@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --font: 'Outfit', sans-serif;
    --border-bright: rgba(255, 255, 255, 0.15);
}

/* --- LOGO STYLES (V2.1) --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-box img {
    filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.3));
    transition: all 0.3s ease;
    object-fit: contain;
}

.logo-container:hover .logo-box {
    transform: scale(1.08) rotate(3deg);
}

.logo-container:hover .logo-box img {
    filter: drop-shadow(0 0 15px rgba(79, 70, 229, 0.6));
}

.logo-glow-effect {
    position: absolute;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, transparent 70%);
    filter: blur(15px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    animation: logoPulse 4s infinite ease-in-out;
}

.logo-container:hover .logo-glow-effect {
    opacity: 1;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.08) 0px, transparent 40%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.05) 0px, transparent 40%);
    color: var(--text);
    line-height: 1.4;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
    color: white;
    text-transform: uppercase;
}

.nav-logo i {
    color: var(--primary);
    font-size: 18px;
}

/* Glassmorphism Refined */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.glass-bright {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dashboard Elements */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 0px;
    color: white;
}

.stat-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-card {
    padding: 24px;
    position: relative;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.5);
}

.service-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.back-link i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.back-link:hover {
    color: white !important;
    transform: translateX(-4px);
}

.back-link:hover i {
    color: var(--primary);
}

/* Inputs */
.form-group {
    margin-bottom: 24px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
    margin-top: 8px;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.6) 50%),
        linear-gradient(135deg, rgba(255,255,255,0.6) 50%, transparent 50%),
        linear-gradient(to right, rgba(255,255,255,0.12), rgba(255,255,255,0.12));
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px),
        calc(100% - 38px) 50%;
    background-size:
        6px 6px,
        6px 6px,
        1px 18px;
    background-repeat: no-repeat;
}

select.form-input option {
    color: #0f172a;
    background: #ffffff;
}

.list-toolbar .form-input {
    margin-top: 0;
}

.list-bulkbar {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.10) 0%, rgba(14, 165, 233, 0.06) 100%);
}

.list-bulkbar form {
    flex-wrap: wrap;
    align-items: center;
}

.list-bulkbar .form-input {
    margin-top: 0;
}

.list-bulkbar__select {
    border-color: rgba(255,255,255,0.14);
    flex: 1 1 240px;
    min-width: 220px;
}

.list-bulkbar__btn {
    flex: 0 0 auto;
}

.list-bulkbar__select:focus {
    transform: none;
}

.table-applications thead th {
    position: static;
    top: auto;
    background: transparent;
    z-index: auto;
    box-shadow: none;
}

.table-applications {
    border-collapse: collapse;
    border-spacing: 0;
}

.table-applications tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.table-applications tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.table-applications td {
    vertical-align: top;
}

.table-applications th:first-child,
.table-applications td:first-child {
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

.table-applications td {
    line-height: 1.35;
}

@media (max-width: 768px) {
    .list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .list-toolbar > div:first-child {
        width: 100%;
        min-width: 0;
    }

    .list-toolbar__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .list-toolbar__perpage {
        grid-column: 1 / -1;
        width: 100%;
    }

    .list-toolbar__perpage > div {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .list-toolbar__perpage select.form-input {
        width: 100% !important;
    }

    .list-toolbar__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .list-bulkbar {
        justify-content: flex-start;
        gap: 10px;
    }

    .list-bulkbar form {
        width: 100%;
    }

    .list-bulkbar > div:last-child {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .list-bulkbar__select {
        width: 100%;
        flex: 1 1 100%;
        min-width: 0;
    }

    .list-bulkbar__btn {
        width: 100%;
    }

    .table-wrapper {
        -webkit-overflow-scrolling: touch;
    }

    .table-applications input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
    }

    .table-applications td:last-child .btn {
        min-width: 38px;
        min-height: 38px;
        padding: 0 !important;
        border-radius: 10px;
        justify-content: center;
    }

    .table-applications thead th { top: auto; }
}

@media (max-width: 480px) {
    .list-toolbar__actions {
        grid-template-columns: 1fr;
    }
}

.case-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

/* Table Compact */
.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 10px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}

td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

/* Upload Zone */
.doc-preview {
    display: block;
    max-width: 100%;
    max-height: 380px;
    width: auto;
    height: auto;
    margin: 16px auto 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    object-fit: contain;
    background: #0b1120;
    transition: transform 0.3s ease; /* Smooth rotation */
}

.rotate-90 { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }
.rotate-270 { transform: rotate(270deg); }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Badge */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success { 
    background: rgba(16, 185, 129, 0.2); 
    color: #10b981; 
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* --- DASHBOARD HERO --- */
.welcome-hero {
    position: relative;
    padding: 40px;
    margin-bottom: 32px;
    overflow: visible !important; /* Force overflow for dropdowns */
    z-index: 1;
}

.hero-glass-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-bright);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.05);
    pointer-events: none;
    z-index: -2;
}

/* --- DRAG & DROP ZONE (V2.2 REFINED) --- */
.drop-zone {
    width: 100%;
    height: 140px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone--over {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.drop-zone__thumb {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: #0b1120;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.drop-zone__thumb::after {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    color: white;
    background: rgba(0, 0, 0, 0.75);
    font-size: 10px;
    text-align: center;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.drop-zone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    display: none !important;
}

/* Modern Segmented Control for Company Type */
.segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 8px;
}

.segmented-option {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.segmented-option.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.segmented-option:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.animate-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PROFESSIONAL PRINT REPORT STYLES --- */
@media print {
    body {
        background: #fff !important;
        background-image: none !important;
        color: #1a1a1a !important;
        font-size: 11pt !important;
    }

    .navbar, .btn, .nav-user, .badge-pending, .badge-success, aside .btn-ghost, .service-icon {
        display: none !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .glass, .glass-bright {
        background: transparent !important;
        backdrop-filter: none !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        border-radius: 4px !important;
    }

    .case-grid {
        display: block !important;
    }

    aside {
        margin-bottom: 30px !important;
        width: 100% !important;
    }

    main {
        width: 100% !important;
    }

    .case-label {
        color: #666 !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 2px;
        margin-top: 10px;
    }

    .case-value {
        color: #000 !important;
        font-weight: 700 !important;
        padding: 4px 0;
    }

    .doc-card {
        page-break-inside: avoid;
        margin-top: 20px;
        border: 1px solid #eee !important;
    }

    .doc-preview {
        max-height: 350px !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        background: white !important;
    }

    /* Print Header - Professional Dossier Look */
    .print-only-header {
        display: block !important;
        border-top: 4px solid var(--primary);
        border-bottom: 1px solid #000;
        padding: 20px 0;
        margin-bottom: 40px;
    }

    .print-only-header h1 {
        font-size: 24pt;
        font-weight: 800;
        margin: 0;
        color: #000;
        letter-spacing: -1px;
    }

    .print-meta-box {
        display: flex;
        justify-content: space-between;
        margin-top: 15px;
        font-family: sans-serif;
    }

    .print-meta-item {
        background: #f8fafc;
        padding: 8px 15px;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
        font-size: 9pt;
    }
}

.print-only-header { display: none; }

/* Dossier Header - Premium Info Bar (FIXED FROM NAVY TO GLASS) */
.dossier-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.dossier-meta {
    display: flex;
    gap: 32px;
}

.dossier-item .label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.dossier-item .value {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* Case Grid (Detail View Layout) */
.case-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

aside {
    position: sticky;
    top: 100px;
}

/* PDF Preview Frame - ENLARGED */
.pdf-frame {
    width: 100%;
    height: 750px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    margin-top: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Notification Center (V2.4 Refresh) */
.notif-dropdown {
    width: 340px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.notif-header {
    padding: 15px 20px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mark-all-read {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}

.mark-all-read:hover {
    color: white !important;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.mark-all-read i {
    font-size: 9px;
    color: var(--primary);
}

.notif-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    text-decoration: none !important;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    background: transparent;
}

.notif-item:hover {
    background: rgba(79, 70, 229, 0.08);
}

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

.notif-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.notif-content {
    flex: 1;
}

.notif-title {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notif-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Premium Dropdown System (V2.7) */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 240px;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-bright);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.dropdown-menu.dropdown-right {
    left: auto;
    right: 0;
}

.dropdown-wrapper:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

@media (min-width: 769px) {
    .dropdown-item:hover {
        transform: translateX(5px);
    }
}

.dropdown-item i {
    font-size: 14px;
    color: var(--primary);
    width: 20px;
}

/* White Form Headers Utility */
.white-header {
    color: white !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding-bottom: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.white-header i {
    color: white;
}

/* --- RESPONSIVE OPTIMIZATIONS (V3.1 - FINAL FIX) --- */

/* Utility Classes - Safe Defaults */
.show-mobile { display: none !important; }
.hide-mobile { } /* Default inherited display */

/* Base Hidden States (For Desktop) - FORCE HIDDEN */
.mobile-drawer, 
.drawer-overlay, 
.hamburger-btn {
    display: none !important;
}

/* Side Menu (Drawer) - Global Defaults (Hidden) */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);
    z-index: 9999;
    padding: 30px 24px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-left: 1px solid var(--border-bright);
    display: none; /* Hidden on desktop */
    flex-direction: column;
    gap: 20px;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none; /* Hidden on desktop */
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hamburger-btn {
    width: 40px;
    height: 40px;
    display: none; /* Hidden on desktop */
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 18px;
}


/* Mobile Breakpoint (768px) */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
    
    .hamburger-btn { display: flex !important; }
    .mobile-drawer { display: flex !important; }
    .drawer-overlay { display: block !important; }
    
    .container {
        padding: 0 16px;
    }

    .btn {
        min-height: 42px;
        border-radius: 10px;
    }

    .form-input {
        font-size: 16px;
    }

    /* Grids & Cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card {
        padding: 20px;
    }

    .form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Welcome Hero Stacking */
    .welcome-hero {
        padding: 24px 20px !important;
        margin-bottom: 24px;
        overflow: visible !important;
    }

    .welcome-hero .hero-glass-bg {
        border-radius: 20px !important;
    }

    .welcome-hero .hero-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left;
    }

    .welcome-hero .btn-group {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .welcome-hero .btn {
        width: 100%;
    }

    /* Table Mobile View */
    .table-wrapper {
        margin: 0 -16px;
        width: calc(100% + 32px);
    }
    
    table th, table td {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Dossier Header Mobile */
    .dossier-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .dossier-meta {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    /* Segmented Control Fix */
    .segmented-control {
        flex-direction: column;
        gap: 4px;
        background: transparent;
        border: none;
        padding: 0;
    }

    .segmented-option {
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--border);
    }

    /* Drop Zone Fix */
    /* Case Grid (View Page) */
    .case-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    aside {
        position: static !important;
    }

    aside .glass {
        position: static !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-content {
        padding: 0 10px;
    }

    .btn {
        padding: 10px 16px;
        min-height: 44px;
    }
}
