﻿/* ============================================
   QUOTE HISTORY - LIGHT THEME
   Toyota Professional Insurance Interface
   ============================================ */


/* CSS Variables - Light Theme */
.theme-light,
:root {
    --qh-toyota-red: #eb0a1e;
    --qh-toyota-red-dark: #c20818;
    --qh-toyota-grey: #595959;
    --qh-toyota-grey-dark: #2d2d2d;
    --qh-bg-primary: #f8fafc;
    --qh-bg-card: #ffffff;
    --qh-border: #e5e7eb;
    --qh-text-primary: #2d2d2d;
    --qh-text-secondary: #595959;
    --qh-text-muted: #8c8c8c;
    --qh-success: #22c55e;
    --qh-warning: #f59e0b;
    --qh-error: #ef4444;
    --qh-info: #3b82f6;
    --qh-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --qh-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --qh-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

    /* Container & Background */
    .theme-light .dashboard-container,
    .dashboard-container {
        background: var(--qh-bg-primary);
        color: var(--qh-text-primary);
    }

    /* Dashboard Header */
    .theme-light .dashboard-header,
    .dashboard-header {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
        box-shadow: var(--qh-shadow-lg);
    }

    /* Controls Section */
    .theme-light .company-selector-card,
    .theme-light .search-card,
    .company-selector-card,
    .search-card {
        background: var(--qh-bg-card);
        border: 1px solid var(--qh-border);
        box-shadow: var(--qh-shadow-sm);
    }

    .theme-light .selector-header i,
    .theme-light .search-header i,
    .selector-header i,
    .search-header i {
        color: var(--qh-toyota-red);
    }

    .theme-light .selector-header label,
    .theme-light .search-header label,
    .selector-header label,
    .search-header label {
        color: var(--qh-text-primary);
    }

    /* Search Input */
    .theme-light .search-input,
    .search-input {
        border: 1px solid var(--qh-border);
        background: var(--qh-bg-card);
        color: var(--qh-text-primary);
    }

        .theme-light .search-input:focus,
        .search-input:focus {
            border-color: var(--qh-toyota-red);
            box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.1);
        }

        .theme-light .search-input::placeholder,
        .search-input::placeholder {
            color: var(--qh-text-muted);
        }

    .theme-light .clear-search,
    .clear-search {
        color: var(--qh-text-muted);
    }

        .theme-light .clear-search:hover,
        .clear-search:hover {
            color: var(--qh-error);
            background: rgba(239, 68, 68, 0.1);
        }

    /* Loading State */
    .theme-light .loading-container,
    .loading-container {
        background: var(--qh-bg-card);
        box-shadow: var(--qh-shadow-sm);
    }

    .theme-light .spinner,
    .spinner {
        border-color: var(--qh-border);
        border-top-color: var(--qh-toyota-red);
    }

    .theme-light .loading-spinner p,
    .loading-spinner p {
        color: var(--qh-text-secondary);
    }

    /* Pagination */
    .theme-light .pagination-card,
    .pagination-card {
        background: var(--qh-bg-card);
        box-shadow: var(--qh-shadow-sm);
        border: 1px solid var(--qh-border);
    }

    .theme-light .pagination-info,
    .pagination-info {
        color: var(--qh-text-secondary);
    }

    .theme-light .pagination-btn,
    .pagination-btn {
        border: 1px solid var(--qh-border);
        background: var(--qh-bg-card);
        color: var(--qh-text-secondary);
    }

        .theme-light .pagination-btn:hover:not(:disabled),
        .pagination-btn:hover:not(:disabled) {
            border-color: var(--qh-toyota-red);
            color: var(--qh-toyota-red);
            background: rgba(235, 10, 30, 0.05);
        }

    .theme-light .current-page,
    .current-page {
        color: var(--qh-text-primary);
    }

    /* Dashboard Cards */
    .theme-light .dashboard-card,
    .dashboard-card {
        background: var(--qh-bg-card);
        box-shadow: var(--qh-shadow-sm);
        border: 1px solid var(--qh-border);
    }

        .theme-light .dashboard-card:hover,
        .dashboard-card:hover {
            box-shadow: var(--qh-shadow-md);
        }

    .theme-light .card-header,
    .card-header {
        border-bottom: 1px solid var(--qh-border);
        background: #fafafa;
    }

        .theme-light .card-header h2,
        .card-header h2 {
            color: var(--qh-text-primary);
        }

            .theme-light .card-header h2 i,
            .card-header h2 i {
                color: var(--qh-toyota-red);
            }

    .theme-light .quote-count,
    .quote-count {
        background: rgba(235, 10, 30, 0.1);
        color: var(--qh-toyota-red);
    }

    /* Period Cards */
    .theme-light .period-card .card-header:hover,
    .period-card .card-header:hover {
        background: rgba(235, 10, 30, 0.05);
    }

    .theme-light .period-card .card-header.expanded,
    .period-card .card-header.expanded {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
        color: white;
    }

        .theme-light .period-card .card-header.expanded h2,
        .theme-light .period-card .card-header.expanded h2 i,
        .period-card .card-header.expanded h2,
        .period-card .card-header.expanded h2 i {
            color: white;
        }

        .theme-light .period-card .card-header.expanded .quote-count,
        .period-card .card-header.expanded .quote-count {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }

        .theme-light .period-card .card-header.expanded .toggle-icon,
        .period-card .card-header.expanded .toggle-icon {
            color: white;
        }

    .theme-light .toggle-icon,
    .toggle-icon {
        color: var(--qh-text-muted);
    }

    /* Empty State */
    .theme-light .empty-state,
    .empty-state {
        color: var(--qh-text-muted);
    }

        .theme-light .empty-state h3,
        .empty-state h3 {
            color: var(--qh-text-primary);
        }

        .theme-light .empty-state i,
        .empty-state i {
            color: var(--qh-text-muted);
        }

    /* Table Styles */
    .theme-light .performance-table th,
    .performance-table th {
        color: var(--qh-text-primary);
        border-bottom: 2px solid var(--qh-border);
        background: #fafafa;
    }

    .theme-light .performance-table td,
    .performance-table td {
        border-bottom: 1px solid var(--qh-border);
    }

    .theme-light .performance-table tbody tr:hover,
    .performance-table tbody tr:hover {
        background: #fafafa;
    }

    .theme-light .quote-number-cell .quote-number,
    .quote-number-cell .quote-number {
        color: var(--qh-toyota-red);
    }

    .theme-light .date-value,
    .date-value {
        color: var(--qh-text-primary);
    }

    .theme-light .time-value,
    .time-value {
        color: var(--qh-text-muted);
    }

    .theme-light .policyholder-info span,
    .policyholder-info span {
        color: var(--qh-text-primary);
    }

    .theme-light .user-name,
    .user-name {
        color: var(--qh-text-secondary);
    }

    .theme-light .metric-value,
    .metric-value {
        color: var(--qh-success);
    }

    /* Status Badges */
    .theme-light .status-badge.pending,
    .status-badge.pending {
        background: rgba(245, 158, 11, 0.1);
        color: var(--qh-warning);
        border: 1px solid var(--qh-warning);
    }

    .theme-light .status-badge.approved,
    .status-badge.approved {
        background: rgba(59, 130, 246, 0.1);
        color: var(--qh-info);
        border: 1px solid var(--qh-info);
    }

    .theme-light .status-badge.concluded,
    .status-badge.concluded {
        background: rgba(34, 197, 94, 0.1);
        color: var(--qh-success);
        border: 1px solid var(--qh-success);
    }

    .theme-light .status-badge.rejected,
    .status-badge.rejected {
        background: rgba(239, 68, 68, 0.1);
        color: var(--qh-error);
        border: 1px solid var(--qh-error);
    }

    .theme-light .status-badge.default,
    .status-badge.default {
        background: #fafafa;
        color: var(--qh-text-secondary);
        border: 1px solid var(--qh-border);
    }

    /* Mobile Card View */
    .theme-light .quote-card-mobile,
    .quote-card-mobile {
        background: var(--qh-bg-card);
        border: 1px solid var(--qh-border);
        box-shadow: var(--qh-shadow-sm);
    }

        .theme-light .quote-card-mobile:hover,
        .quote-card-mobile:hover {
            box-shadow: var(--qh-shadow-md);
        }

    .theme-light .quote-card-header,
    .quote-card-header {
        border-bottom: 1px solid var(--qh-border);
    }

    .theme-light .quote-label,
    .quote-label {
        color: var(--qh-text-muted);
    }

    .theme-light .quote-number,
    .quote-number {
        color: var(--qh-toyota-red);
    }

    .theme-light .detail-label,
    .detail-label {
        color: var(--qh-text-secondary);
    }

    .theme-light .detail-value,
    .detail-value {
        color: var(--qh-text-primary);
    }

        .theme-light .detail-value.premium,
        .detail-value.premium {
            color: var(--qh-success);
        }

    .theme-light .quote-card-footer,
    .quote-card-footer {
        border-top: 1px solid var(--qh-border);
    }

    /* Buttons */
    .theme-light .btn-primary,
    .btn-primary {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
        color: white;
        border-color: var(--qh-toyota-red);
        box-shadow: 0 4px 12px rgba(235, 10, 30, 0.25);
    }

        .theme-light .btn-primary:hover:not(:disabled),
        .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--qh-toyota-red-dark) 0%, #a00614 100%);
            box-shadow: 0 6px 16px rgba(235, 10, 30, 0.35);
            transform: translateY(-1px);
        }

        .theme-light .btn-primary:active:not(:disabled),
        .btn-primary:active:not(:disabled) {
            transform: translateY(0);
        }

    /* Form Controls */
    .theme-light .form-control,
    .form-control {
        border: 1px solid var(--qh-border);
        background: var(--qh-bg-card);
        color: var(--qh-text-primary);
    }

        .theme-light .form-control:focus,
        .form-control:focus {
            border-color: var(--qh-toyota-red);
            box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.1);
        }

        .theme-light .form-control:disabled,
        .form-control:disabled {
            background: #fafafa;
        }

    /* Card Content */
    .theme-light .card-content,
    .card-content {
        background: var(--qh-bg-card);
    }

    /* Scrollbar Styling */
    .theme-light ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .theme-light ::-webkit-scrollbar-track {
        background: #f3f4f6;
    }

    .theme-light ::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 4px;
    }

        .theme-light ::-webkit-scrollbar-thumb:hover {
            background: var(--qh-toyota-red);
        }

    /* Focus Visible Styling */
    .theme-light *:focus-visible,
    *:focus-visible {
        outline: 2px solid var(--qh-toyota-red);
        outline-offset: 2px;
    }

    /* Smooth Transitions */
    .theme-light * {
        transition-property: color, background-color, border-color, box-shadow, transform;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        transition-duration: 150ms;
    }

    /* Toyota Brand Accent */
    .theme-light .toyota-accent,
    .toyota-accent {
        color: var(--qh-toyota-red);
    }

    .theme-light .toyota-bg-accent,
    .toyota-bg-accent {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
    }

    /* Enhanced Hover Effects */
    .theme-light .dashboard-card:hover,
    .dashboard-card:hover {
        box-shadow: 0 8px 20px rgba(235, 10, 30, 0.1);
    }

    .theme-light .performance-table tbody tr:hover,
    .performance-table tbody tr:hover {
        background: linear-gradient(90deg, transparent 0%, rgba(235, 10, 30, 0.02) 50%, transparent 100%);
    }

/* Animation for new content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-light .dashboard-card,
.dashboard-card {
    animation: fadeInUp 0.4s ease-out;
}

/* Print Styles */
@media print {
    .theme-light .dashboard-header,
    .dashboard-header {
        background: white !important;
        color: var(--qh-toyota-grey-dark) !important;
        box-shadow: none !important;
    }

        .theme-light .dashboard-header h1,
        .dashboard-header h1 {
            color: var(--qh-toyota-red) !important;
        }

    .theme-light .btn,
    .btn {
        display: none !important;
    }

    .theme-light .controls-section,
    .controls-section {
        display: none !important;
    }

    .theme-light .pagination-card,
    .pagination-card {
        display: none !important;
    }
}

/* ============================================
   QUOTE HISTORY - DARK THEME
   Toyota Professional Insurance Interface
   ============================================ */

/* CSS Variables - Dark Theme */
.theme-dark {
    --qh-toyota-red: #eb0a1e;
    --qh-toyota-red-dark: #c20818;
    --qh-toyota-red-light: #ff1a2e;
    --qh-toyota-grey: #595959;
    --qh-toyota-grey-light: #8c8c8c;
    --qh-toyota-grey-dark: #2d2d2d;
    --qh-toyota-charcoal: #1a1a1a;
    --qh-bg-primary: #0f0f0f;
    --qh-bg-card: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    --qh-bg-card-solid: #1a1a1a;
    --qh-border: rgba(255, 255, 255, 0.1);
    --qh-text-primary: rgba(255, 255, 255, 0.95);
    --qh-text-secondary: rgba(255, 255, 255, 0.7);
    --qh-text-muted: rgba(255, 255, 255, 0.5);
    --qh-success: #22c55e;
    --qh-warning: #f59e0b;
    --qh-error: #ef4444;
    --qh-info: #3b82f6;
    --qh-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --qh-shadow-md: 0 4px 12px rgb(0 0 0 / 0.3);
    --qh-shadow-lg: 0 10px 30px rgb(0 0 0 / 0.5);
}

    /* Container & Background */
    .theme-dark .dashboard-container {
        background: var(--qh-bg-primary);
        color: var(--qh-text-primary);
    }

    /* Dashboard Header */
    .theme-dark .dashboard-header {
        background: linear-gradient(135deg, var(--qh-toyota-grey-dark) 0%, var(--qh-toyota-charcoal) 100%);
        border-bottom: 1px solid var(--qh-border);
        box-shadow: var(--qh-shadow-lg);
    }

        .theme-dark .dashboard-header::before {
            background: rgba(255, 255, 255, 0.05);
        }

        .theme-dark .dashboard-header h1 {
            color: white;
        }

        .theme-dark .dashboard-header p {
            color: rgba(255, 255, 255, 0.85);
        }

    /* Controls Section */
    .theme-dark .company-selector-card,
    .theme-dark .search-card {
        background: var(--qh-bg-card);
        border: 1px solid var(--qh-border);
        box-shadow: var(--qh-shadow-md);
    }

    .theme-dark .selector-header i,
    .theme-dark .search-header i {
        color: var(--qh-toyota-red);
    }

    .theme-dark .selector-header label,
    .theme-dark .search-header label {
        color: var(--qh-text-primary);
    }

    /* Search Input */
    .theme-dark .search-input {
        border: 1px solid var(--qh-border);
        background: rgba(255, 255, 255, 0.05);
        color: var(--qh-text-primary);
    }

        .theme-dark .search-input:focus {
            border-color: var(--qh-toyota-red);
            box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.2);
            background: rgba(255, 255, 255, 0.08);
        }

        .theme-dark .search-input::placeholder {
            color: var(--qh-text-muted);
        }

    .theme-dark .clear-search {
        color: var(--qh-text-muted);
    }

        .theme-dark .clear-search:hover {
            color: var(--qh-toyota-red);
            background: rgba(235, 10, 30, 0.1);
        }

    /* Loading State */
    .theme-dark .loading-container {
        background: var(--qh-bg-card);
        box-shadow: var(--qh-shadow-md);
    }

    .theme-dark .spinner {
        border-color: rgba(255, 255, 255, 0.1);
        border-top-color: var(--qh-toyota-red);
    }

    .theme-dark .loading-spinner p {
        color: var(--qh-text-secondary);
    }

    /* Pagination */
    .theme-dark .pagination-card {
        background: var(--qh-bg-card);
        box-shadow: var(--qh-shadow-md);
        border: 1px solid var(--qh-border);
    }

    .theme-dark .pagination-info {
        color: var(--qh-text-secondary);
    }

    .theme-dark .pagination-btn {
        border: 1px solid var(--qh-border);
        background: rgba(255, 255, 255, 0.05);
        color: var(--qh-text-secondary);
    }

        .theme-dark .pagination-btn:hover:not(:disabled) {
            background: rgba(235, 10, 30, 0.1);
            border-color: var(--qh-toyota-red);
            color: var(--qh-toyota-red);
        }

    .theme-dark .current-page {
        color: var(--qh-text-primary);
    }

    /* Dashboard Cards */
    .theme-dark .dashboard-card {
        background: var(--qh-bg-card);
        box-shadow: var(--qh-shadow-md);
        border: 1px solid var(--qh-border);
    }

        .theme-dark .dashboard-card:hover {
            box-shadow: var(--qh-shadow-lg);
        }

    .theme-dark .card-header {
        border-bottom: 2px solid var(--qh-toyota-red);
        background: rgba(0, 0, 0, 0.2);
    }

        .theme-dark .card-header h2 {
            color: white;
        }

            .theme-dark .card-header h2 i {
                color: var(--qh-toyota-red);
            }

    .theme-dark .quote-count {
        background: rgba(235, 10, 30, 0.1);
        color: var(--qh-toyota-red);
        border: 1px solid rgba(235, 10, 30, 0.3);
    }

    /* Period Cards */
    .theme-dark .period-card .card-header:hover {
        background: rgba(235, 10, 30, 0.1);
    }

    .theme-dark .period-card .card-header.expanded {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
        color: white;
        border-bottom: 2px solid var(--qh-toyota-red-dark);
    }

        .theme-dark .period-card .card-header.expanded h2,
        .theme-dark .period-card .card-header.expanded h2 i {
            color: white;
        }

        .theme-dark .period-card .card-header.expanded .quote-count {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border-color: rgba(255, 255, 255, 0.3);
        }

        .theme-dark .period-card .card-header.expanded .toggle-icon {
            color: white;
        }

    .theme-dark .toggle-icon {
        color: var(--qh-text-muted);
    }

    /* Empty State */
    .theme-dark .empty-state {
        color: var(--qh-text-muted);
    }

        .theme-dark .empty-state h3 {
            color: var(--qh-text-primary);
        }

        .theme-dark .empty-state i {
            color: var(--qh-text-muted);
            opacity: 0.3;
        }

    /* Table Styles */
    .theme-dark .performance-table th {
        color: var(--qh-text-primary);
        border-bottom: 2px solid var(--qh-border);
        background: rgba(0, 0, 0, 0.2);
    }

    .theme-dark .performance-table td {
        border-bottom: 1px solid var(--qh-border);
    }

    .theme-dark .performance-table tbody tr:hover {
        background: rgba(235, 10, 30, 0.05);
    }

    .theme-dark .quote-number-cell .quote-number {
        color: var(--qh-toyota-red);
    }

    .theme-dark .date-value {
        color: var(--qh-text-primary);
    }

    .theme-dark .time-value {
        color: var(--qh-text-muted);
    }

    .theme-dark .policyholder-info span {
        color: var(--qh-text-primary);
    }

    .theme-dark .user-name {
        color: var(--qh-text-secondary);
    }

    .theme-dark .metric-value {
        color: var(--qh-success);
    }

    /* Status Badges */
    .theme-dark .status-badge.pending {
        background: rgba(245, 158, 11, 0.15);
        color: var(--qh-warning);
        border: 1px solid rgba(245, 158, 11, 0.3);
    }

    .theme-dark .status-badge.approved {
        background: rgba(59, 130, 246, 0.15);
        color: var(--qh-info);
        border: 1px solid rgba(59, 130, 246, 0.3);
    }

    .theme-dark .status-badge.concluded {
        background: rgba(34, 197, 94, 0.15);
        color: var(--qh-success);
        border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .theme-dark .status-badge.rejected {
        background: rgba(239, 68, 68, 0.15);
        color: var(--qh-error);
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .theme-dark .status-badge.default {
        background: rgba(255, 255, 255, 0.05);
        color: var(--qh-text-secondary);
        border: 1px solid var(--qh-border);
    }

    /* Mobile Card View */
    .theme-dark .quote-card-mobile {
        background: var(--qh-bg-card);
        border: 1px solid var(--qh-border);
        box-shadow: var(--qh-shadow-sm);
    }

        .theme-dark .quote-card-mobile:hover {
            box-shadow: var(--qh-shadow-md);
            border-color: rgba(235, 10, 30, 0.3);
        }

    .theme-dark .quote-card-header {
        border-bottom: 1px solid var(--qh-border);
    }

    .theme-dark .quote-label {
        color: var(--qh-text-muted);
    }

    .theme-dark .quote-number {
        color: var(--qh-toyota-red);
    }

    .theme-dark .detail-label {
        color: var(--qh-text-secondary);
    }

    .theme-dark .detail-value {
        color: var(--qh-text-primary);
    }

        .theme-dark .detail-value.premium {
            color: var(--qh-success);
        }

    .theme-dark .quote-card-footer {
        border-top: 1px solid var(--qh-border);
    }

    /* Buttons */
    .theme-dark .btn-primary {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
        color: white;
        border-color: var(--qh-toyota-red);
        box-shadow: 0 4px 12px rgba(235, 10, 30, 0.3);
    }

        .theme-dark .btn-primary:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--qh-toyota-red-light) 0%, var(--qh-toyota-red) 100%);
            box-shadow: 0 6px 16px rgba(235, 10, 30, 0.4);
            transform: translateY(-1px);
        }

        .theme-dark .btn-primary:active:not(:disabled) {
            transform: translateY(0);
        }

    .theme-dark .btn-secondary {
        background: rgba(255, 255, 255, 0.05);
        color: var(--qh-text-primary);
        border: 1px solid var(--qh-border);
    }

        .theme-dark .btn-secondary:hover:not(:disabled) {
            background: rgba(235, 10, 30, 0.15);
            border-color: var(--qh-toyota-red);
            color: var(--qh-toyota-red);
        }

    /* Form Controls */
    .theme-dark .form-control {
        border: 1px solid var(--qh-border);
        background: rgba(255, 255, 255, 0.05);
        color: var(--qh-text-primary);
    }

        .theme-dark .form-control:focus {
            border-color: var(--qh-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:disabled {
            background: rgba(0, 0, 0, 0.2);
            opacity: 0.6;
        }

        .theme-dark .form-control option {
            background: var(--qh-toyota-charcoal);
            color: var(--qh-text-primary);
        }

    /* Card Content */
    .theme-dark .card-content {
        background: transparent;
    }

    /* Scrollbar Styling - Dark Theme */
    .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(--qh-toyota-red);
        }

    /* Focus Visible Styling */
    .theme-dark *:focus-visible {
        outline: 2px solid var(--qh-toyota-red);
        outline-offset: 2px;
    }

    /* Toyota Brand Accent */
    .theme-dark .toyota-accent {
        color: var(--qh-toyota-red);
    }

    .theme-dark .toyota-bg-accent {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
    }

    /* Enhanced Hover Effects */
    .theme-dark .dashboard-card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        border-color: rgba(235, 10, 30, 0.3);
    }

    .theme-dark .performance-table tbody tr:hover {
        background: linear-gradient(90deg, transparent 0%, rgba(235, 10, 30, 0.08) 50%, transparent 100%);
    }

    /* Policyholder Avatar Dark Theme */
    .theme-dark .policyholder-avatar {
        background: linear-gradient(135deg, var(--qh-toyota-red) 0%, var(--qh-toyota-red-dark) 100%);
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.3);
    }

/* Animation for new content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-dark .dashboard-card {
    animation: fadeInUp 0.4s ease-out;
}

/* Glow Effects */
.theme-dark .quote-number:hover {
    text-shadow: 0 0 8px rgba(235, 10, 30, 0.5);
}

.theme-dark .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(235, 10, 30, 0.4), 0 0 20px rgba(235, 10, 30, 0.2);
}

/* Enhanced Card Borders on Hover */
.theme-dark .quote-card-mobile:hover {
    border-color: var(--qh-toyota-red);
    box-shadow: 0 4px 12px rgba(235, 10, 30, 0.3);
}

/* Period Card Enhanced States */
.theme-dark .period-card .card-header.expanded:hover {
    background: linear-gradient(135deg, var(--qh-toyota-red-light) 0%, var(--qh-toyota-red) 100%);
}

/* Table Row Alternate Styling */
.theme-dark .performance-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Enhanced Search Card */
.theme-dark .search-card:hover,
.theme-dark .company-selector-card:hover {
    border-color: rgba(235, 10, 30, 0.3);
}

/* Loading Animation Enhancement */
@keyframes spin-glow {
    0% {
        transform: rotate(0deg);
        filter: drop-shadow(0 0 2px rgba(235, 10, 30, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(235, 10, 30, 0.8));
    }

    100% {
        transform: rotate(360deg);
        filter: drop-shadow(0 0 2px rgba(235, 10, 30, 0.5));
    }
}

.theme-dark .spinner {
    animation: spin-glow 1s linear infinite;
}

/* Pagination Enhanced */
.theme-dark .pagination-btn:hover:not(:disabled) {
    background: rgba(235, 10, 30, 0.15);
    transform: translateX(2px);
}

.theme-dark .pagination-btn:first-child:hover:not(:disabled) {
    transform: translateX(-2px);
}

/* Status Badge Pulse Animation for Active States */
@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(235, 10, 30, 0.7);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(235, 10, 30, 0);
    }
}

.theme-dark .status-badge.pending {
    animation: pulse-red 2s infinite;
}

/* Enhanced Empty State */
.theme-dark .empty-state:hover i {
    color: var(--qh-toyota-red);
    opacity: 0.5;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Quote Number Cell Enhancement */
.theme-dark .quote-number-cell:hover .quote-number {
    color: var(--qh-toyota-red-light);
    text-shadow: 0 0 8px rgba(235, 10, 30, 0.4);
}

/* Form Control Focus Enhancement */
.theme-dark .form-control:focus {
    border-color: var(--qh-toyota-red);
    box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.2), 0 0 12px rgba(235, 10, 30, 0.1);
}

/* Select Dropdown Dark Styling */
.theme-dark .form-control::-ms-expand {
    background-color: var(--qh-toyota-charcoal);
    color: var(--qh-text-primary);
}

/* Disabled State Enhancement */
.theme-dark .btn:disabled {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Print Styles for Dark Theme */
@media print {
    .theme-dark .dashboard-container {
        background: white !important;
        color: black !important;
    }

    .theme-dark .dashboard-header {
        background: white !important;
        border-bottom: 2px solid var(--qh-toyota-red) !important;
    }

        .theme-dark .dashboard-header h1 {
            color: var(--qh-toyota-red) !important;
        }

        .theme-dark .dashboard-header p {
            color: var(--qh-toyota-grey-dark) !important;
        }

    .theme-dark .dashboard-card,
    .theme-dark .quote-card-mobile {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: none !important;
    }

    .theme-dark .card-header {
        background: #f8f9fa !important;
        border-bottom: 2px solid var(--qh-toyota-red) !important;
    }

        .theme-dark .card-header h2,
        .theme-dark .quote-number,
        .theme-dark .detail-value,
        .theme-dark .date-value {
            color: black !important;
        }

    .theme-dark .performance-table th,
    .theme-dark .performance-table td {
        border-color: #e5e7eb !important;
        color: black !important;
    }

    .theme-dark .performance-table tbody tr:nth-child(even) {
        background: #f8f9fa !important;
    }

    .theme-dark .btn,
    .theme-dark .controls-section,
    .theme-dark .pagination-card {
        display: none !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-contrast: high) {
    .theme-dark {
        --qh-border: rgba(255, 255, 255, 0.3);
        --qh-text-primary: #ffffff;
        --qh-text-secondary: rgba(255, 255, 255, 0.85);
    }

        .theme-dark .dashboard-card,
        .theme-dark .quote-card-mobile {
            border-width: 2px;
        }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .theme-dark * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .theme-dark .spinner {
        animation: none;
        border-top-color: var(--qh-toyota-red);
    }

    .theme-dark .status-badge.pending {
        animation: none;
    }
}

/* High Performance Mode - Disable Heavy Effects */
@media (prefers-reduced-motion: reduce) {
    .theme-dark .dashboard-card:hover,
    .theme-dark .quote-card-mobile:hover,
    .theme-dark .btn-primary:hover:not(:disabled) {
        box-shadow: var(--qh-shadow-sm);
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .theme-dark {
        --qpd-border: rgba(255, 255, 255, 0.3);
        --qpd-text: #ffffff;
        --qpd-text-sec: rgba(255, 255, 255, 0.85);
    }

        .theme-dark .qp-timeline-content,
        .theme-dark .qp-change-item {
            border-width: 2px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .theme-dark * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .theme-dark .qp-timeline-item.qp-active .qp-timeline-marker {
        animation: none;
    }
}
/* QUOTE DIALOGS - LIGHT THEME - Toyota Professional */
.theme-light, :root {
    --qpd-toyota-red: #eb0a1e;
    --qpd-toyota-red-dark: #c20818;
    --qpd-bg-overlay: rgba(0, 0, 0, 0.6);
    --qpd-bg-modal: #ffffff;
    --qpd-bg-timeline: #f8fafc;
    --qpd-border: #e2e8f0;
    --qpd-text: #1e293b;
    --qpd-text-sec: #64748b;
    --qpd-text-muted: #94a3b8;
    --qpd-success: #10b981;
    --qpd-danger: #ef4444;
    --qpd-info: #3b82f6;
}

    /* Modal Overlay */
    .theme-light .qp-modal-overlay, .qp-modal-overlay {
        background: var(--qpd-bg-overlay);
    }

    /* Modal Container */
    .theme-light .qp-modal, .qp-modal {
        background: var(--qpd-bg-modal);
    }

    /* Modal Header */
    .theme-light .qp-modal-header, .qp-modal-header {
        background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
        border-bottom-color: var(--qpd-border);
    }

    .theme-light .qp-modal-title h3, .qp-modal-title h3 {
        color: var(--qpd-text);
    }

    .theme-light .qp-modal-title i, .qp-modal-title i {
        color: var(--qpd-toyota-red);
    }

    /* Modal Body */
    .theme-light .qp-modal-body, .qp-modal-body {
        background: white;
    }

    /* Timeline */
    .theme-light .qp-history-timeline::before, .qp-history-timeline::before {
        background: var(--qpd-border);
    }

    .theme-light .qp-timeline-marker, .qp-timeline-marker {
        background: white;
        border-color: var(--qpd-border);
    }

    .theme-light .qp-timeline-item.qp-active .qp-timeline-marker, .qp-timeline-item.qp-active .qp-timeline-marker {
        background: var(--qpd-toyota-red);
        border-color: var(--qpd-toyota-red);
    }

    .theme-light .qp-timeline-content, .qp-timeline-content {
        background: var(--qpd-bg-timeline);
        border: 1px solid var(--qpd-border);
    }

    .theme-light .qp-timeline-item.qp-active .qp-timeline-content, .qp-timeline-item.qp-active .qp-timeline-content {
        background: white;
        border-color: var(--qpd-toyota-red);
        box-shadow: 0 4px 12px rgba(235, 10, 30, 0.15);
    }

    /* Version Info */
    .theme-light .qp-version-number, .qp-version-number {
        color: var(--qpd-text);
    }

    .theme-light .qp-version-date, .qp-version-date {
        color: var(--qpd-text-sec);
    }

    .theme-light .qp-version-author, .qp-version-author {
        color: var(--qpd-text-sec);
    }

    /* Change Item */
    .theme-light .qp-change-item, .qp-change-item {
        background: white;
        border: 1px solid var(--qpd-border);
    }

        .theme-light .qp-change-item:hover, .qp-change-item:hover {
            background: #fafafa;
            border-color: var(--qpd-toyota-red);
        }

    .theme-light .qp-change-icon, .qp-change-icon {
        background: linear-gradient(135deg, var(--qpd-toyota-red), var(--qpd-toyota-red-dark));
        color: white;
    }

    .theme-light .qp-change-description, .qp-change-description {
        color: var(--qpd-text);
    }

    .theme-light .qp-old-value, .qp-old-value {
        background: #fee2e2;
        color: var(--qpd-danger);
        border: 1px solid var(--qpd-danger);
    }

    .theme-light .qp-new-value, .qp-new-value {
        background: #d1fae5;
        color: var(--qpd-success);
        border: 1px solid var(--qpd-success);
    }

    .theme-light .qp-change-meta, .qp-change-meta {
        color: var(--qpd-text-muted);
    }

    /* Form Controls */
    .theme-light .qp-form-group label, .qp-form-group label {
        color: var(--qpd-text);
    }

    .theme-light .qp-form-control, .qp-form-control {
        background: white;
        border-color: var(--qpd-border);
        color: var(--qpd-text);
    }

        .theme-light .qp-form-control:focus, .qp-form-control:focus {
            border-color: var(--qpd-toyota-red);
            box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.1);
        }

    /* Modal Footer */
    .theme-light .qp-modal-footer, .qp-modal-footer {
        background: linear-gradient(to top, #f8fafc, #f1f5f9);
        border-top-color: var(--qpd-border);
    }

    /* Buttons */
    .theme-light .qp-btn-primary, .qp-btn-primary {
        background: linear-gradient(135deg, var(--qpd-toyota-red), var(--qpd-toyota-red-dark));
        color: white;
        box-shadow: 0 4px 12px rgba(235, 10, 30, 0.25);
    }

        .theme-light .qp-btn-primary:hover, .qp-btn-primary:hover {
            background: linear-gradient(135deg, var(--qpd-toyota-red-dark), #a00614);
            box-shadow: 0 6px 16px rgba(235, 10, 30, 0.35);
        }

    .theme-light .qp-btn-secondary, .qp-btn-secondary {
        background: var(--qpd-border);
        color: var(--qpd-text-sec);
    }

        .theme-light .qp-btn-secondary:hover, .qp-btn-secondary:hover {
            background: var(--qpd-text-sec);
            color: white;
        }

    .theme-light .qp-btn-revert, .qp-btn-revert {
        background: white;
        color: var(--qpd-toyota-red);
        border: 2px solid var(--qpd-toyota-red);
    }

        .theme-light .qp-btn-revert:hover, .qp-btn-revert:hover {
            background: var(--qpd-toyota-red);
            color: white;
        }

    /* Scrollbar */
    .theme-light .qp-modal-body::-webkit-scrollbar-track, .qp-modal-body::-webkit-scrollbar-track {
        background: #f3f4f6;
    }

    .theme-light .qp-modal-body::-webkit-scrollbar-thumb, .qp-modal-body::-webkit-scrollbar-thumb {
        background: #d1d5db;
    }

        .theme-light .qp-modal-body::-webkit-scrollbar-thumb:hover, .qp-modal-body::-webkit-scrollbar-thumb:hover {
            background: var(--qpd-toyota-red);
        }

    /* Focus */
    .theme-light .qp-modal *:focus-visible, .qp-modal *:focus-visible {
        outline: 2px solid var(--qpd-toyota-red);
        outline-offset: 2px;
    }
