/* Base Theme Colors for Tailwind/CSS compatibility */
:root {
    /* Primary gold color palette — Lawnova Premium Dark Theme */
    --primary: #997745;
    --primary-dark: #7A5E36;
    --primary-light: #D5B890;
    --primary-200: #E6C79C;

    /* Secondary/accent colors */
    --secondary: #D5B890;
    --accent: #E6C79C;
    --accent-dark: #997745;

    /* Status colors */
    --danger: #DC2626;
    --danger-hover: #B91C1C;
    --success: #166534;
    --warning: #D97706;

    /* Hover states */
    --primary-hover: #7A5E36;

    /* Extended shade palette for badges/backgrounds */
    --primary-50: #1E1E1E;
    --primary-100: #2A2A2A;
    --primary-800: #D5B890;
    --secondary-50: #1A1A1A;
    --secondary-100: #2A2A2A;
    --secondary-800: #997745;
    --accent-50: #1E1C1A;
    --accent-100: #2A2520;
    --accent-800: #E6C79C;

    /* Text and UI colors */
    --text-muted: #B8B8B8;
    --background: #0C0C0C;

    /* For modern gradients */
    --gradient-primary: linear-gradient(135deg, #997745 0%, #7A5E36 100%);
    --gradient-primary-accent: linear-gradient(135deg, #997745 0%, #D5B890 100%);
}

/* Tailwind CSS compatibility - custom colors */
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-dark { background-color: var(--primary-dark) !important; }
.bg-accent { background-color: var(--accent) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.olive-bg { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.olive-text { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-secondary { color: var(--secondary) !important; }
.border-primary { border-color: var(--primary) !important; }
.border-accent { border-color: var(--accent) !important; }
.border-danger { border-color: var(--danger) !important; }
.border-secondary { border-color: var(--secondary) !important; }
.text-danger { color: var(--danger) !important; }
.from-primary { --tw-gradient-from: var(--primary); }
.to-accent { --tw-gradient-to: var(--accent); }
.to-secondary { --tw-gradient-to: var(--secondary); }
.from-primary-200 { --tw-gradient-from: var(--primary-200); }
.hover\:from-primary-dark:hover { --tw-gradient-from: var(--primary-dark); }
.focus\:ring-primary:focus { --tw-ring-color: var(--primary); }
.focus\:border-primary:focus { border-color: var(--primary) !important; }
.group-focus-within\:text-primary .group:focus-within & { color: var(--primary); }
.hover\:text-primary-dark:hover { color: var(--primary-dark) !important; }

/* Fix hover text visibility - override !important on text-primary */
.hover\:text-white:hover { color: white !important; }
.hover\:text-gray-900:hover { color: #F5F5F5 !important; }

/* Button hover effect */
.hover-darker:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
}

/* Base styles with Tailwind compatibility */
body {
    background-color: var(--background);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Modern card styling with hover effects */
.card-modern {
    background-color: #161616;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card-modern:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Add focus state for accessibility */
.card-modern:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Navbar with Tailwind compatible styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding: 1rem 2rem;
    background-color: #161616;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.btn i {
    width: 18px;
    height: 18px;
}

/* Custom button styles with improved hover states */
.btn-custom-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-custom-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-custom-warning {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-custom-warning:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
}

.btn-custom-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-custom-danger:hover {
    background-color: var(--danger-hover);
    border-color: var(--danger-hover);
    color: white;
}

/* Override Bootstrap's colors */
.btn-primary, .bg-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 0 0 0.25rem rgba(153, 119, 69, 0.25) !important;
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(153, 119, 69, 0.5) !important;
}

/* Override active state for list items */
.list-group-item.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-danger {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.btn-danger:hover {
    background-color: var(--danger-hover) !important;
    border-color: var(--danger-hover) !important;
}

.btn-warning {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: white !important;
}

.btn-warning:hover {
    background-color: #a65b1f !important;
    border-color: #a65b1f !important;
}

.btn-olive {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.btn-olive:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: white !important;
}

.btn-outline-danger {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.btn-outline-danger:hover {
    background-color: var(--danger) !important;
    color: white !important;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.badge.bg-primary, .badge.status-open {
    background-color: var(--primary) !important;
    color: white;
}

.badge.bg-warning {
    background-color: var(--accent) !important;
    color: white;
}

.badge.bg-info {
    background-color: var(--secondary) !important;
    color: white;
}

.badge.bg-secondary {
    background-color: var(--text-muted) !important;
}

/* Form Controls */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(96,108,56,.25);
}

/* Override Bootstrap's focus states */
.btn-check:focus + .btn-primary, 
.btn-primary:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(96,108,56,.25);
}

/* Layout */
.container {
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
}

/* Card Styles */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    margin-bottom: 1.5rem;
    height: 100%;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.card-body {
    padding: 1.5rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Tabs */
.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border: none;
    border-bottom: 2px solid var(--primary);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border: none;
    border-bottom: 2px solid var(--primary);
    background: none;
}

/* Timeline */
.timeline-item {
    padding: 1rem;
    border-left: 2px solid var(--primary);
    margin-left: 1rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--primary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.upload-area:hover {
    background-color: rgba(96,108,56,.05);
}

/* ========================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ======================================== */

/* Mobile Navigation */
.mobile-nav-modern {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #161616;
    border-top: 1px solid #2A2A2A;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.5rem 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .mobile-nav-modern {
        display: none;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: #B8B8B8;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 48px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary);
    background: rgba(153, 119, 69, 0.1);
    text-decoration: none;
}

.mobile-nav-item .icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-item .label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* Space for mobile nav */
    }

    .container {
        padding: 0 1rem;
    }

    /* Mobile Card Optimizations */
    .card-enhanced {
        margin: 0 0 1rem 0;
        border-radius: 0.75rem;
    }

    .card-body-enhanced {
        padding: 1rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .metric-value {
        font-size: 1.75rem;
    }

    /* Mobile Button Optimizations */
    .btn-primary-modern,
    .btn-secondary-modern,
    .btn-destructive-modern,
    .btn-ghost-modern {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        min-height: 48px;
    }

    .btn-sm {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        min-height: 40px;
    }

    /* Mobile Form Improvements */
    .form-input-modern {
        padding: 0.875rem 1rem;
        font-size: 1rem; /* Prevents zoom on iOS */
        min-height: 48px;
    }

    /* Mobile Table Improvements */
    .table-modern {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Stack layout for mobile */
    .mobile-stack {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    /* Hide on mobile */
    .hidden-mobile {
        display: none !important;
    }

    /* Navigation adjustments */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: none;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        border: none;
        border-bottom: 2px solid transparent;
    }

    /* Timeline adjustments */
    .timeline-item {
        margin-left: 0.5rem;
        padding: 0.75rem;
    }

    /* Upload area adjustments */
    .upload-area {
        padding: 1rem !important;
    }

    /* Grid adjustments */
    .grid {
        gap: 1rem;
    }

    /* Hero section mobile */
    .hero-section {
        min-height: 70vh;
    }

    .carousel-caption {
        padding: 1rem;
    }

    .carousel-caption h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }

    /* Extra small buttons for tight spaces */
    .btn-xs {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        min-height: 32px;
    }

    /* Full width modals on small screens */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        border-radius: 1rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Case header mobile */
    .case-header {
        flex-direction: column;
        gap: 1rem;
    }

    .case-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .case-actions .btn {
        width: 100%;
    }

    /* Typography adjustments */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }

    /* Reduce hero text size */
    .carousel-caption h1 {
        font-size: 1.5rem;
    }

    .carousel-caption p {
        font-size: 0.875rem;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    /* Larger touch targets */
    a, button, input, select, textarea {
        min-height: 44px;
    }

    /* Improved tap targets */
    .icon-button {
        padding: 0.75rem;
        min-height: 44px;
        min-width: 44px;
    }

    /* Better spacing for touch */
    .list-group-item {
        padding: 1rem;
    }

    /* Improved dropdown spacing */
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 60vh;
    }

    .mobile-nav-modern {
        padding: 0.25rem 1rem;
    }

    .mobile-nav-item {
        padding: 0.375rem;
    }

    .mobile-nav-item .label {
        display: none; /* Hide labels in landscape */
    }
}

/* Print styles */
@media print {
    .mobile-nav-modern,
    .btn,
    .nav-tabs,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none !important;
    }

    .card-enhanced {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* Hero Section and Carousel */
.hero-section {
    height: 600px;
    overflow: hidden;
}

.carousel {
    height: 100%;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-caption {
    position: relative;
    right: auto;
    left: auto;
    bottom: auto;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.carousel-caption p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.carousel-indicators {
    margin-bottom: 2rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    .hero-section {
        height: 500px;
    }

    .carousel-caption h1 {
        font-size: 2.5rem;
    }

    .carousel-caption p {
        font-size: 1.2rem;
    }

    .carousel-caption .btn {
        font-size: 1rem;
        padding: 0.5rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 400px;
    }

    .carousel-caption h1 {
        font-size: 2rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }
}

/* ========================================
   MODERN BUTTON SYSTEM
   ======================================== */

/* Primary Action Buttons */
.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    min-height: 38px;
}

/* Full width buttons - applies to all modern button types */
.btn-primary-modern.w-full,
.btn-secondary-modern.w-full,
.btn-ghost-modern.w-full,
.btn-destructive-modern.w-full,
.w-full .btn-primary-modern,
.w-full .btn-secondary-modern,
.w-full .btn-ghost-modern,
.w-full .btn-destructive-modern,
.w-full.btn-primary-modern,
.w-full.btn-secondary-modern,
.w-full.btn-ghost-modern,
.w-full.btn-destructive-modern {
    display: flex !important;
    width: 100% !important;
}

/* Override for button containers with proper spacing */
.space-y-4 > .btn-primary-modern,
.space-y-4 > .btn-secondary-modern,
.space-y-4 > .btn-ghost-modern,
.space-y-4 > .btn-destructive-modern,
.space-y-3 > .btn-primary-modern,
.space-y-3 > .btn-secondary-modern,
.space-y-3 > .btn-ghost-modern,
.space-y-3 > .btn-destructive-modern {
    display: flex !important;
    width: 100% !important;
}

/* Specific fix for Quick Actions card buttons */
.card-enhanced .card-body-enhanced .space-y-4 a,
.card-enhanced .card-body-enhanced .space-y-3 a {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
}

/* Force all modern buttons in cards to be full width */
.card-enhanced a[class*="btn-"],
.card-enhanced button[class*="btn-"] {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* ========================================
   HERO CAROUSEL IMPROVEMENTS
   ======================================== */

/* Modern carousel indicators */
.carousel-indicators {
    margin-bottom: 0;
}

.carousel-indicators button {
    border: none;
    outline: none;
    cursor: pointer;
}

.carousel-indicators button:focus,
.carousel-indicators button:active {
    outline: none;
    box-shadow: none;
}

.carousel-indicators button.active {
    background-opacity: 1 !important;
    transform: scale(1.2);
}

/* Ensure proper spacing between hero elements */
.hero-scroll-indicator {
    bottom: 1.5rem;
}

.hero-carousel-dots {
    bottom: 5rem;
}

.btn-primary-modern:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(153, 119, 69, 0.3);
    color: white;
    text-decoration: none;
}

.btn-primary-modern:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary);
    ring-offset: 2px;
}

.btn-primary-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Secondary Action Buttons */
.btn-secondary-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: #161616;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    min-height: 38px;
}

.btn-secondary-modern:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(153, 119, 69, 0.2);
    text-decoration: none;
}

/* Destructive Actions */
.btn-destructive-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    min-height: 38px;
}

.btn-destructive-modern:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    color: white;
    text-decoration: none;
}

/* Ghost Buttons */
.btn-ghost-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    color: #E0E0E0;
    background: transparent;
    border: none;
    transition: all 0.2s ease-out;
    cursor: pointer;
    text-decoration: none;
    min-height: 38px;
}

.btn-ghost-modern:hover {
    background: #1E1E1E;
    color: var(--primary);
    text-decoration: none;
}

/* Button Size Variants */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 36px;
}

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    min-height: 44px;
}

.btn-xl {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    min-height: 48px;
}

/* ========================================
   FROSTED GLASS HEADER BUTTONS
   ======================================== */

.btn-glass {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
    color: white;
    text-decoration: none;
}

.btn-glass:active {
    transform: scale(0.98);
}

.btn-glass-solid {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #161616;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-glass-solid:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--primary);
    text-decoration: none;
}

/* ========================================
   ENHANCED CARD SYSTEM
   ======================================== */

.card-enhanced {
    background: #161616;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #1E1E1E;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-enhanced:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.card-header-enhanced {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    background: linear-gradient(135deg, #0C0C0C 0%, #1E1E1E 100%);
    border-bottom: 1px solid #2A2A2A;
}

.card-header-enhanced h2,
.card-header-enhanced h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #F5F5F5;
    margin: 0;
}

.card-body-enhanced {
    padding: 1.5rem;
}

/* Metric Cards */
.metric-card {
    background: #161616;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #1E1E1E;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #F5F5F5;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #B8B8B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.metric-change.positive {
    color: #059669;
}

.metric-change.negative {
    color: #dc2626;
}

/* ========================================
   MODERN FORM SYSTEM
   ======================================== */

.form-group-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #E0E0E0;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.form-input-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #2A2A2A;
    border-radius: 0.5rem;
    background: #161616;
    color: #F5F5F5;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-height: 44px;
}

.form-input-modern::placeholder {
    color: #B8B8B8;
}

.form-input-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(153, 119, 69, 0.1);
}

.form-input-modern:focus + .form-label-modern {
    color: var(--primary);
}

/* Form Validation States */
.form-input-valid {
    border-color: #059669;
}

.form-input-valid:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-input-invalid {
    border-color: #dc2626;
}

.form-input-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error-message {
    font-size: 0.875rem;
    color: #dc2626;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.form-success-message {
    font-size: 0.875rem;
    color: #059669;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

/* ========================================
   ICON SYSTEM
   ======================================== */

.icon-xs { width: 0.75rem; height: 0.75rem; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }
.icon-2xl { width: 3rem; height: 3rem; }

.icon-primary { color: var(--primary); }
.icon-secondary { color: var(--secondary); }
.icon-accent { color: var(--accent); }
.icon-success { color: #059669; }
.icon-warning { color: #d97706; }
.icon-error { color: #dc2626; }
.icon-muted { color: #B8B8B8; }
.icon-white { color: white; }

.icon-interactive {
    transition: color 0.2s ease;
}

.icon-interactive:hover {
    color: var(--primary);
}

.icon-button {
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}

.icon-button:hover {
    background: #1E1E1E;
}

.icon-button:hover .icon-interactive {
    color: var(--primary);
}

/* ========================================
   STATUS INDICATORS
   ======================================== */

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    text-shadow: none;
}

/* Standard status indicators for light backgrounds */
.status-active {
    background: #166534;
    color: #ffffff;
    border-color: #15803d;
}

.status-pending {
    background: #d97706;
    color: #ffffff;
    border-color: #ea580c;
}

.status-inactive {
    background: #6b7280;
    color: #ffffff;
    border-color: #B8B8B8;
}

.status-closed {
    background: #dc2626;
    color: #ffffff;
    border-color: #ef4444;
}

/* Alternative light status indicators for dark backgrounds */
.status-indicator.status-light {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 700;
    text-shadow: none;
}

.status-indicator.status-light.status-active {
    color: #166534;
    background: rgba(220, 252, 231, 0.95);
    border-color: #166534;
}

.status-indicator.status-light.status-pending {
    color: #d97706;
    background: rgba(254, 243, 199, 0.95);
    border-color: #d97706;
}

.status-indicator.status-light.status-inactive {
    color: #E0E0E0;
    background: rgba(243, 244, 246, 0.95);
    border-color: #B8B8B8;
}

.status-indicator.status-light.status-closed {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.95);
    border-color: #dc2626;
}

/* ========================================
   ENHANCED ANIMATIONS
   ======================================== */

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

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

/* Staggered fade-in for lists */
.stagger-fade > * {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade > *:nth-child(6) { animation-delay: 0.6s; }

/* Loading States */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-skeleton {
    background: linear-gradient(90deg, #1E1E1E 25%, #2A2A2A 50%, #1E1E1E 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.25rem;
}

.loading-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(153, 119, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(153, 119, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(153, 119, 69, 0); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 3D Hover effect */
.hover-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-3d:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Animated underline for links */
.animated-underline {
    position: relative;
    text-decoration: none;
}

.animated-underline:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.animated-underline:hover:after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Multi-layer shadow for depth */
.depth-shadow {
    box-shadow:
        0 1px 1px rgba(0,0,0,0.03),
        0 2px 2px rgba(0,0,0,0.03),
        0 4px 4px rgba(0,0,0,0.03),
        0 8px 8px rgba(0,0,0,0.03),
        0 16px 16px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.depth-shadow:hover {
    box-shadow:
        0 1px 1px rgba(0,0,0,0.05),
        0 2px 2px rgba(0,0,0,0.05),
        0 4px 4px rgba(0,0,0,0.05),
        0 8px 8px rgba(0,0,0,0.05),
        0 16px 16px rgba(0,0,0,0.05),
        0 32px 32px rgba(0,0,0,0.05);
}

/* Modern glassmorphism */
.glassmorphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   NOTIFICATION SYSTEM
   ======================================== */

.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    max-width: 24rem;
    space-y: 1rem;
}

.notification {
    background: #161616;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #2A2A2A;
    padding: 1rem;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #059669;
}

.notification.error {
    border-left: 4px solid #dc2626;
}

.notification.warning {
    border-left: 4px solid #d97706;
}

.notification.info {
    border-left: 4px solid var(--primary);
}

/* ========================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
   ======================================== */

/* Touch-friendly interactions */
.touch-friendly {
    min-height: 44px; /* iOS recommended minimum */
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(153, 119, 69, 0.1);
}

/* Mobile-friendly button sizing */
@media (max-width: 767px) {
    .btn-primary-modern,
    .btn-secondary-modern,
    .btn-ghost-modern,
    .btn-destructive-modern {
        min-height: 38px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Smaller action buttons for mobile */
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Mobile table alternatives */
.table-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .table-desktop {
        display: none;
    }

    .table-mobile {
        display: block;
    }
}

/* Text truncation for mobile */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile modal improvements */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-lg {
        max-width: calc(100% - 1rem);
    }

    .modal-xl {
        max-width: calc(100% - 1rem);
    }
}

/* Form improvements for mobile */
@media (max-width: 767px) {
    .form-group-modern {
        margin-bottom: 1rem;
    }

    .form-input-modern,
    .form-select-modern,
    .form-textarea-modern {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Flash notification mobile positioning */
@media (max-width: 767px) {
    #flash-notification-container {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        justify-content: stretch;
    }

    .notification-message {
        max-width: none;
        width: 100%;
    }
}

/* Touch feedback for interactive elements */
.card-enhanced:active,
.touch-friendly:active {
    transform: scale(0.98);
    transition: transform 0.1s ease-in-out;
}

/* Improved mobile navigation spacing */
@media (max-width: 767px) {
    .mobile-nav-modern {
        padding: 0.75rem 0.5rem;
    }

    .mobile-nav-item {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Responsive container improvements */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Status indicators mobile sizing */
@media (max-width: 767px) {
    .status-indicator {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ========================================
   ACCESSIBILITY & CONTRAST IMPROVEMENTS
   ======================================== */

/* Enhanced contrast for gray text */
.text-gray-400 {
    color: #B8B8B8 !important; /* Darker gray for better contrast */
}

.text-gray-300 {
    color: #E0E0E0 !important; /* Much darker for readability */
}

/* Better contrast for icons and secondary text */
.text-gray-secondary {
    color: #E0E0E0 !important; /* Dark gray with good contrast */
}

/* Enhanced muted text that's still readable */
.text-muted-readable {
    color: #B8B8B8 !important;
    font-weight: 500;
}

/* Improved tab styling for better visibility */
.tab-button {
    transition: all 0.2s ease-in-out;
}

.tab-button:not(.active) {
    color: #E0E0E0 !important; /* Darker gray for inactive tabs */
}

.tab-button:hover {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Better empty state styling */
.empty-state-icon {
    color: #B8B8B8 !important; /* Better contrast for empty state icons */
}

.empty-state-text {
    color: #E0E0E0 !important; /* Darker text for empty states */
}

/* Improved form placeholder and input styling */
.form-input-modern::placeholder {
    color: #B8B8B8 !important;
    opacity: 1;
}

/* Better search icon contrast */
.search-icon {
    color: #B8B8B8 !important;
}

/* Enhanced card subtitle readability */
.card-subtitle {
    color: #E0E0E0 !important;
    font-weight: 500;
}

/* Better contrast for data labels in mobile cards */
.data-label {
    color: #E0E0E0 !important;
    font-weight: 600;
}

.data-value {
    color: #F5F5F5 !important;
    font-weight: 500;
}

/* ========================================
   AUTH PAGES - LOGIN & REGISTER MOBILE
   ======================================== */

/* Auth page container - ensure proper viewport handling */
.auth-page-container {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari */
}

/* Mobile-specific auth form optimizations */
@media (max-width: 640px) {
    /* Ensure form inputs don't zoom on iOS (font-size >= 16px) */
    input[type="email"],
    input[type="password"],
    input[type="text"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Better touch targets for form inputs */
    .auth-form input,
    .auth-form select,
    .auth-form textarea {
        min-height: 48px;
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    }

    /* Compact spacing for auth forms on mobile */
    .auth-form .space-y-6 {
        gap: 1rem;
    }

    /* Ensure video background doesn't cause scroll issues */
    video.auth-video-bg {
        position: fixed;
        min-width: 100%;
        min-height: 100%;
    }
}

/* Small mobile devices (iPhone SE, etc.) */
@media (max-width: 375px) {
    /* Extra compact form layout */
    .auth-form-card {
        padding: 1rem !important;
    }

    .auth-form-card h2 {
        font-size: 1.5rem !important;
    }

    .auth-form-card .space-y-4,
    .auth-form-card .space-y-6 {
        gap: 0.75rem !important;
    }

    /* Smaller labels on tiny screens */
    .auth-form-card label {
        font-size: 0.8125rem;
    }
}

/* Landscape mobile adjustments for auth pages */
@media (max-width: 768px) and (orientation: landscape) {
    .auth-page-container {
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .auth-form-header {
        margin-bottom: 0.5rem !important;
    }

    .auth-form-header h2 {
        font-size: 1.25rem !important;
    }

    .auth-form-header p {
        display: none; /* Hide subtitle in landscape */
    }
}

/* Ensure proper safe area handling for notched devices */
@supports (padding: max(0px)) {
    .auth-page-container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Auth form input icons alignment */
.auth-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #B8B8B8;
    transition: color 0.2s ease;
}

.auth-input-wrapper:focus-within .auth-input-icon {
    color: var(--primary);
}

/* Prevent form card overflow on mobile */
@media (max-width: 640px) {
    .auth-form-card {
        max-width: calc(100vw - 2rem);
        overflow-x: hidden;
    }

    /* Hide decorative elements that might overflow */
    .auth-form-card .decorative-blob {
        display: none !important;
    }
}

/* ========================================
   MOBILE SELECT DROPDOWN FIX
   ======================================== */

/* Ensure select dropdowns display properly on mobile */
@media (max-width: 640px) {
    /* Reset select to native styling for better mobile UX */
    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: #161616 !important;
        font-size: 16px !important; /* Prevent iOS zoom */
        min-height: 48px;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        padding-right: 2.5rem !important;
        line-height: 1.5;
        cursor: pointer;
    }

    /* Custom dropdown arrow for mobile */
    select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.75rem center;
        background-repeat: no-repeat;
        background-size: 1.25em 1.25em;
    }

    /* Ensure select text is visible and not cut off */
    select option {
        padding: 12px 16px;
        font-size: 16px;
        line-height: 1.5;
        background-color: #161616;
        color: #F5F5F5;
    }

    /* Fix for relative positioned parent containers */
    .relative select {
        position: relative;
        z-index: 1;
    }

    /* Ensure icon container doesn't interfere with select */
    .relative .pointer-events-none {
        z-index: 2;
    }
}

/* iOS-specific select fixes */
@supports (-webkit-touch-callout: none) {
    select {
        -webkit-appearance: none;
        background-color: #161616 !important;
    }

    /* Ensure select options are readable on iOS */
    select option {
        color: #000;
        background-color: #161616;
    }
}

/* ========================================
   ENHANCED METRIC CARDS (Jan 2026)
   ======================================== */

.metric-card-enhanced {
    position: relative;
    background: #161616;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #1E1E1E;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient left border accent */
.metric-card-enhanced::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px 0 0 4px;
}

.metric-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(153, 119, 69, 0.15);
}

/* Metric icon wrapper with gradient background */
.metric-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(153, 119, 69, 0.1) 0%, rgba(188, 108, 37, 0.1) 100%);
}

.metric-icon-wrapper svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

/* Metric header layout */
.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Trend badge styles */
.trend-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-badge svg {
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.25rem;
}

.trend-positive {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.trend-negative {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.trend-neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #B8B8B8;
}

/* Metric value - large bold number */
.metric-value-enhanced {
    font-size: 2.25rem;
    font-weight: 700;
    color: #F5F5F5;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

/* Metric label */
.metric-label-enhanced {
    font-size: 0.875rem;
    font-weight: 500;
    color: #B8B8B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Metric detail/subtext */
.metric-detail {
    font-size: 0.75rem;
    color: #B8B8B8;
    margin-top: 0.5rem;
}

/* ========================================
   SECTION DIVIDERS (Jan 2026)
   ======================================== */

.section-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0 1rem;
    color: #B8B8B8;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2A2A2A, transparent);
}

.section-divider::before {
    margin-right: 1rem;
}

.section-divider::after {
    margin-left: 1rem;
}

.section-divider-start {
    display: flex;
    align-items: center;
    margin: 1.25rem 0 1rem;
    color: #B8B8B8;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-divider-start::after {
    content: '';
    flex: 1;
    height: 1px;
    margin-left: 1rem;
    background: linear-gradient(90deg, #2A2A2A, transparent);
}

/* ========================================
   MODERN CARD HEADERS (Jan 2026)
   ======================================== */

.card-header-modern {
    padding: 1.25rem 1.5rem;
    background: #161616;
    border-bottom: 2px solid var(--primary);
    border-radius: 1rem 1rem 0 0;
}

.card-header-modern h2,
.card-header-modern h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #F5F5F5;
    margin: 0;
}

.card-header-modern .header-subtitle {
    font-size: 0.75rem;
    color: #B8B8B8;
    margin-top: 0.25rem;
}

/* ========================================
   DASHBOARD HEADER ENHANCEMENT (Jan 2026)
   ======================================== */

.dashboard-header-enhanced {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 1rem 1rem 0 0;
}

.dashboard-header-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(at 40% 20%, rgba(255,255,255,0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(255,255,255,0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(255,255,255,0.1) 0px, transparent 50%);
    pointer-events: none;
}

.dashboard-header-enhanced > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   QUICK ACTION ENHANCEMENTS (Jan 2026)
   ======================================== */

.quick-action-btn,
.quick-action-btn:hover,
.quick-action-btn:focus,
.quick-action-btn:active,
.quick-action-btn:visited {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none !important;
    position: relative;
}

.quick-action-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.quick-action-btn:hover svg {
    transform: translateX(2px);
}

/* Arrow indicator that appears on hover */
.quick-action-btn .action-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.quick-action-btn:hover .action-arrow {
    opacity: 0.5;
    transform: translateX(0);
}

/* Primary action with pulse glow */
.quick-action-primary {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.quick-action-primary:hover,
.quick-action-primary:focus,
.quick-action-primary:active {
    color: white !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(153, 119, 69, 0.3);
}

.quick-action-primary::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    z-index: -1;
    animation: pulse-glow 2s ease-in-out 3;
}

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

/* Secondary action style */
.quick-action-secondary {
    background: #161616;
    border: 1px solid #2A2A2A;
    color: #E0E0E0;
}

.quick-action-secondary:hover,
.quick-action-secondary:focus,
.quick-action-secondary:active {
    background: #0C0C0C;
    border-color: var(--primary);
    color: var(--primary) !important;
    text-decoration: none;
}

/* Ghost action style */
.quick-action-ghost {
    background: transparent;
    color: #B8B8B8;
}

.quick-action-ghost:hover,
.quick-action-ghost:focus,
.quick-action-ghost:active {
    background: #1E1E1E;
    color: var(--primary) !important;
    text-decoration: none;
}

/* Keyboard shortcut hint */
.kbd-hint {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: inherit;
    opacity: 0.6;
    margin-left: auto;
}

.quick-action-primary .kbd-hint {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   EMPTY STATE ENHANCEMENTS (Jan 2026)
   ======================================== */

.empty-state-enhanced {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #1E1E1E 0%, #2A2A2A 100%);
    margin-bottom: 1.5rem;
}

.empty-state-icon svg {
    width: 2rem;
    height: 2rem;
    color: #B8B8B8;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #E0E0E0;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.875rem;
    color: #B8B8B8;
    max-width: 20rem;
    margin: 0 auto;
}

/* ========================================
   SPEECH-TO-TEXT WIDGET
   Voice dictation mic button & animations
   ======================================== */

/* Wrapper: sits around just the input/textarea, provides positioning context */
.speech-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

/* Ensure wrapped inputs fill the wrapper */
.speech-input-wrapper > input,
.speech-input-wrapper > textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Mic button base */
.speech-mic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(107, 114, 128, 0.08);
    color: #B8B8B8;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
    z-index: 5;
}

.speech-mic-btn:hover {
    background: var(--primary-50, #f4f5ef);
    color: var(--primary, #997745);
}

.speech-mic-btn:focus-visible {
    outline: 2px solid var(--primary, #997745);
    outline-offset: 2px;
}

/* Hide wave and spinner icons by default, show mic */
.speech-mic-btn .speech-wave-icon,
.speech-mic-btn .speech-spinner-icon {
    display: none;
}

.speech-mic-btn .speech-mic-icon {
    display: block;
}

/* --- Recording state --- */
.speech-mic-btn.speech-mic-recording {
    background: var(--primary, #997745);
    color: white;
    animation: speech-pulse 1.5s ease-in-out infinite;
}

.speech-mic-btn.speech-mic-recording:hover {
    background: var(--primary-dark, #515b2f);
    color: white;
}

.speech-mic-btn.speech-mic-recording .speech-mic-icon {
    display: none;
}

.speech-mic-btn.speech-mic-recording .speech-wave-icon {
    display: flex;
}

/* --- Transcribing state --- */
.speech-mic-btn.speech-mic-transcribing {
    background: var(--primary, #997745);
    color: white;
    cursor: wait;
}

.speech-mic-btn.speech-mic-transcribing .speech-mic-icon,
.speech-mic-btn.speech-mic-transcribing .speech-wave-icon {
    display: none;
}

.speech-mic-btn.speech-mic-transcribing .speech-spinner-icon {
    display: block;
    animation: speech-spin 1s linear infinite;
}

/* Pulse ring animation */
@keyframes speech-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(153, 119, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(153, 119, 69, 0);
    }
}

/* Spinner rotation */
@keyframes speech-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Waveform bars */
.speech-wave-icon {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 18px;
}

.speech-wave-icon .bar {
    width: 3px;
    background: #161616;
    border-radius: 2px;
    animation: speech-wave 0.8s ease-in-out infinite;
}

.speech-wave-icon .bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.speech-wave-icon .bar:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.speech-wave-icon .bar:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.speech-wave-icon .bar:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.speech-wave-icon .bar:nth-child(5) { height: 8px; animation-delay: 0.6s; }

@keyframes speech-wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.2); }
}

/* Duration badge */
.speech-duration {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #1f2937;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
}

/* Positioning: inside text input (right side, vertically centered) */
.speech-mic-btn-input {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
}

/* Positioning: inside textarea (bottom-right corner) */
.speech-mic-btn-textarea {
    position: absolute;
    right: 6px;
    bottom: 6px;
}

/* Positioning: inside textarea (bottom-left, for fields with send button on right) */
.speech-mic-btn-textarea-left {
    position: absolute;
    left: 6px;
    bottom: 6px;
}

/* Border glow when recording */
.speech-dictating {
    border-color: var(--primary, #997745) !important;
    box-shadow: 0 0 0 3px rgba(153, 119, 69, 0.15) !important;
}

/* ---- Responsive: Tablet (iPad) ---- */
@media (max-width: 1024px) {
    .speech-mic-btn {
        width: 34px;
        height: 34px;
    }
}

/* ---- Responsive: Mobile (iPhone) ---- */
@media (max-width: 767px) {
    .speech-mic-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .speech-mic-btn-input {
        right: 4px;
    }

    .speech-mic-btn-textarea {
        bottom: 4px;
        right: 4px;
    }

    .speech-mic-btn-textarea-left {
        bottom: 4px;
        left: 4px;
    }

    /* On small screens, slightly reduce mic icon to fit inside smaller inputs */
    .speech-mic-btn .speech-mic-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ---- Very small screens (iPhone SE, 375px) ---- */
@media (max-width: 400px) {
    .speech-mic-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .speech-mic-btn .speech-mic-icon svg {
        width: 14px;
        height: 14px;
    }
}


/* ========================================
   Voice Intake Wizard
   ======================================== */

.voice-intake-wizard {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* Header */
.vi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2A2A2A;
}

.vi-header-center { flex: 1; text-align: center; }

.vi-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary, #997745);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.vi-back-link:hover { color: var(--primary-dark, #515b2f) !important; text-decoration: underline; }

.vi-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 0;
}

/* Mode toggle */
.vi-mode-toggle {
    display: inline-flex;
    background: #1E1E1E;
    border-radius: 8px;
    padding: 3px;
}
.vi-mode-btn {
    padding: 0.375rem 1rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #B8B8B8;
    cursor: pointer;
    transition: all 0.2s;
}
.vi-mode-btn.active {
    background: #161616;
    color: var(--primary, #997745);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.vi-mode-btn:hover:not(.active) { color: #E0E0E0; }

/* Progress dots */
.vi-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    padding: 0 1rem;
}
.vi-progress-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.vi-progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2A2A2A;
    color: #B8B8B8;
    transition: all 0.3s;
}
.vi-progress-dot.active .vi-progress-icon {
    background: var(--primary, #997745);
    color: white;
    box-shadow: 0 0 0 4px rgba(153, 119, 69, 0.15);
}
.vi-progress-dot.completed .vi-progress-icon {
    background: var(--primary, #997745);
    color: white;
}
.vi-progress-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #B8B8B8;
}
.vi-progress-dot.active .vi-progress-label,
.vi-progress-dot.completed .vi-progress-label {
    color: var(--primary, #997745);
}
.vi-progress-line {
    flex: 1;
    height: 2px;
    background: #2A2A2A;
    margin: 0 0.25rem;
    margin-bottom: 1rem;
    min-width: 10px;
}

/* Steps */
.vi-step { display: none; }
.vi-step.active { display: block; }

.vi-step-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.vi-step-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary, #997745);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.vi-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 0.25rem 0 0;
}

/* Prompt card */
.vi-prompt-card {
    background: #0C0C0C;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.vi-prompt-text {
    font-size: 1rem;
    color: #E0E0E0;
    line-height: 1.6;
    margin: 0 0 0.5rem;
}
.vi-prompt-example {
    font-size: 0.8125rem;
    color: #B8B8B8;
    font-style: italic;
    margin: 0;
}

/* Recorder area */
.vi-recorder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
}

.vi-mic-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid #2A2A2A;
    background: #161616;
    color: #B8B8B8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.vi-mic-btn:hover {
    border-color: var(--primary, #997745);
    color: var(--primary, #997745);
    transform: scale(1.05);
}
.vi-mic-btn:focus-visible {
    outline: 3px solid var(--primary, #997745);
    outline-offset: 3px;
}

/* Recording state */
.vi-mic-btn.vi-mic-recording {
    background: var(--primary, #997745);
    border-color: var(--primary, #997745);
    color: white;
    animation: vi-pulse 1.5s ease-in-out infinite;
}
.vi-mic-btn.vi-mic-recording:hover {
    background: var(--primary-dark, #515b2f);
    transform: scale(1.05);
}

/* Transcribing state */
.vi-mic-btn.vi-mic-transcribing {
    background: var(--primary, #997745);
    border-color: var(--primary, #997745);
    color: white;
    cursor: wait;
}

/* Done state */
.vi-mic-btn.vi-mic-done {
    border-color: var(--primary, #997745);
    color: var(--primary, #997745);
}

@keyframes vi-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(153, 119, 69, 0.4); }
    50% { box-shadow: 0 0 0 14px rgba(153, 119, 69, 0); }
}

.vi-spin { animation: speech-spin 1s linear infinite; }

.vi-recorder-status {
    font-size: 0.875rem;
    font-weight: 500;
    color: #B8B8B8;
}
.vi-recorder-duration {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary, #997745);
    background: var(--primary-50, #f4f5ef);
    padding: 2px 8px;
    border-radius: 10px;
}
.vi-redo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #2A2A2A;
    border-radius: 6px;
    background: #161616;
    color: #B8B8B8;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.vi-redo-btn:hover { border-color: var(--primary, #997745); color: var(--primary, #997745); }

/* Transcription display */
.vi-transcription-area {
    margin-top: 1rem;
    padding: 0 0.5rem;
}
.vi-transcription-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: #B8B8B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.vi-edit-btn {
    padding: 0.125rem 0.5rem;
    border: 1px solid #2A2A2A;
    border-radius: 4px;
    background: #161616;
    color: var(--primary, #997745);
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}
.vi-edit-btn:hover { background: var(--primary-50, #f4f5ef); }

.vi-transcription-text {
    background: #161616;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #E0E0E0;
    line-height: 1.6;
}
.vi-transcription-edit {
    width: 100%;
    border: 2px solid var(--primary, #997745);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #E0E0E0;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

/* Navigation */
.vi-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2A2A2A;
}
.vi-nav-spacer { flex: 1; }

.vi-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.vi-nav-prev {
    background: #161616;
    border: 1px solid #2A2A2A;
    color: #E0E0E0;
}
.vi-nav-prev:hover { background: #0C0C0C; }

.vi-nav-next {
    background: var(--primary, #997745);
    color: white;
}
.vi-nav-next:hover { background: var(--primary-dark, #515b2f); }

.vi-nav-skip {
    background: transparent;
    color: #B8B8B8;
    font-weight: 500;
}
.vi-nav-skip:hover { color: #B8B8B8; }

.vi-nav-process {
    background: linear-gradient(135deg, var(--primary, #997745), var(--accent, #D5B890));
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
}
.vi-nav-process:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(96,108,56,0.3); }

/* Freeform mode */
.vi-freeform-card {
    padding: 1rem 0;
}

/* Processing overlay */
.vi-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.vi-overlay-content {
    text-align: center;
    max-width: 400px;
}
.vi-overlay-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 1rem 0 0.5rem;
}
.vi-processing-steps {
    color: #B8B8B8;
    font-size: 0.875rem;
}
.vi-processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #2A2A2A;
    border-top-color: var(--primary, #997745);
    border-radius: 50%;
    animation: speech-spin 0.8s linear infinite;
    margin: 0 auto;
}

/* ---- Review Screen ---- */
.vi-review-header {
    margin-bottom: 1.5rem;
}
.vi-review-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 0 0 0.25rem;
}
.vi-review-header p {
    color: #B8B8B8;
    font-size: 0.875rem;
    margin: 0;
}

.vi-review-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

/* Review form sections */
.vi-review-section {
    background: #161616;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.vi-review-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1E1E1E;
}

.vi-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.vi-form-group {
    margin-bottom: 0.75rem;
}
.vi-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #E0E0E0;
    margin-bottom: 0.25rem;
}
.vi-required { color: #ef4444; }

.vi-form-input,
.vi-form-select,
.vi-form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #F5F5F5;
    background: #161616;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}
.vi-form-input:focus,
.vi-form-select:focus,
.vi-form-textarea:focus {
    border-color: var(--primary, #997745);
    outline: none;
    box-shadow: 0 0 0 3px rgba(96,108,56,0.1);
}
.vi-form-textarea { resize: vertical; }
.vi-field-locked { background: #0C0C0C; color: #B8B8B8; }

/* Client matching */
.vi-client-match {
    background: var(--primary-50, #f4f5ef);
    border: 1px solid var(--primary, #997745);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.vi-client-match-info {
    font-size: 0.875rem;
    color: #E0E0E0;
}
.vi-client-match-actions {
    display: flex;
    gap: 0.5rem;
}
.vi-match-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.vi-match-use {
    background: var(--primary, #997745);
    color: white;
}
.vi-match-use:hover { opacity: 0.9; }
.vi-match-new {
    background: #161616;
    border: 1px solid #2A2A2A;
    color: #E0E0E0;
}
.vi-match-new:hover { background: #0C0C0C; }

.vi-client-match-confirmed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary, #997745);
    width: 100%;
}
.vi-match-change {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--primary, #997745);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8125rem;
}

/* Key facts */
.vi-key-facts { margin-top: 0.5rem; }
.vi-facts-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #E0E0E0;
    line-height: 1.8;
}

/* Review actions */
.vi-review-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #2A2A2A;
}
.vi-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.vi-action-cancel {
    background: transparent;
    color: #B8B8B8;
}
.vi-action-cancel:hover { color: #E0E0E0; }
.vi-action-back {
    background: #161616;
    border: 1px solid #2A2A2A;
    color: #E0E0E0;
}
.vi-action-back:hover { background: #0C0C0C; }
.vi-action-create {
    margin-left: auto;
    background: linear-gradient(135deg, var(--primary, #997745), var(--accent, #D5B890));
    color: white;
    padding: 0.75rem 1.5rem;
}
.vi-action-create:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(96,108,56,0.3); }
.vi-action-create:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; }

/* ---- Completeness Sidebar ---- */
.vi-completeness-card,
.vi-tasks-card,
.vi-warnings-card {
    background: #161616;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.vi-completeness-title,
.vi-tasks-title,
.vi-warnings-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.vi-confidence-score {
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.vi-score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}
.vi-score-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.vi-score-high { background: #ecfdf5; }
.vi-score-high .vi-score-value { color: #059669; }
.vi-score-high .vi-score-label { color: #059669; }
.vi-score-mid { background: #fffbeb; }
.vi-score-mid .vi-score-value { color: #d97706; }
.vi-score-mid .vi-score-label { color: #d97706; }
.vi-score-low { background: #fef2f2; }
.vi-score-low .vi-score-value { color: #dc2626; }
.vi-score-low .vi-score-label { color: #dc2626; }

.vi-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.vi-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
}
.vi-check-icon { flex-shrink: 0; display: flex; }
.vi-check-ok { color: #059669; background: #ecfdf5; }
.vi-check-warn { color: #d97706; background: #fffbeb; }
.vi-check-missing { color: #dc2626; background: #fef2f2; }

/* Suggested tasks */
.vi-tasks-hint {
    font-size: 0.75rem;
    color: #B8B8B8;
    margin: 0 0 0.75rem;
}
.vi-task-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #E0E0E0;
    transition: background 0.15s;
}
.vi-task-item:hover { background: #0C0C0C; }
.vi-task-checkbox {
    margin-top: 2px;
    accent-color: var(--primary, #997745);
}

/* Warnings */
.vi-warnings-title { color: #d97706; }
.vi-warnings-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
    color: #92400e;
    line-height: 1.8;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .vi-review-grid {
        grid-template-columns: 1fr;
    }
    .vi-review-sidebar {
        order: -1;
    }
}

@media (max-width: 767px) {
    .voice-intake-wizard {
        padding: 1rem 0.75rem 2rem;
    }
    .vi-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .vi-header-left, .vi-header-right { text-align: center; }
    .vi-progress {
        padding: 0;
        overflow-x: auto;
    }
    .vi-progress-label { font-size: 0.5625rem; }
    .vi-progress-icon { width: 30px; height: 30px; }
    .vi-mic-btn { width: 64px; height: 64px; }
    .vi-step-title { font-size: 1.25rem; }
    .vi-form-row { grid-template-columns: 1fr; }
    .vi-review-actions { flex-wrap: wrap; }
    .vi-action-create { width: 100%; justify-content: center; margin-left: 0; }
    .vi-client-match { flex-direction: column; align-items: stretch; }
}

@media (max-width: 400px) {
    .vi-mic-btn { width: 56px; height: 56px; }
    .vi-mic-btn svg { width: 22px; height: 22px; }
    .vi-mode-btn { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
}


/* ========================================
   NOTIFICATION SYSTEM
   ======================================== */

/* Notification Panel */
.notification-panel {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #2A2A2A;
}

.notification-panel .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: -80px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: bottom 0.3s ease;
    padding: 0 1rem;
}

.pwa-install-banner.visible {
    bottom: 1rem;
}

@media (max-width: 767px) {
    .pwa-install-banner.visible { bottom: 5rem; } /* Above mobile nav */
}

.pwa-install-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #161616;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #2A2A2A;
}

.pwa-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
}

.pwa-install-text strong {
    display: block;
    font-size: 0.875rem;
    color: #F5F5F5;
}

.pwa-install-text span {
    display: block;
    font-size: 0.75rem;
    color: #B8B8B8;
}

.pwa-install-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.pwa-install-btn:hover {
    background: var(--primary-dark);
}

.pwa-install-dismiss {
    background: none;
    border: none;
    color: #B8B8B8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.pwa-install-dismiss:hover {
    color: #B8B8B8;
}

/* Notification Preferences Page */
.notif-pref-section {
    background: #161616;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #2A2A2A;
}

.notif-pref-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #F5F5F5;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #1E1E1E;
}

.notif-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #0C0C0C;
}

.notif-pref-row:last-child {
    border-bottom: none;
}

.notif-pref-label {
    font-size: 0.875rem;
    color: #E0E0E0;
}

.notif-pref-label small {
    display: block;
    font-size: 0.75rem;
    color: #B8B8B8;
    margin-top: 0.125rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #2A2A2A;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #161616;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Notification Center Page */
.notification-center-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #1E1E1E;
    transition: background 0.15s;
}

.notification-center-item:hover {
    background: #0C0C0C;
}

.notification-center-item.unread {
    background: rgba(153, 119, 69, 0.04);
    border-left: 3px solid var(--primary);
}

.notification-center-item .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-center-item .notif-body {
    flex: 1;
    min-width: 0;
}

.notification-center-item .notif-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #F5F5F5;
}

.notification-center-item .notif-text {
    font-size: 0.8125rem;
    color: #B8B8B8;
    margin-top: 0.125rem;
}

.notification-center-item .notif-time {
    font-size: 0.75rem;
    color: #B8B8B8;
    margin-top: 0.25rem;
}

/* Admin Notification Rules */
.notif-rule-card {
    background: #161616;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #2A2A2A;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notif-rule-card .rule-info { flex: 1; min-width: 0; }

.notif-rule-card .rule-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #F5F5F5;
}

.notif-rule-card .rule-desc {
    font-size: 0.8125rem;
    color: #B8B8B8;
    margin-top: 0.25rem;
}

.notif-rule-card .rule-channels {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.channel-badge.push { background: #dbeafe; color: #1e40af; }
.channel-badge.email { background: #e0e7ff; color: #3730a3; }
.channel-badge.sms { background: #d1fae5; color: #065f46; }
.channel-badge.voice { background: #fce7f3; color: #9d174d; }