/* PulsaDesk — tampilan dasbor minimal profesional (putih–abu, padat data) */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --line: #e4e7ec;
  --line-soft: #eef0f3;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --brand: #1d4ed8;
  --brand-dark: #1a44bd;
  --soft: #eef3ff;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 18px 40px rgba(16, 24, 40, .16);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.hide { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }
h5 { font-size: 13px; }
p { margin: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--line-soft);
  padding: 2px 5px;
  border-radius: 5px;
}

/* ---------------------------------- tombol -------------------------------- */

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #f9fafb; border-color: #d0d5dd; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; display: block; padding: 10px 16px; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { color: var(--bad); border-color: #fcd2cd; background: #fff; }

.link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--brand);
  cursor: pointer;
}
.link:hover { text-decoration: underline; }

.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------------------------------- form ---------------------------------- */

.form { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.field small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

input[type="text"], input[type="password"], input[type="number"], select, textarea {
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  min-height: 36px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #93b4fd;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}
input::placeholder { color: #98a2b3; }
input:disabled { background: #f9fafb; color: var(--muted); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 30px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
}
.check input { min-height: 0; width: auto; }

.form-error {
  font-size: 12.5px;
  color: var(--bad);
  min-height: 1px;
}
.form-error:empty { display: none; }

.alert {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.alert.warn { background: var(--warn-bg); border-color: #fedf89; color: var(--warn); }
.alert.bad { background: var(--bad-bg); border-color: #fecdca; color: var(--bad); }
.alert.info { background: var(--soft); border-color: #cfdcfd; color: #1e3a8a; }
.alert.ok { background: var(--ok-bg); border-color: #abefc6; color: var(--ok); }
.alert:empty { display: none; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ------------------------------ layar masuk ------------------------------- */

.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, #e8eeff 0%, transparent 60%),
    radial-gradient(700px 400px at -10% 100%, #eef2f7 0%, transparent 55%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 26px 24px;
}
.auth-card.wide { max-width: 460px; }

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-brand h1 { font-size: 19px; }
.auth-brand p { font-size: 12.5px; color: var(--muted); }

.mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1d4ed8, #0f2f8a);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  box-shadow: 0 4px 10px rgba(29, 78, 216, .25);
  flex: none;
}

.auth-lead { font-size: 13px; color: var(--ink-2); margin-bottom: 18px; line-height: 1.5; }
.auth-foot { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 16px; }

/* -------------------------------- kerangka -------------------------------- */

.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.side {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 18px; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; font-size: 12px; }
.brand-text { display: grid; line-height: 1.25; }
.brand-text strong { font-size: 13.5px; }
.brand-text span { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }

.nav { display: grid; gap: 2px; }
.nav-item {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.nav-item svg { width: 16px; height: 16px; fill: currentColor; opacity: .65; flex: none; }
.nav-item:hover { background: #f7f8fa; color: var(--ink); }
.nav-item.on { background: var(--soft); color: var(--brand); font-weight: 600; }
.nav-item.on svg { opacity: 1; }

.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--line-soft); }
.who { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px #ecfdf3; }
.ver { font-size: 10.5px; color: #98a2b3; letter-spacing: .03em; margin-top: 2px; cursor: default; user-select: none; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h2 { font-size: 17px; }
.topbar p { font-size: 12px; color: var(--muted); }

.top-actions { display: flex; align-items: center; gap: 10px; }

.saldo-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 6px 5px 12px;
  box-shadow: var(--shadow);
}
.saldo-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.saldo-chip strong { font-size: 13.5px; font-variant-numeric: tabular-nums; }

.content { padding: 20px 24px 40px; display: grid; gap: 18px; max-width: 1320px; width: 100%; }

/* ---------------------------------- kartu --------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-head h3 { font-size: 14.5px; }
.card-head .muted { font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: grid; gap: 4px; padding: 16px 16px 14px; }
.stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-sub { font-size: 11.5px; color: var(--muted); }

.cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.page { display: grid; gap: 18px; }

/* --------------------------------- daftar --------------------------------- */

.list { display: grid; }
.list .row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.list .row-item:last-child { border-bottom: 0; }
.list .row-main { display: grid; gap: 2px; min-width: 0; }
.list .row-main b { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .row-main span { font-size: 11.5px; color: var(--muted); }
.list .row-end { text-align: right; display: grid; gap: 3px; justify-items: end; }
.list .row-end b { font-size: 13px; font-variant-numeric: tabular-nums; }

.empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 22px 8px; }

/* --------------------------------- tabel ---------------------------------- */

.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.tbl th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl tbody tr:hover { background: #fafbfc; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.tbl .nowrap { white-space: nowrap; }
.tbl .prod-cell { display: grid; gap: 1px; min-width: 170px; }
.tbl .prod-cell span { font-size: 11px; color: var(--muted); }
.tbl .empty { padding: 26px 8px; }

.foot-row { margin-top: 12px; align-items: center; }

/* --------------------------------- lencana --------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.sukses { background: var(--ok-bg); color: var(--ok); border-color: #abefc6; }
.badge.pending { background: var(--warn-bg); color: var(--warn); border-color: #fedf89; }
.badge.gagal { background: var(--bad-bg); color: var(--bad); border-color: #fecdca; }
.badge.off { background: #f2f4f7; color: var(--muted); border-color: #e4e7ec; }
.badge.test { background: #f4f3ff; color: #5925dc; border-color: #d9d6fe; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--muted);
  border: 1px solid var(--line);
}
.chip.on { background: var(--ok-bg); color: var(--ok); border-color: #abefc6; }

/* ------------------------------- beli / combo ----------------------------- */

.buy .combo { position: relative; }
.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.combo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.8px;
}
.combo-item:hover, .combo-item.active { background: #f5f7fb; }
.combo-item .ci-main { display: grid; gap: 1px; min-width: 0; }
.combo-item .ci-main b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-item .ci-main span { font-size: 11px; color: var(--muted); }
.combo-item .ci-price { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.combo-empty { padding: 12px; font-size: 12.5px; color: var(--muted); text-align: center; }

.price-box {
  display: grid;
  gap: 6px;
  background: #fafbfc;
  border: 1px dashed var(--line);
  border-radius: 9px;
  padding: 12px 13px;
}
.price-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-2); }
.price-row b { font-variant-numeric: tabular-nums; font-weight: 550; }
.price-row.total {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--ink);
}
.price-row.total b { font-size: 16px; font-weight: 700; }

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 380px; }
.filters input { flex: 1 1 180px; min-width: 140px; }
.filters select { flex: 0 1 170px; min-width: 130px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------- grafik -------------------------------- */

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 130px; padding-top: 6px; }
.bar-col { display: grid; grid-template-rows: 1fr auto; gap: 6px; min-width: 0; height: 100%; }
.bar-track { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.bar {
  width: 100%;
  max-width: 44px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #4f7bf0, #1d4ed8);
  opacity: .9;
}
.bar.zero { background: var(--line); }
.bar-lbl { font-size: 10.5px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------- modal --------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 24, 40, .48);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}
.modal-card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  animation: pop .14s ease-out;
}
.modal-card.narrow { max-width: 420px; }
.modal-card.wide { max-width: 760px; }

@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(.995); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 18px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 13px 18px;
  border-top: 1px solid var(--line-soft);
  background: #fcfcfd;
  border-radius: 0 0 13px 13px;
  flex-wrap: wrap;
}

.kv { display: grid; gap: 8px; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 550; word-break: break-word; }
.kv .kv-total { border-top: 1px solid var(--line); padding-top: 9px; font-size: 14px; }
.kv .kv-total dd { font-weight: 700; font-size: 15.5px; }

.secret-body { gap: 0; padding: 0; }
.sect { padding: 18px; border-bottom: 1px solid var(--line-soft); display: grid; gap: 10px; }
.sect:last-child { border-bottom: 0; }
.sect-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sect h4 { font-size: 13.5px; }
.sect h5 { font-size: 12.5px; color: var(--ink-2); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid2.forms { align-items: start; gap: 20px; }

.copybox { display: flex; gap: 8px; align-items: center; }
.copybox input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }

.ticks { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 12px; color: var(--ink-2); line-height: 1.5; }

.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #101828;
  color: #fff;
  font-size: 12.8px;
  padding: 10px 16px;
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  max-width: min(480px, calc(100vw - 32px));
  text-align: center;
}
.toast.bad { background: #912018; }

/* -------------------------------- responsif ------------------------------- */

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  /* Catatan: di layar sempit kolom kiri TIDAK dipakai — tab utama ada di
     bilah bawah (.tabbar), sedangkan merek/versi/keluar ada di .mobilehead.
     Jangan hidupkan lagi bilah tab di bagian atas layar sempit. */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding: 12px 14px; position: static; }
  .content { padding: 14px 14px 32px; gap: 14px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .modal { padding: 12px; align-items: flex-end; }
  .modal-card { max-height: calc(100dvh - 24px); }
  .grid2, .grid2.forms { grid-template-columns: minmax(0, 1fr); }
  .bars { height: 108px; gap: 6px; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-value { font-size: 18px; }
  .saldo-chip .saldo-label { display: none; }
  .topbar h2 { font-size: 15px; }
  .topbar p { display: none; }
  .auth-card { padding: 22px 18px; }
  .filters select { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================ tambahan v2 ============================== */

body.modal-open { overflow: hidden; }
.end-field { align-self: end; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grow { flex: 1 1 220px; }
.pad-note { padding: 0 0 12px; }
.muted-wrap { opacity: .65; }
.note-cell { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-wrap .note-cell { color: var(--ink-2); }

/* hotel */
.hotel-list { display: grid; gap: 12px; }
.hotel-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.hotel-item img, .hotel-ph {
  width: 84px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--line-soft);
}
.hotel-main { display: grid; gap: 2px; min-width: 0; }
.hotel-main b { font-size: 13.5px; }
.hotel-main span { font-size: 12px; color: var(--muted); }
.hotel-hero { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; }
.room-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 12px; }
.room-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.room-rate {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--line-soft);
}
.room-rate:first-of-type { border-top: 0; }
.room-rate-main { display: grid; gap: 1px; }
.room-rate-main b { font-size: 12.5px; font-weight: 550; }
.room-rate-end { display: flex; align-items: center; gap: 10px; }
.room-rate-end b { font-variant-numeric: tabular-nums; }
.room-book { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }


/* preset editor */
.preset-list { display: grid; gap: 14px; margin-top: 12px; }
.preset-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; background: #fcfcfd; }
.preset-head { display: flex; align-items: center; gap: 8px; }
.preset-name {
  font-weight: 600; font-size: 13.5px; max-width: 260px;
}
.fee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fee-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.fee-row label { font-size: 11.5px; color: var(--muted); }
.fee-row input { min-height: 32px; padding: 5px 8px; font-size: 12.5px; }

/* hasil tagihan */
.bill-result { display: grid; gap: 12px; }
.bill-result .kv { background: #fafbfc; border: 1px solid var(--line); border-radius: 9px; padding: 12px; }

@media (max-width: 820px) {
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .hotel-item { grid-template-columns: 64px minmax(0, 1fr); }
  .hotel-item img, .hotel-ph { width: 64px; height: 52px; }
  .hotel-item .btn { grid-column: 1 / -1; }
  .note-cell { max-width: 130px; }
}

/* ======================= alur prabayar (nomor → cek) =================== */

.subtabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin: -4px -2px 16px;
  padding: 0 2px;
}
.subtab {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
}
.subtab:hover { color: var(--ink); }
.subtab.on { color: var(--brand); border-bottom-color: var(--brand); }

.buy-flow { display: grid; gap: 14px; max-width: 720px; }

.chip-row { position: relative; display: flex; align-items: center; gap: 8px; }
.chip-pick {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 36px;
  cursor: pointer;
  width: 100%;
  justify-content: space-between;
}
.chip-pick:hover { border-color: #d0d5dd; }
.chip-pick.picked { color: var(--brand); border-color: #b9cdfd; background: var(--soft); }
.chip-pick svg { width: 16px; height: 16px; fill: currentColor; opacity: .6; }
.chip-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  padding: 4px;
  max-height: 280px;
  overflow-y: auto;
}

.offer-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fcfcfd;
}
.offer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.offer-head > div:first-child { display: grid; gap: 2px; min-width: 0; }
.offer-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.alt-list { display: grid; gap: 4px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.alt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  font-size: 12.3px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.alt-row:last-child { border-bottom: 0; }

@media (max-width: 820px) {
  .buy-flow { max-width: none; }
  .chip-menu { min-width: 100%; }
  .offer-price { font-size: 18px; }
}

/* ================== v4: paket tanpa nominal + pascabayar ================== */

/* Chip "tanpa nominal" di bawah kolom nominal, dan chip nominal tersedia saat KOSONG. */
.extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.extras-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.extra-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}
.extra-chip b { font-weight: 600; }
.extra-chip span { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.extra-chip:hover { border-color: #b9cdfd; background: var(--soft); }
.extra-chip:active { transform: translateY(1px); }

/* Blok "Cek tagihan" pascabayar + catatan kosong. */
.gap-head { margin-top: 18px; }
#pas-note-info { margin: 0 0 14px; }

/* ===================== v4: katalog tombol produk & per pengguna ===================== */

/* Layar pembaca (dipakai untuk wadah form unduhan). */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Segmented: Prabayar / Pascabayar */
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.seg-item {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.seg-item.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm, 0 1px 2px rgba(16, 24, 40, .08)); }

/* Bar kategori + alat bantu */
.cat-bar { display: grid; gap: 12px; margin-bottom: 12px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.cat-chip span { color: var(--muted); font-size: 11.5px; }
.cat-chip.on { border-color: #b9cdfd; background: var(--soft); color: var(--brand); font-weight: 600; }
.cat-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-tools select { flex: 0 1 220px; min-width: 150px; }
.cat-tools input { flex: 1 1 200px; min-width: 140px; }
.catalog-meta { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 0 0 14px; }

/* Petak tombol produk */
.ptile-group {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 18px 0 10px;
}
.ptile-group:first-child { margin-top: 0; }
.ptile-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.ptile {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  position: relative;
  transition: border-color .12s ease, transform .12s ease;
}
.ptile:hover { border-color: #b9cdfd; }
.ptile:active { transform: translateY(1px); }
.ptile-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.ptile-sub { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ptile.down { cursor: not-allowed; background: var(--soft); opacity: .85; }
.ptile.down .ptile-sub { color: #b42318; }
.ptile-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee4e2;
  color: #b42318;
}

/* Rincian per pengguna */
.user-head { display: grid; gap: 8px; }
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.mini-stat {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}
.mini-stat span { font-size: 11.5px; color: var(--muted); }
.mini-stat b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sn-box {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px dashed var(--line);
  word-break: break-all;
  font-size: 13px;
}
.chip.small { font-size: 10.5px; padding: 2px 7px; }

@media (max-width: 640px) {
  .ptile-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cat-tools select, .cat-tools input { flex: 1 1 100%; }
}

/* Lapisan modal: rincian pengguna & sandi rahasia harus di ATAS menu pengaturan. */
#modal-unlock { z-index: 55; }
#modal-user { z-index: 60; }
#modal-relogin { z-index: 95; }
/* PIN dibuka DI ATAS modal pesanan/tagihan; invoice di atas rincian transaksi. */
#modal-pin { z-index: 70; }
#modal-invoice { z-index: 72; }
#modal-note { z-index: 62; }

/* Kolom kode/token di riwayat: jangan sampai melebarkan tabel. */
.sn-cell { display: block; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Baris admin utama di daftar pengguna menu rahasia (selalu paling atas). */
.admin-row td { background: var(--soft); }

/* ===================== v7: tab utama pindah ke bilah bawah ===================== */

/* Bilah ringkas (merek + pengguna + versi + keluar) — hanya di layar sempit.
   Tab TIDAK di sini; lihat .tabbar di bawah. */
.mobilehead { display: none; }

/* Bilah bawah: 4 tab, ikon di atas teks. Tanpa tombol mengambang di tengah. */
.tabbar { display: none; }

@media (max-width: 820px) {
  /* Kolom kiri tidak dipakai lagi di layar sempit. */
  /* align-content: start → baris grid tidak ikut melar mengisi sisa tinggi layar.
     Tanpa ini, di layar tinggi baris merek (.mobilehead) bisa membengkak dua kali
     lipat (47px → 104px) sehingga ruang layar terbuang. */
  .shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .side { display: none; }

  .mobilehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .mh-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .mh-brand .mark { width: 28px; height: 28px; border-radius: 8px; font-size: 10.5px; }
  .mh-text { display: grid; line-height: 1.2; min-width: 0; }
  .mh-text strong { font-size: 12.5px; }
  .mh-text span {
    font-size: 10.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mh-actions { display: flex; align-items: center; gap: 12px; flex: none; }
  .mh-actions .link { font-size: 12px; }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -1px 2px rgba(16, 24, 40, .04);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tab-item {
    appearance: none;
    border: 0;
    background: none;
    font: inherit;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 4px 2px 3px;
    min-height: 52px;
    border-radius: 10px;
    color: #98a2b3;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tab-item svg { width: 24px; height: 24px; fill: currentColor; display: block; }
  .tab-item span { font-size: 11.5px; line-height: 1.1; letter-spacing: .01em; }
  .tab-item.on { color: var(--brand); }
  .tab-item.on span { font-weight: 600; }
  .tab-item:active { background: var(--soft); }

  /* Isi halaman jangan tertutup bilah bawah (termasuk area aman iPhone). */
  .content { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  /* Pesan (toast) muncul DI ATAS bilah bawah, bukan tertutup olehnya. */
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ================== v8: PIN, izin, cutoff, marquee, invoice ================== */

/* Pengumuman berjalan */
.marquee {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 10px;
  color: #92400e;
  font-size: 12.8px;
}
.marquee-tag {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: #f59e0b;
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
}
.marquee-track { flex: 1 1 auto; overflow: hidden; white-space: nowrap; }
.marquee-track span { display: inline-block; padding-left: 100%; animation: marquee 22s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Judul dasbor + tombol Catatan */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-title { font-size: 15px; margin: 0; }

/* Kotak deteksi operator */
.detect-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  margin-bottom: 16px;
}
.detect-result { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.detect-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: #fff; border: 1px solid #b9cdfd; color: var(--brand);
  font-size: 13px; font-weight: 600;
}
.detect-chip small { font-weight: 400; color: var(--muted); }
.detect-chip.warn { border-color: #fecaca; color: #b42318; background: #fff; }

/* Saklar (switch) */
.switches { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 4px 0 12px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui {
  position: relative; flex: none;
  width: 40px; height: 22px; border-radius: 999px;
  background: #d0d5dd; transition: background .15s ease;
}
.switch-ui::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.2);
  transition: transform .15s ease;
}
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid #93b4fd; outline-offset: 2px; }
.switch-label { color: var(--ink-2); }
.switch-row { margin-top: 6px; }

/* Tombol beli tersembunyi (5 ketukan) + hitungan */
/* opacity 0 (BUKAN visibility:hidden): tombol tidak terlihat tetapi MASIH bisa diketuk.
   visibility:hidden membuat elemen tidak menerima ketukan sama sekali.
   Semua umpan balik visual dimatikan: tanpa latar biru saat disentuh, tanpa kilatan
   tap-highlight bawaan peramban, tanpa transisi — jadi tidak terlihat seperti tombol. */
.btn-hidden-buy,
.btn-hidden-buy:hover,
.btn-hidden-buy:active,
.btn-hidden-buy:focus,
.btn-hidden-buy:focus-visible {
  opacity: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transition: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Pratinjau invoice */
.inv-preview { display: grid; place-items: center; padding: 6px 0 12px; }
.inv-preview img { max-width: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); }

/* Status per pengguna: daftar saklar izin produk */
.perm-grid { display: grid; gap: 10px; }
.perm-cat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.perm-cat > b { font-size: 12.5px; }
.perm-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.perm-brand-row span { font-size: 12.5px; }

/* Catatan siap pakai */
.note-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.note-chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.note-chip:hover { border-color: #b9cdfd; background: var(--soft); }
.note-chip.on { border-color: var(--brand); color: var(--brand); }

@media (max-width: 820px) {
  .detect-box { grid-template-columns: minmax(0, 1fr); }
  .tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tab-item svg { width: 22px; height: 22px; }
  .tab-item span { font-size: 10.5px; }
}

/* Pengganti inline style (CSP: style-src 'self' melarang atribut style di HTML). */
.switch-top { margin-top: 10px; }
.bad-text { color: #b42318; }
.perm-toggle { display: flex; align-items: center; gap: 9px; }

/* Kaki modal pesanan: tombol beli tetap di tempatnya tapi disembunyikan (5 ketukan). */

/* Peringatan besar jam cutoff sistem (khusus pengguna). */
.cutoff-box {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #fecaca;
  background: #fef3f2;
  color: #912018;
  font-size: 14.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: var(--shadow);
}
.cutoff-box b { font-size: 17px; display: block; }

/* Pemilih layanan (brand) muncul setelah kategori dipilih. */
.brand-pick { display: grid; gap: 6px; margin: 4px 0 6px; max-width: 340px; }
.brand-pick label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.brand-pick select { padding: 9px 12px; }
