/* ==========================================================================
   FAMEDIA — sistem desain tunggal (publik + dashboard), mobile-first.
   Urutan: font → token → dasar → komponen → layout publik → layout dashboard
           → bottom nav & PWA → utilitas → print.
   Komponen Blade di resources/views/components memakai kelas di file ini.
   ========================================================================== */

/* Font (self-hosted, latin) ---------------------------------------------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

/* Token ------------------------------------------------------------------- */
:root {
    --fm-primary: #22396f;
    --fm-primary-600: #0d1c42;
    --fm-primary-700: #010736;
    --fm-primary-50: #fcf1d0;
    --fm-accent: #fcf1d0;
    --fm-accent-600: #e2d3a7;
    --fm-success: #2f7d50;
    --fm-ink: #0d1c42;
    --fm-ink-strong: #010736;
    --fm-muted: #5c6680;
    --fm-line: #d9deeb;
    --fm-surface: #f7f8fc;
    --fm-card: #ffffff;
    --fm-sidebar: #010736;
    --fm-gradient: linear-gradient(125deg, #010736 0%, #0d1c42 52%, #22396f 100%);

    --fm-radius-sm: 10px;
    --fm-radius: 14px;
    --fm-radius-lg: 18px;
    --fm-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px -10px rgba(16, 24, 40, .12);
    --fm-shadow: 0 18px 40px -24px rgba(16, 24, 40, .28);

    --fm-gutter: 16px;
    --fm-card-pad: 16px;
    --fm-stack: 16px;
    --fm-header-h: 64px;
    --fm-bottom-h: 62px;
    --fm-sidebar-w: 268px;
    --fm-sidebar-mini: 80px;
    --fm-safe-top: env(safe-area-inset-top, 0px);
    --fm-safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Bootstrap */
    --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-body-line-height: 1.6;
    --bs-body-color: var(--fm-ink);
    --bs-body-bg: #fff; /* latar komponen (kartu, input, modal); latar halaman diatur di body */
    --bs-emphasis-color: var(--fm-ink-strong);
    --bs-secondary-color: var(--fm-muted);
    --bs-border-color: var(--fm-line);
    --bs-primary: #22396f;
    --bs-primary-rgb: 34, 57, 111;
    --bs-link-color: var(--fm-primary-700);
    --bs-link-color-rgb: 1, 7, 54;
    --bs-link-hover-color: var(--fm-primary-600);
    --bs-border-radius: var(--fm-radius-sm);
    --bs-border-radius-lg: var(--fm-radius);
    --bs-border-radius-xl: var(--fm-radius-lg);
    --bs-focus-ring-color: rgba(34, 57, 111, .25);
}

@media (min-width: 768px) {
    :root { --fm-gutter: 24px; --fm-card-pad: 24px; --fm-stack: 24px; }
}

/* Dasar ------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--fm-header-h) + 16px); }
body { min-height: 100vh; min-height: 100dvh; background: var(--fm-surface); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--fm-ink-strong); font-weight: 700; letter-spacing: -.015em; }
h1, .h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h2, .h2 { font-size: clamp(1.3rem, 1.15rem + .8vw, 1.7rem); }
.h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
.h4 { font-size: 1.15rem; }
.h5 { font-size: 1.05rem; }
.h6 { font-size: .95rem; }
a { text-decoration: none; }
img { max-width: 100%; }
.container, .container-fluid { --bs-gutter-x: calc(var(--fm-gutter) * 2); }
.container { max-width: 1240px; }
.text-muted, .text-secondary { color: var(--fm-muted) !important; }
.text-brand { color: var(--fm-primary-700) !important; }
.bg-brand-soft { background: var(--fm-primary-50) !important; }
.fw-bolder { font-weight: 700 !important; }
.min-w-0 { min-width: 0; }

/* Tombol (target sentuh ≥ 44px) */
/* ATURAN RESPONSIF TOMBOL: ukuran (tinggi, huruf, padding) KONSTAN di semua breakpoint
   dan lebar mengikuti isi. Saat layar berubah, yang menyesuaikan hanya POSISI
   (wrap ke baris baru, menumpuk, berganti perataan) melalui .actions / .form-actions.
   Tidak ada aturan @media yang mengubah ukuran tombol. */
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: 999px; --bs-btn-padding-x: 1.15rem; min-height: 44px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap; }
.btn-sm { --bs-btn-padding-x: .85rem; min-height: 36px; }
.btn-lg { min-height: 52px; --bs-btn-padding-x: 1.6rem; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn-sm.btn-icon { width: 36px; min-height: 36px; }

/* Grup aksi: satu pola untuk semua halaman. Default rata kanan; varian rata kiri/tengah/terbagi. */
.actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem .75rem; }
.form-actions { margin-top: 1.5rem; }
.actions.is-start { justify-content: flex-start; }
.actions.is-center, .form-actions.is-center { justify-content: center; }
/* Terbagi: tombol pertama (Batal/Kembali) di kiri, tombol utama selalu di kanan —
   termasuk saat membungkus ke baris baru di layar sempit. */
.form-actions.is-split > :first-child { margin-right: auto; }
.btn-primary {
    --bs-btn-color: #fcf1d0; --bs-btn-bg: var(--fm-primary); --bs-btn-border-color: var(--fm-primary);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--fm-primary-600); --bs-btn-hover-border-color: var(--fm-primary-600);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--fm-primary-700); --bs-btn-active-border-color: var(--fm-primary-700);
    --bs-btn-disabled-color: #fcf1d0; --bs-btn-disabled-bg: var(--fm-primary); --bs-btn-disabled-border-color: var(--fm-primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--fm-primary-700); --bs-btn-border-color: var(--fm-primary);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--fm-primary-600); --bs-btn-hover-border-color: var(--fm-primary-600);
    --bs-btn-active-bg: var(--fm-primary-700); --bs-btn-active-border-color: var(--fm-primary-700);
}
.btn-accent {
    --bs-btn-color: var(--fm-ink-strong); --bs-btn-bg: var(--fm-accent); --bs-btn-border-color: var(--fm-accent);
    --bs-btn-hover-color: var(--fm-ink-strong); --bs-btn-hover-bg: #fff7df; --bs-btn-hover-border-color: #fff7df;
    --bs-btn-active-bg: var(--fm-accent-600); --bs-btn-active-border-color: var(--fm-accent-600);
}
.btn-soft { --bs-btn-color: var(--fm-ink); --bs-btn-bg: #fff; --bs-btn-border-color: var(--fm-line); --bs-btn-hover-bg: var(--fm-primary-50); --bs-btn-hover-border-color: var(--fm-primary); --bs-btn-hover-color: var(--fm-primary-700); --bs-btn-active-bg: var(--fm-primary-50); }

/* Form */
.form-label { font-weight: 600; font-size: .875rem; color: var(--fm-ink-strong); margin-bottom: .35rem; }
.form-control, .form-select { min-height: 46px; border-color: #cbd2e2; border-radius: 12px; padding: .6rem .9rem; font-size: 1rem; }
.form-control-sm, .form-select-sm { min-height: 36px; font-size: .875rem; }
textarea.form-control { min-height: auto; }
.form-control:focus, .form-select:focus { border-color: var(--fm-primary); box-shadow: 0 0 0 .25rem rgba(34, 57, 111, .18); }
.form-text { font-size: .8rem; }
.form-check-input:checked { background-color: var(--fm-primary-600); border-color: var(--fm-primary-600); }
@media (min-width: 768px) { .form-control, .form-select { font-size: .9375rem; } }
/* <x-form.input type="password">: tombol intip menempel di sisi kanan, tingginya mengikuti kolom. */
.password-field { position: relative; }
.password-field .form-control, .password-field .form-control.is-invalid { padding-right: 3.25rem; background-image: none; }
.password-field .form-control::-ms-reveal, .password-field .form-control::-ms-clear { display: none; }
.password-toggle { position: absolute; top: 3px; right: 3px; bottom: 3px; display: grid; width: 42px; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--fm-muted); font-size: 1.1rem; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--fm-primary-700); background: var(--fm-primary-50); }
.password-toggle:focus-visible { outline: 2px solid var(--fm-primary); outline-offset: -2px; }

/* Kartu & tabel */
.card { --bs-card-border-color: var(--fm-line); --bs-card-border-radius: var(--fm-radius-lg); --bs-card-inner-border-radius: calc(var(--fm-radius-lg) - 1px); --bs-card-spacer-x: var(--fm-card-pad); --bs-card-spacer-y: var(--fm-card-pad); --bs-card-cap-padding-x: var(--fm-card-pad); --bs-card-cap-padding-y: .9rem; --bs-card-cap-bg: #fff; box-shadow: var(--fm-shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-title { font-size: 1.02rem; font-weight: 700; margin: 0; color: var(--fm-ink-strong); }
.table { --bs-table-color: var(--fm-ink); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .8rem var(--fm-card-pad); }
.table thead th { background: #fffaf0; color: var(--fm-muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.badge { font-weight: 600; letter-spacing: .01em; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--fm-primary-600); --bs-nav-link-color: var(--fm-ink); --bs-nav-link-hover-color: var(--fm-primary-700); gap: .5rem; flex-wrap: wrap; } /* tab pindah ke baris baru, ukurannya tetap */
.nav-pills .nav-link { border-radius: 999px; font-weight: 600; white-space: nowrap; background: #fff; border: 1px solid var(--fm-line); }
.nav-pills .nav-link.active { border-color: transparent; }
.pagination { --bs-pagination-active-bg: var(--fm-primary-600); --bs-pagination-active-border-color: var(--fm-primary-600); --bs-pagination-color: var(--fm-primary-700); flex-wrap: wrap; margin-bottom: 0; }
.alert { border: 0; border-radius: var(--fm-radius); }
.modal-content { border: 0; border-radius: var(--fm-radius-lg); }
.dropdown-menu { border-color: var(--fm-line); border-radius: var(--fm-radius); box-shadow: var(--fm-shadow); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .55rem .75rem; display: flex; align-items: center; gap: .6rem; }
.accordion { --bs-accordion-border-radius: var(--fm-radius-lg); --bs-accordion-inner-border-radius: var(--fm-radius-lg); --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-active-bg: #fff; --bs-accordion-active-color: var(--fm-ink-strong); }
.accordion-button { padding: var(--fm-card-pad); }
.accordion-body { padding: 0 var(--fm-card-pad) var(--fm-card-pad); }

/* Komponen ---------------------------------------------------------------- */

/* <x-brand>: logo = siluet PNG sebagai mask sehingga warnanya mengikuti tema. */
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--fm-ink-strong); min-width: 0; }
.brand:hover { color: var(--fm-ink-strong); }
.brand-mark { --size: 42px; display: inline-block; width: var(--size); height: var(--size); flex: 0 0 var(--size); background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.brand-mark.is-tile { border-radius: 12px; background: var(--fm-gradient); -webkit-mask: none; mask: none; display: grid; place-items: center; }
.brand-mark.is-tile::after { content: ""; width: 72%; height: 72%; background: #fff; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; color: inherit; }
.brand-tagline { font-size: .64rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-top: .2rem; white-space: nowrap; }
.brand--light { color: #fff; }
.brand--light:hover { color: #fff; }

/* <x-avatar> */
.avatar { --size: 40px; width: var(--size); height: var(--size); flex: 0 0 var(--size); border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: var(--fm-gradient); color: #fff; font-weight: 700; font-size: calc(var(--size) * .4); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--fm-line); }

/* <x-page-header> */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: var(--fm-stack); }
.page-header h1 { margin: 0; font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); }
.page-header p { margin: .25rem 0 0; color: var(--fm-muted); }
.page-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.filter-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-form > .form-control, .filter-form > .form-select { flex: 1 1 180px; min-width: 0; }
@media (min-width: 768px) { .filter-form > .form-control, .filter-form > .form-select { flex: 0 1 220px; } }

/* <x-hero-card> */
.hero-card { position: relative; overflow: hidden; color: #fff; background: var(--fm-gradient); border-radius: var(--fm-radius-lg); padding: calc(var(--fm-card-pad) * 1.25); box-shadow: 0 24px 50px -30px rgba(1, 7, 54, .55); margin-bottom: var(--fm-stack); }
.hero-card::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h1, .hero-card h2 { color: #fff; margin-bottom: .4rem; }
.hero-card p { color: rgba(255, 255, 255, .9); margin: 0; }
.hero-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; margin-bottom: .75rem; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--fm-primary-700); font-size: .75rem; font-weight: 600; }

/* <x-stat-card> */
.stat-card { height: 100%; padding: var(--fm-card-pad); container: stat / inline-size; }
.stat-body { display: flex; align-items: center; gap: .85rem; }
/* Kartu sempit: ikon pindah ke atas teks; ukuran ikon tetap, angka tidak dipatah. */
@container stat (max-width: 210px) { .stat-body { flex-direction: column; align-items: flex-start; gap: .6rem; } }
.stat-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; }
.stat-value { font-size: clamp(1rem, 10cqi, 1.35rem); font-weight: 700; color: var(--fm-ink-strong); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-label { font-size: .8rem; color: var(--fm-muted); }

/* <x-empty-state> */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--fm-muted); }
.empty-state > i { font-size: 2.25rem; display: block; margin-bottom: .5rem; color: #98a2b3; }
.empty-state h3 { font-size: 1rem; margin-bottom: .25rem; }

/* <x-detail> */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem 1.25rem; margin: 0; }
.detail-grid dt { font-size: .75rem; font-weight: 500; color: var(--fm-muted); margin-bottom: .1rem; }
.detail-grid dd { margin: 0; font-weight: 600; color: var(--fm-ink-strong); word-break: break-word; }
.detail-grid .is-wide { grid-column: 1 / -1; }
.detail-grid .is-wide dd { font-weight: 400; color: var(--fm-ink); white-space: pre-line; }

/* Callout informasi */
.info-callout { position: relative; display: flex; gap: .75rem; padding: .9rem 1rem; margin-bottom: var(--fm-stack); border-radius: var(--fm-radius); background: var(--fm-primary-50); border: 1px solid #e5d7ad; color: var(--fm-ink); }
.info-callout > i { color: var(--fm-primary-600); font-size: 1.2rem; line-height: 1.3; }
.rich-text { min-width: 0; overflow-wrap: anywhere; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p { margin-bottom: .5rem; }
.rich-text img { display: block; max-width: min(100%, 420px); height: auto; margin: .5rem 0; border-radius: var(--fm-radius); }
.note-box { padding: .9rem 1rem; border-radius: var(--fm-radius); background: var(--fm-surface); }

/* Tiket */
.ticket-badge { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; padding: .45rem .85rem; border: 1px dashed rgba(34, 57, 111, .58); border-radius: 999px; background: var(--fm-primary-50); color: var(--fm-primary-700); font-weight: 700; font-size: .82rem; letter-spacing: .04em; word-break: break-all; }
.copy-field { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem .9rem; border-radius: 12px; border: 1px dashed rgba(34, 57, 111, .58); background: var(--fm-primary-50); color: var(--fm-primary-700); font-weight: 700; word-break: break-all; }
.copy-field span { flex: 1; min-width: 0; }

/* <x-progress-panel> (sengaja memakai prefiks "progress-" agar tidak bentrok dengan seksi beranda) */
.progress-track { height: 12px; border-radius: 999px; background: #e4e7ec; overflow: hidden; }
.progress-fill { height: 100%; width: 0; min-width: 2.5%; border-radius: inherit; background: linear-gradient(90deg, #facc15, var(--fm-accent) 30%, var(--fm-primary) 65%, var(--fm-success)); transition: width .8s cubic-bezier(.16, 1, .3, 1); }
.progress-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; margin-top: 1rem; }
.progress-step { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); background: #fff; }
.progress-step.is-done { border-color: rgba(18, 161, 80, .3); background: #f3fbf6; }
.progress-step.is-current { border-color: var(--fm-primary); box-shadow: 0 0 0 3px rgba(34, 57, 111, .16); }
.progress-dot { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; background: #e4e7ec; color: var(--fm-muted); font-weight: 700; font-size: .8rem; }
.progress-step.is-done .progress-dot { background: var(--fm-success); color: #fff; }
.progress-step.is-current .progress-dot { background: var(--fm-primary-600); color: #fff; }
.progress-step strong { display: block; font-size: .85rem; color: var(--fm-ink-strong); }
.progress-step small { display: block; color: var(--fm-muted); font-size: .76rem; line-height: 1.45; }
@media (max-width: 575.98px) { .progress-steps.is-collapsible:not(.is-open) .progress-step:not(.is-current) { display: none; } }

/* Daftar dokumen */
.doc-list { display: grid; gap: .5rem; }
.doc-link { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border: 1px solid var(--fm-line); border-radius: 12px; background: #fff; color: var(--fm-ink); font-weight: 500; min-height: 46px; }
.doc-link:hover { border-color: var(--fm-primary); color: var(--fm-primary-700); background: var(--fm-primary-50); }
.doc-link > i { color: var(--fm-primary-600); font-size: 1.1rem; }
.doc-link .bi-chevron-right { margin-left: auto; color: #98a2b3; font-size: .85rem; }

/* Formulir unggah ringkas */
.upload-box { padding-top: var(--fm-card-pad); margin-top: var(--fm-card-pad); border-top: 1px dashed var(--fm-line); }
.section-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fm-muted); padding-bottom: .5rem; margin: 0 0 1rem; border-bottom: 1px solid var(--fm-line); }
.icon-circle { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--fm-primary-50); color: var(--fm-primary-700); }
.thumb { border-radius: 12px; object-fit: cover; background: var(--fm-surface); }

/* Layout publik ----------------------------------------------------------- */
.site-body { background: #fff; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 rgba(16, 24, 40, .06); padding-top: var(--fm-safe-top); }
.site-utility { background: #fcf1d0; color: var(--fm-muted); font-size: .75rem; }
.site-utility .container { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: 1rem; }
.site-utility a { color: inherit; }
.site-utility a:hover { color: var(--fm-primary-700); }
.site-utility ul { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-nav { display: flex; align-items: center; gap: .75rem; min-height: var(--fm-header-h); }
.site-nav .brand { margin-right: auto; }
.site-search { position: relative; flex: 1 1 360px; max-width: 420px; }
.site-search input { width: 100%; height: 44px; padding: 0 3rem 0 1rem; border: 1px solid #cbd2e2; border-radius: 999px; background: #f7f8fc; font-size: 1rem; outline: 0; }
.site-search input:focus { border-color: var(--fm-primary); background: #fff; box-shadow: 0 0 0 .25rem rgba(34, 57, 111, .16); }
.site-search button { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--fm-primary-50); color: var(--fm-primary-700); }
.site-actions { display: flex; align-items: center; gap: .5rem; }
.site-menu .dropdown-item i { color: var(--fm-primary-600); }
.site-main { flex: 1 0 auto; }
.page-shell { padding-top: calc(var(--fm-stack) * 1.25); padding-bottom: calc(var(--fm-stack) * 2); }
.narrow { max-width: 880px; margin-inline: auto; }
.narrow-sm { max-width: 520px; margin-inline: auto; }
.site-footer { color: var(--fm-muted); background: #fff; border-top: 1px solid var(--fm-line); }
.site-footer-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding-block: 1.25rem; }
.site-footer-brand { display: none; }
.site-footer h2 { margin-bottom: .65rem; font-size: .72rem; text-align: center; }
.site-footer ul { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--fm-muted); font-size: .64rem; line-height: 1.35; text-align: center; }
.site-footer a i { color: var(--fm-primary); font-size: 1rem; line-height: 1; }
.site-footer a:hover { color: var(--fm-primary-700); }
.site-footer-bottom { padding: .7rem .75rem; background: #fcf1d0; font-size: .65rem; text-align: center; }
@media (min-width: 768px) {
    .site-footer-main { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; padding-block: 2.5rem; }
    .site-footer-brand { display: block; }
    .site-footer h2 { margin-bottom: .85rem; font-size: .9rem; text-align: left; }
    .site-footer ul { gap: .55rem; }
    .site-footer a { flex-direction: row; align-items: center; gap: .45rem; font-size: .85rem; text-align: left; }
    .site-footer a i { font-size: .9rem; }
    .site-footer-bottom { padding: 1rem 0; font-size: .75rem; }
}
@media (max-width: 991.98px) {
    .site-utility, .site-nav > .site-search { display: none !important; }
    .site-nav { min-height: 58px; }
}

/* Layout dashboard -------------------------------------------------------- */
.app-body { background: var(--fm-surface); }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1045; width: var(--fm-sidebar-w); display: flex; flex-direction: column; background: var(--fm-sidebar); color: #94a3b8; padding-top: var(--fm-safe-top); transition: width .25s ease, transform .25s ease; }
.app-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: var(--fm-header-h); padding: 0 1rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.app-sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.app-sidebar-foot { padding: .75rem; padding-bottom: calc(.75rem + var(--fm-safe-bottom)); border-top: 1px solid rgba(255, 255, 255, .07); }
.app-nav-section { padding: .9rem .75rem .35rem; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748b; white-space: nowrap; }
.app-nav-link { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 44px; padding: .6rem .8rem; margin-bottom: .15rem; border: 0; border-radius: 12px; background: none; color: #a5b4c8; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.app-nav-link i { font-size: 1.1rem; width: 22px; text-align: center; flex: 0 0 22px; }
.app-nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.app-nav-link.active { color: #fff; background: linear-gradient(135deg, var(--fm-primary-700), rgba(34, 57, 111, .95)); box-shadow: 0 10px 24px -18px rgba(1, 7, 54, .9); }
.app-nav-link.is-danger { color: #fca5a5; }
.app-main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; transition: margin-left .25s ease; }
.app-topbar { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem; min-height: var(--fm-header-h); padding: var(--fm-safe-top) var(--fm-gutter) 0; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--fm-line); }
.app-topbar-title { min-width: 0; flex: 1; }
.app-topbar-title strong { display: block; color: var(--fm-ink-strong); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar-title small { display: block; color: var(--fm-muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-user { display: flex; align-items: center; gap: .6rem; padding: .25rem; border: 0; border-radius: 999px; background: none; color: var(--fm-ink); text-align: left; }
.app-user:hover { background: var(--fm-surface); }
.app-content { flex: 1; width: 100%; max-width: 1400px; margin-inline: auto; padding: var(--fm-stack) var(--fm-gutter) calc(var(--fm-stack) * 2); }
.app-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(2, 6, 23, .55); opacity: 0; visibility: hidden; transition: opacity .2s ease; }
body.sidebar-open .app-backdrop { opacity: 1; visibility: visible; }
@media (min-width: 992px) {
    .app-main { margin-left: var(--fm-sidebar-w); }
    body.sidebar-mini .app-sidebar { width: var(--fm-sidebar-mini); }
    body.sidebar-mini .app-main { margin-left: var(--fm-sidebar-mini); }
    body.sidebar-mini .app-sidebar .brand-copy,
    body.sidebar-mini .app-nav-link span,
    body.sidebar-mini .app-nav-section { display: none; }
    body.sidebar-mini .app-nav-link { justify-content: center; }
    body.sidebar-mini .app-sidebar-head { justify-content: center; padding: 0; }
    .app-backdrop, .app-sidebar [data-sidebar-close] { display: none; }
}
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-105%); }
    body.sidebar-open .app-sidebar { transform: none; box-shadow: 24px 0 60px -30px rgba(0, 0, 0, .8); }
    body.sidebar-open { overflow: hidden; }
}

/* Bottom navigation (ponsel) & PWA ---------------------------------------- */
.bottom-nav { position: fixed; inset: auto 0 0 0; z-index: 1035; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: calc(var(--fm-bottom-h) + var(--fm-safe-bottom)); padding-bottom: var(--fm-safe-bottom); background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--fm-line); box-shadow: 0 -8px 24px -18px rgba(16, 24, 40, .3); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; border: 0; background: none; color: #7a8698; font-size: .68rem; font-weight: 500; line-height: 1.2; }
.bottom-nav i { font-size: 1.25rem; line-height: 1; }
.bottom-nav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 2px; }
.bottom-nav .active { color: var(--fm-primary-700); font-weight: 600; }
.bottom-nav .active i { transform: translateY(-1px); }
.bottom-nav .is-primary i { width: 44px; height: 44px; margin-top: -18px; display: grid; place-items: center; border-radius: 50%; background: var(--fm-accent); color: var(--fm-ink-strong); box-shadow: 0 8px 18px -8px rgba(1, 7, 54, .45); border: 3px solid #fff; }
body.has-bottom-nav { padding-bottom: calc(var(--fm-bottom-h) + var(--fm-safe-bottom)); }
@media (min-width: 992px) { .bottom-nav { display: none; } body.has-bottom-nav { padding-bottom: 0; } }

.install-banner { position: fixed; left: 12px; right: 12px; bottom: calc(var(--fm-bottom-h) + var(--fm-safe-bottom) + 12px); z-index: 1036; display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; border-radius: var(--fm-radius); background: var(--fm-ink-strong); color: #fff; box-shadow: var(--fm-shadow); }
.install-banner[hidden] { display: none; }
.install-banner .brand-mark { --size: 40px; }
.install-banner p { margin: 0; font-size: .8rem; line-height: 1.35; color: rgba(255, 255, 255, .8); }
.install-banner strong { display: block; color: #fff; font-size: .9rem; }
@media (min-width: 992px) { .install-banner { left: auto; right: 24px; bottom: 24px; max-width: 380px; } }
.net-status { position: fixed; top: calc(var(--fm-safe-top) + 10px); left: 50%; z-index: 1090; transform: translate(-50%, -150%); padding: .45rem 1rem; border-radius: 999px; background: #1d2939; color: #fff; font-size: .8rem; font-weight: 500; transition: transform .25s ease; }
.net-status.show { transform: translate(-50%, 0); }
@media (display-mode: standalone) { .site-utility { display: none !important; } }

/* Utilitas ---------------------------------------------------------------- */
.stack > * + * { margin-top: var(--fm-stack); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.text-pre { white-space: pre-line; }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Print ------------------------------------------------------------------- */
@media print {
    .no-print, .site-header, .site-footer, .app-sidebar, .app-topbar, .bottom-nav, .install-banner, .net-status { display: none !important; }
    body, .site-body, .app-body { background: #fff !important; padding: 0 !important; }
    .app-main { margin: 0 !important; }
    .card { box-shadow: none !important; }
}

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