/* FNBnesia — design system blueprint ChatGPT v1.0 (mockup UI/UX 16 Nov 2026).
   Palet mengikuti logo: oranye energi utama, hijau penyeimbang segar,
   krem latar harian, navy hanya untuk aksen kontras (CTA band).
   Tipografi: Fraunces (headline besar) + Plus Jakarta Sans (UI & isi).
   Font di-self-host di public/fonts — tanpa CDN eksternal. */
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/jakarta-var.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces-var.woff2") format("woff2");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #FFFBF4;
    --bg2: #FFF4E6;
    --surface: #FFFFFF;
    --surface2: #FFF8EE;
    --surface-green: #EDF7F0;
    --ink: #1E241F;
    --ink2: #4A554D;
    --ink3: #7A877D;
    --line: #EFE3D3;
    --line-green: #D6EADD;
    --orange: #F2762E;
    --orange-deep: #D95F1A;
    --orange-pastel: #FFD9B8;
    --orange-soft: #FFF0DF;
    --green: #2F9E6B;
    --green-deep: #1F7A4F;
    --green-pastel: #BFE8D2;
    --green-soft: #E6F5EC;
    --cream: #FFF6E9;
    --cream-2: #FFF4E6;
    --navy: #1B2A4A;
    --yellow: #FFD98E;
    --pink-soft: #FFE3EA;
    /* Alias lama — dipakai gaya inline di beberapa view, nilainya ikut palet baru. */
    --white: #FFFFFF;
    --muted: #4A554D;
    --orange-strong: #F2762E;
    --green-strong: #2F9E6B;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(90, 50, 10, 0.08);
    --shadow-sm: 0 4px 14px rgba(90, 50, 10, 0.06);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 0 0 12px; }
h2 { font-size: 1.45rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; line-height: 1.35; color: var(--ink); }

/* Header */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 48px; width: auto; display: block; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { color: var(--ink2); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { background: var(--orange-soft); color: var(--orange-deep); text-decoration: none; }
.main-nav a.active { background: var(--orange-soft); color: var(--orange-deep); }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { color: var(--ink); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.badge-mod { background: var(--green); color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.inline-form { display: inline; }

/* Tombol */
.btn {
    display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
    font-family: inherit; font-weight: 700; font-size: 0.95rem; min-height: 40px;
    padding: 10px 18px; border-radius: 999px; text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-sm { padding: 7px 14px; font-size: 0.9rem; min-height: 36px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-light { background: #fff; color: var(--navy); }
.btn-danger { background: #C0392B; color: #fff; }
.btn-block { width: 100%; text-align: center; justify-content: center; }

/* Tag & chip kategori */
.tag {
    font-size: 11px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-deep);
    white-space: nowrap;
}
.tag.o { background: var(--orange-soft); color: var(--orange-deep); }
.tag.g { background: var(--green-soft); color: var(--green-deep); }
.cat-badge { background: var(--green-soft); color: var(--green-deep); padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; }
.badge-best { background: var(--green-soft); color: var(--green-deep); padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; }
.badge-archived { background: #EDE6DE; color: var(--muted); padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; }

/* Avatar inisial */
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    background: var(--green-pastel); color: var(--green-deep);
    display: inline-grid; place-items: center; font-weight: 800; font-size: 13px;
}
.avatar.o { background: var(--orange-pastel); color: var(--orange-deep); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* Hero */
.hero {
    background: linear-gradient(180deg, var(--orange-soft), transparent 75%);
    border-radius: var(--radius-lg); padding: 36px 36px 28px; margin: 28px 0;
    border: 1px solid var(--line);
}
.hero-logo { display: block; width: 100%; max-width: 400px; height: auto; margin-bottom: 20px; }
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--orange-soft); color: var(--orange-deep);
    font-size: 12px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px; margin-bottom: 4px;
}
.hero h1 { margin: 12px 0; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 1.05rem; color: var(--ink2); max-width: 640px; margin: 0 0 20px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.92rem; color: var(--muted); }
.searchbar {
    display: flex; gap: 8px; margin-top: 4px; max-width: 560px;
    background: var(--surface); border: 1px solid var(--line); padding: 6px;
    border-radius: 999px; box-shadow: var(--shadow-sm);
}
.searchbar input { flex: 1; border: 0; background: transparent; padding: 0 12px; font-family: inherit; font-size: 14px; color: var(--ink); min-width: 0; }
.searchbar input:focus { outline: none; box-shadow: none; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px; }
.hero-stats div b { display: block; font-size: 1.25rem; line-height: 1.2; }
.hero-stats div span { font-size: 0.8rem; color: var(--ink3); font-weight: 600; }

/* Kartu & grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 4px; }

/* Kartu kategori (homepage) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-card {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}
.cat-card:hover { text-decoration: none; border-color: var(--orange-pastel); }
.cat-card b { font-size: 0.95rem; display: block; margin-bottom: 2px; }
.cat-card span { font-size: 0.82rem; color: var(--ink3); }
.cat-ic {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    font-size: 18px; margin-bottom: 10px; background: var(--orange-soft);
}
.cat-grid .cat-card:nth-child(even) .cat-ic { background: var(--green-soft); }
.cat-card.calc { background: var(--green-soft); border-color: var(--green-pastel); }
.cat-card.calc .cat-ic { background: #fff; }

/* CTA band navy — satu-satunya blok gelap di halaman */
.cta-band {
    margin: 28px 0; background: var(--navy); color: #FFF6E9; border-radius: 18px;
    padding: 24px; display: flex; flex-wrap: wrap; gap: 14px;
    align-items: center; justify-content: space-between;
}
.cta-band h2, .cta-band h3 { margin: 0; color: #fff; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; font-size: 1.1rem; letter-spacing: 0; }
.cta-band p { margin: 6px 0 0; font-size: 0.92rem; opacity: 0.85; max-width: 480px; }

/* Forum */
.cat-pills { display: none; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.cat-pill {
    background: var(--surface); border: 1px solid var(--line); color: var(--ink);
    padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 0.88rem;
}
.cat-pill:hover { border-color: var(--orange-pastel); text-decoration: none; }
.cat-pill.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.forum-layout { display: grid; grid-template-columns: 240px 1fr 260px; gap: 0; margin-top: 8px; }
.forum-side { border-right: 1px solid var(--line); padding: 16px 16px 16px 0; }
.forum-right { border-left: 1px solid var(--line); padding: 16px 0 16px 16px; }
.forum-main { padding: 4px 20px; min-width: 0; }
.forum-side h5, .forum-right h5 { margin: 4px 0 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); }
.side-item {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 9px 10px; border-radius: 10px; font-size: 0.92rem; font-weight: 600;
    color: var(--ink2); text-decoration: none;
}
.side-item:hover { text-decoration: none; background: var(--surface2); }
.side-item.on { background: var(--orange-soft); color: var(--orange-deep); }
.side-item .count { font-size: 11.5px; background: var(--surface2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.filter-row a {
    border: 1px solid var(--line); background: var(--surface); padding: 7px 12px;
    border-radius: 999px; font-weight: 700; font-size: 12.5px; color: var(--ink2);
}
.filter-row a:hover { text-decoration: none; border-color: var(--orange-pastel); }
.filter-row a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mini-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: var(--surface2); }
.mini-card b { font-size: 0.9rem; }
.mini-card p { margin: 4px 0 0; font-size: 0.85rem; color: var(--ink2); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.thread-list { display: flex; flex-direction: column; gap: 12px; }
.thread-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.thread-item.thread-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; }
.thread-row .thread-main { flex: 1; min-width: 0; }
.thread-item h3 { margin: 0 0 4px; font-size: 1rem; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 700; }
.thread-item h3 a { color: var(--ink); }
.thread-item h3 a:hover { color: var(--orange-deep); }
.thread-meta { font-size: 0.85rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.thread-count { margin-left: auto; text-align: right; flex: none; font-size: 12px; color: var(--ink3); }
.thread-count b { color: var(--ink); font-size: 14px; display: block; }
.thread-body { white-space: pre-wrap; margin: 16px 0; }
.reply {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.reply.best { border: 2px solid var(--green); background: var(--surface-green); }
.reply-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.reply-body { white-space: pre-wrap; }

/* Form */
.form-card { max-width: 640px; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.95rem; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-pastel); }
textarea { min-height: 160px; resize: vertical; }
.form-hint { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Kalkulator */
.calc-table { width: 100%; border-collapse: collapse; }
.calc-table th, .calc-table td { padding: 8px; text-align: left; vertical-align: middle; }
.calc-table th { font-size: 0.9rem; color: var(--muted); }
.calc-table input { min-width: 0; }
.result-box {
    background: var(--green-soft); border: 2px solid var(--green); border-radius: var(--radius);
    padding: 20px 24px; margin-top: 20px;
}
.result-box h3 { margin-top: 0; color: var(--green-deep); }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line-green); flex-wrap: wrap; }
.result-row > span:first-child { min-width: 0; }
.result-row strong, .result-row .result-big { flex-shrink: 0; white-space: nowrap; }
.result-row:last-child { border-bottom: none; }
.result-row strong { font-size: 1.1rem; }
.result-big { font-size: 1.6rem; font-weight: 800; color: var(--green-deep); }
.foodcost-ok { color: var(--green-deep); font-weight: 700; }
.foodcost-warn { color: #B25B00; font-weight: 700; }
.foodcost-bad { color: #C0392B; font-weight: 700; }

/* Edukasi */
.lesson-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.lesson-body th, .lesson-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.lesson-body th { background: var(--cream-2); }
.lesson-body ul { padding-left: 22px; }
.lesson-body h3 { color: var(--orange-deep); margin-top: 1.6rem; }
.lesson-list { display: flex; flex-direction: column; gap: 14px; }

/* Rules */
.rule-num {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800; color: #fff;
}
.rule-1 { background: var(--orange-strong); }
.rule-2 { background: var(--green-strong); }
.rule-3 { background: #E9A13B; }
.rule-item { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }

/* Flash */
.flash { border-radius: var(--radius-sm); padding: 12px 16px; margin: 18px 0 0; font-weight: 600; }
.flash-ok { background: var(--green-soft); border: 1px solid var(--green); color: var(--green-deep); }
.flash-err { background: #FDECEA; border: 1px solid #F5B7AF; color: #9B2C1E; }
.flash ul { margin: 6px 0 0; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 3px solid var(--orange-soft); background: var(--white); padding: 26px 0 34px; }
.footer-logo { display: block; width: 190px; height: auto; margin-bottom: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Paginasi */
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 13px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.pagination a:hover { text-decoration: none; border-color: var(--orange-pastel); }
.pagination .active span { background: var(--orange); color: #fff; border-color: var(--orange); }
.pagination .disabled span { color: var(--muted); }

@media (max-width: 900px) {
    .forum-layout { grid-template-columns: 1fr; }
    .forum-side, .forum-right { display: none; }
    .forum-main { padding: 4px 0; }
    .cat-pills { display: flex; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .hero { padding: 28px 22px; }
    .hero-logo { max-width: 300px; }
    .user-menu { margin-left: 0; }
}

/* Dashboard member (mockup UI/UX blueprint) */
.dash-layout { display: grid; grid-template-columns: 230px 1fr; gap: 0; margin-top: 8px; }
.dash-side { border-right: 1px solid var(--line); padding: 16px 16px 16px 0; background: var(--surface2); border-radius: var(--radius) 0 0 var(--radius); }
.dash-main { padding: 4px 0 4px 20px; min-width: 0; }
.profile-mini { display: flex; gap: 10px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.profile-mini b { font-size: 14px; display: block; line-height: 1.3; }
.profile-mini span { font-size: 12px; color: var(--ink3); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.kpi span { font-size: 12px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi b { display: block; font-size: 24px; margin-top: 4px; line-height: 1; }
.kpi small { font-size: 12px; color: var(--green-deep); font-weight: 700; }
.activity { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; font-size: 0.92rem; align-items: flex-start; }
.activity:first-of-type { border-top: 0; }
.activity time { margin-left: auto; color: var(--ink3); font-size: 12px; flex: none; }
@media (max-width: 760px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-side { display: none; }
    .dash-main { padding: 4px 0; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
