/* Custom styles for SmartzProd - Minimalist Professional Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================
   DESIGN TOKENS (Minimalist Palette)
   ========================================== */
:root {
  /* Neutral Colors */
  --neutral-50: #f8f9fa;
  --neutral-100: #f1f3f5;
  --neutral-200: #e9ecef;
  --neutral-300: #dee2e6;
  --neutral-400: #ced4da;
  --neutral-500: #adb5bd;
  --neutral-600: #868e96;
  --neutral-700: #495057;
  --neutral-800: #343a40;
  --neutral-900: #212529;
  
  /* Accent Color (Orange) */
  --accent-500: #f97316;
  --accent-600: #ea580c;
  --accent-700: #c2410c;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Semantic Tokens */
  --bg: var(--neutral-50);
  --surface: #ffffff;
  --fg: var(--neutral-900);
  --fg-muted: var(--neutral-600);
  --border: var(--neutral-300);
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  
  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  
  /* Radii (Subtle) */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  
  /* Shadows (Minimalist) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-focus: 0 0 0 3px rgba(249, 115, 22, 0.2);
  
  /* Transitions (Fast & Purposeful) */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
    background-color: var(--bg);
    font-family: var(--font-sans);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}


/* ==========================================
   ANIMATIONS (Minimalist & Purposeful)
   ========================================== */
   
/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Fade in (reduced motion friendly) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

/* Slide down for expandable content */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* Slide in for toasts */
@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

.animate-slide-in {
    animation: slideIn var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Modal content animation */
#confirmModal:not(.hidden) .modal-content {
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Keyboard hint styling */
kbd {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
}

/* Shimmer effect for buttons */
.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.group:hover .shimmer {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Modal animations */
.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================
   MODAL RESPONSIVE FIXES
   ========================================== */
/* Ensure modals are properly sized on all devices */
#editModal, #confirmModal {
    overscroll-behavior: contain;
}

/* Modal content scrolling on mobile */
@media (max-height: 700px) {
    #editModal > div,
    #confirmModal > div {
        max-height: 85vh;
    }
}

/* Smaller screens - reduce padding */
@media (max-width: 640px) {
    /* Make kbd element more compact on mobile */
    kbd {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Adjust modal icon sizes */
    .modal-content {
        margin: 0.5rem;
    }
}

/* Touch-friendly button sizes on mobile */
@media (max-width: 640px) and (hover: none) {
    button {
        min-height: 44px; /* Apple's minimum touch target */
        min-width: 44px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* ==========================================
   SCROLLBAR (Minimalist)
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-400);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-500);
}

/* ==========================================
   SIDEBAR (Clean & Minimal)
   ========================================== */
#sidebar {
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    background-color: var(--surface);
    border-right: 1px solid var(--border);
}

/* Sidebar collapsed state */
#sidebar.collapsed {
    overflow: visible;
}

#sidebar.collapsed .sidebar-content {
    display: none !important;
    opacity: 0;
}

#sidebar.collapsed .collapsed-icons {
    display: flex !important;
    opacity: 1;
}

/* Collapsed icons positioning */
.collapsed-icons {
    transition: opacity var(--transition-base);
    position: relative;
    z-index: 1000;
}

/* Tooltip positioning for collapsed icons */
.collapsed-icons .group:hover .absolute {
    opacity: 1;
}

/* ==========================================
   FORM INPUTS (Accessible & Clean)
   ========================================== */
   
/* Prevent icon disappearance on focus */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
    position: relative;
    z-index: 1;
    outline: none;
    border-color: var(--accent-500);
    box-shadow: var(--shadow-focus);
}

/* Left icon container - ensure it stays visible */
.relative > .absolute.inset-y-0.left-0 {
    z-index: 2;
    pointer-events: none;
}

/* Right icon container - ensure it stays visible */
.relative > .absolute.inset-y-0.right-0 {
    z-index: 2;
    pointer-events: none;
}

/* Ensure icons stay visible on hover */
input:hover ~ .absolute.inset-y-0,
input:focus ~ .absolute.inset-y-0 {
    z-index: 2;
}

/* Validation Icons - Hidden by default */
i[id$="-valid"],
i[id$="-invalid"] {
    display: none;
}

/* Show validation icons when active */
i[id$="-valid"].show {
    display: inline-block !important;
}

i[id$="-invalid"].show {
    display: inline-block !important;
}

/* ==========================================
   BUTTONS (Minimalist & Accessible)
   ========================================== */
   
/* All buttons - base styles */
button {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-weight: 500;
    min-height: 44px; /* WCAG 2.2 touch target */
    border-radius: var(--radius-md);
}

button:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary action buttons (Quick Actions) */
button[id^="btn"]:not(#menu-toggle):not(#sidebar-toggle-desktop):not(#filters-toggle) {
    transition: all var(--transition-fast);
}

button[id^="btn"]:not(#menu-toggle):not(#sidebar-toggle-desktop):not(#filters-toggle):hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button[id^="btn"]:not(#menu-toggle):not(#sidebar-toggle-desktop):not(#filters-toggle):active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Sidebar toggle buttons */
#menu-toggle,
#sidebar-toggle-desktop {
    transition: all var(--transition-fast);
    background-color: var(--surface);
    border: 1px solid var(--border);
}

#menu-toggle:hover,
#sidebar-toggle-desktop:hover {
    background-color: var(--neutral-100);
    border-color: var(--neutral-400);
}

#menu-toggle:active,
#sidebar-toggle-desktop:active {
    transform: scale(0.95);
}

/* Filters toggle button */
#filters-toggle {
    transition: all var(--transition-fast);
}

#filters-toggle:hover {
    transform: translateY(-1px);
    background-color: var(--neutral-100);
    box-shadow: var(--shadow-sm);
}

#filters-toggle:active {
    transform: translateY(0);
}

/* Ripple effect for buttons (subtle) */
button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before {
    width: 300px;
    height: 300px;
    transition: width 0s, height 0s;
}

/* Clear filters button */
#clearFiltersBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

#clearFiltersBtn:active {
    transform: translateY(0) scale(0.95);
}

/* Input focus styling */
input:focus,
select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: scale(1.01);
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Collapsible animation */
#filters-content {
    overflow: hidden;
    transition: all 0.3s ease;
}

#filters-content.hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Slide in animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Table hover effects */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: linear-gradient(to right, #f9fafb 0%, #f3f4f6 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Enhanced table styling */
table {
    border-collapse: separate;
    border-spacing: 0;
}

/* Table header enhancements */
thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Table cell styling */
tbody td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #374151;
}

/* First column (No) styling */
tbody td:first-child {
    font-weight: 600;
    color: #6b7280;
}

/* Action buttons in table */
tbody button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Remove fixed width/height - let p-3 padding determine size */
tbody button i {
    transition: transform 0.2s ease;
    font-size: 0.875rem; /* text-sm */
}

tbody button:hover i {
    transform: scale(1.1);
}

/* Active state scale down */
tbody button:active {
    transform: scale(0.95) !important;
}

/* Ripple effect */
tbody button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

tbody button:active::before {
    width: 100px;
    height: 100px;
}

tbody button:hover i {
    transform: scale(1.1);
}

/* Ripple effect */
tbody button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

tbody button:active::before {
    width: 100px;
    height: 100px;
}

/* Alternating row colors */
tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Smooth transitions for row hover */
tbody tr:hover td {
    color: #111827;
}


/* Responsive adjustments */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }
    
    main {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 8px 12px;
        white-space: nowrap;
    }
}

/* Print styles */
@media print {
    #sidebar, #menu-toggle, button, .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    .shadow-sm, .shadow-md, .shadow-lg {
        box-shadow: none !important;
    }
    
    .rounded-lg {
        border: 1px solid #e5e7eb;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* Mobile menu toggle */
#sidebar.mobile-open {
    transform: translateX(0);
}

/* Sidebar width transitions */
#sidebar {
    transition: width 0.3s ease-in-out;
}

main {
    transition: margin-left 0.3s ease-in-out;
}

/* Modal Animation */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-modal-in {
    animation: modalIn 0.3s ease-out;
}

/* Toast Container Positioning */
#toastContainer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 500px;
}

@media (max-width: 640px) {
    #toastContainer {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* Sidebar toggle animation for icons */
#sidebar-toggle-desktop {
    transition: all 0.2s ease;
}

#sidebar-toggle-desktop:hover {
    transform: scale(1.1);
}

/* ==========================================
   Individual Charts Per Excavator - Styles
   ========================================== */

/* Excavator Card */
.excavator-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.excavator-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Mobile - Smaller border radius, no hover lift */
@media (max-width: 767px) {
    .excavator-card {
        border-radius: 12px;
    }
    
    .excavator-card:hover {
        transform: none; /* Disable hover lift on mobile */
    }
}

/* Card Header */
.card-header {
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

.card-header:hover {
    filter: brightness(1.05);
}

.card-header:active {
    filter: brightness(0.95);
}

/* Mobile - Compact header padding */
@media (max-width: 767px) {
    .card-header {
        padding: 16px;
    }
}

/* Charts Grid - Collapsible */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
    background: #fafbfc;
    max-height: 1000px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-in-out,
                padding 0.3s ease-in-out;
}

.charts-grid.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

/* Tablet - Stack charts */
@media (max-width: 1023px) {
    .charts-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
}

/* Mobile - Smaller padding and gap */
@media (max-width: 767px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
}

/* Small Mobile - Extra compact */
@media (max-width: 480px) {
    .charts-grid {
        gap: 10px;
        padding: 10px;
    }
}

/* Chart Wrapper */
.chart-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.chart-wrapper:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Tablet - Slightly smaller padding */
@media (max-width: 1023px) {
    .chart-wrapper {
        padding: 18px;
    }
}

/* Mobile - Compact padding */
@media (max-width: 767px) {
    .chart-wrapper {
        padding: 16px;
        border-radius: 10px;
    }
    
    .chart-wrapper:hover {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Disable hover on mobile */
    }
}

/* Small Mobile - Extra compact */
@media (max-width: 480px) {
    .chart-wrapper {
        padding: 12px;
        border-radius: 8px;
    }
}

/* Chart Title */
.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tablet - Slightly smaller */
@media (max-width: 1023px) {
    .chart-title {
        font-size: 13px;
    }
}

/* Mobile - Compact size */
@media (max-width: 767px) {
    .chart-title {
        font-size: 12px;
        margin-bottom: 10px;
        gap: 6px;
    }
}

/* Small Mobile - Extra compact */
@media (max-width: 480px) {
    .chart-title {
        font-size: 11px;
        margin-bottom: 8px;
    }
}

/* Chart Canvas Wrapper */
.chart-canvas-wrapper {
    height: 250px;
    position: relative;
}

/* Tablet - Same height */
@media (max-width: 1023px) {
    .chart-canvas-wrapper {
        height: 250px;
    }
}

/* Mobile - Smaller chart height */
@media (max-width: 767px) {
    .chart-canvas-wrapper {
        height: 200px;
    }
}

/* Small Mobile - Extra compact chart */
@media (max-width: 480px) {
    .chart-canvas-wrapper {
        height: 180px;
    }
}

/* Landscape Mobile - Slightly taller */
@media (max-width: 767px) and (orientation: landscape) {
    .chart-canvas-wrapper {
        height: 220px;
    }
}

/* Chart Statistics Bar */
.chart-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    gap: 8px;
    flex-wrap: wrap;
}

.chart-stats span {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Tablet - Slightly smaller */
@media (max-width: 1023px) {
    .chart-stats {
        gap: 6px;
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .chart-stats span {
        font-size: 10px;
        padding: 4px 7px;
    }
}

/* Mobile - Compact stats */
@media (max-width: 767px) {
    .chart-stats {
        gap: 4px;
        margin-top: 8px;
        padding-top: 8px;
        justify-content: center; /* Center on mobile */
    }
    
    .chart-stats span {
        font-size: 9px;
        padding: 3px 6px;
        border-radius: 4px;
    }
}

/* Small Mobile - Extra compact, 2-column layout */
@media (max-width: 480px) {
    .chart-stats {
        gap: 3px;
        margin-top: 6px;
        padding-top: 6px;
    }
    
    .chart-stats span {
        font-size: 8px;
        padding: 2px 5px;
        flex: 0 0 calc(50% - 2px); /* 2 columns with gap */
        text-align: center;
    }
}

/* Chevron Rotation Animation */
.fa-chevron-down {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fa-chevron-down.rotate-180 {
    transform: rotate(180deg);
}

/* Highlight Flash Animation */
@keyframes highlightFlash {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(59, 130, 246, 0.1);
    }
}

.highlight-flash {
    animation: highlightFlash 1.5s ease-in-out;
}

/* Empty State */
#individualChartsContainer .text-center {
    padding: 48px 24px;
}

@media (max-width: 767px) {
    #individualChartsContainer .text-center {
        padding: 32px 16px;
    }
    
    #individualChartsContainer .text-center i {
        font-size: 2.5rem; /* Smaller icon on mobile */
    }
    
    #individualChartsContainer .text-center h3 {
        font-size: 1.125rem; /* Smaller title on mobile */
    }
    
    #individualChartsContainer .text-center p {
        font-size: 0.875rem; /* Smaller text on mobile */
    }
}

@media (max-width: 480px) {
    #individualChartsContainer .text-center {
        padding: 24px 12px;
    }
}

/* Touch-friendly tap targets */
@media (max-width: 767px) {
    .card-header {
        min-height: 56px; /* Minimum tap target size */
    }
    
    /* Increase chevron icon size for easier tapping */
    .fa-chevron-down {
        font-size: 1.125rem;
        padding: 8px;
    }
}

/* Prevent text selection on mobile during swipe/tap */
@media (max-width: 767px) {
    .excavator-card * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
}

/* Smooth scroll behavior for mobile */
@media (max-width: 767px) {
    #individualChartsContainer {
        scroll-behavior: smooth;
    }
}

/* Loading state optimization for mobile */
@media (max-width: 767px) {
    .chart-stats span {
        line-height: 1.2; /* Tighter line height on mobile */
    }
}

/* Responsive container spacing */
@media (max-width: 767px) {
    #individualChartsContainer {
        margin: 0 -0.5rem; /* Negative margin to use full width on mobile */
    }
    
    .excavator-card {
        margin: 0 0.5rem; /* Add margin back to cards */
    }
}

#sidebar-toggle-desktop i {
    transition: transform 0.3s ease;
}

/* Status badge colors */
.badge-success {
    background-color: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-danger {
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
}

/* Fleet-dash style collapsed icons enhancements */
.collapsed-icons {
    padding-top: 1rem;
}

/* Collapsed sidebar icons animations - Fleet-dash exact match */
.collapsed-icons .group > div {
    transition: all 0.3s ease;
}

.collapsed-icons .group:hover > div {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.collapsed-icons .group:active > div {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* Tooltip animations for collapsed icons - Fleet-dash exact match */
.collapsed-icons .group {
    position: relative;
}

.collapsed-icons .group .absolute {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(10px) translateY(-50%) scale(0.8);
    pointer-events: none;
}

.collapsed-icons .group:hover .absolute {
    transform: translateX(0) translateY(-50%) scale(1);
    z-index: 99999 !important;
}

/* Fleet-dash style collapsed icons enhancements */
.collapsed-icons {
    padding-top: 1rem;
}

/* Collapsed sidebar icons animations - Fleet-dash exact match */
.collapsed-icons .group > div {
    transition: all 0.3s ease;
}

.collapsed-icons .group:hover > div {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.collapsed-icons .group:active > div {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* Tooltip animations for collapsed icons - Fleet-dash exact match */
.collapsed-icons .group {
    position: relative;
}

.collapsed-icons .group .absolute {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(10px) translateY(-50%) scale(0.8);
    pointer-events: none;
}

.collapsed-icons .group:hover .absolute {
    transform: translateX(0) translateY(-50%) scale(1);
    z-index: 99999 !important;
}


/* Chart container styling - ensure full width */
canvas {
    display: block;
    box-sizing: border-box;
}

#matchFactorChart,
#productivityChart {
    max-width: 100% !important;
    width: 100% !important;
}
