/* Simatupang Palugada — gaya dasar (mobile first) */
:root {
  --navy: #0B2C64;
  --navy-dark: #071C42;
  --orange: #FF5B00;
  --orange-text: #B53D00;
  --orange-soft: #FFF1E8;
  --bg: #F3F5FA;
  --line: #E3E8F2;
  --text: #0F1B33;
  --muted: #5A6478;
  --white: #FFFFFF;
  --green: #11704A;
  --red: #B42318;
  --radius: 16px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Saira', 'Plus Jakarta Sans', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Kerangka aplikasi HP ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; position: relative; }
.app-main { flex: 1; padding: 16px 18px 96px; display: flex; flex-direction: column; gap: 16px; }
.app-main.rapat { padding-top: 0; }

.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--white); padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.hero.orange { background: var(--orange); }
.hero .deco-a { position: absolute; right: -60px; top: -40px; width: 230px; height: 360px; background: var(--orange); transform: skewX(-18deg); }
.hero .deco-b { position: absolute; right: 90px; top: -40px; width: 18px; height: 360px; background: var(--white); transform: skewX(-18deg); opacity: .95; }
.hero.orange .deco-a { background: var(--navy); }
.hero > * { position: relative; }
.hero .deco-a, .hero .deco-b { position: absolute; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-logo { height: 60px; width: auto; }
.hero-title { font-family: var(--font-head); font-style: italic; font-weight: 900; font-size: 26px; letter-spacing: .2px; text-transform: uppercase; }
.hero-sub { font-size: 13px; font-weight: 600; }
.hero > .stack, .title-row > .stack { max-width: calc(100% - 150px); }
.hero > p.hero-title, .hero > h1.hero-title { max-width: calc(100% - 120px); }
.hero.ext { padding-bottom: 60px; }
.pull-up { margin-top: -44px; position: relative; z-index: 1; }

.btn-circle { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--white); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; cursor: pointer; }
.title-row { display: flex; align-items: center; gap: 12px; }

/* ---------- Komponen ---------- */
.card { background: var(--white); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.shadow { box-shadow: 0 8px 22px rgba(11, 44, 100, .12); }
.card.navy { background: var(--navy); color: var(--white); }
.card.orange { background: var(--orange); color: var(--white); }
.card h2, .section-title { font-size: 16px; font-weight: 800; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.link-more { font-size: 13px; font-weight: 700; color: var(--orange-text); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 800; }
.price { font-weight: 800; color: var(--orange-text); }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.tight { gap: 4px; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--white); border-radius: var(--radius); padding: 14px 6px 12px; color: var(--text); text-decoration: none; text-align: center; font-size: 13px; font-weight: 700; }
.tile .ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--white); background: var(--navy); }
.tile .ico.o { background: var(--orange); }
.tile .ico.off { background: var(--line); color: var(--navy); }
.tile .tag { position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 800; color: var(--white); background: var(--navy); border-radius: 6px; padding: 2px 6px; }

.promo { position: relative; overflow: hidden; background: var(--orange); color: var(--white); border-radius: 18px; padding: 16px 18px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.promo::after { content: ''; position: absolute; right: -30px; top: -20px; width: 120px; height: 160px; background: var(--navy); transform: skewX(-18deg); }
.promo > * { position: relative; z-index: 1; max-width: 230px; }
.promo .big { font-family: var(--font-head); font-style: italic; font-weight: 900; font-size: 24px; line-height: 1.05; }
.promo:hover { color: var(--white); }

.list-item { display: flex; gap: 12px; align-items: center; background: var(--white); border-radius: 14px; padding: 12px 14px; color: var(--text); text-decoration: none; border: 2px solid transparent; }
a.list-item:hover { border-color: var(--line); color: var(--text); }
.list-item .ico { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--orange-soft); color: var(--orange-text); display: flex; align-items: center; justify-content: center; }
.thumb { width: 76px; height: 60px; border-radius: 12px; background: var(--line); object-fit: cover; flex: none; display: flex; align-items: center; justify-content: center; color: var(--navy); }

.badge { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.badge-menunggu { background: #FFF1E8; color: var(--orange-text); }
.badge-diterima { background: #E6ECF7; color: var(--navy); }
.badge-proses { background: var(--navy); color: var(--white); }
.badge-selesai { background: #E3F4EC; color: var(--green); }
.badge-batal { background: #FDECEA; color: var(--red); }
.badge-terverifikasi { background: #E3F4EC; color: var(--green); }
.badge-ditolak, .badge-nonaktif { background: #FDECEA; color: var(--red); }
.badge-navy { background: var(--navy); color: var(--white); }

/* ---------- Formulir ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 14px; font-weight: 800; }
.field small, .hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; border: 1px solid #C9D1E0; border-radius: 12px; padding: 10px 12px; background: var(--white); font-size: 15px; }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(11, 44, 100, .15); }
.search { display: flex; align-items: center; gap: 10px; background: var(--white); color: var(--muted); border-radius: 14px; padding: 0 14px; height: 50px; box-shadow: 0 6px 18px rgba(7, 28, 66, .25); }
.search input { border: 0; outline: none; flex: 1; background: transparent; font-size: 14px; color: var(--text); }

.seg { display: flex; background: var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg.white { background: var(--white); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { flex: 1; min-height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; font-weight: 800; color: var(--navy); cursor: pointer; padding: 4px 6px; }
.seg input:checked + label { background: var(--navy); color: var(--white); }
.seg input:focus-visible + label { outline: 3px solid var(--orange); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip label, a.chip-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--white); color: var(--navy); font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: none; }
.chip input:checked + label, a.chip-link.on { border-color: var(--orange); background: var(--orange-soft); }
.chip input:focus-visible + label { outline: 3px solid var(--orange); }

.pick { position: relative; display: block; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .list-item { cursor: pointer; }
.pick input:checked + .list-item { border-color: var(--orange); }
.pick input:focus-visible + .list-item { outline: 3px solid var(--orange); }
.pick input:disabled + .list-item { opacity: .5; cursor: not-allowed; }

.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 700; font-size: 14px; }
.check input { width: 22px; height: 22px; accent-color: var(--navy); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); }
.btn-orange { background: var(--orange); color: var(--white); font-size: 19px; }
.btn-orange:hover { background: #E55100; color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost { background: transparent; color: var(--orange-text); }
.btn-danger { background: var(--white); color: var(--red); border: 2px solid var(--red); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 38px; height: 38px; border-radius: 19px; border: 2px solid var(--navy); background: var(--white); color: var(--navy); font-size: 20px; font-weight: 800; cursor: pointer; }
.stepper button.plus { background: var(--navy); color: var(--white); }
.stepper output { min-width: 18px; text-align: center; font-weight: 800; font-size: 17px; }

.footer-bar { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); background: var(--white); padding: 12px 18px 16px; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); margin: 0 -18px -96px; z-index: 5; }

/* ---------- Pesan kilat ---------- */
.flash { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.flash-sukses { background: #E3F4EC; color: var(--green); }
.flash-error { background: #FDECEA; color: var(--red); }
.flash-info { background: #E6ECF7; color: var(--navy); }

/* ---------- Status pesanan ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { width: 22px; height: 22px; border-radius: 11px; border: 3px solid var(--line); background: var(--white); flex: none; display: flex; align-items: center; justify-content: center; color: var(--white); position: relative; z-index: 1; }
.timeline li::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 3px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.done .dot { background: var(--navy); border-color: var(--navy); }
.timeline li.done::before { background: var(--navy); }
.timeline li.now .dot { background: var(--orange); border-color: #FFD3BA; }
.timeline .t { font-size: 14px; font-weight: 700; color: var(--muted); }
.timeline li.done .t, .timeline li.now .t { color: var(--text); font-weight: 800; }

.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv > :first-child { color: var(--muted); font-weight: 600; }
.kv > :last-child { font-weight: 800; text-align: right; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos a { display: block; border-radius: 10px; overflow: hidden; background: var(--line); aspect-ratio: 1; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.stars { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.stars input { position: absolute; opacity: 0; }
.stars label { cursor: pointer; color: #C9D1E0; }
.stars label svg { width: 34px; height: 34px; fill: currentColor; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--orange); }
.stars input:focus-visible + label { outline: 3px solid var(--orange); border-radius: 6px; }

.map { height: 240px; border-radius: 14px; overflow: hidden; background: #DCE4EF; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-weight: 600; }

/* ---------- Navigasi bawah ---------- */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; justify-content: space-around; align-items: center; height: 68px; background: var(--white); border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 6px 0; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.bottom-nav a.on { color: var(--navy); font-weight: 800; }
.bottom-nav a.on svg { color: var(--orange); }

/* ---------- Halaman masuk ---------- */
.auth { min-height: 100vh; background: var(--navy); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 28px 18px; }
.auth::before { content: ''; position: absolute; left: -140px; bottom: 120px; width: 760px; height: 240px; background: var(--orange); transform: rotate(-24deg); }
.auth::after { content: ''; position: absolute; left: -140px; bottom: 380px; width: 760px; height: 16px; background: var(--white); transform: rotate(-24deg); }
.auth > * { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.auth-logo { width: 290px; max-width: 80%; margin: 12px auto 18px; filter: drop-shadow(0 14px 24px rgba(7, 28, 66, .45)); }

/* ---------- Admin ---------- */
.admin { display: flex; flex-wrap: wrap; min-height: 100vh; background: var(--bg); }
.admin-side { flex: 1 1 220px; max-width: 260px; background: var(--navy); color: var(--white); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.admin-side img { width: 190px; margin: 0 auto 12px; }
.admin-side a { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.admin-side a:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.admin-side a.on { background: var(--orange); }
.admin-side .count { margin-left: auto; background: var(--white); color: var(--navy); border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 800; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.admin-main h1 { font-family: var(--font-head); font-style: italic; font-weight: 900; font-size: 28px; color: var(--navy); text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--white); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.stat .n { font-family: var(--font-head); font-style: italic; font-weight: 900; font-size: 30px; color: var(--navy); line-height: 1.1; }
.stat.alert { border: 2px solid var(--orange); }
.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #F8F9FC; }
tr:last-child td { border-bottom: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; height: 100%; font-size: 11px; color: var(--muted); font-weight: 700; }
.bars .bar span.b { width: 100%; max-width: 44px; background: var(--navy); border-radius: 6px 6px 0 0; min-height: 3px; }
.bars .bar strong { color: var(--text); font-size: 12px; }
.pager { display: flex; gap: 8px; align-items: center; }

@media (max-width: 720px) {
  .admin-side { max-width: none; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .admin-side img { width: 120px; margin: 0 8px 0 0; }
  .admin-main { padding: 16px; }
}

.toast-wrap { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast-wrap .flash { box-shadow: 0 10px 26px rgba(7, 28, 66, .22); transition: opacity .4s; }
