/* =====================================================================
   KosFlow - SATU berkas CSS untuk seluruh aplikasi
   (situs publik, aplikasi pemilik kos, administrator, halaman masuk).

   Arah desain: dunia kos-kosan Indonesia.
   - Hijau "buku kas" sebagai warna utama, kuning kunci (kuningan) sebagai aksen,
     latar kertas dingin. Satu elemen khas: PAPAN KAMAR (ubin kamar bergantungan kunci).
   - Huruf: Bricolage Grotesque (judul, nomor kamar) + Figtree (teks, tabel, form).
   - Ukuran dasar 16px dan target sentuh 44px: pemilik kos banyak memakai ponsel.

   Mengganti merek: cukup ubah variabel di :root.
   Daftar isi: 1 Token | 2 Dasar | 3 Tata letak | 4 Tombol | 5 Form | 6 Kartu & statistik
   7 Lencana & peringatan | 8 Tabel & daftar | 9 Modal & toast | 10 Kerangka aplikasi
   11 Situs publik | 12 Halaman masuk | 13 Papan kamar | 14 Wilayah | 15 Utilitas | 16 Responsif
   ===================================================================== */

/* ---------- 1. Token ---------- */
:root {
  --ink: #10241F;
  --ink-2: #34504A;
  --muted: #5B706B;
  --paper: #F2F5F3;
  --surface: #FFFFFF;
  --line: #DCE5E1;
  --line-strong: #C3D1CB;

  --brand: #14594A;
  --brand-ink: #0D4237;
  --brand-50: #E6F0EC;
  --brand-100: #CFE3DB;
  --key: #E3A72F;
  --key-ink: #5E4100;
  --key-50: #FBF1D9;

  --success: #1E8E5A;  --success-50: #E3F4EB;  --success-ink: #126A42;
  --warning: #C98A12;  --warning-50: #FBF0DA;  --warning-ink: #7A4F00;
  --danger:  #C8423A;  --danger-50:  #FBE7E5;  --danger-ink:  #9A2B25;
  --info:    #2F6BDB;  --info-50:    #E4ECFB;  --info-ink:    #1F4FA8;
  --violet:  #6D55C7;  --violet-50:  #EDE9FA;  --violet-ink:  #4B3A9C;
  --maint:   #D2641F;  --maint-50:   #FBEADF;  --maint-ink:   #8F3F0B;
  --gray:    #7C8C87;  --gray-50:    #EBEFED;  --gray-ink:    #465651;

  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Bricolage Grotesque", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 80px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(16, 36, 31, .06), 0 1px 1px rgba(16, 36, 31, .04);
  --shadow-2: 0 14px 34px -16px rgba(16, 36, 31, .30);
  --focus: 0 0 0 3px rgba(20, 89, 74, .28);
  --sidebar-w: 264px;
  --topbar-h: 64px;
}

/* ---------- 2. Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
:focus-visible { outline: 3px solid rgba(20, 89, 74, .45); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 var(--s3); letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 var(--s4); }
small { font-size: .85rem; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--gray-50); padding: 1px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); z-index: 200; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.num, .table td.num, .stat-value { font-variant-numeric: tabular-nums; }

/* ---------- 3. Tata letak ---------- */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--s4); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s2); } .gap-3 { gap: var(--s3); } .gap-4 { gap: var(--s4); } .gap-5 { gap: var(--s5); }
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: var(--s4); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s5); }
.page-title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.page-sub { margin: var(--s1) 0 0; color: var(--muted); }

/* ---------- 4. Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4);
  border: 1px solid transparent; border-radius: 10px;
  font-weight: 600; font-size: .97rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--focus); outline: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand-ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-ink); color: #fff; }
.btn-accent { background: var(--key); color: var(--ink); }
.btn-accent:hover { background: #D39718; color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: .9rem; border-radius: var(--r-sm); }
.btn-lg { min-height: 52px; padding: 0 var(--s5); font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--line-strong); border-top-color: var(--brand); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--ink);
}
.icon-btn:hover { background: var(--brand-50); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 5. Form ---------- */
.field { margin-bottom: var(--s4); }
.label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font: inherit; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B706B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: #8A9B96; }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--gray-50); color: var(--muted); cursor: not-allowed; }
.is-invalid { border-color: var(--danger); }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(200, 66, 58, .25); }
.error-text { margin: 6px 0 0; font-size: .86rem; color: var(--danger-ink); }
.hint { margin: 6px 0 0; font-size: .86rem; color: var(--muted); }
.input-group { display: flex; }
.input-prefix {
  display: inline-flex; align-items: center; padding: 0 12px;
  background: var(--gray-50); border: 1px solid var(--line-strong); border-right: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm); color: var(--muted); font-weight: 600;
}
.input-group .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.check { display: flex; align-items: flex-start; gap: var(--s2); font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
.form-stack .field:last-child { margin-bottom: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* ---------- 6. Kartu & statistik ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.1rem; }
.card-body { padding: var(--s5); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s4); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); }
.stat-label { color: var(--muted); font-size: .9rem; margin: 0 0 var(--s1); }
.stat-value { font-family: var(--font-head); font-weight: 800; font-size: 2rem; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.stat-note { color: var(--muted); font-size: .85rem; margin: var(--s2) 0 0; }
.stat-accent { border-color: var(--key); background: var(--key-50); }
.stat-accent .stat-note { color: var(--key-ink); }
.empty { text-align: center; padding: var(--s7) var(--s5); color: var(--muted); }
.empty h3 { color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

/* ---------- 7. Lencana & peringatan ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
  background: var(--gray-50); color: var(--gray-ink);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge-brand   { background: var(--brand-50);   color: var(--brand-ink); }
.badge-success { background: var(--success-50); color: var(--success-ink); }
.badge-warning { background: var(--warning-50); color: var(--warning-ink); }
.badge-danger  { background: var(--danger-50);  color: var(--danger-ink); }
.badge-info    { background: var(--info-50);    color: var(--info-ink); }
.badge-violet  { background: var(--violet-50);  color: var(--violet-ink); }
.badge-maint   { background: var(--maint-50);   color: var(--maint-ink); }
.alert {
  display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4);
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
  margin-bottom: var(--s4); font-size: .95rem;
}
.alert > .icon { margin-top: 2px; }
.alert-success { background: var(--success-50); border-color: #BFE3CF; color: var(--success-ink); }
.alert-info    { background: var(--info-50);    border-color: #C4D5F5; color: var(--info-ink); }
.alert-warning { background: var(--warning-50); border-color: #EBD49B; color: var(--warning-ink); }
.alert-danger  { background: var(--danger-50);  border-color: #F0BDB9; color: var(--danger-ink); }
.noscript { margin: 0; border-radius: 0; }

/* ---------- 8. Tabel & daftar ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--muted); padding: 12px var(--s4); background: #F8FAF9; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFCFB; }
.table .num { text-align: right; }
.table-actions { display: flex; gap: var(--s1); justify-content: flex-end; }
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; }
.tab { padding: 10px var(--s4); border: 0; background: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand-ink); border-bottom-color: var(--key); }
.pagination { display: flex; flex-wrap: wrap; gap: var(--s1); justify-content: center; margin-top: var(--s5); }
.page-link { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.page-link:hover { background: var(--brand-50); }
.page-link.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.skeleton { background: linear-gradient(90deg, #E8EEEB 25%, #F4F7F6 50%, #E8EEEB 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-sm); min-height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 9. Modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: var(--s4); background: rgba(16, 36, 31, .55); }
.modal-backdrop[hidden] { display: none; }
.modal { width: 100%; max-width: 480px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.modal-head { padding: var(--s5) var(--s5) 0; }
.modal-head h3 { margin: 0; }
.modal-body { padding: var(--s3) var(--s5) var(--s5); color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s3); padding: var(--s4) var(--s5); background: #F8FAF9; border-top: 1px solid var(--line); }
.toast-stack { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 180; display: grid; gap: var(--s2); max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); background: var(--ink); color: #fff; border-radius: var(--r-sm); border-left: 4px solid var(--brand-100); box-shadow: var(--shadow-2); font-size: .95rem; animation: toast-in .2s ease-out; }
.toast-success { border-left-color: var(--success); }
.toast-danger { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--key); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 10. Kerangka aplikasi (pemilik & admin) ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: var(--s4) var(--s3) var(--s3);
  background: var(--brand-ink); color: #CFE3DB;
}
.sidebar-brand, .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.sidebar-brand { color: #fff; padding: var(--s2) var(--s3) var(--s3); }
.brand-mark { width: 30px; height: 30px; color: var(--key); flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.sidebar-context { margin: 0 var(--s3) var(--s4); padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .08); color: #fff; font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { flex: 1; }
.nav-group { margin-bottom: var(--s4); }
.nav-title { padding: 0 var(--s3); margin-bottom: 6px; font-size: .8rem; font-weight: 600; color: #8DB5A8; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 42px; padding: 0 var(--s3); border-radius: var(--r-sm);
  color: inherit; text-decoration: none; font-weight: 500; font-size: .95rem; background: none; border: 0; text-align: left;
}
.nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--key); }
.nav-link.is-soon { opacity: .5; cursor: default; }
.nav-link.is-soon:hover { background: none; color: inherit; }
.soon-tag { margin-left: auto; font-size: .72rem; padding: 1px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14); }
.nav-label { flex: 1; min-width: 0; }
.sidebar-foot { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, .12); }
.nav-button { cursor: pointer; }
.sidebar-scrim { position: fixed; inset: 0; background: rgba(16, 36, 31, .5); z-index: 90; }
.sidebar-scrim[hidden] { display: none; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--s3); height: var(--topbar-h); padding: 0 var(--s5); background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; margin-left: -10px; }
.topbar-title { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand-ink); font-weight: 700; }
.topbar-user-text { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-user-text small { color: var(--muted); }
.app-content { padding: var(--s6) var(--s5) var(--s7); max-width: 1240px; width: 100%; }

/* ---------- 11. Situs publik ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(242, 245, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; gap: var(--s5); min-height: 68px; }
.site-header .brand { color: var(--brand); }
.site-header .brand-mark { color: var(--brand); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); flex: 1; }
.site-nav .nav-list { display: flex; gap: var(--s1); }
.site-nav .nav-link { color: var(--ink-2); min-height: 40px; width: auto; }
.site-nav .nav-link:hover { background: var(--brand-50); color: var(--brand-ink); }
.site-nav .nav-link.is-active { background: none; color: var(--brand-ink); box-shadow: inset 0 -3px 0 var(--key); border-radius: 0; }
.site-nav .nav-link.is-soon { opacity: .45; }
.site-actions { display: flex; gap: var(--s2); align-items: center; }
.nav-toggle { display: none; margin-left: auto; }
.site-main { min-height: 60vh; }
.section { padding: var(--s8) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: var(--s6); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.hero { padding: var(--s8) 0 var(--s7); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s7); align-items: center; }
.hero-copy p { font-size: 1.15rem; color: var(--ink-2); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.hero-note { margin-top: var(--s4); color: var(--muted); font-size: .92rem; }
.board-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-2); }
.board-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.board-panel-head h2 { margin: 0; font-size: 1.1rem; }
.board-panel-head span { color: var(--muted); font-size: .85rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s5); }
.feature { padding-top: var(--s4); border-top: 3px solid var(--brand); }
.feature h3 { margin-bottom: var(--s2); }
.feature p { color: var(--muted); margin: 0; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s4); align-items: stretch; }
.price-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); }
.price-card.is-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-2); border-top: 6px solid var(--key); }
.price-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; margin: 0; }
.price-tagline { color: var(--muted); font-size: .92rem; margin: var(--s1) 0 var(--s4); min-height: 3.1em; }
.price-amount { font-family: var(--font-head); font-weight: 800; font-size: 2.1rem; letter-spacing: -.02em; line-height: 1.1; }
.price-per { color: var(--muted); font-size: .9rem; margin-bottom: var(--s4); }
.price-list { list-style: none; margin: 0 0 var(--s5); padding: 0; flex: 1; display: grid; align-content: start; gap: 10px; font-size: .95rem; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; }
.price-list .icon { color: var(--success); margin-top: 3px; }
.price-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s4); padding: var(--s4) var(--s5); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.price-banner .price-name { margin-bottom: var(--s1); }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: var(--s2); }
.faq-item summary { cursor: pointer; padding: var(--s4); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s3); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 var(--s4) var(--s4); color: var(--ink-2); }
.site-footer { background: var(--brand-ink); color: #CFE3DB; padding: var(--s7) 0 var(--s5); margin-top: var(--s7); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: var(--s6); }
.footer-about p, .footer-contact p { margin: var(--s2) 0 0; font-size: .95rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { color: var(--key); }
.footer-links { display: grid; gap: 8px; align-content: start; }
.footer-links a, .footer-links .is-soon { font-size: .95rem; }
.footer-links .is-soon { opacity: .5; }
.footer-legal { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, .14); font-size: .88rem; color: #9CC1B4; }

/* ---------- 12. Halaman masuk ---------- */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s5); padding: var(--s6) var(--s4); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.auth-brand .brand-mark { color: var(--brand); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow-2); }
.auth-title { font-size: 1.7rem; margin-bottom: var(--s1); }
.auth-sub { color: var(--muted); margin-bottom: var(--s5); }
.auth-alt { margin: var(--s5) 0 0; text-align: center; color: var(--muted); font-size: .95rem; }

/* ---------- 13. Papan kamar (elemen khas) ---------- */
.room-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.room-tile {
  --st: var(--gray);
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  min-height: 88px; padding: 12px 12px 10px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.room-tile::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 5px; border-radius: 0 5px 5px 0; background: var(--st); }
.room-tile::after { content: ""; position: absolute; right: 10px; top: 9px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper); }
a.room-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: var(--ink); }
.room-code { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1; }
.room-meta { display: block; font-size: .78rem; line-height: 1.25; color: var(--muted); }
.room-state { display: block; font-size: .78rem; font-weight: 600; color: var(--st); filter: brightness(.78); }
.room-tile[data-status="occupied"] { --st: var(--info); }
.room-tile[data-status="available"] { --st: var(--success); }
.room-tile[data-status="reserved"] { --st: var(--violet); }
.room-tile[data-status="maintenance"] { --st: var(--maint); }
.room-tile[data-status="inactive"] { --st: var(--gray); background: #F7F9F8; }
.room-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s4); font-size: .85rem; color: var(--muted); }
.room-legend span { display: inline-flex; align-items: center; gap: 6px; }
.room-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--gray)); }

/* ---------- 14. Wilayah bertingkat ---------- */
.wilayah .select, .wilayah .input { min-width: 0; }
.wilayah.is-loading .select { background-color: var(--gray-50); }

/* ---------- 15. Utilitas ---------- */
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); } .mt-6 { margin-top: var(--s6); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--s4); } .mb-5 { margin-bottom: var(--s5); }
.hide { display: none !important; }
[hidden] { display: none !important; }
pre.output { background: var(--ink); color: #D8EBE4; padding: var(--s4); border-radius: var(--r-sm); overflow: auto; font-size: .85rem; max-height: 280px; }

/* ---------- 16. Responsif ---------- */
@media (max-width: 960px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 100; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease-out; box-shadow: var(--shadow-2); }
  .app-shell.sidebar-open .sidebar { transform: none; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 var(--s4); }
  .app-content { padding: var(--s5) var(--s4) var(--s7); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; gap: var(--s3); padding: var(--s3) var(--s4) var(--s4); background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); }
  .site-nav.is-open { display: flex; }
  .site-nav .nav-list { flex-direction: column; }
  .site-nav .nav-link.is-active { box-shadow: none; background: var(--brand-50); border-radius: var(--r-sm); }
  .site-actions .btn { flex: 1; }
  .section { padding: var(--s7) 0; }
  .hero { padding: var(--s6) 0; }
}
@media (max-width: 600px) {
  .form-grid, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar-user-text { display: none; }
  .card-body { padding: var(--s4); }
  .auth-card { padding: var(--s5); }
  .room-board { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .toast-stack { left: var(--s4); right: var(--s4); max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .site-header, .site-footer, .toast-stack, .btn { display: none !important; }
  body { background: #fff; }
  .app-shell { display: block; }
}
