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

/* ============================================================
   THEME TOKENS
   ============================================================ */
:root {
    /* ============================
       Brand Colors
       ============================ */
    --brand-purple: #5A2DBE;
    --brand-orange: #F9A11B;
    --brand-black: #000000;
    --brand-gray: #48474C;
    --brand-white: #FFFFFF;

    /* Semantic tokens mapped to the brand palette */
    --navy: var(--brand-black);
    --navy-light: #262529;
    --emerald: var(--brand-purple);
    --emerald-dark: #47228f;
    --gold: var(--brand-orange);
    --bg: #F7F6F9;
    --surface: var(--brand-white);
    --text: var(--brand-black);
    --muted: var(--brand-gray);
    --border: #E2E0E7;
    --shadow: 0 10px 30px -12px rgba(90, 45, 190, 0.18);
    --radius: 14px;
    --radius-sm: 8px;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Fraunces", "Inter", serif;
}

[data-theme="dark"] {
    --navy: var(--brand-white);
    --navy-light: #d8d3e6;
    --emerald: #9d7bf0;
    --emerald-dark: #b393ff;
    --gold: #ffc25c;
    --bg: #0E0D12;
    --surface: #19171F;
    --text: #F5F4F7;
    --muted: #A7A4AE;
    --border: #2C2A33;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-eyebrow { color: var(--emerald); font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; display: block; }
.section-title { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; margin: 0 0 12px; color: var(--navy); }
[data-theme="dark"] .section-title { color: var(--text); }
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--emerald); color: #ffffff; }
.btn-primary:hover { background: var(--emerald-dark); box-shadow: 0 8px 20px -6px rgba(90,45,190,0.5); }
.btn-secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
[data-theme="dark"] .btn-secondary { border-color: var(--text); color: var(--text); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
[data-theme="dark"] .btn-secondary:hover { background: var(--text); color: var(--bg); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ============================================================
   HEADER
   ============================================================ */
#siteHeader { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid transparent; transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
#siteHeader.scrolled { box-shadow: var(--shadow); border-color: var(--border); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 1180px; margin: 0 auto; gap: 16px; }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
[data-theme="dark"] .logo { color: var(--text); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--emerald), var(--navy)); flex-shrink: 0; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a { font-weight: 500; font-size: 0.95rem; color: var(--text); position: relative; }
.nav-menu a:hover { color: var(--emerald); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: none; background: transparent; padding: 6px 12px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.lang-switch button.active { background: var(--navy); color: #fff; }
[data-theme="dark"] .lang-switch button.active { background: var(--emerald); color: var(--bg); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; }

@media (max-width: 900px) {
    .nav-menu { position: fixed; inset: 0 0 0 30%; background: var(--surface); flex-direction: column; align-items: flex-start; padding: 100px 28px 28px; transform: translateX(100%); transition: transform 0.25s ease; z-index: 99; gap: 22px; }
    .nav-menu.open { transform: translateX(0); }
    .nav-toggle { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
[data-theme="dark"] .hero { background: #050409; }
.hero::before { content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(90,45,190,0.5), transparent 70%); }
.hero::after { content: ""; position: absolute; left: -100px; bottom: -160px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(249,161,27,0.25), transparent 70%); }
.hero-inner { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 92px 20px 80px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-tag { display: inline-block; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: var(--gold); padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 600; line-height: 1.12; margin: 0 0 18px; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.82); max-width: 52ch; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .btn-secondary { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero .btn-secondary:hover { background: #fff; color: var(--navy); }
.hero-note { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.hero-visual { position: relative; aspect-ratio: 4/5; border-radius: 24px; background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; padding: 30px; }
.hero-visual svg { width: 100%; height: 100%; }

@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; padding-top: 40px; } .hero-visual { max-width: 320px; margin: 0 auto; } }

/* Quick search */
.quick-search { position: relative; z-index: 3; margin-top: -34px; }
.quick-search-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 22px 26px; display: flex; align-items: center; gap: 14px; }
.quick-search-card label { font-weight: 600; white-space: nowrap; }
.quick-search-card input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 12px 18px; background: var(--bg); color: var(--text); font-size: 0.95rem; }
.quick-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.quick-tags button { border: 1px solid var(--border); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; }
.quick-tags button:hover { color: var(--emerald); border-color: var(--emerald); }
@media (max-width: 640px) { .quick-search-card { flex-direction: column; align-items: stretch; } }

/* Trust bar */
.trust-bar { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: center; padding: 34px 20px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.trust-bar span { display: flex; align-items: center; gap: 8px; }
.trust-bar span::before { content: "✓"; color: var(--emerald); font-weight: 800; }

/* ============================================================
   CARDS
   ============================================================ */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(90,45,190,0.12); color: var(--emerald); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 16px; }
.card h3 { font-size: 1.08rem; margin: 0 0 8px; color: var(--navy); }
[data-theme="dark"] .card h3 { color: var(--text); }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0 0 16px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.price-tag { font-weight: 700; color: var(--emerald-dark); font-size: 0.88rem; }
[data-theme="dark"] .price-tag { color: var(--emerald); }
.card-link { font-weight: 600; color: var(--navy); font-size: 0.88rem; }
[data-theme="dark"] .card-link { color: var(--emerald); }

.book-card, .blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.book-card:hover, .blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover, .blog-image { aspect-ratio: 3/2; background: linear-gradient(135deg, var(--navy), var(--emerald-dark)); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-size: 1.1rem; padding: 16px; text-align: center; }
.book-cover { aspect-ratio: 3/4; }
.book-body, .blog-body { padding: 18px 20px 22px; }
.badge { display: inline-block; background: rgba(90,45,190,0.12); color: var(--emerald-dark); font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em; }
[data-theme="dark"] .badge { color: var(--emerald); }
.book-body h3, .blog-body h3 { margin: 10px 0 6px; font-size: 1.02rem; color: var(--navy); }
[data-theme="dark"] .book-body h3, [data-theme="dark"] .blog-body h3 { color: var(--text); }
.book-body p, .blog-body p { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.book-foot { display: flex; align-items: center; justify-content: space-between; }
.blog-meta { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 20px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px; }
[data-theme="dark"] .step-num { background: var(--emerald); color: var(--bg); }
.step h3 { font-size: 1rem; margin: 0 0 6px; }
.step p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* Why choose */
.why-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 780px) { .why-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .why-list { grid-template-columns: 1fr; } }
.why-item { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; }
.why-item::before { content: "✓"; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: rgba(90,45,190,0.14); color: var(--emerald-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; }
[data-theme="dark"] .why-item::before { color: var(--emerald); }

/* Testimonials */
.testi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.testi-card p { font-style: italic; color: var(--text); margin: 0 0 16px; }
.testi-name { font-weight: 700; }
.testi-loc { color: var(--muted); font-size: 0.85rem; }

/* FAQ accordion */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-q { display: flex; align-items: center; justify-content: space-between; padding: 20px 4px; font-weight: 600; cursor: pointer; }
.accordion-q::after { content: "+"; font-size: 1.4rem; color: var(--emerald); transition: transform 0.2s ease; }
.accordion-item.open .accordion-q::after { transform: rotate(45deg); }
.accordion-a { max-height: 0; overflow: hidden; color: var(--muted); transition: max-height 0.25s ease; }
.accordion-item.open .accordion-a { max-height: 300px; padding-bottom: 18px; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy), var(--navy-light)); color: #fff; border-radius: 24px; padding: 56px 40px; text-align: center; margin: 0 20px; }
[data-theme="dark"] .cta-band { background: linear-gradient(120deg, #0a0710, #1c1428); }
.cta-band h2 { font-family: var(--font-display); font-size: 1.9rem; margin: 0 0 10px; }
.cta-band p { color: rgba(255,255,255,0.75); margin: 0 0 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: var(--navy); color: rgba(255,255,255,0.8); margin-top: 60px; }
[data-theme="dark"] footer { background: #050409; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 30px; padding: 60px 20px 30px; max-width: 1180px; margin: 0 auto; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 16px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.6); max-width: 40ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 20px; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.footer-disclaimer { font-size: 0.78rem; color: rgba(255,255,255,0.45); max-width: 900px; margin: 0 auto 12px; text-align: center; }

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.wa-float { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 10px 24px -6px rgba(37,211,102,0.6); z-index: 200; }
.wa-float:hover { transform: scale(1.06); }

/* ============================================================
   FORMS
   ============================================================ */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; background: var(--bg); color: var(--text); font-size: 0.95rem; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: 2px solid var(--emerald); outline-offset: 1px; }
.form-group input.invalid, .form-group textarea.invalid { border-color: #e0575b; }
.field-error { color: #e0575b; font-size: 0.8rem; margin-top: 5px; min-height: 1em; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.file-drop { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 24px; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* Success panel */
.success-panel { text-align: center; padding: 40px 20px; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(90,45,190,0.14); color: var(--emerald-dark); font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.ref-box { display: inline-block; background: var(--bg); border: 1px dashed var(--emerald); border-radius: var(--radius-sm); padding: 14px 26px; font-weight: 700; font-family: var(--font-display); font-size: 1.2rem; color: var(--emerald-dark); margin: 14px 0; }
[data-theme="dark"] .ref-box { color: var(--emerald); }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--muted); padding: 20px 0 0; }
.breadcrumb a { color: var(--emerald-dark); }
[data-theme="dark"] .breadcrumb a { color: var(--emerald); }

/* Official source box */
.official-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.official-box h4 { margin: 0 0 6px; font-size: 0.95rem; }
.official-box .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.notice-box { background: rgba(249,161,27,0.12); border: 1px solid rgba(249,161,27,0.4); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 0.88rem; color: var(--text); }

/* Detail page layout */
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-block { margin-bottom: 30px; }
.detail-block h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--navy); margin-bottom: 12px; }
[data-theme="dark"] .detail-block h2 { color: var(--text); }
.detail-block ul { list-style: disc; padding-left: 20px; }
.detail-block li { margin-bottom: 8px; color: var(--text); }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.fee-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.fee-row:last-child { border: none; font-weight: 700; }

/* Search / filter bar */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-btn { border: 1px solid var(--border); background: var(--surface); color: var(--muted); padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.filter-btn.active { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.search-bar { display: flex; gap: 10px; margin-bottom: 26px; }
.search-bar input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 12px 20px; background: var(--surface); color: var(--text); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Simple page hero */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 46px 0 30px; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--navy); margin: 6px 0 8px; }
[data-theme="dark"] .page-hero h1 { color: var(--text); }
.page-hero p { color: var(--muted); max-width: 60ch; }

/* Founder / biography card */
.founder-card { display: flex; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 30px; }
@media (max-width: 560px) { .founder-card { flex-direction: column; text-align: center; } }
.founder-photo { width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--navy), var(--emerald-dark)); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; border: 3px solid var(--gold); }
.founder-name { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 2px; color: var(--navy); }
[data-theme="dark"] .founder-name { color: var(--text); }
.founder-role { color: var(--emerald-dark); font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; }
[data-theme="dark"] .founder-role { color: var(--emerald); }
.founder-bio { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ============================================================
   APP SHELL (dashboard / admin)
   ============================================================ */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 140px); }
@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; } }
.app-sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; }
@media (max-width: 860px) { .app-sidebar { border-right: none; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; gap: 4px; padding: 12px; } }
.app-sidebar a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: 0.92rem; white-space: nowrap; margin-bottom: 4px; }
.app-sidebar a:hover { background: var(--bg); }
.app-sidebar a.active { background: rgba(90,45,190,0.12); color: var(--emerald-dark); font-weight: 700; }
[data-theme="dark"] .app-sidebar a.active { color: var(--emerald); }
.app-main { padding: 32px 28px; }
@media (max-width: 560px) { .app-main { padding: 20px 16px; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--navy); }
[data-theme="dark"] .stat-value { color: var(--text); }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.data-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.status-new { background: rgba(72,71,76,0.12); color: var(--brand-gray); }
.status-processing { background: rgba(249,161,27,0.2); color: #7a4d00; }
.status-completed { background: rgba(90,45,190,0.16); color: var(--emerald-dark); }
.status-cancelled { background: rgba(224,87,91,0.15); color: #b3282c; }
[data-theme="dark"] .status-new { color: #d8d3e6; background: rgba(255,255,255,0.08); }
[data-theme="dark"] .status-processing { color: #ffc25c; }
[data-theme="dark"] .status-completed { color: var(--emerald); }
[data-theme="dark"] .status-cancelled { color: #ff8f92; }

.notif-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); margin-top: 7px; flex-shrink: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; color: var(--muted); font-size: 0.9rem; }
.timeline li.done { color: var(--emerald-dark); font-weight: 600; }
[data-theme="dark"] .timeline li.done { color: var(--emerald); }
.auth-wrap { max-width: 420px; margin: 60px auto; }
.demo-banner { background: rgba(249,161,27,0.14); border: 1px solid rgba(249,161,27,0.4); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.85rem; margin-bottom: 22px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--emerald); outline-offset: 2px;
}


/* ============================================================
   ICGANG STATIONERIES — logo, flash messages, Flask additions
   ============================================================ */
.logo img { height: 54px; width: auto; display: block; }
[data-theme="dark"] .logo img,
footer .logo img { background: var(--brand-white); border-radius: 10px; padding: 4px 10px; }
footer .logo img { height: 52px; }
.logo-text-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.flash-wrap { max-width: 1180px; margin: 10px auto 0; padding: 0 20px; }
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); border-left-width: 4px; background: var(--surface); color: var(--text); font-size: 0.92rem; margin-bottom: 8px; }
.flash-success { border-left-color: var(--brand-purple); background: rgba(90,45,190,0.08); }
.flash-info    { border-left-color: var(--brand-gray);   background: rgba(72,71,76,0.08); }
.flash-warning { border-left-color: var(--brand-orange); background: rgba(249,161,27,0.12); }
.flash-error   { border-left-color: #e0575b;             background: rgba(224,87,91,0.10); }

html[lang="sw"] .lang-en { display: none; }
html[lang="en"] .lang-sw { display: none; }

.inline-form { display: inline; margin: 0; }
.app-sidebar form button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); background: none; border: 0; color: var(--text); font-weight: 500; font-size: 0.92rem; white-space: nowrap; margin-bottom: 4px; text-align: left; }
.app-sidebar form button:hover { background: var(--bg); }
.form-group select.compact, .status-form select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 0.85rem; }
.status-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.empty-note { color: var(--muted); font-size: 0.95rem; padding: 14px 4px; }
.notif-item .notif-time { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 2px; }

/* ============================================================
   ADMIN: modals, toolbars, row actions
   ============================================================ */
.muted { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn-icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { border-color: var(--brand-purple); background: rgba(90,45,190,0.08); }
.btn-danger { background: #e0575b; color: #fff; }
.btn-danger:hover { background: #b3282c; }
.fee-row.total-row { border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; color: var(--emerald); font-size: 1.05rem; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; }
.msg-pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 8px 0 0; max-height: 40vh; overflow: auto; }
.data-table td { vertical-align: top; }

dialog.modal { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; width: calc(100% - 32px); max-width: 540px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5); margin: auto; }
dialog.modal.modal-sm { max-width: 420px; }
dialog.modal::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modalIn 0.18s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 3px solid var(--brand-orange); }
.modal-head h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-display); }
.modal-x { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 18px 20px; max-height: 66vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); }
.modal .form-group select, .modal .form-group input, .modal .form-group textarea { width: 100%; }
@media (prefers-reduced-motion: reduce) { dialog.modal[open] { animation: none; } }
