/* =====================================================
   ADVOKASIHUB — Premium Stylesheet v2.0
   ===================================================== */

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

:root {
    /* Core Palette */
    --primary:       #3B5BDB;
    --primary-dark:  #2F4AC0;
    --primary-light: #EEF2FF;
    --secondary:     #7048E8;
    --accent:        #F59F00;
    --success:       #0CA678;
    --danger:        #F03E3E;
    --info:          #1C7ED6;

    /* Neutrals */
    --dark:          #0D1B2A;
    --dark-2:        #152234;
    --gray-50:       #F8FAFC;
    --gray-100:      #F1F5F9;
    --gray-200:      #E2E8F0;
    --gray-400:      #94A3B8;
    --gray-600:      #475569;
    --gray-800:      #1E293B;

    /* Gradients */
    --grad-brand:    linear-gradient(135deg, #3B5BDB 0%, #7048E8 100%);
    --grad-hero:     linear-gradient(135deg, #0D1B2A 0%, #1a2a4a 45%, #3B5BDB 100%);
    --grad-card:     linear-gradient(145deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);

    /* Radius */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-2xl: 32px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 2px 6px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1),  0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 28px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
    --shadow-xl: 0 20px 40px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.08);
    --shadow-brand: 0 8px 32px rgba(59,91,219,.35);
    --shadow-glow:  0 0 60px rgba(59,91,219,.25);

    /* Transitions */
    --ease-out: cubic-bezier(.16,1,.3,1);
    --transition: .25s var(--ease-out);
}

/* ── Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.fw-mono { font-family: 'Courier New', monospace; }

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar            { width: 5px; }
::-webkit-scrollbar-track      { background: #f1f5f9; }
::-webkit-scrollbar-thumb      { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: var(--primary-dark); }

/* ══════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════ */
#mainNavbar {
    background: rgba(13,27,42,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: .85rem 0;
    transition: all .3s ease;
}

#mainNavbar.scrolled {
    padding: .6rem 0;
    background: rgba(13,27,42,.97);
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: var(--grad-brand);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59,91,219,.4);
    transition: transform var(--transition);
}

.navbar-brand:hover .brand-icon { transform: rotate(-5deg) scale(1.08); }

.brand-name {
    display: block;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.2;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.brand-sub {
    font-size: .65rem;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
}

.nav-link-custom {
    color: rgba(255,255,255,.75) !important;
    font-weight: 500;
    font-size: .875rem;
    padding: .45rem .85rem !important;
    border-radius: 9px;
    transition: all .2s ease;
    position: relative;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    inset: auto 50% 4px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: inset var(--transition);
    opacity: 0;
}

.nav-link-custom:hover {
    color: #fff !important;
    background: rgba(255,255,255,.08);
}

.nav-link-custom:hover::after {
    inset: auto 10% 4px;
    opacity: 1;
}

.btn-nav-admin {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15) !important;
    color: #fff !important;
    font-size: .82rem !important;
    padding: .45rem 1rem !important;
    border-radius: 9px;
    transition: all .2s ease;
    font-weight: 600 !important;
    backdrop-filter: blur(4px);
}

.btn-nav-admin:hover {
    background: rgba(255,255,255,.18) !important;
    border-color: rgba(255,255,255,.3) !important;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════ */
.hero-section {
    background: var(--grad-hero);
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.min-vh-hero {
    min-height: calc(100vh - 74px);
    padding: 4rem 0 2rem;
    display: flex;
    align-items: center;
}

/* — Particle / blob shapes — */
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.shape {
    position: absolute;
    border-radius: 50%;
}

.shape-1 {
    width: 700px; height: 700px;
    top: -220px; right: -220px;
    background: radial-gradient(circle, rgba(59,91,219,.2) 0%, transparent 70%);
}

.shape-2 {
    width: 500px; height: 500px;
    bottom: -180px; left: -150px;
    background: radial-gradient(circle, rgba(112,72,232,.18) 0%, transparent 70%);
}

.shape-3 {
    width: 350px; height: 350px;
    top: 30%; left: 25%;
    background: rgba(59,91,219,.08);
    filter: blur(80px);
}

/* Animated grid overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.5) 40%, rgba(0,0,0,.5) 60%, transparent);
    pointer-events: none;
}

/* — Hero Badge — */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.9);
    font-size: .78rem;
    font-weight: 600;
    padding: .4rem 1.1rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    text-transform: uppercase;
    letter-spacing: .07em;
    animation: fadeUp .6s var(--ease-out) both;
}

.hero-badge .badge-dot {
    width: 7px; height: 7px;
    background: #4ADE80;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(74,222,128,.3);
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%,100% { box-shadow: 0 0 0 2px rgba(74,222,128,.3); }
    50%      { box-shadow: 0 0 0 5px rgba(74,222,128,.15); }
}

/* — Hero Title — */
.hero-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -.02em;
    animation: fadeUp .6s var(--ease-out) .1s both;
}

.hero-title .text-highlight {
    background: linear-gradient(135deg, #F59F00 0%, #FF8C00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: rgba(255,255,255,.7);
    max-width: 500px;
    line-height: 1.75;
    animation: fadeUp .6s var(--ease-out) .2s both;
}

/* — Stat Cards (hero) — */
.hero-stats { animation: fadeUp .6s var(--ease-out) .3s both; }

.stat-card {
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-md);
    padding: .85rem 1.25rem;
    min-width: 105px;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    background: rgba(255,255,255,.12);
    transform: translateY(-3px);
}

.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.9rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: .7rem;
    color: rgba(255,255,255,.55);
    margin-top: .25rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
}

/* — CTA Buttons (hero) — */
.hero-cta { animation: fadeUp .6s var(--ease-out) .4s both; }

.btn-hero-primary {
    background: linear-gradient(135deg, #F59F00, #E67700);
    color: #fff !important;
    border: none;
    font-weight: 700;
    padding: .85rem 2rem;
    border-radius: 14px;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(245,159,0,.4);
    transition: all var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(245,159,0,.5);
    filter: brightness(1.05);
    color: #fff !important;
}

.btn-hero-secondary {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.9) !important;
    border: 1px solid rgba(255,255,255,.2);
    font-weight: 600;
    padding: .85rem 2rem;
    border-radius: 14px;
    font-size: 1rem;
    backdrop-filter: blur(8px);
    transition: all var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,.18);
    color: #fff !important;
    transform: translateY(-3px);
}

/* — Hero Illustration — */
.hero-illustration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeUp .6s var(--ease-out) .2s both;
}

.hero-shield-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-shield-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,91,219,.25) 0%, transparent 70%);
    animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.1); opacity: .7; }
}

.hero-shield-icon {
    font-size: 9rem;
    color: rgba(255,255,255,.08);
    filter: drop-shadow(0 0 40px rgba(59,91,219,.4));
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: rgba(255,255,255,.11);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    padding: .65rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.floating-card.card-1 { top: 5%; right: -15px; animation: floatCard 4s ease-in-out 0s infinite; }
.floating-card.card-2 { top: 42%; left: -25px; animation: floatCard 4s ease-in-out 1.5s infinite; }
.floating-card.card-3 { bottom: 10%; right: -10px; animation: floatCard 4s ease-in-out 3s infinite; }

@keyframes floatCard {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

/* — Hero Wave — */
.hero-wave { margin-top: 3rem; line-height: 0; }
.hero-wave svg { width: 100%; display: block; }

/* ══════════════════════════════════════════════════════
   SECTION TITLES
══════════════════════════════════════════════════════ */
.section-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .75rem;
    font-weight: 700;
    padding: .38rem 1.1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .08em;
    border: 1px solid rgba(59,91,219,.15);
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -.02em;
}

.section-sub {
    color: var(--gray-600);
    max-width: 520px;
    margin: .6rem auto 0;
    font-size: 1rem;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════
   CARA KERJA — STEP CARDS
══════════════════════════════════════════════════════ */
.how-section {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.step-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    border: 1px solid #EEF2FF;
    transition: all .35s var(--ease-out);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity .35s ease;
    z-index: 0;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(59,91,219,.15);
    border-color: var(--primary);
}

.step-card:hover::before { opacity: 1; }

.step-card > * { position: relative; z-index: 1; }

.step-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: .4rem;
    -webkit-text-stroke: 2px var(--primary);
    transition: all .35s ease;
}

.step-card:hover .step-number {
    color: rgba(255,255,255,.12);
    -webkit-text-stroke: 2px rgba(255,255,255,.5);
}

.step-icon {
    width: 62px;
    height: 62px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: .5rem auto;
    transition: all .35s ease;
}

.step-card:hover .step-icon {
    background: rgba(255,255,255,.2);
    color: #fff;
}

.step-title {
    font-weight: 700;
    font-size: 1rem;
    margin: .75rem 0 .3rem;
    transition: color .35s ease;
}

.step-card:hover .step-title { color: #fff; }

.step-desc {
    font-size: .83rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
    transition: color .35s ease;
}

.step-card:hover .step-desc { color: rgba(255,255,255,.8); }

/* Connector arrows (desktop) */
.step-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 1.3rem;
    padding-top: 2.5rem;
}

/* ══════════════════════════════════════════════════════
   WHY SECTION — Fitur Unggulan
══════════════════════════════════════════════════════ */
.why-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    position: relative;
    overflow: hidden;
}

.why-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.why-section .section-badge {
    background: rgba(59,91,219,.2);
    color: rgba(255,255,255,.85);
    border-color: rgba(59,91,219,.3);
}

.why-section .section-title { color: #fff; }
.why-section .section-sub   { color: rgba(255,255,255,.6); }

.feature-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    padding: 2rem 1.75rem;
    height: 100%;
    transition: all .35s var(--ease-out);
    backdrop-filter: blur(8px);
}

.feature-card:hover {
    background: rgba(255,255,255,.09);
    border-color: rgba(59,91,219,.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.3), 0 0 0 1px rgba(59,91,219,.2);
}

.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: transform .35s var(--ease-out);
}

.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-5deg); }

.fi-blue   { background: rgba(59,91,219,.2);  color: #748FFC; }
.fi-purple { background: rgba(112,72,232,.2); color: #AE8FF7; }
.fi-green  { background: rgba(12,166,120,.2); color: #63E6BE; }
.fi-amber  { background: rgba(245,159,0,.2);  color: #FFD43B; }
.fi-rose   { background: rgba(240,62,62,.2);  color: #FF8787; }
.fi-teal   { background: rgba(28,126,214,.2); color: #74C0FC; }

.feature-title {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: .5rem;
}

.feature-desc {
    font-size: .855rem;
    color: rgba(255,255,255,.55);
    line-height: 1.65;
    margin: 0;
}

/* ══════════════════════════════════════════════════════
   FORM PENGADUAN
══════════════════════════════════════════════════════ */
.form-section-wrap {
    background: var(--gray-50);
}

.form-card {
    border-radius: var(--radius-2xl) !important;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.06);
    border: 1px solid rgba(59,91,219,.1) !important;
}

.card-header-custom {
    background: var(--grad-brand);
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}

.card-header-custom::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}

.card-header-custom::before {
    content: '';
    position: absolute;
    bottom: -60%;
    left: 10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}

.card-header-custom > * { position: relative; z-index: 1; }

.header-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,.18);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    backdrop-filter: blur(8px);
    transition: transform var(--transition);
}

.header-icon:hover { transform: rotate(-8deg) scale(1.1); }

/* Form sections */
.form-section-title {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-weight: 700;
    font-size: .975rem;
    color: var(--dark);
    margin-bottom: .25rem;
}

.section-step {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: var(--grad-brand);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(59,91,219,.3);
}

.form-divider {
    border-top: 2px dashed #E8EFFF;
    margin: 1.75rem 0;
}

/* Inputs */
.form-label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: .5rem;
}

.form-control,
.form-select {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: .65rem .9rem;
    font-size: .9rem;
    color: var(--dark);
    background: #fff;
    transition: all .2s ease;
    box-shadow: var(--shadow-xs);
}

.form-control:hover, .form-select:hover {
    border-color: #B8C8FF;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59,91,219,.12);
    outline: none;
}

.form-control::placeholder { color: var(--gray-400); }

.form-control-lg { font-size: .95rem !important; padding: .75rem 1rem !important; }
.form-select-lg  { font-size: .95rem !important; padding: .75rem 1rem !important; }

.input-group .input-group-text {
    border: 1.5px solid var(--gray-200);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
    background: var(--gray-50);
    color: var(--gray-600);
    transition: border-color .2s;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

.form-text {
    font-size: .795rem;
    color: var(--gray-400);
    margin-top: .35rem;
}

/* ── Upload Zone ───────────────────────────────────── */
.upload-zone {
    border: 2px dashed #C7D7FE;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #F0F4FF 0%, #F8FAFF 100%);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #E8EEFF 0%, #EEF2FF 100%);
    box-shadow: 0 0 0 4px rgba(59,91,219,.08);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-icon {
    font-size: 3.2rem;
    color: #A5B4FC;
    margin-bottom: .75rem;
    transition: all .3s ease;
    display: block;
}

.upload-zone:hover .upload-icon {
    color: var(--primary);
    transform: translateY(-4px);
}

.upload-text { font-size: .95rem; color: var(--dark); margin: 0; font-weight: 500; }
.upload-hint { font-size: .8rem; color: var(--gray-400); margin: .4rem 0 0; }

.upload-preview {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
    width: 95px;
    height: 95px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    border: 2px solid rgba(59,91,219,.2);
}

.preview-item img { width: 100%; height: 100%; object-fit: cover; }

.preview-remove {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    background: rgba(220,38,38,.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform .2s;
}

.preview-remove:hover { transform: scale(1.15); }

.alert-info-soft {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-md);
    color: #1E40AF;
    font-size: .83rem;
}

/* ── Submit Button ─────────────────────────────────── */
.btn-submit {
    background: var(--grad-brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    letter-spacing: .02em;
    box-shadow: var(--shadow-brand);
    transition: all .3s var(--ease-out);
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #F59F00, #E67700);
    opacity: 0;
    transition: opacity .3s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(59,91,219,.5);
    color: #fff;
}

.btn-submit:hover::before { opacity: 0; }

.btn-submit:active { transform: translateY(-1px); }

.btn-submit .btn-text,
.btn-submit .btn-loading { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════════════
   TRACKING SECTION
══════════════════════════════════════════════════════ */
.tracking-section {
    background: linear-gradient(180deg, #fff 0%, var(--gray-50) 100%);
}

.track-card {
    border-radius: var(--radius-2xl) !important;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
    border: 1px solid rgba(59,91,219,.08) !important;
    background: #fff;
}

/* Tab Toggle */
.track-tab {
    background: transparent;
    color: var(--gray-600);
    border: none;
    transition: all .22s ease;
    font-size: .875rem;
    border-radius: 10px;
}

.track-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    font-weight: 600;
}

.track-tab:hover:not(.active) {
    background: rgba(255,255,255,.65);
    color: var(--dark);
}

.track-pane { animation: fadeInTab .28s ease both; }

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

/* Status Guide */
.status-guide { border-top: 1px solid var(--gray-200) !important; }

/* ── STATUS BADGES ─────────────────────────────────── */
.badge {
    font-size: .77rem;
    font-weight: 600;
    padding: .45em .85em;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.badge-waiting { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-process { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-done    { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.badge-reject  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* ══════════════════════════════════════════════════════
   COOLDOWN & TICKET BANNERS
══════════════════════════════════════════════════════ */
.cooldown-banner {
    background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
    border: 1px solid #FCD34D;
    border-left: 4px solid #D97706;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: none;
}
.cooldown-banner.show { display: flex; align-items: center; gap: .75rem; }

.countdown-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: #92400E;
    min-width: 56px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.submission-counter      { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.counter-dot             { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #CBD5E1; background: #fff; transition: all .3s; }
.counter-dot.used        { background: var(--primary); border-color: var(--primary); }

/* Ticket Banner */
.ticket-banner {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1px solid #6EE7B7;
    border-left: 5px solid #059669;
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    position: relative;
    animation: ticketSlideIn .4s var(--ease-out);
    box-shadow: 0 8px 24px rgba(5,150,105,.12);
}

@keyframes ticketSlideIn {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ticket-code-box {
    background: #fff;
    border: 2px dashed #059669;
    border-radius: 10px;
    padding: .5rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #065F46;
    display: inline-block;
    user-select: all;
    cursor: text;
}

.ticket-banner .btn-close-ticket {
    position: absolute;
    top: .75rem; right: .75rem;
    background: rgba(5,150,105,.1);
    border: none; border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: #059669; font-size: 1rem;
    cursor: pointer; transition: background .2s;
}

.ticket-banner .btn-close-ticket:hover { background: rgba(5,150,105,.2); }

.ticket-copy-btn { font-size: .78rem; padding: .2rem .6rem; border-radius: 6px; }

.ticket-banner-dismissing {
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .3s ease, transform .3s ease;
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 3.5rem 0 1.75rem;
    position: relative;
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.footer-section > * { position: relative; z-index: 1; }

.footer-brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.footer-desc { color: rgba(255,255,255,.45); font-size: .85rem; line-height: 1.7; }

.footer-heading { color: rgba(255,255,255,.3); font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }

.footer-link {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .855rem;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem 0;
}

.footer-link:hover {
    color: #fff;
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.07);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
}

.footer-social {
    display: flex;
    gap: .6rem;
}

.social-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .9rem;
    transition: all .2s ease;
}

.social-btn:hover {
    background: rgba(59,91,219,.3);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════
   SCROLL TO TOP
══════════════════════════════════════════════════════ */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem; right: 1.5rem;
    width: 48px; height: 48px;
    background: var(--grad-brand);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.4rem;
    display: flex;
    align-items: center; justify-content: center;
    box-shadow: var(--shadow-brand);
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: all .3s var(--ease-out);
    z-index: 999;
}

.scroll-top-btn.show { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 28px rgba(59,91,219,.5); }

/* ══════════════════════════════════════════════════════
   ADMIN AREA (shared)
══════════════════════════════════════════════════════ */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--dark) 0%, #1e293b 100%);
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform .3s ease;
}

.sidebar-brand    { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-nav      { padding: 1rem 0; }
.sidebar-section  { padding: .4rem 1rem .2rem; font-size: .67rem; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .1em; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .875rem;
    transition: all .2s ease;
    border-left: 3px solid transparent;
    margin: .1rem 0;
}

.sidebar-link:hover  { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-link.active { color: #fff; background: rgba(59,91,219,.25); border-left-color: var(--primary); }
.sidebar-link .link-icon { width: 22px; text-align: center; font-size: 1rem; }

.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: .67rem; font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 50px;
    min-width: 20px; text-align: center;
}

.main-content  { margin-left: 260px; min-height: 100vh; background: #F8FAFC; transition: margin .3s ease; }

.topbar {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}

.page-content { padding: 1.75rem; }

/* ── Stat Widgets ──────────────────────────────────── */
.stat-widget {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #F1F5F9;
    transition: all .3s ease;
    height: 100%;
}

.stat-widget:hover         { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.stat-widget-icon          { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat-widget-number        { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat-widget-label         { font-size: .8rem; color: var(--gray-600); font-weight: 500; margin-top: .2rem; }

/* ── Tables ─────────────────────────────────────────  */
.table-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #F1F5F9; }
.table-card .table { margin: 0; }
.table thead th {
    background: var(--gray-50);
    font-size: .77rem; font-weight: 700; color: var(--gray-600);
    text-transform: uppercase; letter-spacing: .06em;
    padding: .9rem 1rem; border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.table tbody td { padding: .85rem 1rem; vertical-align: middle; border-bottom: 1px solid #F1F5F9; font-size: .9rem; }
.table tbody tr:hover td { background: #FAFBFF; }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Chat ───────────────────────────────────────────  */
.chat-container { height: 420px; overflow-y: auto; padding: 1.25rem; background: #F8FAFC; border-radius: 12px; border: 1px solid var(--gray-200); display: flex; flex-direction: column; gap: .75rem; scroll-behavior: smooth; }
.chat-bubble { max-width: 75%; padding: .65rem 1rem; border-radius: 16px; font-size: .88rem; line-height: 1.5; position: relative; }
.chat-bubble.bubble-student { background: #fff; border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: var(--shadow-sm); }
.chat-bubble.bubble-admin   { background: var(--grad-brand); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble-meta { font-size: .72rem; margin-top: .3rem; opacity: .65; text-align: left; display: block; }
.chat-input-area { display: flex; gap: .75rem; align-items: flex-end; margin-top: 1rem; }
.chat-input-area textarea { flex: 1; resize: none; border-radius: 14px; border-color: var(--gray-200); padding: .75rem 1rem; font-size: .9rem; min-height: 50px; max-height: 120px; transition: border-color .2s; }
.chat-input-area textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,91,219,.1); }
.btn-send { background: var(--primary); color: #fff; border: none; border-radius: 12px; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; transition: all .2s ease; flex-shrink: 0; }
.btn-send:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ── Timeline Log ──────────────────────────────────  */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: .5rem; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before { content: ''; position: absolute; left: -1.27rem; top: .4rem; width: 12px; height: 12px; background: var(--primary); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-content { background: #fff; border-radius: 10px; padding: .65rem 1rem; border: 1px solid #F1F5F9; font-size: .85rem; }
.timeline-time { font-size: .75rem; color: var(--gray-600); }

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

/* Scroll-reveal via JS (add .reveal class) */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s var(--ease-out), transform .65s var(--ease-out);
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .sidebar              { transform: translateX(-100%); }
    .sidebar.show         { transform: translateX(0); }
    .main-content         { margin-left: 0; }
    .sidebar-overlay      { display: block !important; }
    .min-vh-hero          { min-height: 80vh; }
}

@media (max-width: 767.98px) {
    .hero-title           { font-size: 2rem; }
    .hero-stats           { flex-direction: row; }
    .stat-card            { flex: 1; min-width: 80px; }
    .page-content         { padding: 1rem; }
    .form-card .card-body { padding: 1.25rem !important; }
    .chat-bubble          { max-width: 88%; }
    .stat-widget-number   { font-size: 1.6rem; }
    .step-connector       { display: none; }
    .feature-card         { padding: 1.5rem 1.25rem; }
}

@media (max-width: 575.98px) {
    .topbar               { padding: .75rem 1rem; }
    .floating-card        { display: none; }
    .btn-hero-primary,
    .btn-hero-secondary   { width: 100%; justify-content: center; }
    .hero-cta             { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════ */
.cursor-pointer { cursor: pointer; }
.rounded-4      { border-radius: var(--radius-lg)   !important; }
.rounded-5      { border-radius: var(--radius-xl)   !important; }
.text-white-25  { color: rgba(255,255,255,.25); }
.char-counter   { font-family: monospace; }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
}

/* Print */
@media print {
    .sidebar, .topbar, .btn, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { font-size: 12px; }
    .table-responsive { overflow: visible !important; }
}

/* ══════════════════════════════════════════════════════
   ADMIN CHAT — Halaman chat.php
   Light professional theme, selaras dengan admin panel
══════════════════════════════════════════════════════ */

/* ── Chat-specific tokens ── */
:root {
    --chat-sidebar-w:    320px;
    --chat-topbar-h:     60px;
    --surface-app:       #F0F4F8;
    --surface-sidebar:   #FFFFFF;
    --surface-input:     #F8FAFC;
    --surface-msg-bg:    #EEF2F9;
    --border-chat:       #E2E8F0;
    --text-chat-primary: #0D1B2A;
    --text-chat-sec:     #475569;
    --text-chat-muted:   #94A3B8;
    --brand-chat:        #3B5BDB;
    --brand-chat-light:  #EEF2FF;
    --brand-chat-dark:   #2F4AC0;
    --bubble-out:        #DBEAFE;
    --bubble-in:         #FFFFFF;
    --sidebar-hover:     #F1F5F9;
    --sidebar-active:    #EEF2FF;
}

/* ── App shell ── */
.wa-app {
    display: flex;
    height: 100vh;
    background: var(--surface-app);
    overflow: hidden;
}

/* ══ LEFT SIDEBAR ══ */
.wa-sidebar {
    width: var(--chat-sidebar-w);
    min-width: var(--chat-sidebar-w);
    background: #fff;
    border-right: 1px solid var(--border-chat);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: transform .25s ease;
    z-index: 200;
}

.wa-sidebar-header {
    background: #fff;
    border-bottom: 1px solid var(--border-chat);
    padding: 0 1rem;
    height: var(--chat-topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.wa-brand { display: flex; align-items: center; gap: .6rem; }

.wa-brand-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
}

.wa-brand-name {
    color: var(--text-chat-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .9rem;
    font-weight: 800;
}

.wa-header-actions { display: flex; align-items: center; gap: .15rem; }

.wa-icon-btn {
    width: 34px; height: 34px;
    background: transparent;
    border: none;
    color: var(--text-chat-muted);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.wa-icon-btn:hover {
    background: var(--sidebar-hover);
    color: var(--text-chat-primary);
}

/* Search */
.wa-search-wrap {
    padding: .6rem .85rem;
    background: #fff;
    border-bottom: 1px solid var(--border-chat);
    flex-shrink: 0;
}

.wa-search {
    background: var(--surface-input);
    border: 1.5px solid var(--border-chat);
    border-radius: 8px;
    padding: .48rem .75rem .48rem 2.35rem;
    color: var(--text-chat-primary);
    font-size: .85rem;
    width: 100%;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color .2s, box-shadow .2s;
}
.wa-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,.1);
}
.wa-search::placeholder { color: var(--text-chat-muted); }

.wa-search-icon {
    position: absolute;
    left: 1.6rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-chat-muted);
    font-size: .85rem;
    pointer-events: none;
}

/* Tab strip */
.wa-tab-strip {
    display: flex;
    border-bottom: 1px solid var(--border-chat);
    background: #fff;
    flex-shrink: 0;
}
.wa-tab {
    flex: 1;
    padding: .55rem;
    text-align: center;
    font-size: .73rem;
    font-weight: 600;
    color: var(--text-chat-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    letter-spacing: .03em;
}
.wa-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Chat list */
.wa-chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
}
.wa-chat-list::-webkit-scrollbar { width: 4px; }
.wa-chat-list::-webkit-scrollbar-track { background: transparent; }
.wa-chat-list::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

.wa-chat-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #F1F5F9;
    text-decoration: none;
    color: inherit;
    transition: background .12s;
    position: relative;
}
.wa-chat-item:hover  { background: var(--sidebar-hover); }
.wa-chat-item.active { background: var(--sidebar-active); border-left: 3px solid var(--primary); }

.wa-chat-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
}

.unread-badge {
    position: absolute;
    bottom: -2px; right: -2px;
    background: var(--primary);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    min-width: 17px; height: 17px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

.wa-chat-info { flex: 1; overflow: hidden; }

.wa-chat-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.wa-chat-name {
    color: var(--text-chat-primary);
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-time { color: var(--text-chat-muted); font-size: .7rem; flex-shrink: 0; }
.wa-chat-time.unread { color: var(--primary); font-weight: 600; }

.wa-chat-row2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .15rem;
}
.wa-chat-preview {
    color: var(--text-chat-muted);
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.wa-unread-pill {
    background: var(--primary);
    color: #fff;
    font-size: .63rem;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Status dots */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot-green  { background: var(--success); }
.status-dot-blue   { background: var(--info); }
.status-dot-amber  { background: var(--accent); }
.status-dot-red    { background: var(--danger); }
.status-dot-gray   { background: var(--gray-400); }

/* List heading */
.wa-list-heading {
    padding: .5rem 1rem .3rem;
    font-size: .65rem;
    font-weight: 700;
    color: var(--text-chat-muted);
    text-transform: uppercase;
    letter-spacing: .09em;
    background: #FAFBFF;
}

/* ══ MAIN CHAT AREA ══ */
.wa-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Dot-pattern background */
.wa-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--surface-msg-bg);
    background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .45;
    pointer-events: none;
    z-index: 0;
}

/* Chat topbar */
.wa-chat-topbar {
    background: #fff;
    height: var(--chat-topbar-h);
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-chat);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
    gap: .75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.wa-topbar-left {
    display: flex; align-items: center; gap: .75rem; flex: 1; overflow: hidden;
}

.wa-topbar-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--grad-brand);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1rem;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59,91,219,.25);
}

.wa-topbar-name {
    color: var(--text-chat-primary);
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-topbar-sub {
    color: var(--text-chat-muted);
    font-size: .73rem;
    display: flex; align-items: center; gap: .4rem; margin-top: .05rem;
}

.wa-topbar-right { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; }

/* Dropdown */
.wa-dropdown { position: relative; }

.wa-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px); right: 0;
    background: #fff;
    border: 1px solid var(--border-chat);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: none;
    min-width: 210px;
    z-index: 999;
    overflow: hidden;
}
.wa-dropdown-menu.open { display: block; }

.wa-dropdown-item {
    padding: .65rem 1rem;
    color: var(--text-chat-sec);
    font-size: .85rem;
    cursor: pointer;
    display: flex; align-items: center; gap: .65rem;
    transition: background .12s;
    text-decoration: none;
}
.wa-dropdown-item:hover { background: var(--sidebar-hover); color: var(--text-chat-primary); }
.wa-dropdown-item.danger { color: var(--danger); }
.wa-dropdown-divider { height: 1px; background: var(--border-chat); }

/* Messages area */
.wa-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.25rem 8%;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}
.wa-messages::-webkit-scrollbar { width: 5px; }
.wa-messages::-webkit-scrollbar-track { background: transparent; }
.wa-messages::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* Date separator */
.wa-date-sep { display: flex; align-items: center; justify-content: center; margin: .6rem 0; }
.wa-date-sep span {
    background: rgba(59,91,219,.08);
    color: var(--primary);
    font-size: .7rem;
    font-weight: 600;
    padding: .28rem .85rem;
    border-radius: 50px;
    border: 1px solid rgba(59,91,219,.15);
}

/* Message row */
.wa-msg-row {
    display: flex;
    align-items: flex-end;
    max-width: 100%;
    animation: msgIn .18s cubic-bezier(.34,1.4,.64,1);
}
@keyframes msgIn {
    from { opacity:0; transform:translateY(6px) scale(.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}
.wa-msg-row.outgoing { justify-content: flex-end; }
.wa-msg-row.incoming { justify-content: flex-start; }

/* Bubbles */
.wa-bubble {
    max-width: min(65%, 520px);
    padding: .5rem .75rem .35rem .85rem;
    border-radius: 10px;
    font-size: .9rem;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.wa-bubble.out {
    background: var(--bubble-out);
    color: var(--dark);
    border-radius: 12px 2px 12px 12px;
}
.wa-bubble.out::after {
    content: '';
    position: absolute;
    top: 0; right: -7px;
    width: 0; height: 0;
    border-left: 8px solid var(--bubble-out);
    border-bottom: 8px solid transparent;
}
.wa-bubble.in {
    background: var(--bubble-in);
    color: var(--dark);
    border-radius: 2px 12px 12px 12px;
    border: 1px solid #E8EEF6;
}
.wa-bubble.in::before {
    content: '';
    position: absolute;
    top: 0; left: -7px;
    width: 0; height: 0;
    border-right: 8px solid var(--bubble-in);
    border-bottom: 8px solid transparent;
}

.bubble-sender-name { font-size: .71rem; font-weight: 700; margin-bottom: .18rem; }
.bubble-sender-name.admin-name   { color: var(--primary); }
.bubble-sender-name.student-name { color: var(--success); }

.bubble-text { display: block; white-space: pre-wrap; }

.bubble-meta-row {
    display: flex; align-items: center; justify-content: flex-end; gap: .2rem; margin-top: .2rem;
}
.bubble-time { font-size: .67rem; color: var(--gray-400); }
.bubble-ticks { color: var(--primary); font-size: .8rem; }

/* System message */
.wa-system-msg {
    background: rgba(59,91,219,.07);
    color: var(--primary-dark);
    font-size: .72rem;
    font-weight: 500;
    padding: .28rem .9rem;
    border-radius: 50px;
    border: 1px solid rgba(59,91,219,.15);
    text-align: center;
    margin: .5rem auto;
    max-width: 380px;
}

/* Empty state */
.wa-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .75rem; color: var(--gray-400); padding: 2rem;
}
.wa-empty i { font-size: 3rem; opacity: .3; color: var(--primary); }
.wa-empty p { font-size: .9rem; font-weight: 500; margin: 0; }

/* ══ CHAT FOOTER ══ */
.wa-footer {
    background: #fff;
    border-top: 1px solid var(--border-chat);
    padding: .65rem .85rem;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

/* Quick replies */
.wa-quick-replies {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    padding: .55rem .85rem;
    background: #FAFBFF;
    border-bottom: 1px solid var(--border-chat);
}
.wa-qr {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(59,91,219,.2);
    border-radius: 50px;
    padding: .32rem .85rem;
    font-size: .77rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.wa-qr:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Input row */
.wa-input-row { display: flex; align-items: flex-end; gap: .5rem; }

.wa-emoji-btn, .wa-attach-btn {
    width: 38px; height: 38px;
    background: transparent; border: none;
    color: var(--gray-400);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.15rem;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.wa-emoji-btn:hover, .wa-attach-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.wa-msg-input {
    flex: 1;
    background: var(--surface-input);
    border: 1.5px solid var(--border-chat);
    border-radius: 22px;
    padding: .6rem 1rem;
    color: var(--dark);
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
    resize: none;
    outline: none;
    min-height: 40px; max-height: 140px;
    line-height: 1.5;
    overflow-y: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.wa-msg-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,.1);
    background: #fff;
}
.wa-msg-input::placeholder { color: var(--gray-400); }

.wa-send-btn {
    width: 40px; height: 40px;
    background: var(--primary);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    cursor: pointer; transition: all .2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,91,219,.3);
}
.wa-send-btn:hover   { background: var(--primary-dark); transform: scale(1.06); box-shadow: 0 4px 14px rgba(59,91,219,.4); }
.wa-send-btn:active  { transform: scale(.96); }
.wa-send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }

.wa-char-info {
    display: flex; justify-content: space-between; align-items: center;
    padding: .2rem .25rem 0;
    font-size: .7rem; color: var(--gray-400);
}

/* Closed bar */
.wa-closed-bar {
    background: #fff;
    border-top: 1px solid var(--border-chat);
    padding: .9rem 1.25rem;
    display: flex; align-items: center; justify-content: center;
    gap: .75rem; flex-shrink: 0; z-index: 10; position: relative;
}
.wa-closed-text { color: var(--gray-600); font-size: .875rem; text-align: center; }

/* ══ INFO PANEL (right drawer) ══ */
.wa-info-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 340px;
    background: #fff;
    border-left: 1px solid var(--border-chat);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s ease;
    z-index: 100;
    box-shadow: -4px 0 24px rgba(0,0,0,.08);
}
.wa-info-panel.open { transform: translateX(0); }

.wa-info-header {
    background: #fff;
    border-bottom: 1px solid var(--border-chat);
    padding: 0 1rem;
    height: var(--chat-topbar-h);
    display: flex; align-items: center; gap: .75rem; flex-shrink: 0;
}
.wa-info-header h6 { color: var(--dark); font-size: .95rem; font-weight: 700; margin: 0; }

.wa-info-body {
    flex: 1; overflow-y: auto;
    padding: 1.1rem 1.25rem;
    background: #FAFBFF;
}

.info-section-title {
    font-size: .67rem; font-weight: 700;
    color: var(--primary);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: .6rem;
}

.info-row {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid var(--border-chat);
}
.info-row:last-child { border-bottom: none; }

.info-row-icon {
    width: 34px; height: 34px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: .85rem; flex-shrink: 0;
}
.info-row-label { font-size: .69rem; color: var(--gray-400); font-weight: 500; }
.info-row-value { font-size: .875rem; color: var(--dark); font-weight: 600; margin-top: .1rem; }

/* Status action buttons in info panel */
.status-action-btn {
    display: flex; align-items: center; gap: .5rem;
    width: 100%; padding: .6rem .9rem;
    border-radius: 10px; border: 1.5px solid;
    font-size: .84rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
    margin-bottom: .4rem; text-align: left;
    background: transparent;
}
.sab-process       { color: var(--info);    border-color: #BFDBFE; }
.sab-process:hover { background: #DBEAFE;   border-color: #93C5FD; }
.sab-resolve       { color: var(--success); border-color: #A7F3D0; }
.sab-resolve:hover { background: #D1FAE5;   border-color: #6EE7B7; }
.sab-reject        { color: var(--danger);  border-color: #FECACA; }
.sab-reject:hover  { background: #FEE2E2;   border-color: #FCA5A5; }
.sab-wait          { color: #D97706;        border-color: #FDE68A; }
.sab-wait:hover    { background: #FEF3C7;   border-color: #FCD34D; }

/* ── Typing indicator ── */
.wa-typing {
    display: none; align-items: center; gap: .3rem;
    padding: .35rem .75rem;
    background: var(--bubble-in);
    border-radius: 2px 12px 12px 12px;
    width: fit-content; margin: .25rem 0;
    border: 1px solid #E8EEF6;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.wa-typing.show { display: flex; }

.typing-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gray-400);
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
    0%,60%,100% { transform: translateY(0); }
    30%          { transform: translateY(-5px); }
}

/* ── Scroll-to-bottom btn ── */
.scroll-bottom-btn {
    position: absolute;
    bottom: 5rem; right: 1.25rem;
    width: 38px; height: 38px;
    background: #fff;
    border: 1px solid var(--border-chat);
    color: var(--gray-600);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    z-index: 20; transition: all .2s;
    opacity: 0; pointer-events: none;
}
.scroll-bottom-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-bottom-btn:hover { background: var(--primary-light); color: var(--primary); }

/* ── Toast ── */
#waToastCtr {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 9999;
    display: flex; flex-direction: column; gap: .5rem;
}
.wa-toast {
    background: #fff;
    color: var(--dark);
    padding: .7rem 1rem;
    border-radius: 10px;
    font-size: .875rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    display: flex; align-items: center; gap: .6rem;
    transform: translateX(120%);
    transition: transform .3s ease;
    max-width: 300px;
    border-left: 3px solid var(--primary);
    font-weight: 500;
}
.wa-toast.show { transform: translateX(0); }
.wa-toast.error   { border-left-color: var(--danger); }
.wa-toast.warning { border-left-color: var(--accent); }

/* Mobile overlay */
.wa-mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(13,27,42,.45);
    z-index: 499; display: none;
}
.wa-mobile-overlay.show { display: block; }

/* ── Responsive ── */
@media (max-width: 991px) {
    :root { --chat-sidebar-w: 290px; }

    .wa-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        z-index: 500;
        box-shadow: 4px 0 24px rgba(0,0,0,.12);
    }
    .wa-sidebar.mobile-open { transform: translateX(0); }
    .wa-messages { padding: 1rem 4%; }
    .wa-bubble   { max-width: min(80%, 420px); }
    .wa-info-panel { width: 100%; }
}

@media (max-width: 575px) {
    .wa-messages { padding: .75rem 2%; }
    .wa-bubble   { max-width: 88%; font-size: .875rem; }
    .wa-footer   { padding: .5rem .6rem; }
    .wa-topbar-name { font-size: .85rem; }
}