/* ==============================================
   DASHBOARD — Premium Dark Theme
   Matching landing.html / style_wow.css aesthetic
   ============================================== */
:root {
    --y: #1a1a1a;
    --y2: rgba(26, 26, 26, 0.6);
    --yd: rgba(26, 26, 26, 0.04);
    --bg: #f5f6f8;
    --bg2: #ffffff;
    --bg3: #ffffff;
    --bg4: #f8f9fa;
    --w: #1a1a1a;
    --w2: #333333;
    --w3: #4b5563;
    --g: #6b7280;
    --g2: #9ca3af;
    --line: rgba(0, 0, 0, 0.08);
    --line2: rgba(0, 0, 0, 0.15);
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Space Grotesk', sans-serif;
    --max: 1400px;
    --r: 20px;
    --r2: 12px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --green: #10b981;
    --red: #ef4444;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --purple: #8b5cf6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--w);
    overflow-x: hidden;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

a:focus {
    outline: none;
}

em {
    font-family: var(--sans);
    font-style: italic;
    color: var(--y);
}

/* ====== AMBIENT BG ====== */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: #f5f6f8;
}

.ambient-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.ambient-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(245, 246, 248, 0.80);
    z-index: 1;
}

.ambient-orb {
    display: none;
}

.ambient-orb:nth-child(1) {
    width: 600px;
    height: 600px;
    top: -10%;
    left: -5%;
    background: radial-gradient(circle, rgba(230, 230, 230, 0.8), transparent 70%);
    animation: ambFloat 20s ease-in-out infinite alternate;
}

.ambient-orb:nth-child(2) {
    width: 500px;
    height: 500px;
    bottom: -10%;
    right: -5%;
    background: radial-gradient(circle, rgba(210, 210, 210, 0.8), transparent 70%);
    animation: ambFloat 25s ease-in-out infinite alternate-reverse;
}

@keyframes ambFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 20px) scale(1.1);
    }

    100% {
        transform: translate(-20px, -10px) scale(.95);
    }
}

/* ====== LAYOUT FRAMEWORK ====== */
.dash-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}


/* ====== CONTENT WRAPPER ====== */
.dash-content-wrapper {
    /* Keep content above the ambient overlay after entry animations finish. */
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Prevents flexbox overflow */
    background: transparent;
}

/* ====== TOP HEADER ====== */
.dash-header {
    height: 80px;
    background: rgba(8, 9, 12, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-i {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.logo span {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--g);
}

.logo b {
    font-weight: 800;
    color: var(--y);
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ====== GLASSMORPHISM NAV PILL ====== */
.nav-glass-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-glass-pill a {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--w3);
    transition: all .25s var(--ease);
    white-space: nowrap;
}

.nav-glass-pill a:hover {
    color: var(--w);
    background: rgba(0, 0, 0, 0.06);
}

.nav-glass-pill .logout-link {
    color: var(--red) !important;
}

.nav-glass-pill .logout-link:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* ====== HAMBURGER BUTTON ====== */
.dash-ham {
    display: none;
    background: none;
    border: none;
    width: 26px;
    height: 18px;
    position: relative;
    cursor: pointer;
    padding: 0;
    z-index: 201;
    flex-shrink: 0;
}

.dash-ham span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--w);
    position: absolute;
    left: 0;
    border-radius: 2px;
    transition: all .35s var(--ease);
}

.dash-ham span:nth-child(1) {
    top: 0;
}

.dash-ham span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.dash-ham span:nth-child(3) {
    bottom: 0;
}

.dash-ham.open span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.dash-ham.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.dash-ham.open span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ====== MOBILE NAV OVERLAY ====== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 89;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .4s var(--ease);
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: transform .4s var(--ease);
}

.mobile-nav-overlay.open .mobile-nav-content {
    transform: translateY(0);
}

.mobile-nav-content a {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--w2);
    padding: 14px 32px;
    border-radius: 16px;
    transition: all .25s var(--ease);
    letter-spacing: -0.3px;
}

.mobile-nav-content a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--w);
}

.mobile-nav-content .logout-link {
    color: var(--red) !important;
}

.logout-link {
    color: var(--red) !important;
}

/* ====== EMAIL VERIFY BANNER ====== */
.email-verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 40px;
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
}

.evb-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.evb-content svg {
    flex-shrink: 0;
    color: #d97706;
}

.evb-content span {
    font-size: 0.82rem;
    font-weight: 600;
    color: #92400e;
}

.evb-btn {
    flex-shrink: 0;
    padding: 6px 18px;
    background: #d97706;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.evb-btn:hover {
    background: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

.evb-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s;
}

.evb-close:hover {
    background: rgba(146,64,14,0.1);
    color: #78350f;
}

@media(max-width:768px) {
    .email-verify-banner {
        padding: 12px 16px;
    }
    .evb-content {
        flex-wrap: wrap;
    }
    .evb-content span {
        font-size: 0.78rem;
    }
}

/* ====== MAIN CONTENT AREA ====== */
.dash-main {
    flex: 1;
    padding: 40px;
    max-width: var(--max);
    width: 100%;
    margin: 0 auto;
}

/* ====== PAGE HEADER ====== */
.page-header {
    margin-bottom: 32px;
}

.page-label {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 1px solid rgba(245, 197, 24, .2);
    color: var(--y2);
    margin-bottom: 10px;
}

.page-title {
    font-family: var(--sans);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.page-desc {
    font-size: .85rem;
    color: var(--g);
}

/* ====== GRID ====== */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    align-items: start;
}

.dash-grid.single {
    grid-template-columns: 1fr;
}

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

/* ====== GLASS CARD ====== */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r);
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: box-shadow .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(26, 26, 26, 0.1), transparent);
}

.glass-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-title {
    font-family: var(--sans);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--w);
    letter-spacing: -0.5px;
}

.card-desc {
    font-size: .85rem;
    color: var(--g);
    margin-bottom: 24px;
}

/* ====== FORM CONTROLS ====== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--w3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--r2);
    color: var(--w);
    font-family: var(--sans);
    font-size: .9rem;
    transition: all .3s;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background: #ffffff;
    border-color: var(--y);
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.05);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--g2);
}

.form-select option {
    background: #ffffff;
    color: var(--w);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row>* {
    flex: 1;
}

/* ====== DETAILS BOX ====== */
.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-row {
    background: #f9fafb;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r2);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--w3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: .9rem;
    font-weight: 600;
    color: var(--w);
}

/* ====== PROFILE HERO BANNER ====== */
.profile-banner {
    margin-bottom: 32px;
}

.profile-banner-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

@media(max-width: 900px) {
    .profile-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 16px;
    }

    .profile-banner-inner .ph-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-banner-inner .ph-actions {
        justify-content: center;
        width: 100%;
        margin-top: 12px;
    }
}

.ph-avatar-ring {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #1a1a1a, #6b7280, #1a1a1a, #6b7280, #1a1a1a);
    padding: 3px;
    animation: ringRotate 8s linear infinite;
}

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

.ph-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -1px;
}

.ph-info {
    flex: 1;
    min-width: 0;
}

.ph-name {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--y);
    margin: 0;
}

.ph-email {
    font-size: 0.95rem;
    color: var(--g);
    margin-top: 4px;
}

.ph-joined {
    font-size: 0.78rem;
    color: var(--g2);
    margin-top: 2px;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 0;
    border-bottom: none;
    overflow-x: auto;
}

.ptab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--g);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: var(--sans);
}

.ptab svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.ptab:hover {
    color: var(--w);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
}

.ptab:hover svg {
    opacity: 1;
}

.ptab.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.ptab.active svg {
    opacity: 1;
}

.ptab.danger:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.15);
}

.ptab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.ptab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--r2);
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .3s var(--ease);
}

.btn-primary {
    background: var(--y);
    color: #ffffff;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.25);
    transform: translateY(-2px);
    background: #000000;
}

.btn-outline {
    background: #ffffff;
    color: var(--w3);
    border: 1px solid var(--line2);
}

.btn-outline:hover {
    border-color: var(--y);
    color: var(--y);
    background: #fafafa;
}

.btn-danger {
    background: rgba(239, 68, 68, .08);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, .2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, .15);
}

.btn-sm {
    padding: 8px 16px;
    font-size: .75rem;
}

.btn-full {
    width: 100%;
}

.btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ====== CASE LIST ITEM ====== */
.case-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r2);
    padding: 18px 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all .3s var(--ease);
    cursor: default;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.case-item:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.case-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--w);
}

.case-id {
    font-size: .7rem;
    color: var(--g2);
    font-family: monospace;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.case-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.case-actions a,
.case-actions button {
    font-size: .8rem;
    font-weight: 700;
    color: var(--w);
    transition: all .3s;
    background: #f4f5f7;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--sans);
    text-decoration: none;
}

.case-actions a:hover,
.case-actions button:hover {
    background: var(--y);
    color: #ffffff;
    border-color: var(--y);
}

/* ====== STATUS BADGE ====== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-submitted {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.08);
}

.badge-assigned {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.08);
}

.badge-in_progress {
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(124, 58, 237, 0.08);
}

.badge-completed {
    color: #059669;
    border-color: rgba(5, 150, 105, 0.2);
    background: rgba(5, 150, 105, 0.08);
}

.badge-rejected_by_admin {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.08);
}

.badge-admin_review {
    color: #333333;
    border-color: rgba(51, 51, 51, 0.2);
    background: rgba(51, 51, 51, 0.08);
}

.badge-draft {
    color: #4b5563;
    border-color: rgba(75, 85, 99, 0.2);
    background: rgba(75, 85, 99, 0.08);
}

.badge-visible_to_agents {
    color: #059669;
    border-color: rgba(5, 150, 105, 0.2);
    background: rgba(5, 150, 105, 0.08);
}

.badge-reassigned {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.08);
}


.badge-archived {
    color: var(--g2);
    border-color: var(--line);
    background: rgba(107, 114, 128, .08);
}

.badge-withdrawn {
    color: #dc2626;
    border-color: rgba(220, 38, 38, .25);
    background: rgba(220, 38, 38, .08);
}

/* ====== WITHDRAWAL TAB (Red accent) ====== */
.ptab-withdrawal {
    position: relative;
}

.ptab-withdrawal::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(1.3); }
}

/* ====== DANGER BUTTON ====== */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all .3s var(--ease);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, .25);
}

/* ====== WITHDRAWAL CARD ====== */
.withdrawal-card {
    border-left: 4px solid #ef4444 !important;
    transition: all .3s var(--ease);
}

.withdrawal-card:hover {
    border-left-color: #dc2626 !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, .1);
}

.withdrawal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-approve {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all .3s var(--ease);
}

.btn-approve:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, .25);
}

.btn-reject {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all .3s var(--ease);
}

.btn-reject:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, .25);
}

.withdrawal-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
}

/* ====== RESPONSE PRE ====== */
.response-box {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r2);
    padding: 14px 18px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: .75rem;
    color: var(--g);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
}

.auth-form-feedback {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-form-feedback.is-visible { display: block; }

.auth-form-feedback.is-success {
  color: #c9f6de;
  background: rgba(58, 186, 121, 0.12);
  border-color: rgba(99, 220, 155, 0.36);
}

.auth-form-feedback.is-error {
  color: #ffd0d0;
  background: rgba(231, 91, 91, 0.12);
  border-color: rgba(255, 125, 125, 0.38);
}

/* ====== DIVIDER ====== */
.divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 20px 0;
}

/* ====== SECTION LABEL ====== */
.section-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--g2);
    margin-bottom: 12px;
    margin-top: 20px;
}

/* ====== EMPTY STATE ====== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--g2);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: .5;
}

.empty-state p {
    font-size: .85rem;
}

/* ====== BACK LINK ====== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--g);
    transition: color .3s;
    margin-bottom: 20px;
}

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

/* ====== AUTH SPLIT LAYOUT ====== */
.auth-split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Auth pages need dark background */
body:has(.auth-split-layout),
body:has(.auth-form-side) {
    background: #0a0a0f !important;
    color: #fff;
}

body:has(.auth-split-layout) .ambient,
body:has(.auth-form-side) .ambient {
    background: #0a0a0f !important;
}

body:has(.auth-split-layout) .ambient-orb:nth-child(1) {
    background: radial-gradient(circle, rgba(245, 197, 24, 0.1), transparent 70%);
}

body:has(.auth-split-layout) .ambient-orb:nth-child(2) {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
}

.auth-bg-img {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.auth-text-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    /* Safari support */
}

.auth-text-side h1 {
    font-family: var(--sans);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.1;
}

.auth-text-side p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    line-height: 1.6;
}

.auth-form-side {
    width: 100%;
    max-width: 500px;
    background: rgba(12, 12, 17, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.auth-split-layout.reverse {
    flex-direction: row-reverse;
}

.auth-split-layout.reverse .auth-form-side {
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.auth-form-side h2 {
    font-family: var(--sans);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: #fff;
}

.auth-form-side .form-group {
    margin-bottom: 30px;
    position: relative;
}

.auth-form-side .form-label {
    display: none;
}

.auth-form-side .form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding: 10px 0;
    font-size: 1.05rem;
    color: #fff;
    transition: all 0.3s;
}

.auth-form-side .form-input:focus {
    border-bottom-color: var(--green);
    box-shadow: none;
}

.auth-form-side .form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.auth-form-side .btn-primary {
    background: var(--green);
    color: #fff;
    border-radius: 4px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 10px;
    width: 100%;
}

.auth-form-side .btn-primary:hover {
    background: #0ea5e9;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.auth-bottom-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-bottom-link a {
    color: var(--green);
    font-weight: 600;
}

.auth-bottom-link a:hover {
    text-decoration: underline;
}

.auth-error {
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: var(--r2);
    padding: 10px 16px;
    font-size: .85rem;
    color: var(--red);
    margin-bottom: 24px;
    text-align: center;
}

.auth-success {
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .2);
    border-radius: var(--r2);
    padding: 10px 16px;
    font-size: .85rem;
    color: var(--green);
    margin-bottom: 24px;
    text-align: center;
}

/* Auth social icons area */
.auth-social-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.auth-divider-vertical {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-divider-vertical::before,
.auth-divider-vertical::after {
    content: '';
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px 0;
}

.auth-social-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.auth-social-btn:hover {
    transform: scale(1.1);
}

/* Inner form container for social layout */
.auth-form-inner {
    display: flex;
    gap: 30px;
    align-items: center;
}

.auth-form-fields {
    flex: 1;
}

/* ====== FOOTER ====== */
.dash-footer {
    text-align: center;
    padding: 20px;
    font-size: .68rem;
    color: var(--g2);
    border-top: 1px solid var(--line);
}

/* ====== ANIMATIONS ====== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.fade-up {
    /* Release the opacity backdrop root after entry so nested glass can blur the page. */
    animation: fadeUp .6s var(--ease) backwards;
}

.fade-up-1 {
    animation-delay: .1s;
}

.fade-up-2 {
    animation-delay: .2s;
}

.fade-up-3 {
    animation-delay: .3s;
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bg3);
    border-radius: 3px;
}

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

/* ====== RESPONSIVE ====== */
@media(max-width:768px) {
    .dash-nav-inner {
        padding: 0 16px;
    }

    .dash-main {
        padding: 24px 16px 60px;
    }

    .glass-card {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .case-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .case-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .auth-split-layout {
        flex-direction: column !important;
        min-height: 100vh;
    }

    .auth-text-side {
        padding: 50px 24px;
        flex: none;
        text-align: center;
    }

    .auth-text-side p {
        margin: 0 auto;
    }

    .auth-form-side {
        max-width: 100%;
        flex: 1;
        padding: 40px 24px;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    }

    .auth-form-inner {
        flex-direction: column;
        gap: 20px;
    }

    .auth-divider-vertical {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

    .auth-divider-vertical::before,
    .auth-divider-vertical::after {
        width: 30%;
        height: 1px;
        margin: 0 15px;
    }

    .auth-social-btns {
        flex-direction: row;
        justify-content: center;
    }

    .nav-glass-pill {
        display: none;
    }

    .dash-ham {
        display: block;
    }

    .dash-header {
        padding: 0 16px;
    }
}

/* Auto Extracted Styles Part 2 */
.w-380 {
    width: 380px;
}

.w-400 {
    width: 400px;
}

.d-none {
    display: none;
}

.mt-24 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 4px;
}

.ml-32 {
    margin-left: 32px;
}

.mb-32 {
    margin-bottom: 32px;
}

.mt-16 {
    margin-top: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-28 {
    margin-bottom: 28px;
}

.cursor-default {
    cursor: default;
}

.auth-nav-center {
    display: none;
    padding: 60px 0;
    text-align: center;
    position: relative;
    z-index: 5;
}

/* ====== LAYOUT UTILITIES ====== */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-end;
}

.filter-row .form-group {
    margin: 0;
    flex: 1;
    min-width: 140px;
}

.customer-history-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) repeat(2, minmax(150px, 1fr)) repeat(3, auto);
    align-items: end;
    gap: 12px;
    margin: 24px 0 28px;
}

.customer-history-filters .form-group {
    min-width: 0;
}

#tab-pool,
#tab-mine {
    --w: #fff;
    --w2: #fff;
    --w3: #fff;
    --g: #fff;
    --g2: #fff;
    color: #fff;
}

#tab-pool .status-badge,
#tab-mine .badge,
#tab-mine code,
#tab-mine input::placeholder,
#tab-pool .case-id,
#tab-pool code,
#tab-pool input::placeholder {
    color: #fff !important;
    opacity: 1 !important;
}

#tab-pool .status-badge {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.25) !important;
}

#tab-mine .badge { color: #fff !important; }
#tab-mine .card-title { margin-bottom: 24px; }

#tab-pool .btn {
    color: #fff;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: none !important;
}

#tab-pool .pool-request-card {
    background: rgba(0,0,0,.42) !important;
    padding: 24px;
}
.pool-request-title { font-size: 1.2rem; font-weight: 700; margin: 8px 0; }
.pool-request-meta { display: grid; gap: 12px; margin-top: 20px; }
.pool-request-meta > div { display: flex; justify-content: space-between; gap: 20px; }
.pool-request-meta dt { color: #fff; }
.pool-request-meta dd { color: #fff; text-align: right; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.pool-request-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pool-request-footer time { font-size: .8rem; color: #fff; }

.customer-history-filters .btn {
    height: 44px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .customer-history-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .customer-history-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .customer-history-filters .form-group {
        grid-column: span 3;
    }

    .customer-history-filters .form-group:first-child {
        grid-column: 1 / -1;
    }

    .customer-history-filters .btn {
        grid-column: span 2;
        min-width: 0;
        padding-inline: 8px;
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

.cms-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 8px;
}

@media(max-width: 768px) {
    .cms-section {
        grid-template-columns: 1fr;
    }
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.stats-grid-sm {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

@media(max-width: 1024px) {
    .stats-grid-sm {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.stats-grid-lg {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.full-width-col {
    grid-column: 1 / -1;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
}

.full-width-col .detail-value {
    white-space: pre-wrap;
    word-break: break-word;
    width: 100%;
}

.space-card {
    margin-bottom: 40px !important;
}

.label-dark {
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--w3);
    margin: 0;
}

.label-yellow {
    border-color: rgba(212, 175, 55, 0.3);
}

.cursor-pointer {
    cursor: pointer;
}

.modal-lg {
    max-width: 900px;
    width: 90vw;
}

/* ====== CUSTOM MODALS ====== */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-modal-backdrop.active {
    display: flex;
}

.custom-modal {
    background: #ffffff;
    border-radius: var(--r);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* ====== CHAT MODAL VARIANT ====== */
.custom-modal.chat-modal {
    max-width: 720px;
    height: 80vh;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,0.05);
}

.custom-modal.chat-modal .custom-modal-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 18px 24px;
    border-bottom: none;
}

.custom-modal.chat-modal .custom-modal-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.custom-modal.chat-modal .custom-modal-title svg {
    stroke: rgba(255,255,255,0.7);
}

.custom-modal.chat-modal .custom-modal-close {
    color: rgba(255,255,255,0.5);
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.custom-modal.chat-modal .custom-modal-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.custom-modal.chat-modal .chat-box {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    background: #f0f2f5;
    gap: 8px;
}

.custom-modal.chat-modal .chat-msg {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.55;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.custom-modal.chat-modal .chat-msg.me {
    background: #10b981;
    border-bottom-right-radius: 4px;
}

.custom-modal.chat-modal .chat-msg.other {
    background: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-bottom-left-radius: 4px;
}

.custom-modal.chat-modal .chat-sender {
    font-size: 0.65rem;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 3px;
    opacity: 1;
}

.custom-modal.chat-modal .chat-meta {
    font-size: 0.6rem;
    margin-top: 4px;
    opacity: 0.55;
}

.custom-modal.chat-modal .chat-input-area {
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
    gap: 10px;
}

.custom-modal.chat-modal .chat-text-input {
    padding: 10px 18px;
    font-size: 0.88rem;
    border-radius: 24px;
    background: #f5f6f8;
    border: 1px solid transparent;
}

.custom-modal.chat-modal .chat-text-input:focus {
    background: #fff;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.custom-modal.chat-modal .chat-file-btn {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    background: #f5f6f8;
    border: none;
    flex-shrink: 0;
}

.custom-modal.chat-modal .chat-send-btn {
    height: 40px;
    padding: 0 18px !important;
    border-radius: 24px !important;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* File Attachment Preview */
.file-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 8px 16px;
    animation: slideInUp 0.3s var(--ease);
}

.file-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #065f46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.file-remove-btn {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.file-remove-btn:hover {
    background: #dc2626;
    color: #fff;
}

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

.custom-modal.chat-modal .empty-state {
    margin: auto;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

@media(max-width: 768px) {
    .custom-modal.chat-modal {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .custom-modal-backdrop:has(.chat-modal) {
        padding: 0;
    }

    .custom-modal.chat-modal .chat-msg {
        max-width: 88%;
    }

    .custom-modal.chat-modal .chat-box {
        padding: 16px;
    }

    .custom-modal.chat-modal .chat-input-area {
        padding: 10px 12px;
        gap: 8px;
    }

    .custom-modal.chat-modal .chat-send-btn {
        padding: 0 14px !important;
        font-size: 0.8rem;
    }
}

.custom-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--w);
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--w3);
    transition: color 0.3s;
}

.custom-modal-close:hover {
    color: var(--w);
}

.custom-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-body-p {
    padding: 40px 45px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-28 {
    margin-bottom: 28px;
}

.text-left {
    text-align: left;
}

.wh-40 {
    width: 40px;
    height: 40px;
}

.text-14rem {
    font-size: 1.4rem;
}

.btn-outline-auth {
    margin-top: 12px;
    display: block;
    text-align: center;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
}

.btn-outline-auth:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: #ffffff;
    color: #000000;
}

/* Auth call-to-action glass treatment. Kept here because both auth pages load dashboard.css. */
.auth-form-side .btn.btn-primary {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(22px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24) !important;
}

.auth-form-side .btn.btn-outline-auth {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(22px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24) !important;
}

.text-y-under {
    color: var(--y);
    text-decoration: underline;
}

.color-g2 {
    color: var(--g2);
}

/* ====== INLINE REFACTOR UTILITIES ====== */
.d-none {
    display: none;
}

.dashboard-map {
    height: 250px;
    width: 100%;
    text-align: left;
    z-index: 1;
    position: relative;
}

/* Wizard tab needs overflow visible for Leaflet map tiles */
#tab-new {
    overflow: visible;
}

/* ====== NOTIFICATION COMPONENT ====== */
.nav-right-cluster {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notif-wrap {
    position: relative;
    display: none;
}

.notif-btn {
    position: relative;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

.notif-btn:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background: #fafafa;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: rgba(14,17,20,.88);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(255,255,255,.22);
    display: none;
    z-index: 9999;
    overflow: hidden;
}

.notif-dropdown.open {
    display: block;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.05);
}

.notif-head strong {
    font-size: 15px;
    color: #fff;
}

.notif-head button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    transition: background 0.2s;
}

.notif-head button:hover {
    background: rgba(255,255,255,.16);
    color: #fff;
}

.notif-list {
    max-height: min(420px, calc(100dvh - 190px));
    scrollbar-color: rgba(255,255,255,.3) transparent;
    overflow-y: auto;
}

.notif-empty {
    padding: 30px 20px;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.notif-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    text-decoration: none;
    color: inherit;
    transition: .2s ease;
    cursor: pointer;
    background: transparent;
}

.notif-item:hover {
    background: rgba(255,255,255,.10);
}

.notif-item.unread {
    background: rgba(255,255,255,.07);
    box-shadow: inset 3px 0 0 #fff;
}

.notif-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.notif-message {
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.notif-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: #fff;
}

.notif-level {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .04em;
}

.notif-level.info {
    color: #fff;
}

.notif-level.success {
    color: #fff;
}

.notif-level.warning {
    color: #fff;
}

.notif-level.error {
    color: #fff;
}

.notif-title, .notif-message { overflow-wrap: anywhere; }
.notif-meta { flex-wrap: wrap; }
.notif-item:last-child { border-bottom: 0; }
.notif-head button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) {
    .notif-dropdown { position: fixed; top: 100px; right: 16px; width: calc(100vw - 32px); }
    .notif-head, .notif-item { padding: 14px 16px; }
}

/* ====== STEPPER & TIMELINE ====== */
.stepper-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 50px;
    position: relative;
    padding: 0 20px;
}

.stepper-wrap::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: var(--line);
    z-index: 0;
}

.step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--w3);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.step-dot.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.step-dot.done {
    background: var(--line);
    border-color: var(--line);
    color: var(--w);
}

.step-label {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--w3);
}

.step-dot.active .step-label {
    color: var(--green);
}

/* Four-step customer request form. */
#tab-new {
    --w: #fff;
    --w1: #fff;
    --w2: #fff;
    --w3: #fff;
    --g: #fff;
    --g2: #fff;
    --green: #fff;
    --bg2: rgba(255, 255, 255, .12);
    color: #fff;
}

#tab-new .card-desc,
#tab-new .step-label,
#tab-new .step-dot,
#tab-new input::placeholder,
#tab-new textarea::placeholder {
    color: #fff !important;
    opacity: 1;
}

#tab-new .stepper-wrap {
    max-width: 760px;
    margin: 8px auto 64px;
    padding-inline: 36px;
}

#tab-new .stepper-wrap::before { content: none; }
#tab-new .step-connector { flex: 1; height: 2px; margin-inline: 8px; background: rgba(255,255,255,.3); }
#tab-new .step-dot { flex-shrink: 0; }
#tab-new .technical-group {
    min-width: 0;
    margin: 0 0 28px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 14px;
    background: rgba(0,0,0,.18);
    color: #fff;
}
#tab-new .technical-group legend { padding-inline: 10px; font-size: 1.05rem; font-weight: 700; color: #fff; }
#tab-new .technical-group > :last-child { margin-bottom: 0; }
#tab-new .technical-preferences { display: flex; flex-wrap: wrap; gap: 16px 28px; }
#tab-new .technical-preferences label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
@media (max-width: 700px) {
    #tab-new .technical-group { padding: 18px 14px; }
}
#tab-new .step-dot { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.4); }
#tab-new .step-dot.active { background: rgba(255,255,255,.25); border-color: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.08); }
#tab-new .step-dot.done { background: rgba(255,255,255,.15); border-color: #fff; }
#tab-new .request-type-title { text-align: center; margin-bottom: 28px; }
.request-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.request-type-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 190px;
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 16px;
    background: rgba(0,0,0,.28);
    color: #fff;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(20px);
    transition: background .2s, border-color .2s;
}
.request-type-card.is-selected { border: 2px solid #fff; padding: 27px; background: rgba(255,255,255,.13); }
.request-type-card:hover { background: rgba(255,255,255,.18); }
.request-type-card:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.request-type-card img {
    position: absolute;
    right: 0;
    top: 0;
    width: 48%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.8);
    mask-image: linear-gradient(to right, transparent, #000 60%);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 60%);
}
.request-type-copy { position: relative; z-index: 1; display: grid; gap: 12px; width: 72%; }
.request-type-copy strong { font-size: 1.2rem; }
.request-type-copy span { font-size: .88rem; line-height: 1.5; }
#tab-new .wizard-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 28px; }
#tab-new .wizard-nav .btn { color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(20px); }
#tab-new #step-2 > .dash-grid { grid-template-columns: 1fr !important; }
#tab-new #description { min-height: 170px; }
@media (max-width: 700px) {
    .request-type-grid { grid-template-columns: 1fr; gap: 14px; }
    .request-type-card { min-height: 145px; padding: 20px; }
    .request-type-card.is-selected { padding: 19px; }
    #tab-new .stepper-wrap { padding-inline: 14px; margin-bottom: 70px; }
    #tab-new .step-label { white-space: normal; width: 72px; text-align: center; font-size: .68rem; }
    #tab-new .dash-grid { grid-template-columns: 1fr !important; }
    #tab-new .wizard-nav .btn { min-width: 0 !important; padding-inline: 16px; }
}

/* Timeline */
.timeline-track {
    display: flex;
    background: #fff;
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: var(--r2);
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
}

.timeline-item {
    flex: 1;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    opacity: 0.4;
    transition: all 0.3s;
    position: relative;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--w3);
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--line);
    z-index: 1;
}

.timeline-item.active .timeline-dot {
    background: var(--green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 7px;
    left: calc(50% + 7px);
    width: 100%;
    height: 1px;
    background: var(--line);
    z-index: 0;
}

.timeline-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--w);
}

/* Sidebar / List Layout Utilities */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 24px;
    align-items: start;
}

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

.sticky-sidebar {
    position: sticky;
    top: 104px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Chat Overhaul */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    border-radius: var(--r2);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
}

.chat-box {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fcfcfd;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.chat-msg.me {
    align-self: flex-end;
    background: var(--green);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-msg.other {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--w);
    border-bottom-left-radius: 4px;
}

.chat-sender {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.chat-meta {
    font-size: 0.6rem;
    margin-top: 6px;
    opacity: 0.6;
    text-align: right;
}

.chat-input-area {
    padding: 16px;
    background: #fff;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-text-input {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.chat-text-input:focus {
    background: #fff;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.chat-file-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    font-size: 1.3rem;
    background: var(--bg);
    border: 1px solid var(--line);
}

/* Loading Spinner */
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

.chat-file-btn:hover {
    background: #f0f0f5;
}

.chat-send-btn {
    height: 44px;
    padding: 0 20px !important;
    border-radius: 999px !important;
}

.chat-file-input {
    display: none;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.chat-msg.other .attachment-link {
    background: var(--bg);
    border-color: var(--line);
}

.detail-row-modern {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.detail-row-modern:last-child {
    border-bottom: none;
}

.detail-l {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--w3);
}

.detail-v {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--w);
}

/* Shared authenticated panels: dark glass surfaces over the landing hero image. */
.ambient {
    background: transparent !important;
}

.ambient-hero-overlay {
    background: rgba(5, 7, 12, 0.30) !important;
}

.glass-card,
.profile-banner-inner,
.case-item,
.withdrawal-card,
.empty-state,
.space-card {
    background: rgba(10, 12, 18, 0.35) !important;
    backdrop-filter: blur(26px) saturate(1.2);
    -webkit-backdrop-filter: blur(26px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.30), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    color: #ffffff;
}

.glass-card .card-title,
.glass-card .card-desc,
.glass-card .form-label,
.profile-banner-inner .ph-name,
.profile-banner-inner .ph-email,
.profile-banner-inner .ph-joined,
.case-item .case-title,
.case-item .case-id,
.empty-state h3,
.empty-state p {
    color: #ffffff !important;
}

.glass-card .card-desc,
.profile-banner-inner .ph-email,
.profile-banner-inner .ph-joined,
.empty-state p {
    color: rgba(255, 255, 255, 0.72) !important;
}

.glass-card .form-input,
.glass-card .form-select,
.glass-card select,
.glass-card input,
.glass-card textarea {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.glass-card .form-input::placeholder,
.glass-card textarea::placeholder {
    color: rgba(255, 255, 255, 0.52) !important;
}

/* Final auth CTA override: must come after every shared button rule. */
.auth-form-side .btn.btn-primary {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(22px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24) !important;
}

.auth-form-side .btn.btn-outline-auth {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(22px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24) !important;
}

/* Keep the authenticated header legible on its black surface. */
.dash-header .logo,
.dash-header .nav-glass-pill a,
.dash-header .nav-lang,
.dash-header .nav-lang .lang-btn,
.dash-header .notif-btn {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dash-header .nav-glass-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

/* Authenticated shell background. */
body {
    background: #090a0e url('/static/img/jusuf-bachtiar-nyceoSzBZxk-unsplash.jpg') center / cover fixed no-repeat !important;
}

.ambient {
    background: transparent !important;
}

.ambient-hero-bg {
    display: none !important;
}

.ambient-hero-overlay {
    background: rgba(5, 7, 12, 0.30) !important;
}

.dash-header .logo span,
.dash-header .logo b,
.dash-header .nav-glass-pill a,
.dash-header .nav-lang .lang-btn,
.dash-header .nav-lang .lang-sep {
    color: #ffffff !important;
}

.dash-header .nav-glass-pill {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.dash-header .notif-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.glass-card,
.profile-banner-inner,
.case-item,
.withdrawal-card,
.empty-state,
.space-card {
    /* Glass effect: semi-transparent dark + blur so the background image bleeds through. */
    background: rgba(0, 0, 0, 0.62) !important;
    backdrop-filter: blur(30px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.2) !important;
    isolation: auto;
}

/* No fixed image layer inside cards: it breaks while scrolling. */
.glass-card::before,
.profile-banner-inner::before,
.case-item::before,
.withdrawal-card::before,
.empty-state::before,
.space-card::before {
    content: none !important;
}

.glass-card > *,
.profile-banner-inner > *,
.case-item > *,
.withdrawal-card > *,
.empty-state > *,
.space-card > * {
    position: relative;
    z-index: 1;
}

.profile-tabs .ptab,
.profile-tabs .ptab span {
    color: #ffffff !important;
}

.profile-tabs .ptab svg {
    color: currentColor !important;
    opacity: 1;
}

.profile-banner-inner .ph-email,
.profile-banner-inner .ph-joined,
.profile-content .card-desc,
.profile-content .form-label,
.profile-content .profile-delete-warning {
    color: #ffffff !important;
}

.profile-content input::placeholder {
    color: #ffffff !important;
    opacity: 1;
}

.profile-delete-warning {
    border-left: 4px solid #dc2626;
    background: rgba(220, 38, 38, 0.18);
    padding: 14px 16px;
    border-radius: 10px;
}

.profile-content .btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.profile-content .profile-delete-button {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.25);
}

.email-verification-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-verification-control .form-input {
    min-width: 0;
    flex: 1;
}

.email-verification-state {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
}

.email-verification-state.is-verified { color: #68e0a6; background: rgba(46, 204, 113, 0.16); }
.email-verification-state.is-unverified { color: #ff8c8c; background: rgba(239, 68, 68, 0.14); }

.email-verify-btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 640px) {
    .email-verification-control { flex-wrap: wrap; }
    .email-verification-control .form-input { flex-basis: calc(100% - 44px); }
}
