/* Website Kost — palet hijau-teal dengan aksen kuning kunyit */
:root {
  --bg: #F3F6F4; --surface: #FFFFFF; --ink: #15302F; --muted: #557170; --line: #D5E0DD;
  --brand: #1E5C57; --brand-ink: #FFFFFF; --accent: #E3A72F; --accent-ink: #2A1E05;
  --plan: #EAF1EF; --plan-line: #1E5C57; --ok: #2E8A4F; --full: #B5452F; --warn: #B7791F; --info: #2B6CB0;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1A1A; --surface: #162525; --ink: #E4EEEC; --muted: #93ADAA; --line: #2A3F3E;
    --brand: #4FA59C; --brand-ink: #071312; --accent: #EDB64A; --accent-ink: #2A1E05;
    --plan: #1C3030; --plan-line: #7CC7BE; --ok: #5DC283; --full: #E07A62; --warn: #E2B04F; --info: #7FB2E8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.eyebrow.on-brand { color: inherit; opacity: .8; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
section { padding-block: 4rem; }
.sec-head { display: grid; gap: 0.6rem; margin-bottom: 2rem; max-width: 640px; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.sec-head p { color: var(--muted); }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 700 0.95rem var(--font-body); padding: 0.8rem 1.25rem; border-radius: 10px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--full) 45%, transparent); color: var(--full); }
.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.86rem; }

/* Form umum */
.field { display: grid; gap: 0.4rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 700; font-size: 0.9rem; }
.field > legend { padding: 0; margin-bottom: 0.4rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  font: 500 1rem var(--font-body); padding: 0.7rem 0.8rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%; min-width: 0;
}
textarea { resize: vertical; }
.check { display: flex; gap: 0.6rem; align-items: center; font-size: 0.95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.flash { padding: 0.8rem 1rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem; margin-bottom: 1rem; }
.flash-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.flash-err { background: color-mix(in srgb, var(--full) 14%, var(--surface)); color: var(--full); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Navigasi */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap, .admin-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.logo .k { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-size: 1rem; }
.nav-links { display: flex; gap: 1.4rem; font-weight: 600; font-size: 0.92rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Hero */
.hero { padding-block: 3.5rem 4rem; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
.hero-copy { display: grid; gap: 1.3rem; min-width: 0; }
.hero-copy > p { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.hero-cta, .chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { font-size: 0.85rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--plan); }
.board { background: var(--brand); color: var(--brand-ink); border-radius: 18px; padding: 1.6rem; display: grid; gap: 1.1rem; box-shadow: 0 18px 40px -20px rgba(10, 40, 38, .55); min-width: 0; }
.board-top { display: flex; justify-content: space-between; gap: 1rem; }
.board-top .label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.board-big { font-family: var(--font-display); font-weight: 800; font-size: 4.5rem; line-height: 1; }
.board-big small { font-size: 1.1rem; font-weight: 600; opacity: .85; }
.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.door { aspect-ratio: 3 / 4; max-width: 100%; border-radius: 6px 6px 2px 2px; display: grid; place-items: end center; padding-bottom: 3px; font-size: 0.68rem; font-weight: 700; }
.door.free, .lg-free { background: var(--accent); color: var(--accent-ink); }
.door.taken, .lg-taken { background: color-mix(in srgb, var(--brand-ink) 18%, transparent); color: color-mix(in srgb, var(--brand-ink) 70%, transparent); }
.legend { display: flex; gap: 1rem; font-size: 0.82rem; opacity: .9; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Kamar */
.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.room { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.room-plan { background: var(--plan); padding: 1.2rem; position: relative; }
.room-plan svg { display: block; width: 100%; height: auto; }
.status { position: absolute; top: 12px; right: 12px; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--surface); }
.status.ok { color: var(--ok); } .status.no { color: var(--full); }
.room-body { padding: 1.3rem; display: grid; gap: 0.9rem; flex: 1; align-content: start; }
.room-body h3 { font-size: 1.35rem; }
.room-meta { font-size: 0.85rem; color: var(--muted); }
.room-feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.room-feat li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 0.5rem; }
.room-foot { display: flex; justify-content: space-between; align-items: end; gap: 0.75rem; padding: 0 1.3rem 1.3rem; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.price small { font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--muted); }

/* Simulasi */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.calc-form { padding: 1.8rem; display: grid; gap: 1.3rem; min-width: 0; align-content: start; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.seg button { font: 700 0.9rem var(--font-body); padding: 0.6rem 0.2rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; display: grid; line-height: 1.25; }
.seg button small { font-weight: 600; font-size: 0.72rem; color: var(--ok); }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seg button[aria-pressed="true"] small { color: var(--brand-ink); }
.calc-out { background: var(--plan); padding: 1.8rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.rows { display: grid; gap: 0.55rem; font-size: 0.95rem; }
.rows div { display: flex; justify-content: space-between; gap: 1rem; }
.rows .disc { color: var(--ok); font-weight: 600; }
.total { border-top: 2px dashed var(--plan-line); padding-top: 1rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.total strong { font-family: var(--font-display); font-size: 2rem; }
.note { font-size: 0.82rem; color: var(--muted); }

/* Booking */
.book-form { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.8rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; position: relative; }
.book-form .full, .form-grid .full { grid-column: 1 / -1; }
.book-form .flash { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .book-form, .form-grid { grid-template-columns: 1fr !important; } }
.booked { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 16px; padding: 1.5rem; display: grid; gap: 0.7rem; justify-items: start; margin-bottom: 1.5rem; }
.booked h3 { color: var(--ok); font-size: 1.3rem; }

/* Lokasi, aturan, FAQ */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.dist { list-style: none; padding: 0; margin: 0; }
.dist li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.dist li span:last-child { font-weight: 700; color: var(--brand); text-align: right; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; counter-reset: r; }
.rules li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.5rem; counter-increment: r; }
.rules li::before { content: counter(r); font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 1.2rem; line-height: 1.4; }
.addr { margin-top: 1.2rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 0.95rem; }
.faq { display: grid; gap: 0.6rem; max-width: 780px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
summary { font-weight: 700; cursor: pointer; }
details p { margin-top: 0.6rem; color: var(--muted); }

/* Kontak */
.contact { background: var(--brand); color: var(--brand-ink); border-radius: 20px; padding: 2.5rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; padding: 1.6rem; } }
.contact h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.contact p { opacity: .9; margin-top: 0.6rem; }
.contact-box { background: color-mix(in srgb, var(--brand-ink) 12%, transparent); border-radius: 14px; padding: 1.3rem; display: grid; gap: 0.8rem; }
.phone { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; user-select: all; }
footer { padding-block: 2rem 3rem; color: var(--muted); font-size: 0.85rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ================= ADMIN ================= */
.admin-auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; display: grid; gap: 1rem; }
.auth-card h1 { font-size: 1.8rem; }
.admin-bar { background: var(--brand); color: var(--brand-ink); }
.admin-bar .wrap { flex-wrap: wrap; }
.admin-bar .logo { white-space: nowrap; }
.tbl td.num, .stepper span { white-space: nowrap; }
.admin-bar .logo .k { background: var(--accent); color: var(--accent-ink); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.admin-nav a { text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 0.4rem 0.75rem; border-radius: 8px; opacity: .85; }
.admin-nav a.on, .admin-nav a:hover { background: color-mix(in srgb, var(--brand-ink) 16%, transparent); opacity: 1; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 0.4em; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; text-align: center; }
.admin-main { padding-block: 2rem 4rem; display: grid; gap: 1.2rem; }
.admin-main > h1 { font-size: 2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; display: grid; }
.stats strong { font-family: var(--font-display); font-size: 1.9rem; }
.stats span { font-size: 0.85rem; }
.tabs { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.2rem; }
.tabs a { white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 0.88rem; padding: 0.45rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.tabs a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.empty { color: var(--muted); padding: 2rem; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }
.booking-list { display: grid; gap: 0.8rem; }
.bk { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: 1rem 1.5rem; }
@media (max-width: 760px) { .bk { grid-template-columns: 1fr; } }
.bk.st-baru { border-left-color: var(--accent); }
.bk.st-dihubungi { border-left-color: var(--info); }
.bk.st-survei { border-left-color: var(--warn); }
.bk.st-jadi { border-left-color: var(--ok); }
.bk.st-batal { border-left-color: var(--full); opacity: .75; }
.bk-main { min-width: 0; display: grid; gap: 0.4rem; }
.bk-top { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; font-size: 1.1rem; }
.bk-meta { font-size: 0.88rem; color: var(--muted); }
.bk-meta b { color: var(--ink); }
.bk-notes { font-size: 0.9rem; font-style: italic; }
.bk-form { display: grid; gap: 0.5rem; align-content: start; }
.bk-form select, .bk-form input { padding: 0.5rem 0.7rem; font-size: 0.9rem; }
.sel { user-select: all; color: var(--ink); font-weight: 600; }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--plan); }
.pill-baru { background: color-mix(in srgb, var(--accent) 25%, var(--surface)); color: var(--ink); }
.pill-dihubungi { color: var(--info); }
.pill-survei { color: var(--warn); }
.pill-jadi { color: var(--ok); }
.pill-batal { color: var(--full); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; margin: 0; }
.panel legend { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; padding: 0 0.4rem; }
.panel h2 { font-size: 1.3rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.4rem; }
.settings { display: grid; gap: 1.2rem; }
.sticky-save { position: sticky; bottom: 0; padding-block: 0.8rem; background: linear-gradient(transparent, var(--bg) 35%); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.tbl th, .tbl td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.tbl form { margin: 0; }
.stepper { display: inline-flex; align-items: center; gap: 0.5rem; }
.stepper form { display: inline; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.1rem; font-weight: 700; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== Penghuni ===== */
.small { font-size: 0.82rem; }
.back { text-decoration: none; font-weight: 600; color: var(--muted); }
.unit-group { display: grid; gap: 0.8rem; }
.unit-group h2 { font-size: 1.3rem; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.7rem; }
.unit { display: grid; gap: 0.25rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; text-decoration: none; min-width: 0; }
a.unit:hover { transform: translateY(-1px); border-color: var(--brand); }
.u-occ { border-top-color: var(--brand); }
.u-free { border-top-color: var(--accent); }
.u-fix { border-top-color: var(--full); opacity: .85; }
.u-match { outline: 2px solid var(--accent); }
.u-dim { opacity: .45; }
.unit-top { display: flex; justify-content: space-between; align-items: baseline; }
.unit-code { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.unit-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.unit-name { overflow-wrap: anywhere; }
.unit-meta { font-size: 0.82rem; color: var(--muted); }
.unit-cta { font-size: 0.85rem; font-weight: 700; color: var(--brand); }
.pay { font-size: 0.78rem; font-weight: 700; }
.pay-paid { color: var(--ok); } .pay-due { color: var(--warn); } .pay-late { color: var(--full); } .pay-muted { color: var(--muted); }
.txt-due { color: var(--warn); }
.placing { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border: 1px solid var(--accent); border-radius: 14px; padding: 1rem 1.2rem; }
.pending ul { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.6rem; }
.pending li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.search { display: flex; gap: 0.5rem; max-width: 420px; }
.unit-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: end; }
.unit-state { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.unit-state.free { color: var(--accent); } .unit-state.fix { color: var(--full); }
.unit-edit { display: flex; gap: 0.6rem; align-items: end; flex-wrap: wrap; }
.unit-edit .field { width: 150px; }
.tenant-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .tenant-layout { grid-template-columns: 1fr; } }
.tc-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.2rem; margin: 0; }
.dl dt { color: var(--muted); font-size: 0.88rem; } .dl dd { margin: 0; overflow-wrap: anywhere; }
.tenant-actions { display: grid; gap: 0.8rem; }
.mini { display: grid; gap: 0.6rem; } .mini h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
.mini select, .mini input { flex: 1; min-width: 0; }
.edit-tenant summary { font-weight: 700; margin-bottom: 0.5rem; }
.h-sub { font-size: 1.2rem; margin-top: 0.5rem; }
.from-booking { margin-bottom: 1rem; } .from-booking .field { flex: 1; }
.unit-group { padding-block: 0; }
