/* ============================================================
   EDU APP ID - Design System
   Digital Solutions for Education & Developers
   Tema: Emerald + Dark Blue + Gradient + Dark/Light mode
   ============================================================ */

:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    --navy-800: #16213e;
    --navy-900: #0f172a;
    --navy-950: #0b1120;

    --primary: var(--emerald-500);
    --primary-hover: var(--emerald-600);
    --secondary: var(--navy-900);

    --gradient-main: linear-gradient(135deg, #10b981 0%, #0d9488 45%, #1e3a8a 100%);
    --gradient-hero: linear-gradient(135deg, rgba(16,185,129,.12) 0%, rgba(29,78,216,.18) 100%);

    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-muted: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #eef2f7;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
    --shadow: 0 4px 16px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
    --shadow-primary: 0 8px 24px rgba(16, 185, 129, .35);

    --radius-sm: .5rem;
    --radius: .75rem;
    --radius-lg: 1.25rem;
    --radius-full: 999px;

    --font-main: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

[data-theme="dark"] {
    --bg-body: #0b1120;
    --bg-card: #111a2e;
    --bg-muted: #16213e;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --border-light: #1a2438;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow: 0 4px 16px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    --gradient-hero: linear-gradient(135deg, rgba(16,185,129,.10) 0%, rgba(29,78,216,.15) 100%);
}

/* ---------- RESET & BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--emerald-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--emerald-500); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::selection { background: var(--emerald-500); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--emerald-500), #0d9488); border-radius: 8px; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 { font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.display-title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; }

.text-gradient {
    background: linear-gradient(120deg, #10b981, #22d3ee, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-weight: 700; font-size: .95rem; padding: .7rem 1.5rem;
    border-radius: var(--radius-full); border: 2px solid transparent;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    text-decoration: none !important;
}
.btn:active { transform: scale(.97); }

.btn-primary {
    background: var(--gradient-main); color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(16, 185, 129, .45); color: #fff; }

.btn-outline {
    border-color: var(--border); color: var(--text-primary); background: transparent;
}
.btn-outline:hover { border-color: var(--emerald-500); color: var(--emerald-500); transform: translateY(-2px); }

.btn-ghost {
    background: var(--bg-muted); color: var(--text-primary);
}
.btn-ghost:hover { background: var(--border); color: var(--text-primary); }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; transform: translateY(-2px); }

.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-lg { padding: .95rem 2.2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn i { font-size: 1em; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ---------- BADGE ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .28rem .7rem; border-radius: var(--radius-full);
    font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}
.badge-emerald { background: var(--emerald-100); color: var(--emerald-700); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-purple { background: #ede9fe; color: #7c3aed; }
.badge-gray { background: var(--bg-muted); color: var(--text-secondary); }
[data-theme="dark"] .badge-emerald { background: rgba(16,185,129,.15); color: var(--emerald-300); }
[data-theme="dark"] .badge-blue { background: rgba(59,130,246,.15); color: #93c5fd; }
[data-theme="dark"] .badge-red { background: rgba(239,68,68,.15); color: #fca5a5; }
[data-theme="dark"] .badge-amber { background: rgba(245,158,11,.15); color: #fcd34d; }
[data-theme="dark"] .badge-purple { background: rgba(139,92,246,.15); color: #c4b5fd; }
[data-theme="dark"] .badge-gray { background: var(--bg-muted); color: var(--text-secondary); }

/* ---------- NAVBAR ---------- */
.navbar-edu {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transition: all .3s;
}
[data-theme="dark"] .navbar-edu { background: rgba(11, 17, 32, .85); }
.navbar-edu.scrolled { box-shadow: var(--shadow); }

.brand-logo {
    display: flex; align-items: center; gap: .6rem;
    font-weight: 900; font-size: 1.3rem; color: var(--text-primary);
    letter-spacing: -.03em;
}
.brand-logo .logo-badge {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--gradient-main);
    display: grid; place-items: center; color: #fff; font-size: 1.1rem;
    box-shadow: var(--shadow-primary);
}
.brand-logo .logo-img {
    height: 40px; width: auto; max-width: 170px;
    object-fit: contain; border-radius: 10px;
}
.brand-logo span em { font-style: normal; color: var(--emerald-500); }

.navbar-edu .nav-link {
    color: var(--text-secondary); font-weight: 600; font-size: .95rem;
    padding: .5rem .9rem; border-radius: var(--radius-full);
    transition: all .2s;
}
.navbar-edu .nav-link:hover,
.navbar-edu .nav-link.active { color: var(--emerald-600); background: var(--emerald-50); }
[data-theme="dark"] .navbar-edu .nav-link:hover,
[data-theme="dark"] .navbar-edu .nav-link.active { background: rgba(16,185,129,.12); color: var(--emerald-300); }

.icon-btn {
    position: relative; width: 42px; height: 42px;
    display: inline-grid; place-items: center;
    border-radius: var(--radius-full); border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-primary);
    font-size: 1.05rem; transition: all .2s;
}
.icon-btn:hover { border-color: var(--emerald-500); color: var(--emerald-500); transform: translateY(-2px); }
.icon-btn .count-dot {
    position: absolute; top: 2px; right: 0;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: #ef4444; color: #fff; font-size: .65rem; font-weight: 800;
    border-radius: var(--radius-full); display: grid; place-items: center;
    border: 2px solid var(--bg-card);
}

/* ---------- HERO ---------- */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(4rem, 9vw, 7rem) 0;
    background: var(--gradient-hero);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(600px 300px at 10% 20%, rgba(16,185,129,.18), transparent 60%),
        radial-gradient(600px 300px at 90% 30%, rgba(59,130,246,.18), transparent 60%);
    pointer-events: none;
}

/* Grid pattern */
.hero-grid-bg {
    position: absolute; inset: 0; opacity: .5;
    background-image:
        linear-gradient(rgba(16,185,129,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,185,129,.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Floating blobs */
.float-blob {
    position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35;
    animation: float 9s ease-in-out infinite;
}
.blob-1 { width: 320px; height: 320px; background: #10b981; top: -80px; right: 8%; }
.blob-2 { width: 260px; height: 260px; background: #3b82f6; bottom: -60px; left: 6%; animation-delay: -3s; }
.blob-3 { width: 180px; height: 180px; background: #22d3ee; top: 40%; left: 40%; animation-delay: -6s; }

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

/* Code window animation */
.code-window {
    background: #0d1526; border: 1px solid rgba(148,163,184,.2);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
    animation: codeFloat 6s ease-in-out infinite;
}
@keyframes codeFloat {
    0%, 100% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(0); }
    50% { transform: perspective(1200px) rotateY(-4deg) rotateX(2deg) translateY(-12px); }
}
.code-window .code-header {
    display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem;
    background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(148,163,184,.15);
}
.code-window .dot { width: 12px; height: 12px; border-radius: 50%; }
.code-window pre {
    padding: 1.2rem; font-family: var(--font-mono); font-size: .82rem;
    color: #a7f3d0; overflow: auto; line-height: 1.7;
}
.code-window .tok-k { color: #818cf8; }
.code-window .tok-s { color: #fbbf24; }
.code-window .tok-c { color: #64748b; }

.hero-stat-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: .5rem 1.1rem;
    font-weight: 700; font-size: .9rem; box-shadow: var(--shadow-sm);
}
.hero-stat-chip i { color: var(--emerald-500); }

/* ---------- CARDS ---------- */
.card {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s;
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, .35);
}

/* Product card */
.product-card { overflow: hidden; position: relative; }
.product-card .thumb {
    position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-muted);
}
.product-card .thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.product-card:hover .thumb img { transform: scale(1.07); }
.product-card .thumb .badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
}
.product-card .thumb .discount-flag {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    background: #ef4444; color: #fff; font-weight: 800; font-size: .72rem;
    padding: .25rem .6rem; border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(239, 68, 68, .4);
}
.product-card .quick-actions {
    position: absolute; right: 12px; bottom: -60px; display: flex; flex-direction: column; gap: .5rem;
    transition: bottom .3s cubic-bezier(.4, 0, .2, 1); z-index: 3;
}
.product-card:hover .quick-actions { bottom: 12px; }
.product-card .quick-actions .icon-btn { width: 38px; height: 38px; background: var(--bg-card); }
.product-card .card-body { padding: 1.1rem; }
.product-card .price-old { text-decoration: line-through; color: var(--text-muted); font-size: .85rem; }
.product-card .price-now { font-weight: 800; font-size: 1.15rem; color: var(--emerald-600); }
[data-theme="dark"] .product-card .price-now { color: var(--emerald-300); }

.stars { color: #f59e0b; font-size: .85rem; letter-spacing: 1px; }
.stars .empty { color: var(--border); }

/* Category card */
.category-card {
    padding: 1.6rem; text-align: center;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); transition: all .3s;
}
.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--emerald-400);
    box-shadow: var(--shadow-lg);
}
.category-card .cat-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem;
    border-radius: 18px; background: var(--gradient-main);
    display: grid; place-items: center; color: #fff; font-size: 1.5rem;
    box-shadow: var(--shadow-primary);
}

/* Feature card */
.feature-card { padding: 1.8rem; }
.feature-card .feat-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: var(--emerald-50); color: var(--emerald-600);
    display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1rem;
}
[data-theme="dark"] .feature-card .feat-icon { background: rgba(16,185,129,.12); color: var(--emerald-300); }

/* Stat card */
.stat-card { padding: 1.6rem; text-align: center; position: relative; overflow: hidden; }
.stat-card .stat-icon {
    width: 52px; height: 52px; margin: 0 auto 1rem; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.25rem; color: #fff;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 900; }
.stat-card .stat-label { color: var(--text-secondary); font-weight: 600; font-size: .9rem; }

/* Testimonial card */
.testimonial-card { padding: 1.8rem; position: relative; }
.testimonial-card .quote-icon {
    position: absolute; top: 1.4rem; right: 1.6rem;
    font-size: 2.4rem; color: var(--emerald-200); opacity: .6;
}
.testimonial-avatar {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--emerald-400);
}

/* ---------- SECTIONS ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-muted { background: var(--bg-muted); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }

/* ---------- FORMS ---------- */
.form-control, .form-select {
    background: var(--bg-card); border: 1.5px solid var(--border);
    color: var(--text-primary); border-radius: var(--radius);
    padding: .7rem 1rem; transition: all .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
    background: var(--bg-card); color: var(--text-primary);
}
.form-label { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.form-text { color: var(--text-muted); font-size: .8rem; }
.is-invalid { border-color: #ef4444 !important; }
.form-check-input:checked { background-color: var(--emerald-500); border-color: var(--emerald-500); }

/* Password strength bar */
.pw-strength { display: flex; gap: .35rem; margin-top: .5rem; }
.pw-strength span { height: 5px; flex: 1; border-radius: 4px; background: var(--border); transition: background .3s; }
.pw-strength span.on-weak { background: #ef4444; }
.pw-strength span.on-fair { background: #f59e0b; }
.pw-strength span.on-good { background: #22c55e; }
.pw-strength span.on-strong { background: #10b981; }
.pw-hint { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }

/* ---------- TABLE ---------- */
.table-edu { --bs-table-bg: transparent; color: var(--text-primary); }
.table-edu thead th {
    background: var(--bg-muted); font-size: .78rem; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-secondary); border-bottom: none; padding: .9rem 1rem;
}
.table-edu tbody td { padding: .9rem 1rem; vertical-align: middle; border-color: var(--border-light); }
.table-edu tbody tr { transition: background .15s; }
.table-edu tbody tr:hover { background: var(--bg-muted); }
[data-theme="dark"] .table-edu { --bs-table-color: var(--text-primary); }

/* ---------- DATA TABLES ---------- */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: var(--bg-card); border: 1.5px solid var(--border);
    color: var(--text-primary); border-radius: var(--radius); padding: .4rem .8rem;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--emerald-500); outline: none; }
.dataTables_wrapper .dataTables_info { color: var(--text-secondary); font-size: .85rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: none !important; border-radius: var(--radius) !important;
    padding: .4rem .8rem !important; margin: 0 .15rem;
    color: var(--text-secondary) !important; background: transparent !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--gradient-main) !important; color: #fff !important;
    box-shadow: var(--shadow-primary);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { color: var(--emerald-500) !important; background: var(--bg-muted) !important; }

/* ---------- ACCORDION (FAQ) ---------- */
.accordion-edu .accordion-item {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius) !important; margin-bottom: .8rem; overflow: hidden;
}
.accordion-edu .accordion-button {
    background: transparent; color: var(--text-primary); font-weight: 700;
    padding: 1.1rem 1.3rem; box-shadow: none;
}
.accordion-edu .accordion-button:not(.collapsed) { color: var(--emerald-600); background: var(--emerald-50); }
[data-theme="dark"] .accordion-edu .accordion-button:not(.collapsed) { background: rgba(16,185,129,.1); color: var(--emerald-300); }
.accordion-edu .accordion-button::after { filter: var(--accordion-icon-filter, none); }
[data-theme="dark"] .accordion-edu .accordion-button::after { filter: invert(1); }
.accordion-edu .accordion-body { color: var(--text-secondary); padding: 1.2rem 1.3rem; }

/* ---------- FOOTER ---------- */
.footer {
    background: var(--navy-950); color: #94a3b8; padding: 4rem 0 0;
}
[data-theme="dark"] .footer { background: #070c18; }
.footer h5 { color: #e2e8f0; font-weight: 800; margin-bottom: 1.2rem; }
.footer a { color: #94a3b8; transition: all .2s; }
.footer a:hover { color: var(--emerald-400); padding-left: 4px; }
.footer .social-btn {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(148,163,184,.12); display: inline-grid; place-items: center;
    color: #cbd5e1; transition: all .25s;
}
.footer .social-btn:hover {
    background: var(--gradient-main); color: #fff; transform: translateY(-3px);
}
.footer-bottom { border-top: 1px solid rgba(148,163,184,.15); padding: 1.2rem 0; margin-top: 3rem; }

/* ---------- FLOATING ELEMENTS ---------- */
.back-to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 990;
    width: 46px; height: 46px; border-radius: var(--radius-full);
    background: var(--gradient-main); color: #fff; border: none;
    display: grid; place-items: center; font-size: 1.1rem;
    box-shadow: var(--shadow-primary);
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); color: #fff; }

.whatsapp-float {
    position: fixed; left: 24px; bottom: 24px; z-index: 990;
    width: 54px; height: 54px; border-radius: var(--radius-full);
    background: #25d366; color: #fff; border: none;
    display: grid; place-items: center; font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
    animation: waPulse 2.5s infinite;
    transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }
@keyframes waPulse {
    0% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
    70% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
}
.anim-fade-up { animation: fadeUp .7s cubic-bezier(.4, 0, .2, 1) both; }
.anim-fade-in { animation: fadeIn .6s ease both; }
.anim-slide-right { animation: slideInRight .7s cubic-bezier(.4, 0, .2, 1) both; }
.anim-zoom-in { animation: zoomIn .5s cubic-bezier(.4, 0, .2, 1) both; }

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: all .7s cubic-bezier(.4, 0, .2, 1); }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-light) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Preloader */
.preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-body); display: grid; place-items: center;
    transition: opacity .5s, visibility .5s;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
    width: 64px; height: 64px; border-radius: 50%;
    border: 4px solid var(--border); border-top-color: var(--emerald-500);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- TOAST ---------- */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 2000;
    display: flex; flex-direction: column; gap: .6rem; max-width: 380px;
}
.edu-toast {
    background: var(--bg-card); color: var(--text-primary);
    border-left: 4px solid var(--emerald-500);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: .9rem 1.1rem; display: flex; align-items: center; gap: .8rem;
    animation: slideInRight .4s cubic-bezier(.4, 0, .2, 1) both;
    font-size: .92rem; font-weight: 600;
}
.edu-toast.toast-error { border-left-color: #ef4444; }
.edu-toast.toast-info { border-left-color: #3b82f6; }
.edu-toast.toast-warning { border-left-color: #f59e0b; }
.edu-toast i { font-size: 1.1rem; }
.edu-toast.toast-error i { color: #ef4444; }
.edu-toast.toast-info i { color: #3b82f6; }
.edu-toast.toast-warning i { color: #f59e0b; }
.edu-toast.hide { animation: slideOut 0.35s ease both; }
@keyframes slideOut {
    to { opacity: 0; transform: translateX(60px); }
}

/* ---------- PAGINATION ---------- */
.pagination-edu { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.pagination-edu a, .pagination-edu span {
    min-width: 40px; height: 40px; display: inline-grid; place-items: center;
    border-radius: var(--radius); border: 1px solid var(--border);
    color: var(--text-secondary); font-weight: 700; font-size: .9rem;
    background: var(--bg-card); transition: all .2s;
}
.pagination-edu a:hover { border-color: var(--emerald-500); color: var(--emerald-500); transform: translateY(-2px); }
.pagination-edu .active span {
    background: var(--gradient-main); color: #fff; border-color: transparent;
    box-shadow: var(--shadow-primary);
}

/* ---------- AUTH PAGE ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 3rem 1rem; }
.auth-card { max-width: 480px; width: 100%; padding: 2.2rem; }
.auth-card .brand-center { display: flex; justify-content: center; margin-bottom: 1.6rem; }

/* ---------- DASHBOARD ---------- */
.dash-layout { display: flex; min-height: calc(100vh - 72px); }
.dash-sidebar {
    width: 260px; background: var(--bg-card); border-right: 1px solid var(--border-light);
    padding: 1.2rem 1rem; position: sticky; top: 72px; height: calc(100vh - 72px);
    overflow-y: auto; flex-shrink: 0;
}
.dash-sidebar .nav-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .75rem 1rem; border-radius: var(--radius);
    color: var(--text-secondary); font-weight: 600; font-size: .92rem;
    transition: all .2s; margin-bottom: .2rem;
}
.dash-sidebar .nav-item i { width: 22px; text-align: center; }
.dash-sidebar .nav-item:hover { background: var(--bg-muted); color: var(--emerald-600); }
.dash-sidebar .nav-item.active {
    background: var(--gradient-main); color: #fff; box-shadow: var(--shadow-primary);
}
.dash-content { flex: 1; padding: 2rem; min-width: 0; }

/* ---------- MODAL ---------- */
.modal-content { background: var(--bg-card); color: var(--text-primary); border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.modal-header { border-bottom: 1px solid var(--border-light); }
.modal-footer { border-top: 1px solid var(--border-light); }
.modal-backdrop.show { opacity: .6; backdrop-filter: blur(2px); }

/* ---------- PRICE / CHECKOUT ---------- */
.price-big { font-size: 2.2rem; font-weight: 900; color: var(--emerald-600); }
[data-theme="dark"] .price-big { color: var(--emerald-300); }

.checkout-summary { position: sticky; top: 96px; }

/* Countdown */
.countdown-box {
    display: flex; gap: .6rem; justify-content: center; align-items: center;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff; border-radius: var(--radius); padding: .9rem;
    font-weight: 800;
}
.countdown-box .cd-unit {
    background: rgba(255,255,255,.18); border-radius: var(--radius-sm);
    padding: .5rem .8rem; min-width: 58px; text-align: center;
}
.countdown-box .cd-num { font-size: 1.3rem; display: block; }
.countdown-box .cd-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }

/* Gallery */
.gallery-main { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; background: var(--bg-muted); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .8rem; overflow-x: auto; }
.gallery-thumbs img {
    width: 84px; height: 56px; object-fit: cover; border-radius: var(--radius-sm);
    cursor: pointer; opacity: .6; border: 2px solid transparent; transition: all .2s;
}
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; border-color: var(--emerald-500); }

/* Product detail */
.detail-tabs .nav-link {
    color: var(--text-secondary); font-weight: 700; border: none;
    border-radius: var(--radius-full); padding: .6rem 1.4rem; margin-right: .4rem;
}
.detail-tabs .nav-link.active { background: var(--gradient-main); color: #fff; box-shadow: var(--shadow-primary); }
.detail-tabs .nav-link:hover:not(.active) { background: var(--bg-muted); color: var(--text-primary); }

.tech-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--bg-muted); border: 1px solid var(--border-light);
    padding: .35rem .8rem; border-radius: var(--radius-full);
    font-size: .82rem; font-weight: 700; color: var(--text-secondary);
}
.tech-chip i { color: var(--emerald-500); }

/* Progress bars (rating distribution) */
.rating-bar { display: flex; align-items: center; gap: .7rem; font-size: .85rem; }
.rating-bar .bar { flex: 1; height: 8px; background: var(--border); border-radius: 6px; overflow: hidden; }
.rating-bar .bar span { display: block; height: 100%; background: #f59e0b; border-radius: 6px; }

/* Review */
.review-item { border-bottom: 1px solid var(--border-light); padding: 1.2rem 0; }
.review-item:last-child { border-bottom: none; }

/* ---------- MISC ---------- */
.text-emerald { color: var(--emerald-500) !important; }
.bg-gradient-main { background: var(--gradient-main); }
.rounded-edu { border-radius: var(--radius-lg); }
.shadow-edu { box-shadow: var(--shadow); }
.shadow-edu-lg { box-shadow: var(--shadow-lg); }
.font-mono { font-family: var(--font-mono); }

.divider { height: 1px; background: var(--border-light); margin: 2rem 0; }

.empty-state {
    text-align: center; padding: 4rem 1rem; color: var(--text-secondary);
}
.empty-state i { font-size: 3.5rem; color: var(--border); margin-bottom: 1rem; }

/* Status badge colors */
.status-pending { background: #fef3c7; color: #b45309; }
.status-paid, .status-settlement { background: #d1fae5; color: #047857; }
.status-processing { background: #dbeafe; color: #1d4ed8; }
.status-expire { background: var(--bg-muted); color: var(--text-secondary); }
.status-cancel, .status-failed { background: #fee2e2; color: #b91c1c; }
.status-refund { background: #ede9fe; color: #7c3aed; }

/* Mobile bottom nav */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 980;
    background: var(--bg-card); border-top: 1px solid var(--border-light);
    display: none; padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom));
}
.mobile-bottom-nav .mb-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: .65rem; font-weight: 700; color: var(--text-secondary);
    padding: .3rem 0;
}
.mobile-bottom-nav .mb-item i { font-size: 1.15rem; }
.mobile-bottom-nav .mb-item.active { color: var(--emerald-500); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
    .dash-sidebar {
        width: 220px;
    }
    .navbar-collapse {
        background: var(--bg-card);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-top: .6rem;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-light);
    }
}

@media (max-width: 767.98px) {
    .dash-layout { flex-direction: column; }
    .dash-sidebar {
        width: 100%; height: auto; position: static;
        display: flex; overflow-x: auto; gap: .4rem; padding: .8rem;
        border-right: none; border-bottom: 1px solid var(--border-light);
    }
    .dash-sidebar .nav-item { white-space: nowrap; margin-bottom: 0; }
    .dash-content { padding: 1.2rem; padding-bottom: 5rem; }
    .mobile-bottom-nav { display: flex; }
    .back-to-top { right: 16px; bottom: 76px; }
    .whatsapp-float { left: 16px; bottom: 76px; }
    body { padding-bottom: 0; }
}

@media (min-width: 768px) {
    .code-window { margin: 0; }
}

/* ---------- UTILITY TAMBAHAN (mobile / Android-friendly) ---------- */
.min-w-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }
html { -webkit-text-size-adjust: 100%; }

.bank-target-item { transition: border-color .15s ease; }
.bank-target-item:has(input:checked) { border-color: var(--emerald-500) !important; background: rgba(16,185,129,.04); }

@media (max-width: 575.98px) {
    .checkout-summary .price-big { font-size: 1.55rem; }
    .auth-card { padding: 1.6rem; }
    .card.p-4, .card.p-5 { padding: 1.25rem !important; }
}
