﻿/* ============================================
   TOYOTA LEADS - LIGHT THEME
   Professional Toyota Brand Styling
   Matching Underwriting Design System
   Works with existing Leads.razor HTML
   ============================================ */

/* === COLOR VARIABLES === */
.theme-light, :root {
    --leads-toyota-red: #eb0a1e;
    --leads-toyota-red-dark: #c20818;
    --leads-toyota-red-light: #ff4d5e;
    --leads-bg: #f8fafc;
    --leads-card: #ffffff;
    --leads-border: #e2e8f0;
    --leads-text: #1e293b;
    --leads-text-sec: #64748b;
    --leads-text-muted: #94a3b8;
    --leads-success: #10b981;
    --leads-danger: #ef4444;
    --leads-warning: #f59e0b;
    --leads-info: #3b82f6;
    --leads-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --leads-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --leads-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

    /* === LAYOUT === */
    .theme-light .leads-container, .leads-container {
        background: var(--leads-bg);
        color: var(--leads-text);
    }

    /* === HEADER (Matching uw-dashboard-header) === */
    .theme-light .leads-header, .leads-header {
        background: linear-gradient(135deg, var(--leads-toyota-red) 0%, var(--leads-toyota-red-dark) 100%);
        box-shadow: var(--leads-shadow-lg);
    }

    .theme-light .leads-dashboard-title h1,
    .theme-light .leads-title,
    .leads-dashboard-title h1,
    .leads-title {
        color: white;
    }

    .theme-light .leads-dashboard-title p,
    .theme-light .leads-subtitle,
    .leads-dashboard-title p,
    .leads-subtitle {
        color: rgba(255, 255, 255, 0.9);
    }

    /* === STATS CARDS === */
    .theme-light .stat-card, .stat-card {
        background: var(--leads-card);
        border-color: var(--leads-border);
        box-shadow: var(--leads-shadow-sm);
    }

        .theme-light .stat-card:hover, .stat-card:hover {
            box-shadow: var(--leads-shadow-md);
        }

    .theme-light .stat-label, .stat-label {
        color: var(--leads-text-sec);
    }

    .theme-light .stat-value, .stat-value {
        color: var(--leads-text);
    }

    /* Stat Icon Colors */
    .theme-light .stat-icon-primary, .stat-icon-primary {
        color: var(--leads-toyota-red);
    }

    .theme-light .stat-icon-secondary, .stat-icon-secondary {
        color: var(--leads-info);
    }

    .theme-light .stat-icon-success, .stat-icon-success {
        color: var(--leads-success);
    }

    .theme-light .stat-icon-warning, .stat-icon-warning {
        color: var(--leads-warning);
    }

    /* === SEARCH & FILTERS === */
    .theme-light .search-icon, .search-icon {
        color: var(--leads-text-muted);
    }

    .theme-light .search-input, .search-input {
        background: white;
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-light .search-input:focus, .search-input:focus {
            border-color: var(--leads-toyota-red);
            box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.1);
        }

        .theme-light .search-input::placeholder, .search-input::placeholder {
            color: var(--leads-text-muted);
        }

    /* === FILTER BUTTONS === */
    .theme-light .filter-btn, .filter-btn {
        background: white;
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-light .filter-btn:hover, .filter-btn:hover {
            border-color: var(--leads-toyota-red);
            background: #fee2e2;
            color: var(--leads-toyota-red);
            box-shadow: var(--leads-shadow-sm);
        }

    .theme-light .filter-btn-active, .filter-btn-active {
        background: var(--leads-toyota-red);
        color: white;
        border-color: var(--leads-toyota-red);
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
    }

        .theme-light .filter-btn-active:hover, .filter-btn-active:hover {
            background: var(--leads-toyota-red-dark);
            border-color: var(--leads-toyota-red-dark);
        }

    /* Refresh Button */
    .theme-light .leads-refresh,
    .theme-light .leads-dashboard-refresh,
    .leads-refresh,
    .leads-dashboard-refresh {
        background: white;
        color: var(--leads-text);
        border-color: var(--leads-border);
        box-shadow: var(--leads-shadow-sm);
    }

        .theme-light .leads-refresh:hover,
        .theme-light .leads-dashboard-refresh:hover,
        .leads-refresh:hover,
        .leads-dashboard-refresh:hover {
            background: var(--leads-toyota-red);
            color: white;
            border-color: var(--leads-toyota-red);
            box-shadow: var(--leads-shadow-md);
        }

    /* === LEAD CARDS === */
    .theme-light .lead-card, .lead-card {
        background: var(--leads-card);
        border-color: var(--leads-border);
        box-shadow: var(--leads-shadow-sm);
    }

        .theme-light .lead-card:hover, .lead-card:hover {
            box-shadow: var(--leads-shadow-md);
        }

    .theme-light .lead-name, .lead-name {
        color: var(--leads-text);
    }

    .theme-light .lead-info-item, .lead-info-item {
        color: var(--leads-text-sec);
    }

        .theme-light .lead-info-item i, .lead-info-item i {
            color: var(--leads-text-muted);
        }

    .theme-light .info-label, .info-label {
        color: var(--leads-text);
    }

    /* === BADGES === */
    .theme-light .badge-fourbuy, .badge-fourbuy {
        background: #dbeafe;
        color: var(--leads-info);
        border-color: var(--leads-info);
    }

    .theme-light .badge-timnet, .badge-timnet {
        background: #d1fae5;
        color: var(--leads-success);
        border-color: var(--leads-success);
    }

    .theme-light .badge-warning, .badge-warning {
        background: #fef3c7;
        color: #92400e;
        border-color: var(--leads-warning);
    }

    .theme-light .badge-success, .badge-success {
        background: #d1fae5;
        color: #065f46;
        border-color: var(--leads-success);
    }

    /* === VEHICLE INFO === */
    .theme-light .lead-vehicle-info, .lead-vehicle-info {
        background: var(--leads-bg);
        border-color: var(--leads-border);
    }

    .theme-light .vehicle-text, .vehicle-text {
        color: var(--leads-text-sec);
    }

    /* === BUTTONS === */
    .theme-light .btn-primary, .btn-primary {
        background: var(--leads-toyota-red);
        color: white;
        border: none;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
    }

        .theme-light .btn-primary:hover:not(:disabled), .btn-primary:hover:not(:disabled) {
            background: var(--leads-toyota-red-dark);
            box-shadow: 0 4px 12px rgba(235, 10, 30, 0.35);
        }

        .theme-light .btn-primary:disabled, .btn-primary:disabled {
            background: var(--leads-text-muted);
        }

    .theme-light .btn-secondary, .btn-secondary {
        background: white;
        color: var(--leads-text);
        border: 2px solid var(--leads-border);
    }

        .theme-light .btn-secondary:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
            border-color: var(--leads-toyota-red);
            color: var(--leads-toyota-red);
            background: #fee2e2;
        }

        .theme-light .btn-secondary:disabled, .btn-secondary:disabled {
            background: var(--leads-bg);
            color: var(--leads-text-muted);
            border-color: var(--leads-border);
        }

    .theme-light .btn-allocate, .btn-allocate {
        background: var(--leads-toyota-red);
        color: white;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
    }

        .theme-light .btn-allocate:hover:not(:disabled), .btn-allocate:hover:not(:disabled) {
            background: var(--leads-toyota-red-dark);
            box-shadow: 0 4px 12px rgba(235, 10, 30, 0.35);
        }

    /* === EMPTY STATE === */
    .theme-light .empty-state, .empty-state {
        background: var(--leads-bg);
        color: var(--leads-text-muted);
    }

    .theme-light .empty-icon, .empty-icon {
        color: var(--leads-text-muted);
    }

    .theme-light .empty-text, .empty-text {
        color: var(--leads-text-sec);
    }

    /* === LOADING SPINNER === */
    .theme-light .spinner-border, .spinner-border {
        color: var(--leads-toyota-red);
    }

    .theme-light .text-primary, .text-primary {
        color: var(--leads-toyota-red) !important;
    }

    /* === TEXT UTILITIES === */
    .theme-light .text-muted, .text-muted {
        color: var(--leads-text-muted);
    }

    /* === SCROLLBAR === */
    .theme-light ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .theme-light ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 4px;
    }

    .theme-light ::-webkit-scrollbar-thumb {
        background: rgba(235, 10, 30, 0.3);
        border-radius: 4px;
    }

        .theme-light ::-webkit-scrollbar-thumb:hover {
            background: var(--leads-toyota-red);
        }

    /* === FOCUS STYLES === */
    .theme-light *:focus-visible {
        outline: 2px solid var(--leads-toyota-red);
        outline-offset: 2px;
    }

    /* === BOOTSTRAP OVERRIDES === */
    .theme-light .form-control, .form-control {
        background: white;
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-light .form-control:focus, .form-control:focus {
            border-color: var(--leads-toyota-red);
            box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.1);
        }

/* === ANIMATIONS === */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.theme-light .spinner-border, .spinner-border {
    animation: spin 1s linear infinite;
}

/* === PRINT STYLES === */
@media print {
    .theme-light .leads-container {
        background: white !important;
        color: black !important;
    }

    .theme-light .leads-header {
        background: white !important;
        border-bottom: 2px solid var(--leads-toyota-red) !important;
    }

    .theme-light .leads-title {
        color: var(--leads-toyota-red) !important;
    }

    .theme-light .filter-section,
    .theme-light .lead-actions {
        display: none !important;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-contrast: high) {
    .theme-light {
        --leads-border: rgba(0, 0, 0, 0.3);
        --leads-text: #000000;
        --leads-text-sec: #1a1a1a;
    }

        .theme-light .lead-card,
        .theme-light .stat-card {
            border-width: 2px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .theme-light * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .theme-light .spinner-border {
        animation: none;
    }
}
/* ============================================
   TOYOTA LEADS - DARK THEME
   Professional Toyota Brand Styling
   Matching Underwriting Dark Theme
   Works with existing Leads.razor HTML
   ============================================ */

/* === COLOR VARIABLES === */
.theme-dark {
    --leads-toyota-red: #eb0a1e;
    --leads-toyota-red-dark: #c20818;
    --leads-toyota-red-light: #ff1a2e;
    --leads-bg: #0f0f0f;
    --leads-card: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    --leads-card-solid: #1a1a1a;
    --leads-border: rgba(255,255,255,0.1);
    --leads-border-light: rgba(255,255,255,0.05);
    --leads-text: rgba(255,255,255,0.95);
    --leads-text-sec: rgba(255,255,255,0.7);
    --leads-text-muted: rgba(255,255,255,0.5);
    --leads-success: #22c55e;
    --leads-danger: #ef4444;
    --leads-warning: #f59e0b;
    --leads-info: #3b82f6;
    --leads-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --leads-shadow-md: 0 4px 12px rgb(0 0 0 / 0.3);
    --leads-shadow-lg: 0 10px 30px rgb(0 0 0 / 0.5);
}

    /* === LAYOUT === */
    .theme-dark .leads-container {
        background: var(--leads-bg);
        color: var(--leads-text);
    }

    /* === HEADER === */
    .theme-dark .leads-header {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
        border-bottom: 1px solid var(--leads-border);
        box-shadow: var(--leads-shadow-lg);
    }

        .theme-dark .leads-header::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 200px;
            height: 200px;
            background: rgba(255,255,255,0.05);
            border-radius: 50%;
            transform: translate(50px,-50px);
        }

    .theme-dark .leads-dashboard-title h1,
    .theme-dark .leads-title {
        color: white;
    }

    .theme-dark .leads-dashboard-title p,
    .theme-dark .leads-subtitle {
        color: rgba(255, 255, 255, 0.9);
    }

    /* === SEARCH & FILTERS === */
    .theme-dark .search-icon {
        color: var(--leads-text-muted);
    }

    .theme-dark .search-input {
        background: rgba(255,255,255,0.05);
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-dark .search-input::placeholder {
            color: var(--leads-text-muted);
        }

        .theme-dark .search-input:focus {
            border-color: var(--leads-toyota-red);
            box-shadow: 0 0 0 3px rgba(235,10,30,0.2);
            background: rgba(255,255,255,0.08);
        }

    .theme-dark .clear-search {
        color: var(--leads-text-muted);
    }

        .theme-dark .clear-search:hover {
            background: rgba(239,68,68,0.2);
            color: var(--leads-danger);
        }

    /* Filter Dropdown */
    .theme-dark .filter-selected {
        background: rgba(255,255,255,0.05);
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-dark .filter-selected:hover {
            border-color: var(--leads-toyota-red);
            background: rgba(235,10,30,0.1);
            box-shadow: 0 0 12px rgba(235,10,30,0.3);
        }

    .theme-dark .filter-options {
        background: var(--leads-card);
        border-color: var(--leads-border);
        box-shadow: var(--leads-shadow-lg);
    }

    .theme-dark .filter-option {
        background: transparent;
        color: var(--leads-text);
    }

        .theme-dark .filter-option:hover {
            background: rgba(235,10,30,0.15);
            color: var(--leads-toyota-red);
        }

        .theme-dark .filter-option.selected {
            background: rgba(235,10,30,0.2);
            color: var(--leads-toyota-red);
        }

    /* Toggle Switch */
    .theme-dark .slider {
        background-color: rgba(255,255,255,0.2);
    }

    .theme-dark input:checked + .slider {
        background-color: var(--leads-toyota-red);
    }

    .theme-dark .switch-label {
        color: white;
    }

    /* Refresh Button */
    .theme-dark .leads-refresh,
    .theme-dark .leads-dashboard-refresh {
        background: rgba(255,255,255,0.05);
        border-color: var(--leads-border);
        color: var(--leads-text);
        box-shadow: var(--leads-shadow-sm);
    }

        .theme-dark .leads-refresh:hover,
        .theme-dark .leads-dashboard-refresh:hover {
            background: var(--leads-toyota-red);
            color: white;
            border-color: var(--leads-toyota-red);
            box-shadow: 0 0 16px rgba(235,10,30,0.4);
        }

    /* === STATS CARDS === */
    .theme-dark .stat-card {
        background: var(--leads-card);
        border-color: var(--leads-border);
        box-shadow: var(--leads-shadow-sm);
    }

        .theme-dark .stat-card:hover {
            box-shadow: 0 8px 20px rgba(0,0,0,0.5);
            border-color: var(--leads-toyota-red);
        }

    .theme-dark .stat-label {
        color: var(--leads-text-sec);
    }

    .theme-dark .stat-value {
        color: var(--leads-text);
    }

    /* Stat Icon Colors */
    .theme-dark .stat-icon-primary {
        color: var(--leads-toyota-red);
    }

    .theme-dark .stat-icon-secondary {
        color: var(--leads-info);
    }

    .theme-dark .stat-icon-success {
        color: var(--leads-success);
    }

    .theme-dark .stat-icon-warning {
        color: var(--leads-warning);
    }

    /* === FILTER BUTTONS === */
    .theme-dark .filter-btn {
        background: rgba(255,255,255,0.05);
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-dark .filter-btn:hover {
            border-color: var(--leads-toyota-red);
            background: rgba(235,10,30,0.15);
            color: var(--leads-toyota-red);
            box-shadow: 0 0 12px rgba(235,10,30,0.3);
        }

    .theme-dark .filter-btn-active {
        background: linear-gradient(135deg, var(--leads-toyota-red) 0%, var(--leads-toyota-red-dark) 100%);
        color: white;
        border-color: var(--leads-toyota-red);
        box-shadow: 0 2px 8px rgba(235,10,30,0.3);
    }

        .theme-dark .filter-btn-active:hover {
            background: linear-gradient(135deg, var(--leads-toyota-red-light) 0%, var(--leads-toyota-red) 100%);
            box-shadow: 0 4px 12px rgba(235,10,30,0.4), 0 0 20px rgba(235,10,30,0.2);
        }

    /* === LEAD CARDS === */
    .theme-dark .lead-card {
        background: var(--leads-card);
        border-color: var(--leads-border);
        box-shadow: var(--leads-shadow-sm);
    }

        .theme-dark .lead-card:hover {
            box-shadow: 0 8px 20px rgba(0,0,0,0.5);
            border-color: var(--leads-toyota-red);
        }

    .theme-dark .lead-name {
        color: var(--leads-text);
    }

    .theme-dark .lead-info-item {
        color: var(--leads-text-sec);
    }

        .theme-dark .lead-info-item i {
            color: var(--leads-text-muted);
        }

    .theme-dark .info-label {
        color: var(--leads-text);
    }

    /* === BADGES === */
    .theme-dark .badge-fourbuy {
        background: rgba(59, 130, 246, 0.2);
        color: #93c5fd;
        border-color: var(--leads-info);
    }

    .theme-dark .badge-timnet {
        background: rgba(34, 197, 94, 0.2);
        color: #86efac;
        border-color: var(--leads-success);
    }

    .theme-dark .badge-warning {
        background: rgba(245, 158, 11, 0.2);
        color: #fcd34d;
        border-color: var(--leads-warning);
    }

    .theme-dark .badge-success {
        background: rgba(34, 197, 94, 0.2);
        color: #86efac;
        border-color: var(--leads-success);
    }

    /* === VEHICLE INFO === */
    .theme-dark .lead-vehicle-info {
        background: rgba(255,255,255,0.03);
        border-color: var(--leads-border);
    }

    .theme-dark .vehicle-text {
        color: var(--leads-text-sec);
    }

    /* === BUTTONS === */
    .theme-dark .btn-primary {
        background: linear-gradient(135deg, var(--leads-toyota-red) 0%, var(--leads-toyota-red-dark) 100%);
        color: white;
        border: none;
        box-shadow: 0 2px 8px rgba(235,10,30,0.3);
    }

        .theme-dark .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--leads-toyota-red-light) 0%, var(--leads-toyota-red) 100%);
            box-shadow: 0 4px 12px rgba(235,10,30,0.4), 0 0 20px rgba(235,10,30,0.2);
        }

        .theme-dark .btn-primary:disabled {
            background: rgba(255,255,255,0.1);
            color: var(--leads-text-muted);
        }

    .theme-dark .btn-secondary {
        background: rgba(255,255,255,0.05);
        color: var(--leads-text);
        border: 2px solid var(--leads-border);
    }

        .theme-dark .btn-secondary:hover:not(:disabled) {
            border-color: var(--leads-toyota-red);
            color: var(--leads-toyota-red);
            background: rgba(235,10,30,0.1);
        }

        .theme-dark .btn-secondary:disabled {
            background: rgba(255,255,255,0.03);
            color: var(--leads-text-muted);
            border-color: var(--leads-border-light);
        }

    .theme-dark .btn-allocate {
        background: linear-gradient(135deg, var(--leads-toyota-red) 0%, var(--leads-toyota-red-dark) 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(235,10,30,0.3);
    }

        .theme-dark .btn-allocate:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--leads-toyota-red-light) 0%, var(--leads-toyota-red) 100%);
            box-shadow: 0 4px 12px rgba(235,10,30,0.4), 0 0 20px rgba(235,10,30,0.2);
        }

    /* === EMPTY STATE === */
    .theme-dark .empty-state {
        background: transparent;
        color: var(--leads-text-muted);
    }

    .theme-dark .empty-icon {
        color: var(--leads-text-muted);
    }

    .theme-dark .empty-text {
        color: var(--leads-text-sec);
    }

    /* === LOADING SPINNER === */
    .theme-dark .spinner-border {
        color: var(--leads-toyota-red);
        border-color: var(--leads-toyota-red);
    }

    .theme-dark .text-primary {
        color: var(--leads-toyota-red) !important;
    }

    /* === TEXT UTILITIES === */
    .theme-dark .text-muted {
        color: var(--leads-text-muted);
    }

    /* === SCROLLBAR === */
    .theme-dark ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .theme-dark ::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    .theme-dark ::-webkit-scrollbar-thumb {
        background: rgba(235,10,30,0.5);
        border-radius: 4px;
    }

        .theme-dark ::-webkit-scrollbar-thumb:hover {
            background: var(--leads-toyota-red);
        }

    /* === FOCUS STYLES === */
    .theme-dark *:focus-visible {
        outline: 2px solid var(--leads-toyota-red);
        outline-offset: 2px;
    }

    /* === BOOTSTRAP OVERRIDES === */
    .theme-dark .form-control {
        background: rgba(255,255,255,0.05);
        border-color: var(--leads-border);
        color: var(--leads-text);
    }

        .theme-dark .form-control:focus {
            border-color: var(--leads-toyota-red);
            box-shadow: 0 0 0 3px rgba(235,10,30,0.2);
            background: rgba(255,255,255,0.08);
        }

        .theme-dark .form-control::placeholder {
            color: var(--leads-text-muted);
        }

/* === ANIMATIONS === */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.theme-dark .spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === PRINT STYLES === */
@media print {
    .theme-dark .leads-container {
        background: white !important;
        color: black !important;
    }

    .theme-dark .leads-header {
        background: white !important;
        border-bottom: 2px solid var(--leads-toyota-red) !important;
    }

    .theme-dark .leads-title,
    .theme-dark .leads-dashboard-title h1 {
        color: var(--leads-toyota-red) !important;
    }

    .theme-dark .filter-section,
    .theme-dark .lead-actions {
        display: none !important;
    }

    .theme-dark .lead-card,
    .theme-dark .stat-card {
        background: white !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-contrast: high) {
    .theme-dark {
        --leads-border: rgba(255,255,255,0.3);
        --leads-text: #ffffff;
        --leads-text-sec: rgba(255,255,255,0.85);
    }

        .theme-dark .lead-card,
        .theme-dark .stat-card {
            border-width: 2px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .theme-dark * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .theme-dark .spinner-border {
        animation: none;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .theme-dark .leads-header {
        margin: 1rem;
        padding: 1.5rem;
    }
}
/* ============================================
   SF-CARD (STAT + FILTER) THEME OVERRIDES
   Light Theme
   ============================================ */

/* Light: container background */
.leads-container,
.theme-light .leads-container {
    background: var(--leads-bg);
    color: var(--leads-text);
}

/* Light: sf-card base */
.sf-card,
.theme-light .sf-card {
    background: var(--leads-card);
    border-color: var(--leads-border);
    box-shadow: var(--leads-shadow-sm);
}

    .sf-card:hover,
    .theme-light .sf-card:hover {
        box-shadow: var(--leads-shadow-md);
        border-color: #cbd5e1;
    }

/* sf-count / sf-label */
.sf-count,
.theme-light .sf-count {
    color: var(--leads-text);
}

.sf-label,
.theme-light .sf-label {
    color: var(--leads-text-sec);
}

/* Icon backgrounds — light */
.sfi-all,
.theme-light .sfi-all {
    background: rgba(235,10,30,0.10);
    color: #c20818;
}

.sfi-timnet,
.theme-light .sfi-timnet {
    background: rgba(59,130,246,0.10);
    color: #2563eb;
}

.sfi-unallocated,
.theme-light .sfi-unallocated {
    background: rgba(245,158,11,0.12);
    color: #b45309;
}

.sfi-allocated,
.theme-light .sfi-allocated {
    background: rgba(16,185,129,0.12);
    color: #059669;
}

/* Active states — light */
.sf-card-all.sf-card-active,
.theme-light .sf-card-all.sf-card-active {
    background: rgba(235,10,30,0.06);
    border-color: rgba(235,10,30,0.3) !important;
    box-shadow: 0 0 0 1px rgba(235,10,30,0.15), 0 4px 14px rgba(235,10,30,0.08);
}

    .sf-card-all.sf-card-active::after,
    .theme-light .sf-card-all.sf-card-active::after {
        background: #eb0a1e;
    }

    .sf-card-all.sf-card-active .sf-count,
    .theme-light .sf-card-all.sf-card-active .sf-count {
        color: #c20818;
    }

.sf-card-timnet.sf-card-active,
.theme-light .sf-card-timnet.sf-card-active {
    background: rgba(59,130,246,0.07);
    border-color: rgba(59,130,246,0.3) !important;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.15), 0 4px 14px rgba(59,130,246,0.08);
}

    .sf-card-timnet.sf-card-active::after,
    .theme-light .sf-card-timnet.sf-card-active::after {
        background: #2563eb;
    }

    .sf-card-timnet.sf-card-active .sf-count,
    .theme-light .sf-card-timnet.sf-card-active .sf-count {
        color: #1d4ed8;
    }

.sf-card-unallocated.sf-card-active,
.theme-light .sf-card-unallocated.sf-card-active {
    background: rgba(245,158,11,0.07);
    border-color: rgba(245,158,11,0.3) !important;
    box-shadow: 0 0 0 1px rgba(245,158,11,0.15), 0 4px 14px rgba(245,158,11,0.07);
}

    .sf-card-unallocated.sf-card-active::after,
    .theme-light .sf-card-unallocated.sf-card-active::after {
        background: #f59e0b;
    }

    .sf-card-unallocated.sf-card-active .sf-count,
    .theme-light .sf-card-unallocated.sf-card-active .sf-count {
        color: #b45309;
    }

.sf-card-allocated.sf-card-active,
.theme-light .sf-card-allocated.sf-card-active {
    background: rgba(16,185,129,0.07);
    border-color: rgba(16,185,129,0.3) !important;
    box-shadow: 0 0 0 1px rgba(16,185,129,0.15), 0 4px 14px rgba(16,185,129,0.07);
}

    .sf-card-allocated.sf-card-active::after,
    .theme-light .sf-card-allocated.sf-card-active::after {
        background: #10b981;
    }

    .sf-card-allocated.sf-card-active .sf-count,
    .theme-light .sf-card-allocated.sf-card-active .sf-count {
        color: #059669;
    }

/* Light: lead card */
.lead-card,
.theme-light .lead-card {
    background: var(--leads-card);
    border-color: var(--leads-border);
}

    .lead-card:hover,
    .theme-light .lead-card:hover {
        box-shadow: var(--leads-shadow-md);
        border-color: #cbd5e1;
    }

.lead-name,
.theme-light .lead-name {
    color: var(--leads-text);
}

/* Accent bars */
.accent-timnet,
.theme-light .accent-timnet {
    background: #2563eb;
}

.accent-fourbuy,
.theme-light .accent-fourbuy {
    background: #eb0a1e;
}

/* Badges — light */
.badge-timnet,
.theme-light .badge-timnet {
    background: rgba(59,130,246,0.12);
    color: #1d4ed8;
    border: 1px solid rgba(59,130,246,0.3);
}

.badge-fourbuy,
.theme-light .badge-fourbuy {
    background: rgba(235,10,30,0.10);
    color: #c20818;
    border: 1px solid rgba(235,10,30,0.25);
}

.badge-unallocated,
.theme-light .badge-unallocated {
    background: rgba(245,158,11,0.12);
    color: #92400e;
    border: 1px solid rgba(245,158,11,0.3);
}

.badge-allocated,
.theme-light .badge-allocated {
    background: rgba(16,185,129,0.12);
    color: #065f46;
    border: 1px solid rgba(16,185,129,0.25);
}

/* Meta labels/values — light */
.meta-icon,
.theme-light .meta-icon {
    color: #94a3b8;
}

.meta-label,
.theme-light .meta-label {
    color: #64748b;
}

.meta-value,
.theme-light .meta-value {
    color: #334155;
}

.meta-email,
.theme-light .meta-email {
    color: #2563eb;
}

.meta-premium,
.theme-light .meta-premium {
    color: #059669;
    font-weight: 600;
}

/* Allocation footer — light */
.lead-allocation-footer,
.theme-light .lead-allocation-footer {
    border-top: 1px solid var(--leads-border);
    color: #64748b;
}

    .lead-allocation-footer i,
    .theme-light .lead-allocation-footer i {
        color: #10b981;
    }

    .lead-allocation-footer strong,
    .theme-light .lead-allocation-footer strong {
        color: #334155;
    }

.allocation-time,
.theme-light .allocation-time {
    color: #94a3b8;
}

/* Buttons — light */
.btn-allocate,
.theme-light .btn-allocate {
    background: var(--leads-toyota-red);
    color: #fff;
}

    .btn-allocate:hover:not(:disabled),
    .theme-light .btn-allocate:hover:not(:disabled) {
        background: var(--leads-toyota-red-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(235,10,30,0.3);
    }

    .btn-allocate:disabled,
    .theme-light .btn-allocate:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-already-allocated,
.theme-light .btn-already-allocated {
    background: rgba(16,185,129,0.08);
    color: #059669;
    border: 1px solid rgba(16,185,129,0.25);
    cursor: not-allowed;
    opacity: 0.85;
}

.btn-view-details,
.theme-light .btn-view-details {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

    .btn-view-details:hover,
    .theme-light .btn-view-details:hover {
        background: #e2e8f0;
        color: #1e293b;
        border-color: #cbd5e1;
    }

/* Search — light */
.search-input,
.theme-light .search-input {
    background: #fff;
    border-color: var(--leads-border);
    color: var(--leads-text);
}

    .search-input::placeholder,
    .theme-light .search-input::placeholder {
        color: var(--leads-text-muted);
    }

    .search-input:focus,
    .theme-light .search-input:focus {
        border-color: var(--leads-toyota-red);
        box-shadow: 0 0 0 3px rgba(235,10,30,0.10);
    }

.search-wrapper .search-icon,
.theme-light .search-wrapper .search-icon {
    color: var(--leads-text-muted);
}

/* Highlighted card — light */
.lead-card-highlighted,
.theme-light .lead-card-highlighted {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.18), 0 4px 24px rgba(245,158,11,0.18);
}

/* Empty state — light */
.empty-state,
.theme-light .empty-state {
    color: var(--leads-text-muted);
}

.empty-icon,
.theme-light .empty-icon {
    color: var(--leads-text-muted);
}

.empty-text,
.theme-light .empty-text {
    color: var(--leads-text-sec);
}

/* ============================================
   SF-CARD DARK THEME OVERRIDES
   ============================================ */

/* Dark: sf-card base */
.theme-dark .sf-card {
    background: #141414;
    border-color: #222;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

    .theme-dark .sf-card:hover {
        border-color: #333;
        box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    }

.theme-dark .sf-count {
    color: #f3f4f6;
}

.theme-dark .sf-label {
    color: #6b7280;
}

/* Dark icon backgrounds */
.theme-dark .sfi-all {
    background: rgba(200,16,46,0.15);
    color: #f87171;
}

.theme-dark .sfi-timnet {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
}

.theme-dark .sfi-unallocated {
    background: rgba(234,179,8,0.13);
    color: #fbbf24;
}

.theme-dark .sfi-allocated {
    background: rgba(22,163,74,0.15);
    color: #4ade80;
}

/* Dark active states */
.theme-dark .sf-card-all.sf-card-active {
    background: rgba(200,16,46,0.08);
    border-color: rgba(200,16,46,0.35) !important;
    box-shadow: 0 0 0 1px rgba(200,16,46,0.2), 0 4px 18px rgba(200,16,46,0.12);
}

    .theme-dark .sf-card-all.sf-card-active::after {
        background: #c8102e;
    }

    .theme-dark .sf-card-all.sf-card-active .sf-count {
        color: #f87171;
    }

.theme-dark .sf-card-timnet.sf-card-active {
    background: rgba(37,99,235,0.08);
    border-color: rgba(37,99,235,0.35) !important;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.2), 0 4px 18px rgba(37,99,235,0.12);
}

    .theme-dark .sf-card-timnet.sf-card-active::after {
        background: #2563eb;
    }

    .theme-dark .sf-card-timnet.sf-card-active .sf-count {
        color: #60a5fa;
    }

.theme-dark .sf-card-unallocated.sf-card-active {
    background: rgba(234,179,8,0.07);
    border-color: rgba(234,179,8,0.35) !important;
    box-shadow: 0 0 0 1px rgba(234,179,8,0.2), 0 4px 18px rgba(234,179,8,0.10);
}

    .theme-dark .sf-card-unallocated.sf-card-active::after {
        background: #f59e0b;
    }

    .theme-dark .sf-card-unallocated.sf-card-active .sf-count {
        color: #fbbf24;
    }

.theme-dark .sf-card-allocated.sf-card-active {
    background: rgba(22,163,74,0.08);
    border-color: rgba(22,163,74,0.35) !important;
    box-shadow: 0 0 0 1px rgba(22,163,74,0.2), 0 4px 18px rgba(22,163,74,0.12);
}

    .theme-dark .sf-card-allocated.sf-card-active::after {
        background: #16a34a;
    }

    .theme-dark .sf-card-allocated.sf-card-active .sf-count {
        color: #4ade80;
    }

/* Dark: lead card */
.theme-dark .lead-card {
    background: #141414;
    border-color: #222;
}

    .theme-dark .lead-card:hover {
        border-color: #333;
        box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    }

.theme-dark .lead-name {
    color: #f3f4f6;
}

/* Dark: accent bars */
.theme-dark .accent-timnet {
    background: #2563eb;
}

.theme-dark .accent-fourbuy {
    background: #c8102e;
}

/* Dark: badges */
.theme-dark .badge-timnet {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
    border: 1px solid rgba(37,99,235,0.3);
}

.theme-dark .badge-fourbuy {
    background: rgba(200,16,46,0.15);
    color: #f87171;
    border: 1px solid rgba(200,16,46,0.3);
}

.theme-dark .badge-unallocated {
    background: rgba(234,179,8,0.12);
    color: #fbbf24;
    border: 1px solid rgba(234,179,8,0.25);
}

.theme-dark .badge-allocated {
    background: rgba(22,163,74,0.12);
    color: #4ade80;
    border: 1px solid rgba(22,163,74,0.25);
}

/* Dark: meta */
.theme-dark .meta-icon {
    color: #4b5563;
}

.theme-dark .meta-label {
    color: #6b7280;
}

.theme-dark .meta-value {
    color: #d1d5db;
}

.theme-dark .meta-email {
    color: #93c5fd;
}

.theme-dark .meta-premium {
    color: #4ade80;
    font-weight: 600;
}

/* Dark: allocation footer */
.theme-dark .lead-allocation-footer {
    border-top: 1px solid #1f1f1f;
    color: #6b7280;
}

    .theme-dark .lead-allocation-footer i {
        color: #4ade80;
    }

    .theme-dark .lead-allocation-footer strong {
        color: #d1d5db;
    }

.theme-dark .allocation-time {
    color: #4b5563;
}

/* Dark: buttons */
.theme-dark .btn-allocate {
    background: #c8102e;
    color: #fff;
}

    .theme-dark .btn-allocate:hover:not(:disabled) {
        background: #a50d25;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(200,16,46,0.35);
    }

    .theme-dark .btn-allocate:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.theme-dark .btn-already-allocated {
    background: rgba(22,163,74,0.10);
    color: #4ade80;
    border: 1px solid rgba(22,163,74,0.25);
    cursor: not-allowed;
    opacity: 0.8;
}

.theme-dark .btn-view-details {
    background: #1f1f1f;
    color: #9ca3af;
    border: 1px solid #2d2d2d;
}

    .theme-dark .btn-view-details:hover {
        background: #2a2a2a;
        color: #e5e7eb;
        border-color: #3d3d3d;
    }

/* Dark: search */
.theme-dark .search-input {
    background: #1a1a1a;
    border-color: #2d2d2d;
    color: #e5e7eb;
}

    .theme-dark .search-input::placeholder {
        color: #4b5563;
    }

    .theme-dark .search-input:focus {
        border-color: #c8102e;
        box-shadow: 0 0 0 3px rgba(200,16,46,0.15);
    }

.theme-dark .search-wrapper .search-icon {
    color: #6b7280;
}

/* Dark: highlighted card */
.theme-dark .lead-card-highlighted {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.2), 0 4px 24px rgba(245,158,11,0.25);
}

/* Dark: empty state */
.theme-dark .empty-state {
    color: #4b5563;
}

.theme-dark .empty-icon {
    color: #4b5563;
}

.theme-dark .empty-text {
    color: #6b7280;
}

/* Dark: container */
.theme-dark .leads-container {
    background: #0f0f0f;
    color: rgba(255,255,255,0.95);
}

/* Dark: leads-list padding */
.theme-dark .leads-list,
.theme-dark .stat-filter-grid,
.theme-dark .search-wrapper {
    /* padding already handled by skin-leads.css */
}
