/* ═══════════════════════════════════════════════════════════
   Bayu Survey — Sistem Pengurusan Maklum Balas  |  v3.0
   ═══════════════════════════════════════════════════════════ */

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

/* ── Design tokens ──────────────────────────────────────── */
:root {
    --blue:        #003087;
    --blue-mid:    #1A47B8;
    --blue-light:  #EEF2FF;
    --teal:        #0EA5E9;
    --gold:        #F59E0B;
    --success:     #10B981;
    --danger:      #EF4444;
    --bg:          #F1F5FF;
    --surface:     #FFFFFF;
    --text:        #0F172A;
    --text-muted:  #64748B;
    --border:      #E2E8F0;
    /* Likert 5-point colors */
    --l1: #EF4444;
    --l2: #F97316;
    --l3: #EAB308;
    --l4: #84CC16;
    --l5: #22C55E;
    /* Survey dark theme */
    --survey-bg-1:  #050e24;
    --survey-bg-2:  #0a1f50;
    --survey-bg-3:  #0d2d72;
    --survey-glass: rgba(255,255,255,0.97);
    --survey-dark-border: rgba(255,255,255,0.09);
    /* Geometry */
    --radius:    16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,.16);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12);
    --touch:     48px;
    --font:      'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES (Login, Verify, OTP)
   ═══════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100dvh;
    background: linear-gradient(135deg, #001f5b 0%, #003087 35%, #1A47B8 70%, #0EA5E9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
}

/* Animated background blobs */
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .12;
    pointer-events: none;
    animation: blobFloat 8s ease-in-out infinite alternate;
}
.auth-blob-1 { width: 400px; height: 400px; background: #0EA5E9; top: -100px; right: -80px; animation-delay: 0s; }
.auth-blob-2 { width: 300px; height: 300px; background: #F59E0B; bottom: -60px; left: -60px; animation-delay: 3s; }
.auth-blob-3 { width: 200px; height: 200px; background: #10B981; top: 50%; left: 30%; animation-delay: 1.5s; }

@keyframes blobFloat {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(20px, -20px) scale(1.05); }
}

.auth-card-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    animation: slideUp .55s cubic-bezier(.16,1,.3,1) both;
}

.auth-glass {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(24px);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.2);
    overflow: hidden;
}

.auth-stripe {
    height: 5px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--teal) 50%, var(--gold) 100%);
}

.auth-header {
    padding: 28px 32px 0;
    text-align: center;
}
.auth-logo { height: 60px; width: auto; margin-bottom: 12px; }
.auth-dept {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}
.auth-body { padding: 24px 32px 32px; }
.auth-title { font-size: 1.4rem; font-weight: 700; color: var(--blue); margin-bottom: 4px; }
.auth-subtitle { font-size: .9rem; color: var(--text-muted); margin-bottom: 24px; }

/* Survey title on verify page */
.survey-verify-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--blue);
    line-height: 1.35;
    margin-bottom: 6px;
}
.survey-verify-desc { font-size: .88rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }

/* Auth footer */
.auth-footer { text-align: center; color: var(--text-muted); font-size: .78rem; margin-top: 14px; }
.auth-footer a { color: var(--text-muted); text-decoration: none; border-bottom: 1px dashed; }

/* ── Split-screen admin login ─────────────────────────── */
.login-split {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-visual {
    background: linear-gradient(150deg, #001f5b 0%, #003087 40%, #1A47B8 80%, #0EA5E9 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-visual-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .15;
}
.login-visual-blob-1 { width: 300px; height: 300px; background: #0EA5E9; top: -60px; right: -60px; }
.login-visual-blob-2 { width: 250px; height: 250px; background: #F59E0B; bottom: -40px; left: -40px; }

.login-visual-content { position: relative; z-index: 1; text-align: center; }

.login-visual-icon {
    width: 80px; height: 80px;
    background: rgba(255,255,255,.15);
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2);
}

.login-visual-title { font-size: 1.8rem; font-weight: 800; color: white; margin-bottom: 12px; line-height: 1.25; }
.login-visual-text  { font-size: .95rem; color: rgba(255,255,255,.75); line-height: 1.6; max-width: 280px; }

.login-feature-list { list-style: none; text-align: left; margin-top: 28px; }
.login-feature-list li {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,.85); font-size: .9rem; margin-bottom: 12px;
}
.login-feature-list li i { color: #10B981; font-size: 1rem; flex-shrink: 0; }

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: white;
}
.login-form-wrap { width: 100%; max-width: 380px; animation: slideUp .5s cubic-bezier(.16,1,.3,1) both; }

/* ── Form controls ────────────────────────────────────── */
.form-label-sm {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.m-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
}
.m-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0,48,135,.09);
}
.m-input::placeholder { color: #94A3B8; }

.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1.05rem; pointer-events: none;
}
.input-wrap .m-input { padding-left: 42px; }

/* Buttons */
.m-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px;
    border: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all .2s; min-height: var(--touch);
    text-decoration: none; white-space: nowrap;
}
.m-btn-primary {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0,48,135,.28);
}
.m-btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,48,135,.38); color: white; }
.m-btn-primary:active { transform: translateY(0); }
.m-btn-primary:disabled { opacity: .65; transform: none; cursor: not-allowed; }

.m-btn-ghost {
    background: transparent; border: 2px solid var(--border);
    color: var(--text-muted);
}
.m-btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

.m-btn-secondary {
    background: white; border: 1.5px solid var(--border);
    color: var(--text-muted);
}
.m-btn-secondary:hover { border-color: var(--blue-mid); color: var(--blue); background: var(--blue-light); }

.m-btn-w { width: 100%; }

/* Alert */
.m-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: var(--radius-xs);
    margin-bottom: 18px; font-size: .9rem;
}
.m-alert i { flex-shrink: 0; margin-top: 1px; }
.m-alert-danger  { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.m-alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }

/* Hint text */
.m-hint { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }

/* OTP input */
.otp-input {
    letter-spacing: .45em;
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    font-family: 'Courier New', monospace;
}

/* ═══════════════════════════════════════════════════════════
   VERIFY PAGE — Immersive Hero Entry
   ═══════════════════════════════════════════════════════════ */
.verify-page {
    min-height: 100dvh;
    background:
        radial-gradient(ellipse at 15% 30%, rgba(26,71,184,0.75) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 70%, rgba(14,165,233,0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(16,185,129,0.3) 0%, transparent 45%),
        #050e24;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow-x: hidden;
}

/* Particle canvas */
#particleCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.verify-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    animation: slideUp .6s cubic-bezier(.16,1,.3,1) both;
}

.verify-glass {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.08) inset;
    overflow: hidden;
}

.verify-header-band {
    background: linear-gradient(135deg, rgba(0,48,135,0.9) 0%, rgba(26,71,184,0.8) 100%);
    padding: 28px 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.verify-header-band::before {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(14,165,233,0.2);
    filter: blur(40px);
}
.verify-logo { height: 52px; width: auto; margin-bottom: 10px; filter: brightness(0) invert(1); }
.verify-logo-fallback { display: none; }
.verify-org {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    line-height: 1.4;
}

.verify-body { padding: 28px 32px 32px; }

/* Survey info card inside verify */
.verify-survey-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.verify-survey-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, #0EA5E9, #6366F1);
    border-radius: 4px 0 0 4px;
}
.verify-survey-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(14,165,233,0.2);
    color: #7DD3FC;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.verify-survey-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
    margin-bottom: 8px;
}
.verify-survey-desc {
    font-size: .83rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.55;
    margin-bottom: 14px;
}
.verify-survey-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.verify-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}
.verify-meta-item i { color: #7DD3FC; font-size: .85rem; }

/* Verify form elements */
.verify-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}
.verify-input {
    width: 100%;
    padding: 15px 18px 15px 46px;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    font-family: var(--font);
    font-size: 1rem;
    color: white;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.verify-input::placeholder { color: rgba(255,255,255,0.3); }
.verify-input:focus {
    border-color: rgba(99,102,241,0.8);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
}
.verify-input-wrap { position: relative; }
.verify-input-icon {
    position: absolute;
    left: 15px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem; pointer-events: none;
}
.verify-hint {
    font-size: .75rem;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
    display: flex; align-items: center; gap: 5px;
}
.verify-hint strong { color: rgba(255,255,255,0.65); }

/* Verify CTA button */
.verify-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2563EB 0%, #4F46E5 50%, #7C3AED 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: var(--font);
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    min-height: 56px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 8px 24px rgba(79,70,229,0.5);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}
.verify-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity .2s;
}
.verify-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79,70,229,0.6); }
.verify-btn:hover::before { opacity: 1; }
.verify-btn:active { transform: translateY(0); }
.verify-btn:disabled { opacity: 0.6; transform: none; cursor: not-allowed; }

/* Alert for verify page */
.verify-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 12px;
    color: #FCA5A5;
    font-size: .875rem;
    margin-bottom: 18px;
}
.verify-alert i { flex-shrink: 0; margin-top: 1px; color: #EF4444; }

.verify-footer {
    text-align: center;
    font-size: .72rem;
    color: rgba(255,255,255,0.3);
    margin-top: 20px;
}
.verify-footer a { color: rgba(255,255,255,0.4); text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   SURVEY FORM — Immersive Multi-step wizard
   ═══════════════════════════════════════════════════════════ */
.survey-page {
    min-height: 100dvh;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(26,71,184,0.8) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 80%, rgba(14,165,233,0.65) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(0,48,135,0.6) 0%, transparent 60%),
        #060f2a;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Animated gradient orbs in background */
.survey-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orbDrift linear infinite;
}
.survey-orb-1 {
    width: 600px; height: 600px;
    top: -200px; left: -150px;
    background: radial-gradient(circle, rgba(26,71,184,0.35) 0%, transparent 70%);
    animation-duration: 30s;
}
.survey-orb-2 {
    width: 500px; height: 500px;
    bottom: -100px; right: -100px;
    background: radial-gradient(circle, rgba(14,165,233,0.28) 0%, transparent 70%);
    animation-duration: 25s; animation-delay: -12s;
}
.survey-orb-3 {
    width: 400px; height: 400px;
    top: 40%; left: 30%;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
    animation-duration: 20s; animation-delay: -7s;
}
@keyframes orbDrift {
    0%   { transform: translate(0,0) scale(1); }
    25%  { transform: translate(30px,-20px) scale(1.05); }
    50%  { transform: translate(-10px,40px) scale(0.95); }
    75%  { transform: translate(-30px,-10px) scale(1.08); }
    100% { transform: translate(0,0) scale(1); }
}

/* Sticky top bar — dark glass */
.survey-topbar {
    position: sticky; top: 0; z-index: 200;
    background: rgba(6,15,42,0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.survey-topbar-inner {
    max-width: 780px; margin: 0 auto;
    padding: 12px 20px;
    display: flex; align-items: center; gap: 14px;
}
.survey-topbar-logo {
    height: 26px; width: auto; flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* Progress track */
.progress-track {
    flex: 1; height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px; overflow: visible;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6 0%, #6366F1 50%, #8B5CF6 100%);
    border-radius: 99px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
    position: relative;
    box-shadow: 0 0 12px rgba(99,102,241,0.7);
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: -4px; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px;
    background: white;
    border: 3px solid #6366F1;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(99,102,241,0.8);
    transition: all .6s cubic-bezier(.4,0,.2,1);
}
.progress-label {
    font-size: .75rem; font-weight: 600; color: rgba(255,255,255,0.6); white-space: nowrap;
}
.progress-label span { color: white; }

/* Step title in topbar */
#stepTitle {
    font-size: .72rem; font-weight: 600;
    color: rgba(255,255,255,0.75);
    margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Survey main area */
.survey-main {
    flex: 1;
    position: relative;
    z-index: 1;
    max-width: 780px; width: 100%;
    margin: 0 auto;
    padding: 28px 20px 160px;
}

/* Title card */
.survey-title-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 22px 26px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: slideUp .5s cubic-bezier(.16,1,.3,1) both;
    position: relative;
    overflow: hidden;
}
.survey-title-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, #3B82F6, #6366F1, #8B5CF6, #0EA5E9);
}
/* Header image — bleeds to all three edges, sits at top of card */
.survey-title-img {
    margin: -22px -26px 18px;   /* cancel card padding on top + sides */
    line-height: 0;              /* kill phantom gap below img */
    overflow: hidden;
    border-radius: 20px 20px 0 0; /* match card top corners */
}
.survey-title-img img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.survey-title-text {
    font-size: 1.1rem; font-weight: 700; color: white; line-height: 1.35; margin-bottom: 5px;
}
.survey-title-desc { font-size: .85rem; color: rgb(255 255 255 / 90%); line-height: 1.5; }
.survey-respondent {
    font-size: .78rem; color: rgb(255 255 255 / 90%); margin-top: 10px;
    display: flex; align-items: center; gap: 6px;
}
.survey-respondent i { color: #7DD3FC; }

/* Step container */
.survey-step { display: none; }
.survey-step.active {
    display: block;
    animation: stepSlideIn .42s cubic-bezier(.16,1,.3,1) both;
}
.survey-step.entering-back {
    display: block;
    animation: stepSlideInBack .42s cubic-bezier(.16,1,.3,1) both;
}
.survey-step.exit-forward {
    display: block;
    animation: stepSlideOut .28s cubic-bezier(.4,0,1,1) forwards;
}
.survey-step.exit-back {
    display: block;
    animation: stepSlideOutBack .28s cubic-bezier(.4,0,1,1) forwards;
}

@keyframes stepSlideIn     { from { opacity:0; transform:translateX(48px) scale(0.98);  } to { opacity:1; transform:none; } }
@keyframes stepSlideInBack { from { opacity:0; transform:translateX(-48px) scale(0.98); } to { opacity:1; transform:none; } }
@keyframes stepSlideOut    { from { opacity:1; transform:none; } to { opacity:0; transform:translateX(-60px) scale(0.97); } }
@keyframes stepSlideOutBack{ from { opacity:1; transform:none; } to { opacity:0; transform:translateX(60px) scale(0.97); } }

/* ── Section banner card (mirrors survey-title-card) ────── */
.section-header {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    animation: slideUp .45s cubic-bezier(.16,1,.3,1) both;
}
.section-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, #3B82F6, #6366F1, #8B5CF6, #0EA5E9);
}

.section-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    flex-wrap: wrap;
}

.section-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(99,102,241,0.18);
    color: #A5B4FC;
    padding: 3px 11px; border-radius: 99px;
    font-size: .65rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase;
    border: 1px solid rgba(99,102,241,0.28);
    white-space: nowrap;
}

.section-status-dot {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(16,185,129,0.12);
    color: #34D399;
    padding: 3px 10px; border-radius: 99px;
    font-size: .63rem; font-weight: 600; letter-spacing: .05em;
    border: 1px solid rgba(16,185,129,0.22);
    white-space: nowrap;
}
.section-status-dot::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: #34D399;
    flex-shrink: 0;
    animation: scPulse 2s ease infinite;
}

.section-title-text {
    font-size: 1.1rem; font-weight: 700;
    color: white; line-height: 1.35;
    margin-bottom: 0;
}

/* Description callout box */
.section-desc {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 13px;
    padding: 11px 14px;
    background: rgba(14,165,233,0.08);
    border: 1px solid rgba(14,165,233,0.16);
    border-radius: 12px;
    font-size: .82rem;
    color: rgb(255 255 255 / 90%);
    line-height: 1.6;
}
.section-desc-icon {
    color: #38BDF8;
    font-size: .9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .section-header { padding: 16px 18px; }
    .section-title-text { font-size: .97rem; }
}

/* ── Question card — glassmorphism ─────────────────────── */
.q-card {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px 24px 26px;
    margin-bottom: 16px;
    border: 1.5px solid rgba(255,255,255,0.9);
    box-shadow: var(--shadow-card);
    transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s, border-color .2s;
    position: relative;
    overflow: hidden;
}
.q-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.12);
}
.q-card:focus-within {
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 16px 48px rgba(0,0,0,0.28), 0 0 0 3px rgba(99,102,241,0.15);
}
.q-card.q-answered {
    border-color: rgba(16,185,129,0.4);
    box-shadow: var(--shadow-card), 0 0 0 2px rgba(16,185,129,0.1);
}
.q-card.q-answered::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, #10B981, #059669);
    border-radius: 4px 0 0 4px;
}
.q-card.q-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.12) !important;
    animation: shake .38s cubic-bezier(.36,.07,.19,.97);
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    15%     { transform: translateX(-7px); }
    45%     { transform: translateX(7px); }
    75%     { transform: translateX(-4px); }
}

.q-header { display: flex; gap: 12px; margin-bottom: 20px; }
.q-num-badge {
    width: 26px; height: 26px; flex-shrink: 0;
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    color: var(--blue);
    border-radius: 8px; font-size: .7rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
    border: 1px solid rgba(99,102,241,0.2);
}
.q-text { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.55; flex: 1; }
.q-required { color: var(--danger); margin-left: 3px; }

/* ── Option cards (radio/checkbox) ────────────────────── */
.q-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: #F8FAFC;
    border: 2px solid #E8EDF5;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .18s cubic-bezier(.4,0,.2,1);
    min-height: var(--touch); user-select: none;
    font-size: .96rem; color: var(--text); font-weight: 500;
    position: relative; overflow: hidden;
}
.q-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(99,102,241,0.15), transparent 60%);
    opacity: 0;
    transition: opacity .3s;
}
.q-option:hover {
    border-color: #6366F1;
    background: #F0F0FF;
    transform: translateX(4px);
}
.q-option input[type="radio"],
.q-option input[type="checkbox"] {
    width: 18px; height: 18px; flex-shrink: 0;
    accent-color: #4F46E5; cursor: pointer;
}
.q-option.selected {
    border-color: #4F46E5;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    color: #3730A3;
    font-weight: 600;
    transform: none;
}
.q-option.selected::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%; transform: translateY(-50%);
    color: #4F46E5;
    font-size: 1rem;
    font-weight: 800;
    animation: checkPop .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes checkPop {
    from { transform: translateY(-50%) scale(0) rotate(-30deg); }
    to   { transform: translateY(-50%) scale(1) rotate(0deg); }
}
.q-option.selected input { accent-color: #4F46E5; }

/* Text input in form */
.q-input {
    width: 100%; padding: 14px 16px;
    border: 2px solid #E8EDF5; border-radius: 12px;
    font-family: var(--font); font-size: .97rem; color: var(--text);
    background: #F8FAFC; transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none; resize: vertical;
}
.q-input:focus {
    border-color: #6366F1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.q-char-count {
    text-align: right; font-size: .72rem; color: var(--text-muted); margin-top: 5px;
}

/* ── Likert scale — gradient spectrum ─────────────────── */
.likert-scale {
    display: grid; grid-template-columns: repeat(5,1fr); gap: 8px;
}
.lk-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 14px 4px; border: 2px solid #E8EDF5; border-radius: 14px;
    background: #F8FAFC; cursor: pointer;
    transition: all .2s cubic-bezier(.4,0,.2,1); min-height: 78px; gap: 6px;
    font-family: var(--font); position: relative; overflow: hidden;
}
.lk-btn:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.lk-btn .lk-num { font-size: 1.3rem; font-weight: 800; line-height: 1; transition: all .2s; }
.lk-btn .lk-lbl { font-size: .57rem; font-weight: 500; color: var(--text-muted); text-align: center; line-height: 1.25; transition: all .2s; }

/* Per-value color theming with gradients */
.lk-btn[data-val="1"]:hover { border-color: #EF4444; background: linear-gradient(135deg, #FEF2F2, #FEE2E2); }
.lk-btn[data-val="2"]:hover { border-color: #F97316; background: linear-gradient(135deg, #FFF7ED, #FFEDD5); }
.lk-btn[data-val="3"]:hover { border-color: #EAB308; background: linear-gradient(135deg, #FEFCE8, #FEF9C3); }
.lk-btn[data-val="4"]:hover { border-color: #84CC16; background: linear-gradient(135deg, #F7FEE7, #ECFCCB); }
.lk-btn[data-val="5"]:hover { border-color: #22C55E; background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }

.lk-btn[data-val="1"].selected { border-color: #EF4444; background: linear-gradient(135deg, #FEE2E2, #FCA5A5); color: #991B1B; }
.lk-btn[data-val="2"].selected { border-color: #F97316; background: linear-gradient(135deg, #FFEDD5, #FED7AA); color: #9A3412; }
.lk-btn[data-val="3"].selected { border-color: #EAB308; background: linear-gradient(135deg, #FEF9C3, #FDE047); color: #713F12; }
.lk-btn[data-val="4"].selected { border-color: #84CC16; background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #365314; }
.lk-btn[data-val="5"].selected { border-color: #22C55E; background: linear-gradient(135deg, #DCFCE7, #86EFAC); color: #14532D; }

.lk-btn[data-val="1"]:hover .lk-num, .lk-btn[data-val="1"].selected .lk-num { color: #EF4444; }
.lk-btn[data-val="2"]:hover .lk-num, .lk-btn[data-val="2"].selected .lk-num { color: #F97316; }
.lk-btn[data-val="3"]:hover .lk-num, .lk-btn[data-val="3"].selected .lk-num { color: #EAB308; }
.lk-btn[data-val="4"]:hover .lk-num, .lk-btn[data-val="4"].selected .lk-num { color: #84CC16; }
.lk-btn[data-val="5"]:hover .lk-num, .lk-btn[data-val="5"].selected .lk-num { color: #22C55E; }

.lk-btn.selected .lk-lbl { color: inherit; font-weight: 600; }
.lk-btn.selected {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: lkPop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes lkPop {
    from { transform: translateY(-4px) scale(0.85); }
    to   { transform: translateY(-4px) scale(1.05); }
}
.lk-label-row {
    display: flex; justify-content: space-between; margin-top: 10px;
    font-size: .7rem; color: rgba(255,255,255,0.5); font-weight: 500;
}

/* ── Star rating — glowing ────────────────────────────── */
.star-row { display: flex; gap: 6px; }
.star-btn {
    font-size: 2.6rem; background: none; border: none; color: #E2E8F0;
    cursor: pointer; padding: 4px; line-height: 1;
    transition: color .12s, transform .15s cubic-bezier(.34,1.56,.64,1), filter .15s;
    display: flex; align-items: center; justify-content: center;
    min-width: 48px; min-height: 48px;
}
.star-btn:hover { color: #FCD34D; transform: scale(1.3) rotate(8deg); filter: drop-shadow(0 0 8px rgba(252,211,77,0.7)); }
.star-btn.active { color: #F59E0B; filter: drop-shadow(0 0 6px rgba(245,158,11,0.5)); }
.star-btn.active:hover { color: #FCD34D; }
.star-lbl {
    font-size: .88rem; color: var(--text-muted); margin-top: 10px; font-weight: 500;
    min-height: 22px; transition: all .2s;
}
.star-lbl.rated { color: #D97706; font-weight: 600; }

/* ── Auto-advance indicator ───────────────────────────── */
.auto-advance-bar {
    position: fixed;
    bottom: 80px; left: 50%; transform: translateX(-50%) translateY(10px);
    z-index: 300;
    background: rgba(6,15,42,0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 99px;
    padding: 10px 20px;
    display: flex; align-items: center; gap: 10px;
    font-size: .82rem; font-weight: 600; color: rgba(255,255,255,0.85);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
    white-space: nowrap;
}
.auto-advance-bar.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.auto-advance-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #6366F1;
    animation: advancePulse .6s ease-in-out infinite alternate;
}
@keyframes advancePulse {
    from { transform: scale(1); opacity: 0.7; }
    to   { transform: scale(1.5); opacity: 1; }
}

/* ── Navigation footer — dark glass ──────────────────── */
.survey-footer {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(6,15,42,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 14px 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
}
.survey-footer-inner {
    max-width: 780px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}

/* Step dots indicator */
.step-dots { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.step-dot {
    height: 8px; border-radius: 99px; background: rgba(255,255,255,0.15);
    transition: all .35s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
}
.step-dot.done   { background: rgba(16,185,129,0.7); width: 8px; }
.step-dot.active { background: #6366F1; width: 24px; box-shadow: 0 0 8px rgba(99,102,241,0.6); }
.step-dot.pending { width: 8px; }

/* Survey nav buttons */
.s-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px;
    border: none; border-radius: 12px;
    font-family: var(--font); font-size: .93rem; font-weight: 600;
    cursor: pointer; transition: all .2s; min-height: 46px;
    white-space: nowrap;
}
.s-btn-prev {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
}
.s-btn-prev:hover {
    background: rgba(255,255,255,0.14);
    color: white;
}
.s-btn-next {
    background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(99,102,241,0.5);
}
.s-btn-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.65); }
.s-btn-submit {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(16,185,129,0.5);
}
.s-btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.65); }
.s-btn:disabled { opacity: 0.6; transform: none !important; cursor: not-allowed; }

/* Error snackbar */
.survey-snack {
    position: fixed;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    left: 50%; transform: translateX(-50%) translateY(16px);
    z-index: 500; background: rgba(15,23,42,0.96); color: white;
    padding: 13px 22px; border-radius: 12px; font-size: .88rem; font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid rgba(239,68,68,0.3);
    opacity: 0;
    transition: opacity .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1);
    pointer-events: none;
    display: flex; align-items: center; gap: 10px;
    word-wrap: break-word; overflow-wrap: anywhere;
    max-width: min(calc(100vw - 32px), 480px);
    width: max-content;
}
.survey-snack.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.survey-snack i { color: #FB923C; font-size: 1rem; flex-shrink: 0; }
.survey-snack > span { min-width: 0; }

@media (max-width: 575.98px) {
    .survey-snack {
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        left: 16px; right: 16px;
        transform: translateY(16px);
        max-width: none;
        width: auto;
        padding: 12px 16px;
        font-size: .85rem;
        align-items: flex-start;
    }
    .survey-snack.show { transform: translateY(0); }
    .survey-snack i { padding-top: 2px; }
}

/* ── Milestone overlay — professional style ────────────── */
.milestone-overlay {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10,20,50,0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0; pointer-events: none;
    transition: opacity .35s ease;
}
.milestone-overlay.show { opacity: 1; pointer-events: all; }

.milestone-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 44px 36px;
    text-align: center;
    max-width: 340px;
    width: calc(100% - 40px);
    position: relative;
    animation: milestoneIn .4s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid rgba(59,130,246,0.12);
}
@keyframes milestoneIn {
    from { transform: translateY(24px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1);       opacity: 1; }
}
.milestone-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #3B82F6, #6366F1);
}

/* Progress ring + percentage together */
.milestone-icon-wrap {
    position: relative;
    width: 88px; height: 88px;
    margin: 0 auto 22px;
    display: flex; align-items: center; justify-content: center;
}
.milestone-ring {
    position: absolute; inset: 0;
    width: 88px; height: 88px;
}
.milestone-pct {
    position: relative;
    font-size: 1.35rem; font-weight: 800;
    color: #1E3A8A;
    letter-spacing: -.02em;
    line-height: 1;
}

.milestone-title {
    font-size: 1.05rem; font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
    letter-spacing: -.01em;
}
.milestone-desc {
    font-size: .84rem; color: #64748B;
    margin-bottom: 28px; line-height: 1.6;
}
.milestone-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 28px;
    background: #1D4ED8;
    color: white; border: none; border-radius: 10px;
    font-family: var(--font); font-size: .9rem; font-weight: 600;
    cursor: pointer; width: 100%;
    letter-spacing: .01em;
    transition: background .2s, box-shadow .2s;
}
.milestone-btn:hover {
    background: #1E40AF;
    box-shadow: 0 4px 16px rgba(29,78,216,0.35);
}

/* Micro confetti — used on form submit */
.mini-confetti {
    position: fixed; pointer-events: none; z-index: 9001;
    animation: miniConfettiFall linear forwards;
}
@keyframes miniConfettiFall {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   THANK-YOU PAGE — Epic Celebration
   ═══════════════════════════════════════════════════════════ */
.ty-page {
    min-height: 100dvh;
    background:
        radial-gradient(ellipse at 15% 25%, rgba(16,185,129,0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 75%, rgba(6,148,162,0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(5,150,105,0.3) 0%, transparent 55%),
        #042a1a;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    position: relative; overflow: hidden;
}

/* Large confetti particles (JS-created) */
.confetti {
    position: fixed; z-index: 0;
    top: -20px;
    animation: confettiFall linear forwards;
    border-radius: 2px;
}
@keyframes confettiFall {
    0%   { transform: translateY(0) rotateX(0deg) rotateZ(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotateX(720deg) rotateZ(540deg); opacity: 0; }
}

/* Orbiting circles on thank you page */
.ty-orb {
    position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
.ty-orb-1 {
    width: 500px; height: 500px;
    top: -150px; left: -150px;
    background: radial-gradient(circle, rgba(16,185,129,0.25) 0%, transparent 70%);
    animation: orbDrift 20s linear infinite;
}
.ty-orb-2 {
    width: 400px; height: 400px;
    bottom: -100px; right: -100px;
    background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, transparent 70%);
    animation: orbDrift 15s linear infinite reverse;
}

.ty-card {
    position: relative; z-index: 1;
    max-width: 540px; width: 100%;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(32px);
    border-radius: 28px; padding: 52px 44px; text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.1) inset;
    animation: cardArrival .7s cubic-bezier(.34,1.56,.64,1) both;
    overflow: hidden;
}
.ty-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, #10B981, #06B6D4, #3B82F6, #8B5CF6);
}
@keyframes cardArrival {
    from { opacity:0; transform:scale(.8) translateY(40px); }
    to   { opacity:1; transform:none; }
}

/* Animated checkmark */
.ty-check-wrap {
    width: 110px; height: 110px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 28px;
    animation: checkArrival .8s .2s cubic-bezier(.34,1.56,.64,1) both;
    box-shadow: 0 16px 48px rgba(16,185,129,0.5), 0 0 0 0 rgba(16,185,129,0.4);
    animation: checkArrival .8s .2s cubic-bezier(.34,1.56,.64,1) both,
               checkPulse 2s 1.5s ease-in-out infinite;
}
@keyframes checkArrival {
    from { transform:scale(.2); opacity:0; }
    to   { transform:scale(1); opacity:1; }
}
@keyframes checkPulse {
    0%, 100% { box-shadow: 0 16px 48px rgba(16,185,129,0.5), 0 0 0 0 rgba(16,185,129,0.4); }
    50%       { box-shadow: 0 16px 48px rgba(16,185,129,0.5), 0 0 0 18px rgba(16,185,129,0); }
}

/* SVG checkmark draw animation */
.ty-check-svg { width: 56px; height: 56px; }
.ty-check-path {
    stroke: white; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: drawCheck .6s .7s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.ty-title {
    font-size: 2.4rem; font-weight: 900; color: var(--text); margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.ty-subtitle { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 8px; }
.ty-survey-name { font-size: 1rem; font-weight: 700; color: #059669; margin-bottom: 20px; }

/* Stats strip */
.ty-stats {
    display: flex; gap: 0; margin-bottom: 24px;
    background: #F8FAFC; border-radius: 16px; overflow: hidden;
    border: 1px solid #E2E8F0;
}
.ty-stat-item {
    flex: 1; padding: 16px 12px; text-align: center;
    border-right: 1px solid #E2E8F0;
}
.ty-stat-item:last-child { border-right: none; }
.ty-stat-num {
    font-size: 1.6rem; font-weight: 800; color: var(--text);
    line-height: 1; margin-bottom: 4px;
    animation: countUp .8s cubic-bezier(.4,0,.2,1);
}
.ty-stat-lbl { font-size: .7rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

.ty-ribbon {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1px solid #A7F3D0;
    border-radius: 14px;
    padding: 14px 18px; margin-bottom: 24px; text-align: left;
}
.ty-ribbon-icon { font-size: 1.4rem; color: #059669; flex-shrink: 0; }
.ty-ribbon-text { font-size: .85rem; color: #065F46; font-weight: 500; line-height: 1.5; }

.ty-desc { font-size: .88rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 28px; }

.ty-close-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px;
    background: #F1F5F9;
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    color: #64748B; font-family: var(--font); font-size: .95rem; font-weight: 600;
    cursor: pointer; transition: all .2s; text-decoration: none;
}
.ty-close-btn:hover { border-color: #CBD5E1; background: #E8EDF5; color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   ADMIN SIDEBAR LAYOUT
   ═══════════════════════════════════════════════════════════ */
.admin-wrap { display: flex; min-height: 100dvh; background: #F1F5FF; }

/* Sidebar */
.admin-sidebar {
    width: 256px; flex-shrink: 0;
    background: linear-gradient(180deg, #001f5b 0%, #003087 100%);
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 400;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 32px rgba(0,48,135,.18);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
}

.sidebar-head {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.sidebar-logo-row { display: flex; align-items: center; gap: 10px; }
.sidebar-logo { height: 34px; width: auto; }
.sidebar-brand { font-size: .85rem; font-weight: 700; color: white; line-height: 1.25; }
.sidebar-brand span { font-size: .65rem; color: rgba(255,255,255,.5); display: block; font-weight: 400; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group-label {
    font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255,255,255,.38); padding: 10px 8px 4px;
}
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-xs);
    color: rgba(255,255,255,.68); text-decoration: none;
    font-size: .875rem; font-weight: 500; margin-bottom: 2px;
    transition: all .15s; position: relative;
}
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; width: 18px; text-align: center; }
.sidebar-link:hover { background: rgba(255,255,255,.1); color: white; }
.sidebar-link.active {
    background: rgba(255,255,255,.15); color: white; font-weight: 600;
}
.sidebar-link.active::before {
    content: ''; position: absolute; left: -1px; top: 20%; bottom: 20%;
    width: 3px; background: var(--teal); border-radius: 0 2px 2px 0;
}

.sidebar-foot {
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-xs);
    background: rgba(255,255,255,.07); margin-bottom: 8px;
}
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.18); display: flex; align-items: center;
    justify-content: center; color: white; font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.user-name  { font-size: .82rem; font-weight: 600; color: white; line-height: 1.2; }
.user-role  { font-size: .68rem; color: rgba(255,255,255,.55); }
.user-role.sa { color: var(--gold); }

.sidebar-logout {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: var(--radius-xs);
    color: rgba(255,255,255,.55); font-size: .85rem; font-weight: 500;
    cursor: pointer; border: none; background: none; width: 100%;
    transition: all .15s; text-align: left;
}
.sidebar-logout:hover { background: rgba(239,68,68,.15); color: #FCA5A5; }

/* Mobile overlay */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 395;
    backdrop-filter: blur(3px);
}
.sidebar-overlay.show { display: block; }

/* Main content area */
.admin-main { flex: 1; margin-left: 256px; display: flex; flex-direction: column; min-width: 0; }

/* Top bar */
.admin-topbar {
    position: sticky; top: 0; z-index: 200;
    background: rgba(248,250,255,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 28px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.sidebar-toggle {
    display: none; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius-xs);
    border: 1px solid var(--border); background: white; cursor: pointer;
    color: var(--text-muted); font-size: 1.2rem; flex-shrink: 0;
    transition: all .15s;
}
.sidebar-toggle:hover { border-color: var(--blue); color: var(--blue); }
.admin-page-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Content */
.admin-content { padding: 28px 28px 48px; }

/* ── Stat cards ───────────────────────────────────────── */
.stat-card {
    background: white; border-radius: var(--radius); padding: 22px 20px;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 16px;
    transition: box-shadow .2s, transform .2s; cursor: default;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.stat-icon {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.stat-val { font-size: 1.85rem; font-weight: 800; line-height: 1; margin-bottom: 3px; color: var(--text); }
.stat-lbl { font-size: .8rem; color: var(--text-muted); font-weight: 500; }

/* ── Survey cards (dashboard list) ────────────────────── */
.s-card {
    background: white; border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s; overflow: hidden;
}
.s-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.s-card-head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
}
.s-card-title { font-weight: 700; font-size: .97rem; color: var(--text); margin-bottom: 8px; line-height: 1.35; }
.s-card-meta  { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--text-muted); }
.s-card-body  { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.s-card-stat  { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.s-card-stat strong { color: var(--text); font-weight: 700; font-size: .95rem; }

/* Status badge */
.s-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 99px;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.s-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.s-active   { background: #D1FAE5; color: #059669; }
.s-draft    { background: #F1F5F9; color: #64748B; }

/* ── New survey cards ──────────────────────────────────── */
@keyframes scCardIn {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    padding: 20px;
}

.sc-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s, border-color .25s;
    animation: scCardIn .45s cubic-bezier(.16,1,.3,1) both;
}
.sc-card:hover {
    box-shadow: 0 10px 32px rgba(0,0,0,.12);
    transform: translateY(-4px);
    border-color: #C7D2FE;
}

/* Accent top bar */
.sc-accent {
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}

/* Header */
.sc-head { padding: 16px 18px 12px; flex: 1; }
.sc-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.sc-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.4;
    margin: 0 0 10px;
}
.sc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    color: #64748B;
}
.sc-meta-item i { font-size: .8rem; }
.sc-meta-expired { color: #EF4444; }
.sc-exp-tag {
    background: #FEE2E2;
    color: #DC2626;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    letter-spacing: .04em;
}

/* Head action icons */
.sc-head-actions { display: flex; gap: 4px; }
.sc-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: transparent;
    color: #64748B;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.sc-icon-btn:hover { background: #EEF2FF; border-color: #A5B4FC; color: #4338CA; }

/* Status badge */
.sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.sc-badge-active   { background: #D1FAE5; color: #065F46; }
.sc-badge-draft    { background: #F1F5F9; color: #475569; }
.sc-badge-closed   { background: #FEF3C7; color: #92400E; }
.sc-badge-archived { background: #EDE9FE; color: #5B21B6; }

/* Animated pulse dot for active */
.sc-pulse {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #10B981;
    flex-shrink: 0;
    animation: scPulse 1.8s ease-in-out infinite;
}
@keyframes scPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
    50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

/* Stats row */
.sc-stats {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    background: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
}
.sc-stat { flex: 1; text-align: center; padding: 4px 0; }
.sc-stat-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
}
.sc-stat-lbl {
    font-size: .68rem;
    color: #94A3B8;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}
.sc-stat-lbl i { font-size: .7rem; }
.sc-stat-div { width: 1px; background: #E2E8F0; align-self: stretch; margin: 4px 0; }

/* Footer action buttons */
.sc-footer {
    display: flex;
    gap: 0;
    border-top: 1px solid #F1F5F9;
}
.sc-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px;
    font-size: .75rem;
    font-weight: 600;
    border: none;
    border-right: 1px solid #F1F5F9;
    background: transparent;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sc-action-btn:last-child { border-right: none; }
.sc-action-btn i { font-size: .85rem; }

.sc-action-btn:hover        { background: #F8FAFC; color: #0F172A; }
.sc-action-primary:hover    { background: #EEF2FF; color: #4338CA; }
.sc-action-success:hover    { background: #ECFDF5; color: #059669; }
.sc-action-warning:hover    { background: #FFFBEB; color: #D97706; }
.sc-action-danger:hover     { background: #FEF2F2; color: #DC2626; }
.s-closed   { background: #FEE2E2; color: #DC2626; }
.s-archived { background: #1E293B18; color: #475569; }

/* Icon action buttons */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-xs);
    border: 1px solid var(--border); background: white;
    color: var(--text-muted); text-decoration: none;
    transition: all .15s; font-size: .95rem; cursor: pointer;
}
.icon-btn:hover           { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.icon-btn.danger:hover    { border-color: var(--danger); color: var(--danger); background: #FEF2F2; }
.icon-btn.success:hover   { border-color: var(--success); color: var(--success); background: #F0FDF4; }
.icon-btn.warning:hover   { border-color: var(--gold); color: var(--gold); background: #FFFBEB; }

/* ── Admin shared components ──────────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.page-header-title { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.page-header-sub   { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }

.admin-card {
    background: white; border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
}
.admin-card-head {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.admin-card-title { font-size: .95rem; font-weight: 700; color: var(--text); }

.table th { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.table td { font-size: .9rem; vertical-align: middle; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state i { font-size: 3rem; color: var(--border); display: block; margin-bottom: 12px; }
.empty-state p { color: var(--text-muted); margin-bottom: 16px; }

/* Flash alert */
.flash-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem;
}
.flash-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.flash-danger  { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.flash-info    { background: var(--blue-light); border: 1px solid #BFDBFE; color: var(--blue); }

/* Chart containers */
.chart-container    { position: relative; height: 280px; }
.chart-container-sm { position: relative; height: 200px; }

/* ── Analytics ────────────────────────────────────────── */
.q-section { border-left: 4px solid var(--blue); padding-left: 16px; margin-bottom: 6px; }

/* ── Survey page footer (shared across all survey pages) ── */
.spf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 20px 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.spf-logo {
    height: 60px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.80;
}
.spf-sep {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.spf-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.spf-org {
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    letter-spacing: .01em;
    line-height: 1.3;
}
.spf-meta {
    font-size: .67rem;
    color: rgba(255,255,255,0.22);
    letter-spacing: .03em;
}
@media (max-width: 600px) {
    .spf { gap: 10px; }
    .spf-sep { display: none; }
    .spf-content { align-items: center; text-align: center; }
}

/* ── Animations ───────────────────────────────────────── */
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes spin    { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1023px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }
}

@media (max-width: 767px) {
    .login-split { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-form-side { padding: 40px 24px; }
    .auth-header { padding: 24px 24px 0; }
    .auth-body { padding: 20px 24px 28px; }
    .ty-card { padding: 36px 24px; border-radius: 20px; }
    .ty-title { font-size: 2rem; }
    .admin-content { padding: 20px 16px 40px; }
    .admin-topbar { padding: 12px 16px; }
    .survey-main { padding: 20px 14px 140px; }
    .lk-btn .lk-lbl { font-size: .52rem; }
    .verify-body { padding: 22px 24px 28px; }
    .verify-header-band { padding: 24px 24px 20px; }
    .milestone-card { padding: 36px 28px; }
}

@media (max-width: 480px) {
    .likert-scale { gap: 5px; }
    .lk-btn { padding: 10px 2px; min-height: 68px; }
    .lk-btn .lk-num { font-size: 1.15rem; }
    .step-dots { display: none; }
    .ty-stats { flex-direction: column; }
    .ty-stat-item { border-right: none; border-bottom: 1px solid #E2E8F0; }
    .ty-stat-item:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
