/* Phase 4: Industrial Design - Apex Rentals Enterprise Dashboard */

/* Industrial Color Scheme - Steel Blue & Gray */
:root {
    --primary-color: #2563eb;      /* Steel Blue */
    --primary-dark: #1d4ed8;       /* Darker Steel Blue */
    --secondary-color: #64748b;     /* Steel Gray */
    --accent-color: #f59e0b;       /* Industrial Orange */
    --success-color: #10b981;      /* Green */
    --warning-color: #f59e0b;      /* Orange */
    --error-color: #ef4444;        /* Red */
    --background: #f8fafc;         /* Light Gray */
    --surface: #ffffff;            /* White */
    --surface-dark: #1e293b;       /* Dark Gray */
    --text: #1e293b;              /* Dark Text */
    --text-light: #64748b;        /* Light Text */
}

/* Base Layout */
body {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
}

/* Industrial Navigation */
.industrial-navbar {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Industrial Cards - Dispatch Theme */
.industrial-card {
    background: #374151;  /* Dispatch theme background */
    border: 1px solid #4B5563;  /* Dispatch theme border */
    border-radius: 8px;  /* Flat 8px radius */
    box-shadow: none;  /* No shadow - flat design */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.industrial-card:hover {
    transform: translateY(-2px);  /* Subtle hover effect */
    box-shadow: none;  /* No shadow - flat design */
    border-color: #6B7280;  /* Slightly lighter border on hover */
}

/* Dark Theme Cards for Branding Dashboard */
.industrial-card-dark {
    background: #374151 !important;  /* Medium gray - between charcoal and slate */
    border: 1px solid #4B5563 !important;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.industrial-card-dark:hover {
    background: #3F4854 !important;  /* Slightly lighter on hover */
    transform: translateY(-2px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Dark card headers */
.industrial-card-dark .card-header {
    border-bottom: 1px solid #4B5563 !important;
}

/* Ensure text is visible in dark cards */
.industrial-card-dark .card-body {
    background: transparent !important;  /* Don't override the card's dark background */
    color: #E5E7EB !important;
}

.industrial-card-dark label {
    color: #FFFFFF !important;  /* Bright white for maximum contrast */
    font-weight: 500;
}

.industrial-card-dark .text-gray-400,
.industrial-card-dark .text-gray-300 {
    color: #D1D5DB !important;  /* Light gray for descriptions */
}

/* Metric Cards - Dispatch Theme Style */
.metric-card-industrial,
.kpi-card-industrial {
    background: #374151;  /* Dispatch theme background */
    border: 1px solid #4B5563;  /* Dispatch theme border */
    border-radius: 8px;  /* 8px border radius */
    box-shadow: none;  /* No shadows - flat design */
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 8px;
}

.metric-card-industrial:hover,
.kpi-card-industrial:hover {
    transform: translateY(-2px);  /* Subtle hover effect */
    box-shadow: none;  /* No shadows - flat design */
    border-color: #6B7280;  /* Slightly lighter border on hover */
}

.kpi-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kpi-icon {
    font-size: 32px;
    opacity: 1;  /* Full opacity */
    /* Keep multi-color icons - colors preserved from Tailwind classes */
}

.kpi-label {
    font-size: 14px;
    color: #9CA3AF !important;  /* Muted gray text */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF !important;  /* White text for KPI values */
    margin: 4px 0 0 0;
}

/* CRITICAL FIX: Override inline styles with ID + class specificity */
/* Target ALL KPI value elements across all dashboards */
#total-equipment.kpi-value,
#active-rentals.kpi-value,
#monthly-revenue.kpi-value,
#maintenance-due.kpi-value,
#billing-monthly-revenue.kpi-value,
#invoices-sent.kpi-value,
#outstanding-amount.kpi-value,
#collection-rate.kpi-value,
#total-orders.kpi-value,
#pending-approvals.kpi-value,
#monthly-spending.kpi-value,
#user-po-limit.kpi-value,
#dispatch-active-count.kpi-value,
#dispatch-scheduled-count.kpi-value,
#dispatch-enroute-count.kpi-value,
#dispatch-available-drivers.kpi-value,
#support-my-tickets-count.kpi-value,
#support-pending-count.kpi-value,
#support-resolved-count.kpi-value,
p.kpi-value,
.kpi-value {
    color: #FFFFFF !important;  /* Force white text for ALL KPI values */
}

/* FIX: Target specific text elements, NOT icons */
.kpi-card-industrial h1,
.kpi-card-industrial h2,
.kpi-card-industrial h3,
.kpi-card-industrial h4,
.kpi-card-industrial h5,
.kpi-card-industrial h6,
.kpi-card-industrial p,
.kpi-card-industrial span:not(.kpi-icon),
.kpi-card-industrial div:not(.kpi-content) {
    color: #FFFFFF !important;  /* Force white text, but exclude icons */
}

.kpi-card-industrial .kpi-label {
    color: #9CA3AF !important;  /* Muted gray for labels */
}

/* Industrial Buttons */
.btn-industrial-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-industrial-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -3px rgba(37, 99, 235, 0.4);
    cursor: pointer;
}

.btn-industrial-primary:active {
    transform: translateY(0);
}

.btn-industrial-secondary {
    background: var(--surface);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-industrial-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    cursor: pointer;
}

.btn-industrial-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -3px rgba(220, 38, 38, 0.4);
    cursor: pointer;
}

.btn-danger:active {
    transform: translateY(0);
}

/* Ensure all buttons are clickable */
button {
    cursor: pointer;
}

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

/* Industrial Progress Bars */
.progress-industrial {
    background: #e2e8f0;
    border-radius: 4px;
    height: 8px;
}

.progress-bar-industrial {
    border-radius: 4px;
    height: 100%;
    transition: width 0.5s ease-in-out;
}

.progress-bar-industrial.revenue {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.progress-bar-industrial.equipment {
    background: linear-gradient(90deg, var(--accent-color) 0%, #ea580c 100%);
}

.progress-bar-industrial.customers {
    background: linear-gradient(90deg, var(--success-color) 0%, #059669 100%);
}

.progress-bar-industrial.maintenance {
    background: linear-gradient(90deg, var(--warning-color) 0%, #d97706 100%);
}

/* Industrial Navigation Tabs */
.nav-tabs-industrial {
    background: rgba(30, 41, 59, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    max-width: calc(100vw - 200px); /* Leave space for logo and logout */
}

.nav-tabs-industrial::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.nav-tab-industrial {
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
}

.nav-tab-industrial.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-tab-industrial:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive navigation adjustments */
@media (max-width: 1024px) {
    .nav-tab-industrial {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .nav-tabs-industrial {
        max-width: calc(100vw - 120px);
    }
    
    .nav-tab-industrial {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Industrial Modal */
.modal-industrial {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content-industrial {
    background: var(--surface);
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Industrial Forms */
.form-input-industrial {
    background: var(--surface);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    color: var(--text);
}

.form-input-industrial:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Status Badges - Industrial */
.status-badge-industrial {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-rented {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.status-maintenance {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Additional Status Badge Styles */
.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.status-active,
.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-pending,
.status-pending-approval {
    background: #fef3c7;
    color: #92400e;
}

.status-inactive,
.status-cancelled,
.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-draft {
    background: #f3f4f6;
    color: #374151;
}

/* REMOVED: Old muted styles - replaced with vibrant styles below */

.status-overdue {
    background: #fecaca;
    color: #7f1d1d;
}

/* Priority Badges - Vibrant Colors with White Text */
.priority-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.priority-low {
    background: #3B82F6 !important;  /* Bright blue */
    color: #FFFFFF !important;       /* White text */
}

.priority-medium {
    background: #F59E0B !important;  /* Bright orange */
    color: #FFFFFF !important;       /* White text */
}

.priority-high {
    background: #EF4444 !important;  /* Bright red */
    color: #FFFFFF !important;       /* White text */
}

.priority-urgent {
    background: #DC2626 !important;  /* Darker red */
    color: #FFFFFF !important;       /* White text */
}

/* Badge for roles - Vibrant Colors with White Text */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-admin {
    background: #8B5CF6 !important;  /* Purple - highest authority */
    color: #FFFFFF !important;       /* White text */
}

.badge-manager {
    background: #3B82F6 !important;  /* Blue - management */
    color: #FFFFFF !important;       /* White text */
}

.badge-reporter {
    background: #10B981 !important;  /* Green - reporting */
    color: #FFFFFF !important;       /* White text */
}

.badge-staff {
    background: #F59E0B !important;  /* Orange - operations */
    color: #FFFFFF !important;       /* White text */
}

.badge-technician {
    background: #6B7280 !important;  /* Gray - field work */
    color: #FFFFFF !important;       /* White text */
}

/* Status Badges - Vibrant Colors with Good Contrast */
.badge-available,
.status-badge.status-available {
    background: #10B981 !important;  /* Bright green */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-rented,
.status-badge.status-rented,
.badge-active,
.status-badge.status-active {
    background: #3B82F6 !important;  /* Bright blue */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-maintenance,
.status-badge.status-maintenance,
.badge-scheduled,
.status-badge.status-scheduled {
    background: #F59E0B !important;  /* Bright orange */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-retired,
.status-badge.status-retired,
.badge-completed,
.status-badge.status-completed,
.badge-paid,
.status-badge.status-paid {
    background: #10B981 !important;  /* Bright green - success */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-pending,
.status-badge.status-pending {
    background: #8B5CF6 !important;  /* Purple */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-cancelled,
.status-badge.status-cancelled,
.badge-overdue,
.status-badge.status-overdue {
    background: #EF4444 !important;  /* Bright red */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

/* Purchase Order Status Badges - Vibrant Colors */
.status-badge.status-pending-approval,
.badge-pending-approval {
    background: #F59E0B !important;  /* Bright orange - awaiting action */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.status-badge.status-approved,
.badge-approved {
    background: #10B981 !important;  /* Bright green - approved */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.status-badge.status-rejected,
.badge-rejected {
    background: #EF4444 !important;  /* Bright red - rejected */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.status-badge.status-completed,
.badge-completed {
    background: #3B82F6 !important;  /* Bright blue - completed */
    color: #FFFFFF !important;       /* White text */
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

/* OVERRIDE: Ensure .status-badge-industrial also uses vibrant colors */
.status-badge-industrial.status-paid,
.status-badge-industrial.status-available {
    background: #10B981 !important;  /* Bright green */
    color: #FFFFFF !important;       /* White text */
    border: 1px solid #10B981 !important;
}

.status-badge-industrial.status-rented,
.status-badge-industrial.status-active,
.status-badge-industrial.status-invoiced {
    background: #3B82F6 !important;  /* Bright blue */
    color: #FFFFFF !important;       /* White text */
    border: 1px solid #3B82F6 !important;
}

.status-badge-industrial.status-maintenance,
.status-badge-industrial.status-scheduled {
    background: #F59E0B !important;  /* Bright orange */
    color: #FFFFFF !important;       /* White text */
    border: 1px solid #F59E0B !important;
}

.status-badge-industrial.status-overdue {
    background: #EF4444 !important;  /* Bright red */
    color: #FFFFFF !important;       /* White text */
    border: 1px solid #EF4444 !important;
}

.status-badge-industrial.status-retired,
.status-badge-industrial.status-cancelled {
    background: #6B7280 !important;  /* Gray */
    color: #FFFFFF !important;       /* White text */
    border: 1px solid #6B7280 !important;
}

/* Recent Activity - Dark background with white text (dispatch theme) */
#recent-activity-list {
    background: transparent !important;  /* Transparent to show card background */
    padding: 12px;
    border-radius: 6px;
}

#recent-activity-list,
#recent-activity-list *,
#recent-activity-list .activity-item,
#recent-activity-list .activity-item * {
    color: #FFFFFF !important;  /* White text on dark background */
    background: transparent !important;
}

#recent-activity-list .activity-item {
    padding: 8px 0;
    border-bottom: 1px solid #4B5563;  /* Dispatch theme border */
}

#recent-activity-list .activity-item:last-child {
    border-bottom: none;
}

/* Activity timestamps should be muted */
#recent-activity-list .activity-item .text-sm,
#recent-activity-list .activity-item small {
    color: #9CA3AF !important;  /* Muted gray for timestamps */
}

/* Industrial Data Tables */
.data-table-industrial,
.industrial-table {
    background: #374151;  /* Dispatch theme background */
    border-radius: 8px;  /* Flat 8px radius */
    overflow: hidden;
    box-shadow: none;  /* No shadow - flat design */
    border: 1px solid #4B5563;  /* Dispatch theme border */
    width: 100%;
    border-collapse: collapse;
}

.data-table-industrial th,
.industrial-table th {
    background: #2D3748;  /* Darker header background */
    color: #9CA3AF !important;  /* Muted gray text */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 16px;
    border: none;
    text-align: left;
}

.data-table-industrial td,
.industrial-table td {
    padding: 16px;
    border-bottom: 1px solid #4B5563;  /* Dispatch theme border */
    color: #E5E7EB !important;  /* Dispatch theme text */
    background: #374151;  /* Dispatch theme background */
}

.industrial-table td button {
    cursor: pointer;
}

.data-table-industrial tbody tr:hover,
.industrial-table tbody tr:hover {
    background: #404B5A !important;  /* Slightly lighter on hover */
}

.data-table-industrial tbody tr:hover td,
.industrial-table tbody tr:hover td {
    background: #404B5A;  /* Slightly lighter on hover */
}

/* Chart Container - Dispatch Theme */
.chart-container-industrial {
    background: #374151;  /* Dispatch theme background */
    border-radius: 8px;  /* Flat 8px radius */
    padding: 24px;
    box-shadow: none;  /* No shadow - flat design */
    border: 1px solid #4B5563;  /* Dispatch theme border */
}

/* Loading States */
.loading-industrial {
    background: var(--surface);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* Industrial Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .metric-card-industrial {
        margin-bottom: 16px;
    }
    
    .nav-tabs-industrial {
        flex-direction: column;
        gap: 4px;
    }
    
    .nav-tab-industrial {
        text-align: center;
    }
}

/* Tab Content Management */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-content.active {
    display: block !important;
    opacity: 1;
}

/* Dashboard Content Visibility */
.tab-content h2,
.tab-content h3,
.tab-content h4 {
    color: white !important;
}

.tab-content p,
.tab-content span,
.tab-content label {
    color: white;
}

/* Card Headers and Titles */
.card-header {
    background: #2D3748;  /* Darker header background */
    padding: 16px 24px;
    border-bottom: 1px solid #4B5563;  /* Dispatch theme border */
}

.card-title {
    color: #E5E7EB;  /* Dispatch theme text */
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 24px;
    background: #374151;  /* Dispatch theme background */
    color: #E5E7EB;  /* Dispatch theme text */
}

.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6,
.card-body p,
.card-body span,
.card-body div {
    color: #E5E7EB;  /* Dispatch theme text for all elements */
}

/* Form Labels - Dispatch Theme */
.form-label {
    color: #9CA3AF;  /* Muted gray text */
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
}

/* Industrial Utilities */
.text-industrial-primary { color: var(--primary-color); }
.text-industrial-secondary { color: var(--secondary-color); }
.text-industrial-accent { color: var(--accent-color); }
.text-industrial-success { color: var(--success-color); }
.text-industrial-warning { color: var(--warning-color); }
.text-industrial-error { color: var(--error-color); }

.bg-industrial-primary { background-color: var(--primary-color); }
.bg-industrial-secondary { background-color: var(--secondary-color); }
.bg-industrial-surface { background-color: var(--surface); }

/* Industrial Icon Styles */
.icon-industrial {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

/* Notification Styles */
.notification-industrial {
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.notification-success { border-left-color: var(--success-color); }
.notification-warning { border-left-color: var(--warning-color); }
.notification-error { border-left-color: var(--error-color); }

/* Status Badge Styles for Contracts and General Use */
.status-badge-industrial {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Contract Status Styles */
.status-badge-industrial.status-active {
    background-color: #dcfdf7;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-badge-industrial.status-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-badge-industrial.status-expiring {
    background-color: #fed7aa;
    color: #c2410c;
    border: 1px solid #fdba74;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-badge-industrial.status-expired {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #f87171;
}

.status-badge-industrial.status-completed {
    background-color: #ddd6fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.status-badge-industrial.status-cancelled {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* Payment Status Styles */
.status-badge-industrial.status-paid {
    background-color: #dcfdf7;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-badge-industrial.status-invoiced {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.status-badge-industrial.status-overdue {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #f87171;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Equipment Status Styles */
.status-badge-industrial.status-available {
    background-color: #dcfdf7;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-badge-industrial.status-rented {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.status-badge-industrial.status-maintenance {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-badge-industrial.status-retired {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* Customer Type Styles */
.status-badge-industrial.status-individual {
    background-color: #e0e7ff;
    color: #3730a3;
    border: 1px solid #a5b4fc;
}

.status-badge-industrial.status-business {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.status-badge-industrial.status-government {
    background-color: #dcfdf7;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Pulse animation for urgent statuses */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .8;
    }
}
.btn-industrial-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-industrial-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

/* ========================================
   NEW DASHBOARD STYLES
   ======================================== */

/* Status Badges for Dispatch & Support */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-en-route {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-loading {
    background: #fef3c7;
    color: #d97706;
}

.status-delivered {
    background: #d1fae5;
    color: #059669;
}

.status-pickup {
    background: #e0e7ff;
    color: #7c3aed;
}

.status-open {
    background: #fee2e2;
    color: #dc2626;
}

.status-in-progress {
    background: #fef3c7;
    color: #d97706;
}

.status-resolved {
    background: #d1fae5;
    color: #059669;
}

.status-escalated {
    background: #fdf2f8;
    color: #ec4899;
}

/* Priority Badges for Support */
.priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-low {
    background: #f0f9ff;
    color: #0284c7;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-critical {
    background: #fdf2f8;
    color: #ec4899;
    animation: pulse-priority 2s infinite;
}

@keyframes pulse-priority {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Dispatch Map Placeholder */
#dispatch-map {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px dashed #cbd5e1;
    position: relative;
    overflow: hidden;
}

#dispatch-map::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    animation: map-pulse 4s ease-in-out infinite;
}

@keyframes map-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

/* Branding Dashboard Styles */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-group input[type="color"] {
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.color-picker-group input[type="color"]:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

#theme-preview {
    position: relative;
    transition: all 0.3s ease;
}

#theme-preview .bg-blue-600 {
    transition: background-color 0.3s ease;
}

/* Theme Selection Cards */
.theme-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.theme-card.selected {
    border-color: var(--primary-color) !important;
    background: rgba(37, 99, 235, 0.05);
}

/* Support Knowledge Base Cards */
.kb-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.kb-card:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced Table Styles for New Dashboards */
.data-table-industrial tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

/* Loading States for New Dashboards */
.dashboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #64748b;
}

.dashboard-loading i {
    font-size: 2rem;
    margin-right: 12px;
    animation: spin 1s linear infinite;
}

/* Form Enhancements */
.industrial-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Purchase Order Status Badges */
.po-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.po-status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.po-status-pending {
    background: #fef3c7;
    color: #d97706;
    animation: pulse-pending 2s infinite;
}

.po-status-approved {
    background: #d1fae5;
    color: #059669;
}

.po-status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.po-status-ordered {
    background: #dbeafe;
    color: #1d4ed8;
}

.po-status-received {
    background: #e0f2fe;
    color: #0277bd;
}

.po-status-cancelled {
    background: #fdf2f8;
    color: #ec4899;
}

@keyframes pulse-pending {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Purchase Order Form Enhancements */
.requisition-form-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.requisition-form-section h4 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Purchase Order Approval Actions */
.po-approval-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.po-approval-actions button {
    padding: 6px 8px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.po-approval-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dispatch Order Cards - Ensure all text is visible on dark background */
.industrial-card-dark .card-body p,
.industrial-card-dark .card-body span,
.industrial-card-dark .card-body div {
    color: #E5E7EB !important;  /* Light gray for all text */
}

.industrial-card-dark .card-body h1,
.industrial-card-dark .card-body h2,
.industrial-card-dark .card-body h3,
.industrial-card-dark .card-body h4,
.industrial-card-dark .card-body h5,
.industrial-card-dark .card-body h6 {
    color: #FFFFFF !important;  /* Pure white for headings */
}

/* Responsive Adjustments for New Dashboards */
@media (max-width: 768px) {
    .nav-tabs-row-industrial {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs-row-industrial::-webkit-scrollbar {
        display: none;
    }
    
    .status-badge, .priority-badge, .po-status-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    #dispatch-map {
        height: 200px;
    }
    
    .po-approval-actions {
        flex-direction: column;
        gap: 4px;
    }
}

/* ========================================
   INSIGHTS DASHBOARD SPECIFIC FIXES
   ======================================== */

/* Insights Dashboard - All text should be white on dark backgrounds */
#content-insights {
    color: #FFFFFF !important;  /* Default white text */
}

/* Insights Dashboard - Industrial card text (charts) */
#content-insights .industrial-card,
#content-insights .industrial-card * {
    color: #FFFFFF !important;  /* White text in dark cards */
}

#content-insights .industrial-card .card-header {
    background: #2D3748 !important;  /* Dark header */
}

#content-insights .industrial-card .card-header,
#content-insights .industrial-card .card-header * {
    color: #E5E7EB !important;  /* Light text in headers */
}

#content-insights .industrial-card .card-body {
    background: #374151 !important;  /* Dispatch theme background */
}

#content-insights .industrial-card .card-body,
#content-insights .industrial-card .card-body * {
    color: #FFFFFF !important;  /* White text in card body */
}

/* Insights Dashboard - Chart canvas elements */
#content-insights canvas {
    /* Canvas itself doesn't need color - Chart.js handles it */
}

/* Insights Dashboard - Actionable insights container */
#actionable-insights-container {
    background: transparent !important;
}

#actionable-insights-container,
#actionable-insights-container *,
#actionable-insights-container .insight-item,
#actionable-insights-container .insight-item *,
#actionable-insights-container .recommendation-item,
#actionable-insights-container .recommendation-item *,
#actionable-insights-container div,
#actionable-insights-container p,
#actionable-insights-container span,
#actionable-insights-container strong,
#actionable-insights-container em {
    color: #1F2937 !important;  /* Dark text for readability on light background */
    background: transparent;
}

/* Insight cards with colored backgrounds */
#actionable-insights-container .insight-item,
#actionable-insights-container .recommendation-item {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Make sure headings in insights are dark */
#actionable-insights-container h4,
#actionable-insights-container h5,
#actionable-insights-container h6 {
    color: #1F2937 !important;
    font-weight: 700;
}

/* Insights Dashboard - Recommendation cards (if they exist) */
#content-insights .insight-card,
#content-insights .recommendation-card {
    background: #374151 !important;  /* Dark background */
    border: 1px solid #4B5563 !important;
}

#content-insights .insight-card *,
#content-insights .recommendation-card * {
    color: #FFFFFF !important;  /* White text */
}

/* Insights Dashboard - Location filter dropdown */
#content-insights #insights-location-filter {
    background: #374151 !important;
    border: 1px solid #4B5563 !important;
    color: #FFFFFF !important;
}

#content-insights #insights-location-filter option {
    background: #374151 !important;
    color: #FFFFFF !important;
}

/* Insights Dashboard - Labels and helper text */
#content-insights label,
#content-insights .text-sm,
#content-insights .text-gray-300 {
    color: #E5E7EB !important;  /* Light gray text */
}
