/* ============================================================
   KARYABANGSA CBT — STYLE.CSS v9.1
   Design system: Modern 2026 (Linear/Vercel-inspired)
   Font: Inter (Google Fonts)
   ============================================================ */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Color palette */
    --bg: #08080b;
    --bg-elevated: #0c0c10;
    --surface: #0e0e12;
    --surface-2: #131318;
    --surface-3: #1a1a20;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-hover: rgba(255, 255, 255, 0.18);

    /* Text hierarchy */
    --text: #ededf0;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-dim: #52525b;
    --text-faint: #3f3f46;

    /* Brand colors */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #7c3aed;
    --accent-soft: rgba(139, 92, 246, 0.12);
    --accent-soft-2: rgba(139, 92, 246, 0.06);

    --cyan: #06b6d4;
    --cyan-soft: rgba(6, 182, 212, 0.12);

    --emerald: #10b981;
    --emerald-soft: rgba(16, 185, 129, 0.12);

    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.12);

    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.12);

    --green: #22c55e;

    /* Layout */
    --sidebar-w: 248px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 8px 24px -8px rgba(139, 92, 246, 0.5);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
    font-variant-ligatures: contextual;
    background: var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
}

body.preload { opacity: 0; }
body.ready { opacity: 1; transition: opacity 0.2s ease-in; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ============================================================
   CARD
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    contain: layout style;
    transition: border-color 0.15s ease;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-accent {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.card-accent::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: -0.005em;
    padding: 9px 14px;
    gap: 6px;
    transition:
        transform 0.08s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 4px 12px -4px rgba(139, 92, 246, 0.5);
}
.btn-primary:active:not(:disabled) {
    background: var(--accent-dark);
    transform: scale(0.98);
}

.btn-ghost {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:active:not(:disabled) {
    border-color: var(--accent);
    background: var(--surface-3);
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover:not(:disabled) {
        transform: translateY(-1px);
    }
    .btn-primary:hover:not(:disabled) {
        background: var(--accent-dark);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.14) inset,
            0 6px 20px -6px rgba(139, 92, 246, 0.6);
    }
    .btn-ghost:hover:not(:disabled) {
        border-color: var(--border-strong);
        background: var(--surface-3);
    }
}

/* ============================================================
   GRADIENT TEXT
   ============================================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-light), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ============================================================
   BRAND LOGO
   ============================================================ */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 6px 16px -6px rgba(139, 92, 246, 0.5);
}

.brand-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.brand-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: -2px;
    letter-spacing: 0.3px;
}

/* ============================================================
   APP SHELL
   ============================================================ */
#app-shell {
    max-width: 780px;
    margin: 0 auto;
    padding: 12px;
}

@media (min-width: 1024px) {
    body { padding-bottom: 0 !important; }
    #app-shell {
        margin-left: var(--sidebar-w);
        max-width: 960px;
        padding: 28px 32px;
    }
}

/* ============================================================
   SIDEBAR NAV
   ============================================================ */
.sidebar-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-direction: column;
    gap: 2px;
    z-index: 40;
}

@media (min-width: 1024px) {
    .sidebar-nav.visible { display: flex; }
}

.sidebar-brand {
    padding: 4px 10px 20px 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.005em;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
    touch-action: manipulation;
    font-family: inherit;
}

.sidebar-item .icon {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.sidebar-item.active {
    background: var(--accent-soft);
    color: var(--accent-light);
    font-weight: 600;
}

.sidebar-poin {
    margin-top: auto;
    background: linear-gradient(135deg, var(--accent-soft), var(--cyan-soft));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.sidebar-poin .label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.sidebar-poin .val {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.06) 0%, rgba(6, 182, 212, 0.06) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 0;
    margin-bottom: 12px;
}

.marquee-label {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: white;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.02em;
    z-index: 2;
    border-radius: var(--radius) 0 0 var(--radius);
    white-space: nowrap;
}

.marquee-content {
    margin-left: 132px;
    overflow: hidden;
    position: relative;
    height: 22px;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: marqueeScroll 45s linear infinite;
    will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }

@keyframes marqueeScroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    font-size: 12px;
    color: var(--text);
    border-right: 1px solid var(--border);
    letter-spacing: -0.005em;
}

.marquee-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 20px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-light);
    padding: 0 6px;
}
.marquee-rank.rank-1 { background: rgba(255, 215, 0, 0.15); color: #FFD700; }
.marquee-rank.rank-2 { background: rgba(192, 192, 192, 0.15); color: #C0C0C0; }
.marquee-rank.rank-3 { background: rgba(205, 127, 50, 0.15); color: #CD7F32; }

.marquee-loading {
    padding: 0 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   PANDUAN MODAL
   ============================================================ */
.panduan-popup {
    max-width: 500px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.panduan-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    max-height: 70vh;
    overflow-y: auto;
}

.panduan-popup .swal2-actions {
    padding: 0 20px 20px 20px !important;
}

.panduan-header {
    background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
    padding: 24px 20px;
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.panduan-header .icon {
    font-size: 40px;
    margin-bottom: 8px;
    line-height: 1;
}
.panduan-header h2 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
}
.panduan-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    margin: 4px 0 0 0;
}

.panduan-body { padding: 20px; }

.panduan-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.panduan-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.panduan-step-num {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.panduan-step-content {
    flex: 1;
    min-width: 0;
}
.panduan-step-title {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.005em;
}
.panduan-step-text {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    letter-spacing: -0.005em;
}
.panduan-step-text b { color: var(--accent-light); font-weight: 600; }

.panduan-tips {
    background: var(--accent-soft-2);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 6px;
}
.panduan-tips-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 8px;
}
.panduan-tips ul {
    margin: 0;
    padding-left: 18px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.7;
}
.panduan-tips ul li b { color: var(--text); }

.btn-help {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
    font-family: inherit;
    transition: all 0.15s ease;
}
.btn-help:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.btn-help:active {
    transform: scale(0.94);
}

/* ============================================================
   SWEETALERT
   ============================================================ */
.swal2-popup {
    border-radius: var(--radius-lg) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text) !important;
    padding: 22px !important;
    width: calc(100% - 32px) !important;
    max-width: 400px !important;
    margin: 16px !important;
    font-family: var(--font-sans) !important;
    letter-spacing: -0.005em !important;
    box-shadow: var(--shadow-lg) !important;
}

.swal2-title {
    color: var(--text) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
}

.swal2-confirm {
    background: var(--accent) !important;
    color: white !important;
    border-radius: var(--radius) !important;
    padding: 11px 16px !important;
    width: 100% !important;
    margin: 6px 0 0 0 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px -4px rgba(139, 92, 246, 0.5) !important;
    transition: all 0.15s ease !important;
    font-family: inherit !important;
}
.swal2-confirm:hover {
    background: var(--accent-dark) !important;
}

.swal2-cancel {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border-radius: var(--radius) !important;
    padding: 11px 16px !important;
    width: 100% !important;
    margin: 6px 0 0 0 !important;
    border: 1px solid var(--border) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

.swal2-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
}

/* ============================================================
   RADIO CUSTOM
   ============================================================ */
.radio-custom input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    background: var(--surface-2);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.radio-custom input[type="radio"]:checked {
    border-color: var(--accent);
    background: var(--accent);
}

.radio-custom input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(8, 8, 11, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 40;
    padding: 4px 0 max(4px, env(safe-area-inset-bottom));
}

@media (min-width: 1024px) {
    .bottom-nav { display: none !important; }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    flex: 1;
    gap: 2px;
    touch-action: manipulation;
    font-family: inherit;
    transition: color 0.15s ease;
}

.bottom-nav-item.active {
    color: var(--accent-light);
    font-weight: 600;
}

.bottom-nav-item .icon {
    font-size: 18px;
    line-height: 1;
}

/* ============================================================
   INPUT
   ============================================================ */
.input {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    width: 100%;
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    letter-spacing: -0.005em;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.04);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.input::placeholder {
    color: var(--text-dim);
}

/* ============================================================
   IKLAN
   ============================================================ */
.iklan-wrap {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 10px;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    contain: layout paint;
}

.iklan-badge {
    display: inline-block;
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.iklan-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(6, 182, 212, 0.06) 100%);
    border-radius: var(--radius-sm);
    min-height: 100px;
}

.iklan-fallback .icon {
    font-size: 28px;
    margin-bottom: 6px;
    opacity: 0.6;
}
.iklan-fallback .title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 2px;
}
.iklan-fallback .desc {
    font-size: 10px;
    color: var(--text-muted);
    max-width: 240px;
    line-height: 1.5;
}

/* Anti-CLS untuk iklan */
#iklan-top {
    min-height: 100px;
    contain: strict;
    content-visibility: auto;
    contain-intrinsic-size: 100px;
}
#iklan-top .iklan-wrap { min-height: 100px; }

.iklan-wrap:empty::after,
.iklan-slot:empty::after {
    content: '';
    display: block;
    width: 100%;
    height: 100px;
    background: linear-gradient(90deg,
        rgba(139, 92, 246, 0.03) 0%,
        rgba(139, 92, 246, 0.08) 50%,
        rgba(139, 92, 246, 0.03) 100%);
    background-size: 200% 100%;
    animation: iklanShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes iklanShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.005em;
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

@media (max-width: 1023px) {
    body { padding-bottom: 64px; }
}

/* ============================================================
   HINT TEXT & DOMAIN BADGE
   ============================================================ */
.hint-text {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: -0.005em;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.domain-prisma {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}
.domain-sts {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

/* ============================================================
   LINK PANDUAN
   ============================================================ */
.link-panduan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    border: 1px solid rgba(139, 92, 246, 0.2);
    touch-action: manipulation;
    transition: all 0.15s ease;
    font-family: inherit;
}
.link-panduan:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
}
.link-panduan:active {
    background: rgba(139, 92, 246, 0.25);
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */
@media (min-width: 1024px) {
    .desktop-grid-2 {
        display: grid;
        grid-template-columns: 1.3fr 0.9fr;
        gap: 16px;
        align-items: start;
    }
}

@media (max-width: 380px) {
    body { font-size: 13px; }
    .btn { padding: 8px 12px; font-size: 12px; }
    .marquee-content { margin-left: 115px; }
    .marquee-label { font-size: 10px; padding: 0 10px; }
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-lulus {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.25);
}
.status-remed {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}
.status-neutral {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-light);
    border-color: rgba(139, 92, 246, 0.25);
}

/* ============================================================
   KERJAKAN UJIAN
   ============================================================ */
#timer-ujian {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
}

#soal-list .card {
    scroll-margin-top: 80px;
}

.soal-option {
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.soal-option:active {
    transform: scale(0.99);
}

#progress-bar {
    transition: width 0.3s ease, background 0.3s ease;
}

/* ============================================================
   DASHBOARD V9
   ============================================================ */

/* Grid layout */
.dash-grid {
    display: block;
}

@media (min-width: 1024px) {
    .dash-grid {
        display: grid;
        grid-template-columns: 1.35fr 1fr;
        gap: 16px;
        align-items: start;
    }
}

.dash-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* Saldo poin card */
.dash-poin-card {
    padding: 20px;
}

.dash-poin-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dash-poin-text {
    min-width: 0;
}

.dash-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.dash-poin-value {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 6px;
}

.dash-poin-hint {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: -0.005em;
}

.dash-poin-hint b {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Domain card */
.dash-domain-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius);
}

.dash-domain-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-domain-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: -0.005em;
}

.dash-domain-label {
    white-space: nowrap;
}

.dash-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--surface-2);
    color: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.005em;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.dash-mini-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* Statistik */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dash-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 10px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.dash-stat:hover {
    border-color: var(--border-hover);
}

.dash-stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.dash-stat-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4px;
}

.dash-stat-hint {
    font-size: 9.5px;
    color: var(--text-dim);
    letter-spacing: -0.005em;
}

.dash-stat-hint span {
    color: var(--text-muted);
    font-weight: 600;
}

/* Daftar ujian */
.dash-ujian-card {
    padding: 18px;
}

.dash-ujian-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.dash-ujian-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0 0 2px 0;
}

.dash-ujian-sub {
    font-size: 11.5px;
    color: var(--text-dim);
    margin: 0;
    letter-spacing: -0.005em;
}

.dash-ujian-filter {
    margin-bottom: 12px;
}

.dash-ujian-filter .input {
    padding: 10px 12px;
    font-size: 13px;
}

.dash-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.dash-empty .spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

/* Fitur unggulan */
.dash-fitur-card {
    padding: 18px;
}

.dash-fitur-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.dash-fitur-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-fitur-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0;
}

.dash-fitur-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 640px) {
    .dash-fitur-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.dash-fitur-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 10px;
    transition: border-color 0.15s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.dash-fitur-item:hover {
    border-color: var(--border-hover);
}

.dash-fitur-emoji {
    font-size: 20px;
    margin-bottom: 6px;
    line-height: 1;
}

.dash-fitur-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: -0.005em;
}

.dash-fitur-desc {
    font-size: 10.5px;
    color: var(--text-dim);
    line-height: 1.4;
    letter-spacing: -0.005em;
}

/* Info cards */
.dash-info-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid;
    align-items: flex-start;
}

.dash-info-violet {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.2);
}

.dash-info-cyan {
    background: rgba(6, 182, 212, 0.06);
    border-color: rgba(6, 182, 212, 0.2);
}

.dash-info-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.dash-info-text {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
    letter-spacing: -0.005em;
}

.dash-info-text b {
    color: var(--accent-light);
    font-weight: 600;
}

.dash-info-cyan .dash-info-text b {
    color: var(--cyan);
}

/* Sosial card */
.dash-social-card {
    padding: 16px;
}

.dash-social-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dash-social-icon {
    font-size: 15px;
    line-height: 1;
}

.dash-social-title {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0;
}

.dash-social-desc {
    font-size: 11.5px;
    color: var(--text-dim);
    margin: 0 0 14px 0;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

.dash-social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dash-social-btn:hover {
    border-color: var(--border-hover);
    background: var(--surface-3);
    transform: translateY(-1px);
}

.dash-social-btn:active {
    transform: translateY(0) scale(0.99);
}

.dash-social-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-social-info {
    flex: 1;
    min-width: 0;
}

.dash-social-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1px;
    letter-spacing: -0.005em;
}

.dash-social-sub {
    font-size: 10.5px;
    color: var(--text-dim);
    letter-spacing: -0.005em;
}

.dash-social-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.dash-social-btn:hover .dash-social-arrow {
    transform: translateX(3px);
}

.dash-social-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 10.5px;
    color: var(--text-dim);
    letter-spacing: -0.005em;
}

.dash-social-footer b {
    color: var(--text-muted);
    font-weight: 600;
}

/* Tips belajar */
.dash-tips-card {
    padding: 16px;
}

.dash-tips-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dash-tips-icon {
    font-size: 15px;
    line-height: 1;
}

.dash-tips-title {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0;
}

.dash-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-tips-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
    letter-spacing: -0.005em;
}

.dash-tips-list b {
    color: var(--text);
    font-weight: 600;
}

.dash-tips-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

/* ============================================================
   MOBILE OPTIMIZATION
   ============================================================ */
@media (max-width: 640px) {
    .card,
    .card-accent,
    .iklan-wrap,
    .iklan-fallback {
        content-visibility: visible !important;
        contain-intrinsic-size: auto !important;
    }

    .radio-custom input[type="radio"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .btn,
    .btn-primary,
    .btn-ghost,
    .sidebar-item,
    .bottom-nav-item {
        min-height: 40px;
        touch-action: manipulation;
    }

    #container-soal,
    #soal-list {
        -webkit-overflow-scrolling: touch;
        overflow-anchor: none;
    }

    button, a, label, .btn {
        touch-action: manipulation;
    }

    .swal2-popup {
        max-width: calc(100% - 24px) !important;
        padding: 18px !important;
    }

    .desktop-grid-2 { display: block !important; }

    .ujian-list { padding-bottom: 20px; }
    .ujian-list .card { margin-bottom: 10px; padding: 14px; }
    .ujian-list .card button,
    .ujian-list .card .btn {
        min-height: 38px;
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
    .ujian-list .card .flex-col { gap: 6px !important; }

    .grid.grid-cols-3 > div { padding: 10px 6px; }
    .fitur-card { padding: 12px; }
    .sosial-btn { padding: 12px 10px; min-height: 56px; }

    #filter-mapel {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    input, select, textarea {
        font-size: 16px !important;
    }

    /* Dashboard mobile */
    .dash-poin-value {
        font-size: 28px;
    }

    .dash-stat-value {
        font-size: 18px;
    }

    .dash-stat {
        padding: 12px 6px;
    }

    .dash-fitur-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-social-btn {
        min-height: 56px;
    }

    .dash-domain-card {
        flex-wrap: wrap;
    }
}

/* ============================================================
   TOUCH OPTIMIZATION
   ============================================================ */
.ujian-list {
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ujian-list .card {
    position: relative;
    isolation: isolate;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ujian-list .card button,
.ujian-list .card .btn {
    min-height: 32px;
    min-width: 44px;
    position: relative;
    z-index: 2;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.touch-btn {
    min-height: 36px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.touch-btn:active { transform: scale(0.96); }

.fitur-card {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.sosial-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background-color 0.2s ease;
}
.sosial-btn:active { transform: scale(0.98); }

#filter-mapel {
    touch-action: manipulation;
    min-height: 40px;
    font-size: 14px;
}

#list-ujian {
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}

/* ============================================================
   iOS SAFARI FIX
   ============================================================ */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .ujian-list .card,
    .fitur-card,
    .sosial-btn {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    button, a, label, .btn, .sosial-btn {
        touch-action: manipulation;
    }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-v8 {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden { display: none !important; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.min-w-0 { min-width: 0; }
.shrink-0 { flex-shrink: 0; }

/* Smooth transitions */
input, button, select, textarea {
    transition-property: background-color, border-color, color, box-shadow, transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

/* ============================================================
   ENGAGEMENT BANNER (Flash Sale disamarkan)
   ============================================================ */
.eng-banner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: engBannerIn 0.5s ease-out;
}

@keyframes engBannerIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Varian hijau (window aktif) */
.eng-banner-active {
    background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(34,197,94,0.08) 100%);
    border: 1px solid rgba(34,197,94,0.35);
    box-shadow: 0 8px 24px -12px rgba(34,197,94,0.5);
}

.eng-banner-active::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(34,197,94,0.15) 0%, transparent 60%);
    animation: engPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes engPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.eng-banner-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    animation: engBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes engBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.eng-banner-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.eng-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.eng-banner-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.eng-banner-desc b {
    color: #4ade80;
    font-weight: 700;
}

.eng-banner-desc s {
    color: var(--text-dim);
    font-size: 10px;
}

.eng-banner-timer {
    font-size: 10px;
    color: #fbbf24;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.eng-banner-timer::before {
    content: '⏰';
    font-size: 11px;
}

.eng-banner-kuota {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Varian orange (hampir habis) */
.eng-banner-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(251,191,36,0.08) 100%);
    border: 1px solid rgba(245,158,11,0.35);
}
.eng-banner-warning .eng-banner-title { color: #fbbf24; }
.eng-banner-warning .eng-banner-desc b { color: #fbbf24; }

/* ============================================================
   STREAK BADGE
   ============================================================ */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(239,68,68,0.1) 0%, rgba(249,115,22,0.06) 100%);
    border: 1px solid rgba(239,68,68,0.25);
    animation: streakIn 0.5s ease-out;
}

@keyframes streakIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.streak-flame {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    animation: flameFlicker 1.5s ease-in-out infinite;
}

@keyframes flameFlicker {
    0%, 100% { transform: scale(1) rotate(-2deg); opacity: 1; }
    50% { transform: scale(1.08) rotate(2deg); opacity: 0.9; }
}

.streak-info {
    flex: 1;
    min-width: 0;
}

.streak-count {
    font-size: 15px;
    font-weight: 800;
    color: #f87171;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.streak-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.streak-motivate {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
    font-style: italic;
}

/* Mobile */
@media (max-width: 640px) {
    .eng-banner {
        padding: 12px 14px;
        gap: 10px;
    }
    .eng-banner-icon { font-size: 26px; }
    .eng-banner-title { font-size: 12px; }
    .eng-banner-desc { font-size: 10px; }
    .streak-flame { font-size: 18px; }
    .streak-count { font-size: 14px; }
}

/* ============================================================
   ENGAGEMENT BANNER — v2 TIMER VISUAL
   ============================================================ */

.eng-banner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: engBannerIn 0.5s ease-out;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

@keyframes engBannerIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ✅ Hijau — window aktif normal */
.eng-banner-active {
    background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(34,197,94,0.08) 100%);
    border: 1px solid rgba(34,197,94,0.35);
    box-shadow: 0 8px 24px -12px rgba(34,197,94,0.5);
}

.eng-banner-active::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(34,197,94,0.15) 0%, transparent 60%);
    animation: engPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes engPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* ✅ Orange — warning (hampir habis) */
.eng-banner-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.18) 0%, rgba(251,191,36,0.1) 100%);
    border: 1px solid rgba(245,158,11,0.4);
    box-shadow: 0 8px 24px -12px rgba(245,158,11,0.5);
    animation: engBannerIn 0.5s ease-out, engPulseOrange 2s ease-in-out infinite;
}

@keyframes engPulseOrange {
    0%, 100% { box-shadow: 0 8px 24px -12px rgba(245,158,11,0.5); }
    50% { box-shadow: 0 8px 32px -8px rgba(245,158,11,0.8); }
}

/* ✅ Merah — danger (< 5 menit) */
.eng-banner-danger {
    background: linear-gradient(135deg, rgba(239,68,68,0.2) 0%, rgba(248,113,113,0.12) 100%);
    border: 1px solid rgba(239,68,68,0.5);
    box-shadow: 0 8px 24px -12px rgba(239,68,68,0.6);
    animation: engBannerIn 0.5s ease-out, engPulseDanger 1s ease-in-out infinite;
}

@keyframes engPulseDanger {
    0%, 100% {
        box-shadow: 0 8px 24px -12px rgba(239,68,68,0.6);
        border-color: rgba(239,68,68,0.5);
    }
    50% {
        box-shadow: 0 12px 36px -8px rgba(239,68,68,0.9);
        border-color: rgba(239,68,68,0.8);
    }
}

.eng-banner-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    animation: engBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

@keyframes engBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.eng-banner-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.eng-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.eng-banner-warning .eng-banner-title { color: #fbbf24; }
.eng-banner-danger .eng-banner-title { color: #f87171; }

.eng-banner-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.eng-banner-desc b {
    color: #4ade80;
    font-weight: 700;
    transition: color 0.3s ease;
}

.eng-banner-warning .eng-banner-desc b { color: #fbbf24; }
.eng-banner-danger .eng-banner-desc b { color: #f87171; }

.eng-banner-desc s {
    color: var(--text-dim);
    font-size: 10px;
}

/* ✅ TIMER — Ini yang bergerak! */
.eng-banner-timer {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 700;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    transition: color 0.3s ease;
}

.eng-banner-timer span {
    display: inline-block;
    min-width: 48px;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

/* ✅ Pulse timer kalau < 60 detik */
.eng-banner-timer-pulse {
    color: #f87171 !important;
    animation: timerPulse 0.8s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.7;
    }
}

.eng-banner-kuota {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 3px;
}

/* ✅ Mobile */
@media (max-width: 640px) {
    .eng-banner {
        padding: 12px 14px;
        gap: 10px;
    }
    .eng-banner-icon { font-size: 26px; }
    .eng-banner-title { font-size: 12px; }
    .eng-banner-desc { font-size: 10px; }
    .eng-banner-timer { font-size: 10px; }
    .eng-banner-timer span { min-width: 42px; }
}

/* ============================================================
   STREAK BADGE
   ============================================================ */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(239,68,68,0.1) 0%, rgba(249,115,22,0.06) 100%);
    border: 1px solid rgba(239,68,68,0.25);
    animation: streakIn 0.5s ease-out;
}

@keyframes streakIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.streak-flame {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    animation: flameFlicker 1.5s ease-in-out infinite;
}

@keyframes flameFlicker {
    0%, 100% { transform: scale(1) rotate(-2deg); opacity: 1; }
    50% { transform: scale(1.08) rotate(2deg); opacity: 0.9; }
}

.streak-info { flex: 1; min-width: 0; }

.streak-count {
    font-size: 15px;
    font-weight: 800;
    color: #f87171;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.streak-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.streak-motivate {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
    font-style: italic;
}

@media (max-width: 640px) {
    .streak-flame { font-size: 18px; }
    .streak-count { font-size: 14px; }
}
.eng-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.eng-banner-timer {
    font-size: 11px;
    color: #fbbf24;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.eng-banner-timer span {
    font-family: 'Courier New', monospace;
    min-width: 48px;
    display: inline-block;
}

/* ============================================================
   ENGAGEMENT BANNER — UPCOMING (Flash Sale akan datang)
   ============================================================ */
.eng-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    animation: engSlideIn 0.4s ease-out;
}

@keyframes engSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.eng-banner-active {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(6,182,212,0.1));
    border: 1px solid rgba(139,92,246,0.4);
}

.eng-banner-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(239,68,68,0.1));
    border: 1px solid rgba(245,158,11,0.5);
}

.eng-banner-danger {
    background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(220,38,38,0.15));
    border: 1px solid rgba(239,68,68,0.6);
    animation: engPulse 1.5s ease-in-out infinite;
}

@keyframes engPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

/* ✅ UPCOMING — warna lebih soft */
.eng-banner-upcoming {
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(139,92,246,0.08));
    border: 1px solid rgba(6,182,212,0.3);
}

.eng-banner-upcoming .eng-banner-title {
    color: #22d3ee;
}

.eng-banner-upcoming .eng-banner-icon {
    animation: engBounce 2s ease-in-out infinite;
}

@keyframes engBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.eng-banner-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.eng-banner-body {
    flex: 1;
    min-width: 0;
}

.eng-banner-title {
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.eng-banner-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.eng-banner-desc b {
    color: var(--text);
    font-weight: 700;
}

.eng-banner-desc s {
    color: var(--text-dim);
    opacity: 0.7;
    font-size: 11px;
}

.eng-banner-timer {
    font-size: 14px;
    font-weight: 700;
    color: #a78bfa;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.eng-banner-timer-pulse {
    animation: engTimerPulse 1s ease-in-out infinite;
}

@keyframes engTimerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.eng-banner-kuota {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 4px;
}