/* Tampilan terang & bersih. Warna utama mengikuti warna outlet (--brand). */
:root {
  --brand: #2563eb;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
  --brand-ink: color-mix(in srgb, var(--brand) 80%, black);
  --bg: #f5f6f8;
  --surface: #ffffff;
  --sunk: #f0f2f5;
  --ink: #1d2025;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --line: #e7e9ee;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --r-s: 10px;
  --r: 14px;
  --r-l: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font: 15px/1.5 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 700; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 700; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Kerangka admin ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px;
}
.side-head { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.side-head .logo { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; object-fit: cover; flex: none; }
.side-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-title span { font-size: 12px; color: var(--muted); }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); color: var(--ink); font-size: 14px; font-weight: 500;
}
.side-nav a span { flex: 1; }
.side-nav a:hover { background: var(--sunk); text-decoration: none; }
.side-nav a.on { background: var(--ink); color: #fff; }
.side-nav kbd {
  font: 600 11px var(--font); color: var(--faint); background: var(--sunk); border-radius: 6px; padding: 1px 6px; min-width: 20px; text-align: center;
}
.side-nav a.on kbd { background: rgba(255,255,255,.16); color: #fff; }
.side-apps { margin-top: 16px; padding: 12px 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.side-apps a { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--sunk); color: var(--ink); }
.side-apps a:hover { background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.side-foot { margin-top: auto; padding: 12px 10px 0; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.side-foot a { flex: 1; color: var(--ink); font-weight: 600; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 4px; }
.linkbtn:hover { color: var(--bad); }
.side-scrim { display: none; }

.main { padding: 22px clamp(16px, 2.4vw, 40px) 56px; width: 100%; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-title { margin: 0; font-size: 24px; }
.shell .main h1:not(.page-title) { display: none; }
.menu-btn { display: none; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; cursor: pointer; }

.subtabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 18px; padding: 4px; background: var(--sunk); border-radius: 12px; width: max-content; max-width: 100%; scrollbar-width: none; }
.subtabs a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.subtabs a:hover { color: var(--ink); text-decoration: none; }
.subtabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 280px; height: 100%; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .side-scrim.open { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 30; }
  .menu-btn { display: inline-grid; place-items: center; }
  .main { padding: 14px 16px 48px; }
  .page-title { font-size: 20px; }
}

/* ---------- Kartu, statistik, tabel ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: transparent; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.card > table.t, .card > div > table.t { margin: -6px -6px 0; width: calc(100% + 12px); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Form & tombol ---------- */
form.f { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea {
  font: inherit; font-weight: 500; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); width: 100%; min-height: 42px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
label.check { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 500; }
textarea { min-height: 76px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; }
legend { padding: 0 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px var(--font); min-height: 40px;
  padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--sunk); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.flash { padding: 12px 16px; border-radius: var(--r-s); margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: #e8f7ee; color: #14532d; }
.flash.error { background: #fdecec; color: #7f1d1d; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--muted); }
.pill.ok { background: #e8f7ee; color: #15803d; }
.pill.warn { background: #fef3e2; color: #b45309; }
.pill.bad { background: #fdecec; color: #b91c1c; }

/* ---------- Ringkasan: kartu outlet & aplikasi ---------- */
.outlet-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.outlet-card .logo { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 18px; object-fit: cover; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.app-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--sunk); color: var(--ink); font-weight: 600; }
.app-tile:hover { background: var(--brand-soft); text-decoration: none; }
.app-tile i { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font-style: normal; font-size: 17px; box-shadow: var(--shadow); }

/* ---------- Halaman masuk ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.center .card { width: 100%; max-width: 400px; padding: 30px 28px; border-radius: var(--r-l); box-shadow: var(--shadow-lg); }
.auth-logo { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; margin: 0 auto 12px; object-fit: cover; }
.center h1 { text-align: center; font-size: 20px; margin-bottom: 4px; display: block; }
.center .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.center .btn.primary { width: 100%; min-height: 46px; }

/* ---------- Kasir ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100vh; height: 100dvh; background: var(--bg); }
.pos header {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.pos header b { font-size: 16px; margin-right: 6px; }
.pos .left { display: flex; flex-direction: column; min-height: 0; }
.pos .scroll { overflow-y: auto; padding: 16px; flex: 1; }
.pos .panel { background: var(--surface); display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.pos > .left { grid-row: 2; }
.pos > .panel { grid-row: 2; }
.pos { grid-template-rows: auto minmax(0, 1fr); }

.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.tbl {
  position: relative; background: var(--surface); border-radius: var(--r); padding: 12px 14px; cursor: pointer; min-height: 96px; box-shadow: var(--shadow);
  border: 2px solid transparent; color: var(--ink); transition: border-color .12s, background .12s;
}
.tbl:hover { border-color: var(--line); }
.tbl .n { font-weight: 700; font-size: 16px; }
.tbl .small { font-size: 12px; }
.tbl.occupied { background: var(--brand-soft); }
.tbl.occupied .n { color: var(--brand-ink); }
.tbl.dirty { background: #fef6e7; }
.tbl.sel { border-color: var(--brand); }
.tbl .timer { font-size: 19px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tbl .timer.paused { color: var(--warn); }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mi { border: 0; border-radius: var(--r-s); background: var(--surface); padding: 12px; cursor: pointer; text-align: left; font: 600 14px var(--font); color: var(--ink); box-shadow: var(--shadow); min-height: 64px; }
.mi:hover { background: var(--brand-soft); }
.mi .small { font-weight: 500; }
.mi.off { opacity: .45; cursor: not-allowed; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.tabs button { border: 0; background: var(--surface); padding: 7px 14px; border-radius: 99px; font: 600 13px var(--font); cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.tabs button.on { background: var(--ink); color: #fff; }
.lines { flex: 1; overflow-y: auto; padding: 0 16px; }
.line { display: flex; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.line.void { text-decoration: line-through; opacity: .5; }
.totals { padding: 14px 16px; border-top: 1px solid var(--line); }
.totals .r { display: flex; justify-content: space-between; font-size: 14px; }
.totals .big { font-size: 22px; font-weight: 700; margin-top: 4px; }
.req { background: #fef6e7; padding: 10px 12px; border-radius: var(--r-s); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req.wait { background: var(--brand-soft); }

@media (max-width: 1100px) { .pos { grid-template-columns: minmax(0, 1fr) 330px; } }
@media (max-width: 820px) {
  .pos { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; height: auto; }
  .pos > .left, .pos > .panel { grid-row: auto; }
  .pos header { position: sticky; top: 0; z-index: 5; overflow-x: auto; flex-wrap: nowrap; }
  .pos header b { white-space: nowrap; }
  .pos .scroll { overflow: visible; }
  .pos .panel { border-left: 0; border-top: 1px solid var(--line); min-height: 50vh; }
  .tables { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .tbl { min-height: 84px; padding: 10px 12px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
  .totals { position: sticky; bottom: 0; background: var(--surface); }
}

dialog { border: 0; border-radius: var(--r-l); padding: 22px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(15, 23, 42, .4); }
dialog h2 { margin-top: 0; font-size: 18px; }

/* ---------- Dapur ---------- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; padding: 16px; }
.ticket { background: var(--surface); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); border-top: 4px solid var(--brand); }
.ticket.late { border-top-color: var(--bad); }
.ticket .it { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.ticket .it.ready { opacity: .45; text-decoration: line-through; }

/* ---------- TV antrean ---------- */
.queue { min-height: 100vh; background: #0f172a; color: #fff; display: grid; grid-template-columns: 1fr 1fr; }
.queue section { padding: 40px; }
.queue section + section { background: #131c33; }
.queue h2 { font-size: 30px; margin: 0 0 24px; color: #94a3b8; }
.queue .nums { display: flex; flex-wrap: wrap; gap: 16px; }
.queue .num { font-size: 60px; font-weight: 800; min-width: 150px; text-align: center; padding: 18px 20px; border-radius: 20px; background: #1e293b; }
.queue .ready .num { background: var(--brand); }
@media (max-width: 700px) { .queue { grid-template-columns: 1fr; } .queue .num { font-size: 40px; min-width: 100px; } }

/* ---------- Menu tamu ---------- */
.guest { max-width: 640px; margin: 0 auto; padding: 0 0 100px; min-height: 100vh; }
.guest header { background: var(--surface); padding: 22px 18px; border-bottom: 1px solid var(--line); }
.guest header div:first-child { font-size: 20px; font-weight: 700; }
.guest .cat { padding: 6px 18px; font-weight: 700; margin-top: 16px; }
.guest .item { display: flex; gap: 10px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; }
.guest .bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.guest .bar .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 8px; }

/* ---------- Struk ---------- */
.receipt { width: 300px; margin: 0 auto; font: 13px/1.45 ui-monospace, Consolas, monospace; padding: 14px; background: #fff; }
.receipt hr { border: 0; border-top: 1px dashed #999; }
@media print { .noprint { display: none !important; } body { background: #fff; } .shell { display: block; } .side, .topbar, .subtabs { display: none; } }

/* Halaman data (daftar + formulir) */
.crud-grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1100px) { .crud-grid { grid-template-columns: minmax(0, 1fr); } }
.add-jump { display: none; }
@media (max-width: 1100px) { .add-jump { display: inline-flex; } }

/* Kasir: segmen & menu akun */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--sunk); border-radius: 99px; }
.seg a { padding: 5px 14px; border-radius: 99px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg a:hover { color: var(--ink); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.menu-pop { position: relative; }
.menu-pop summary { list-style: none; }
.menu-pop summary::-webkit-details-marker { display: none; }
.menu-pop .pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px; background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 6px; display: grid;
}
.menu-pop .pop a, .menu-pop .pop button {
  display: block; text-align: left; padding: 9px 12px; border-radius: var(--r-s); color: var(--ink); font: 500 14px var(--font); background: none; border: 0; cursor: pointer; width: 100%;
}
.menu-pop .pop a:hover, .menu-pop .pop button:hover { background: var(--sunk); text-decoration: none; }
.menu-pop .pop button { color: var(--bad); }
@media (max-width: 820px) { .menu-pop .pop { position: fixed; right: 12px; top: 56px; } }
.pos-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pos-head b { font-size: 16px; margin-right: 6px; }

/* Penyesuaian layar kecil */
.outlet-card > .grow { flex: 1 1 220px; }
@media (max-width: 620px) {
  .outlet-card .btn { flex: 1 1 auto; }
  .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .app-tile { padding: 12px 10px; font-size: 13px; gap: 8px; }
  .tables { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tbl { padding: 10px; min-height: 80px; }
  .tbl .n { font-size: 15px; }
  .tbl .timer { font-size: 16px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 19px; }
  .card { padding: 14px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos header .btn.primary { padding: 5px 10px; }
}

/* ---------- Ikon (Lucide) ---------- */
.ic { flex: none; vertical-align: middle; stroke-width: 2; }
.side-nav a .ic { color: var(--muted); }
.side-nav a.on .ic { color: #fff; }
.side-apps a { display: inline-flex; align-items: center; gap: 5px; }
.side-foot a { display: inline-flex; align-items: center; gap: 8px; }
.page-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.iconbtn { display: inline-grid; place-items: center; color: var(--ink); }
.stat { position: relative; }
.stat-ic { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.app-tile i { font-style: normal; color: var(--brand-ink); }
/* Layar lebar: konten mengisi, grid nambah kolom */
@media (min-width: 1600px) {
  .page-title { font-size: 26px; }
  .tables { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 960px) { .page-ic { display: none; } }

/* ---------- Jadwal booking (timeline meja × jam) ---------- */
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.tl-nav { display: flex; align-items: center; gap: 6px; }
.tl-nav .iconbtn { text-decoration: none; }
.tl-date input { width: auto; min-height: 40px; }
.tl-sum { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 180px; }
.tl-card { padding: 0; overflow: hidden; }
.tl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl { --name-w: 150px; --hour-min: 84px; position: relative; min-width: calc(var(--name-w) + var(--hours) * var(--hour-min)); }
.tl-head, .tl-row { display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr); }
.tl-head { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-corner, .tl-name { position: sticky; left: 0; z-index: 3; background: var(--surface); border-right: 1px solid var(--line); }
.tl-corner { padding: 10px 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tl-hours { display: grid; grid-template-columns: repeat(var(--hours), minmax(0, 1fr)); }
.tl-hours span { padding: 10px 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tl-row { border-bottom: 1px solid var(--line); }
.tl-row:last-of-type { border-bottom: 0; }
.tl-name { padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; min-height: 60px; }
.tl-name b { font-size: 14px; }
.tl-name span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track {
  position: relative; min-height: 60px; cursor: copy;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to right, var(--sunk) 1px, transparent 1px);
  background-size: calc(100% / var(--hours)) 100%, calc(100% / var(--hours) / 2) 100%;
}
.tl-track:hover { background-color: color-mix(in srgb, var(--brand-soft) 35%, transparent); }
.tl-b {
  position: absolute; top: 6px; bottom: 6px; left: calc(100% * var(--s) / var(--hours)); width: calc(100% * var(--d) / var(--hours) - 3px);
  display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 4px 10px; text-align: left; overflow: hidden;
  z-index: 2; border: 0; border-left: 3px solid var(--brand); border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font: inherit; cursor: pointer;
}
.tl-b b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-b span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.tl-b:hover { filter: brightness(.97); }
.tl-b.s-arrived { background: #e3f6ea; border-left-color: #16a34a; color: #14532d; }
.tl-b.s-no_show { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--surface) 6px 12px); border-left-color: var(--faint); color: var(--muted); }
.tl-b.inline { position: static; width: auto; min-width: 160px; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 1; pointer-events: none;
  left: calc(var(--name-w) + (100% - var(--name-w)) * var(--s) / var(--hours)); }
.tl-now::before { content: ''; position: absolute; top: 0; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; background: var(--brand-soft); border-left: 3px solid var(--brand); }
.sw.s-arrived { background: #e3f6ea; border-left-color: #16a34a; }
.sw.s-no_show { background: var(--sunk); border-left-color: var(--faint); }
.tl-unassigned { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
dialog.sheet { width: min(520px, calc(100vw - 24px)); border: 0; border-radius: var(--r-l); padding: 20px; box-shadow: var(--shadow-lg); }
dialog.sheet::backdrop { background: rgba(15, 23, 42, .4); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 16px 0; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; font-weight: 500; }
@media (max-width: 620px) {
  .tl { --name-w: 96px; --hour-min: 68px; }
  .tl-name, .tl-corner { padding: 8px 10px; }
  .row2 { grid-template-columns: 1fr; }
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; }
}

/* ---------- Katalog menu ---------- */
.cat-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 260px; max-width: 460px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; border-radius: 99px; }
.cat-bar select { width: auto; min-width: 180px; border-radius: 99px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; padding-bottom: 2px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; list-style: none; }
.chip::-webkit-details-marker { display: none; }
.chip span { color: var(--muted); font-weight: 600; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on span { color: rgba(255,255,255,.7); }
.cat-settings { margin-left: auto; }
.cat-settings .pop { right: 0; left: auto; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
@media (min-width: 1600px) { .cat-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.mcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.mcard[hidden] { display: none; }
.mcard-photo { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; padding: 0; cursor: pointer; background: hsl(var(--h) 55% 93%); overflow: hidden; }
.mcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard-photo .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 700 30px var(--font); color: hsl(var(--h) 45% 38%); letter-spacing: .02em; }
.mcard-photo .flag { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(15,23,42,.72); color: #fff; }
.mcard-photo .flag.bad { background: var(--bad); }
.mcard.is-out .mcard-photo img, .mcard.is-out .mcard-photo .ph { filter: grayscale(1); opacity: .55; }
.fav { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--faint); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.fav.on { color: #f59e0b; }
.fav.on .ic { fill: currentColor; }
.mcard-body { padding: 12px 14px 4px; cursor: pointer; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mcard-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.mcard-meta { font-size: 12.5px; color: var(--muted); }
.mcard-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.mcard-foot b { flex: 1; font-variant-numeric: tabular-nums; }
.switch { display: flex; align-items: center; gap: 8px; padding: 8px 14px 12px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 34px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: #16a34a; }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch em { font-style: normal; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 20px; color: var(--muted); }
.empty b { color: var(--ink); font-size: 16px; }
.empty p { margin: 0 0 6px; }
/* Laci kanan (desktop) / lembar bawah (HP) */
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw); max-width: 100vw; border-radius: 0; padding: 0; overflow: hidden; }
dialog.drawer[open] { display: flex; }
dialog.drawer > form.f { display: flex; flex-direction: column; gap: 0; width: 100%; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { flex: 1; margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 14px; align-content: start; }
.drawer-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.photo-pick { display: flex; gap: 14px; align-items: center; }
.photo-prev { width: 112px; height: 112px; border-radius: var(--r); background: var(--sunk); display: grid; place-items: center; color: var(--muted); overflow: hidden; flex: none; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; }
.cashier-main { margin: 0 auto; }
@media (max-width: 620px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mcard-body { padding: 10px 10px 2px; }
  .switch { padding: 6px 10px 10px; }
  .cat-bar select { flex: 1; }
  dialog.drawer { margin: auto 0 0; height: 92dvh; width: 100vw; border-radius: 18px 18px 0 0; }
}
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.sec-head { display: flex; gap: 12px; align-items: flex-start; }
.sec-head p { margin: 2px 0 0; }
.hint { font-weight: 500; font-size: 12px; color: var(--faint); }
.clean { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* ---------- Kasir: foto menu, tanda waktu, reward ---------- */
.seg a { display: inline-flex; align-items: center; gap: 6px; }
.tabs button { display: inline-flex; align-items: center; gap: 5px; }
.tbl .tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--sunk); color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .tag.warn { background: #fef3e2; color: #b45309; }
.tbl .tag.bad { background: #fdecec; color: #b91c1c; }
.tbl.soon { box-shadow: inset 0 0 0 2px #f59e0b; }
.tbl.over { box-shadow: inset 0 0 0 2px var(--bad); animation: pulse-over 1.6s ease-in-out infinite; }
@keyframes pulse-over { 50% { box-shadow: inset 0 0 0 2px transparent; } }
.menu-grid.with-photo { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.menu-grid.with-photo .mi { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.mi .mi-ph { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--sunk); overflow: hidden; }
.mi .mi-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mi .mi-ph i { position: absolute; inset: 0; display: grid; place-items: center; font: 700 22px var(--font); font-style: normal; color: var(--faint); }
.mi .mi-ph em { position: absolute; left: 6px; bottom: 6px; padding: 1px 8px; border-radius: 99px; font: 700 11px var(--font); font-style: normal; background: rgba(15,23,42,.72); color: #fff; }
.mi .mi-ph em.low { background: #b45309; }
.mi .mi-ph s { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.92); color: #f59e0b; display: grid; place-items: center; text-decoration: none; }
.mi .mi-ph s .ic { fill: currentColor; }
.mi.off .mi-ph img { filter: grayscale(1); opacity: .5; }
.menu-grid.with-photo .mi-t { padding: 8px 10px 0; line-height: 1.25; }
.menu-grid.with-photo .mi > .small { padding: 2px 10px 10px; }
.mi-t { display: block; }
.pill.tier { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--tc) 16%, white); color: color-mix(in srgb, var(--tc) 80%, black); }
.reward-opt { justify-content: space-between; width: 100%; border-radius: var(--r-s); min-height: 52px; text-align: left; }
.pos header .btn { gap: 6px; }
@media (max-width: 620px) {
  .menu-grid.with-photo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg a .ic { display: none; }
}
.blist { padding: 4px 16px; }
.bl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bl-row:last-child { border-bottom: 0; }
.bl-time { display: flex; flex-direction: column; min-width: 64px; font-variant-numeric: tabular-nums; }
.bl-main { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.bl-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Kontrol formulir bersama (segmen, saklar, input bersatuan) ---------- */
.lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: -6px; }
.sec-title { font-size: 15px; display: block; padding-bottom: 12px; margin: -2px -18px 4px; padding-left: 18px; border-bottom: 1px solid var(--line); }
.segbar { display: flex; padding: 3px; background: var(--sunk); border-radius: 99px; gap: 2px; }
.segbar label { flex: 1; display: block; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.segbar input { position: absolute; opacity: 0; pointer-events: none; }
.segbar span { display: block; text-align: center; padding: 7px 10px; border-radius: 99px; white-space: nowrap; }
.segbar input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segbar input:focus-visible + span { outline: 2px solid var(--brand); }
.tabs-u { display: flex; gap: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-u label { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs-u input { position: absolute; opacity: 0; }
.tabs-u span { display: block; padding: 8px 2px 10px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-u input:checked + span { color: var(--ink); border-bottom-color: var(--brand); }
.inp-unit { position: relative; display: flex; align-items: center; }
.inp-unit input { padding-right: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.inp-unit span { position: absolute; right: 12px; font-size: 12.5px; color: var(--faint); font-weight: 600; pointer-events: none; }
label.toggle { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; color: var(--ink); cursor: pointer; }
label.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
label.toggle > span { width: 36px; height: 22px; border-radius: 99px; background: var(--line); position: relative; flex: none; margin-top: 1px; transition: background .15s; }
label.toggle > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
label.toggle input:checked + span { background: var(--brand); }
label.toggle input:checked + span::after { transform: translateX(14px); }
label.toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
label.toggle b { display: block; font-size: 14px; font-weight: 600; }
label.toggle small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; margin-top: 2px; }
.day-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.day-pick label { cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; }
.day-pick span { display: inline-block; min-width: 52px; text-align: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink); }
.day-pick input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.mono { font-variant-numeric: tabular-nums; }
.iconbtn.sm { width: 32px; height: 32px; border-radius: 9px; }
[hidden] { display: none !important; }

/* ---------- Sewa ---------- */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rt-card { display: grid; gap: 8px; color: var(--ink); align-content: start; }
.rt-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.rt-card.is-off { opacity: .6; }
.rt-price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.rt-price b { font-size: 22px; }
.rt-sched { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 13px; }
.rt-sched li { display: flex; justify-content: space-between; gap: 8px; }
.rt-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.rt-col { display: grid; gap: 14px; }
.rt-side { position: sticky; top: 16px; }
.preview-amt { font-size: 26px; font-weight: 800; margin-top: 10px; }
.pv-chip { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font-weight: 600; }
.side-actions { display: grid; gap: 8px; margin-top: 16px; }
.preset-list { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.preset-list label { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: 14px; cursor: pointer; }
.preset-list label:last-child { border-bottom: 0; }
.preset-list label:has(input:checked) { background: var(--brand-soft); font-weight: 600; }
.rate-table { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.rt-head, .rt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 10px 12px; }
.rt-head { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--sunk); }
.rt-row { border-top: 1px solid var(--line); font-size: 14px; }
.rt-row b { display: block; font-weight: 600; }
.rt-row small { color: var(--muted); font-size: 12px; }
.rt-row.base { background: color-mix(in srgb, var(--sunk) 50%, transparent); }
.rt-row input { min-height: 38px; text-align: right; }
.rules-box { border: 1px solid var(--line); border-radius: var(--r-s); }
.rules-box > b { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rb-row { display: grid; grid-template-columns: 1fr 110px 44px; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); font-weight: 500; }
.rb-row:last-child { border-bottom: 0; }
.rb-row input { min-height: 36px; text-align: right; }
.rb-row em { font-style: normal; font-size: 12.5px; color: var(--faint); }
dialog.sched-dlg { width: min(1100px, calc(100vw - 24px)); max-width: none; padding: 0; overflow: hidden; }
.sched-wrap { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.sched-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); overflow-y: auto; }
.sched-form { padding: 20px; border-right: 1px solid var(--line); }
.sched-sum { padding: 12px 14px; background: var(--sunk); border-radius: var(--r-s); font-size: 14px; line-height: 1.5; }
.week-card { padding: 20px; background: var(--sunk); }
.week { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; margin: 12px 0; padding: 14px; background: var(--surface); border-radius: var(--r); }
.week .hh { font-size: 10.5px; color: var(--muted); text-align: left; font-variant-numeric: tabular-nums; }
.week .dd { font-size: 12px; font-weight: 600; color: var(--muted); align-self: center; }
.wk { display: inline-block; aspect-ratio: 1; min-height: 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); padding: 0; cursor: pointer; }
.wk.has { background: #cbd5e1; border-color: #cbd5e1; }
.wk.cur { background: var(--brand); border-color: var(--brand); }
.wk.clash { background: repeating-linear-gradient(135deg, #fecaca 0 3px, #ef4444 3px 5px); border-color: #ef4444; }
.wk.over { background: repeating-linear-gradient(135deg, #ddd6fe 0 3px, #8b5cf6 3px 5px); border-color: #8b5cf6; }
.wk.pick { outline: 2px solid var(--ink); }
.week-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.week-legend span { display: inline-flex; align-items: center; gap: 6px; }
.week-legend .wk { width: 14px; cursor: default; }
@media (max-width: 1200px) { .rt-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rt-side { grid-column: 1 / -1; position: static; } }
@media (max-width: 860px) { .rt-edit { grid-template-columns: minmax(0, 1fr); } .sched-body { grid-template-columns: 1fr; } .sched-form { border-right: 0; } }

/* ---------- Promo ---------- */
.plist { padding: 4px 18px; }
.prow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); min-width: 0; }
.prow-main:hover { text-decoration: none; }
.prow-main:hover b { color: var(--brand-ink); }
.prow-main .ic { vertical-align: -2px; }
.prow-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prow .switch { padding: 0; }
.promo-edit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; max-width: 1200px; }
.tiers { display: grid; gap: 8px; }
@media (max-width: 960px) { .promo-edit { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================
   Kasir v0.7 — kategori kiri, katalog tengah, tiket kanan, daftar tiket paling kanan
   ========================================================== */
.ks { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.ks-top { flex: none; height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ks-brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ks-brand small { font: 500 10px var(--font); color: var(--faint); font-variant-numeric: tabular-nums; }
.ks-brand b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbtn { position: relative; width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font: 700 13px var(--font); list-style: none; text-decoration: none; }
.kbtn::-webkit-details-marker { display: none; }
.kbtn:hover { background: var(--sunk); text-decoration: none; }
.kbtn.sm { width: 34px; height: 34px; border-radius: 10px; }
.kbtn.xs { width: 30px; height: 30px; border-radius: 9px; border-color: transparent; color: var(--muted); }
.kbtn.xs:hover { color: var(--ink); }
.kbtn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font: 700 11px var(--font); display: grid; place-items: center; }
.kbtn .dot:empty { min-width: 10px; height: 10px; padding: 0; top: 4px; right: 4px; }
.kbtn .dot.warn { background: #f59e0b; }
.ks-new { min-height: 42px; padding: 8px 18px; border-radius: 12px; font-size: 15px; }
.ks-top .menu-pop .pop { right: 0; left: auto; min-width: 240px; }
.pop-head { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-pop .pop button, .menu-pop .pop a { display: flex; align-items: center; gap: 10px; }

.ks-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 128px; }
.ks[data-mode="order"] .ks-body { grid-template-columns: minmax(0, 1fr) 360px 128px; }
.ks[data-mode="floor"] .ks-order, .ks[data-mode="floor"] .ks-ticket { display: none; }
.ks[data-mode="order"] .ks-floor { display: none; }
.ks-mobnav { display: none; }

/* Denah */
.ks-floor { overflow-y: auto; padding: 14px 16px 24px; min-height: 0; }
.ks-zones { display: flex; padding: 3px; background: var(--sunk); border-radius: 12px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.ks-zones button { flex: 1; border: 0; background: none; padding: 10px 14px; border-radius: 9px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; }
.ks-zones button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ks-floor-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.small-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px; }
.small-seg { flex: none; }
.notice { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-s); margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.notice.bad { background: #fdecec; color: #991b1b; }
.ks-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ks-tables.denah { display: block; }
.denah-z { margin: 10px 0 6px; }
.denah-box { position: relative; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tbl { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; min-height: 112px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-family: var(--font); }
.tbl:hover { border-color: var(--faint); }
.tbl:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tbl .t-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tbl .t-name { font-weight: 700; font-size: 17px; }
.tbl .t-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); }
.tbl .t-timer { font-size: 20px; font-weight: 700; margin-top: auto; }
.tbl .t-timer.paused { color: #f59e0b; }
.tbl .t-amt { font-size: 13px; font-weight: 600; opacity: .85; }
.tbl .t-tag { font-size: 12px; font-weight: 600; }
.tbl .t-book { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: auto; }
.tbl.occupied { background: #1b1f27; border-color: #1b1f27; color: #fff; }
.tbl.occupied .t-ic { background: rgba(255,255,255,.14); color: #fff; }
.tbl.dirty { background: #fff7e6; border-color: #f5d79e; }
.tbl.dirty .t-ic { background: #fde7b0; color: #92400e; }
.tbl.dirty .t-tag { color: #92400e; }
.tbl.soon { box-shadow: 0 0 0 3px #f59e0b; }
.tbl.soon .t-tag { color: #fbbf24; }
.tbl.over { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.tbl.over .t-ic { background: rgba(255,255,255,.2); color: #fff; }
.tbl.sel { box-shadow: 0 0 0 3px var(--brand); }

/* Katalog */
.ks-order { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
.ks-cats { overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.ks-cats button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); font: 500 14px var(--font); color: var(--ink); }
.ks-cats button:hover { background: var(--sunk); }
.ks-cats button.on { background: var(--sunk); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.ks-cats button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ks-cats .cat-back { color: var(--muted); font-size: 13px; }
.ks-catalog { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ks-search { padding: 12px 14px 0; }
.ks-search .search { max-width: none; }
.ks-search input { border-radius: 12px; }
.ks-grid { flex: 1; overflow-y: auto; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; align-content: start; }
.mc { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 100px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-family: var(--font); color: var(--ink); overflow: hidden; }
.mc:hover { border-color: var(--faint); }
.mc:active { transform: scale(.98); }
.mc:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.mc.has-ph { padding: 0 0 12px; }
.mc.has-ph img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.mc.has-ph .mc-name, .mc.has-ph .mc-foot { padding: 0 14px; }
.mc-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.mc-foot { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.mc-foot em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.mc-foot em.low { color: #b45309; }
.mc-count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12.5px; }
.mc.off { background: var(--sunk); color: var(--muted); cursor: not-allowed; }
.ks-manual { padding: 10px 14px 14px; border-top: 1px solid var(--line); background: var(--bg); }
.ks-manual .btn { width: 100%; border-radius: 12px; }

/* Panel tiket */
.ks-ticket { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.tk-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tk-head > b { font-size: 18px; }
.tk-member { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tk-member .btn { gap: 6px; }
.mem-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-lines { flex: 1; overflow-y: auto; min-height: 0; }
.tk-empty { display: flex; flex-direction: column; gap: 2px; padding: 16px 14px; }
.tk-line { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tk-line.void { opacity: .45; text-decoration: line-through; }
.tk-line.draft { background: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.tk-l1 { display: flex; align-items: center; gap: 8px; }
.tk-l1 .q { color: var(--muted); font-weight: 600; min-width: 26px; }
.tk-l1 b { font-weight: 600; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tk-mod { margin: 2px 0 0 34px; font-size: 13px; color: var(--muted); }
.tk-st { margin: 3px 0 0 34px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tk-st.s-draft { color: var(--brand-ink); }
.tk-st.s-cooking { color: #b45309; }
.tk-st.s-ready { color: #15803d; }
.tk-l3 { display: flex; justify-content: space-between; margin: 4px 0 0 34px; font-size: 13px; color: var(--muted); }
.tk-l3 span:last-child { color: var(--ink); font-weight: 700; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; font-size: 18px; font-weight: 700; color: var(--ink); }
.stepper button:hover { background: var(--sunk); }
.stepper input { width: 52px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; min-height: 40px; padding: 0; }
.stepper.sm button { width: 30px; height: 30px; font-size: 16px; }
.stepper.sm span { min-width: 26px; text-align: center; font-weight: 700; font-size: 13.5px; }
.tk-sess { margin: 10px 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.tk-sess.ended { background: var(--sunk); }
.tk-sess .row { align-items: flex-start; flex-wrap: nowrap; }
.tk-sess-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.tk-clock { font-size: 22px; font-weight: 800; }
.tk-clock.paused { color: #b45309; }
.tk-sess-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tk-sess-btns .btn { gap: 4px; }
.tk-sess + .tk-line, .tk-sess + .tk-empty { margin-top: 10px; border-top: 1px solid var(--line); }
.linkish { all: unset; cursor: pointer; color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tk-send { padding: 0 14px; }
.send-btn { width: 100%; margin: 10px 0; min-height: 50px; border-radius: 12px; font-size: 15px; justify-content: flex-start; gap: 10px; }
.tk-foot { border-top: 1px solid var(--line); padding: 4px 14px 14px; display: grid; gap: 8px; }
.tk-detail-toggle { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 0; font-size: 13.5px; color: var(--muted); }
.tk-detail-toggle[aria-expanded="true"] .ic { transform: rotate(180deg); }
.tk-detail { display: grid; gap: 4px; font-size: 13.5px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.tk-detail .r { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.tk-detail .r.promo { color: #15803d; }
.badge { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #dcfce7; color: #166534; margin-right: 6px; }
.tk-total { display: flex; align-items: center; gap: 8px; }
.tk-total b { font-size: 18px; }
.tk-total .mono { font-size: 22px; }
.tk-btns { display: flex; gap: 8px; }
.tk-btns .btn { flex: 1; border-radius: 12px; min-height: 44px; }
.tk-btns .btn.icon-only { flex: none; width: 44px; padding: 0; }
.tk-pay { width: 100%; min-height: 54px; border-radius: 12px; justify-content: space-between; font-size: 16px; padding: 0 18px; }

/* Daftar tiket */
.ks-rail { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.rail-head { display: flex; align-items: center; gap: 6px; padding: 14px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.rail-list { flex: 1; overflow-y: auto; }
.rail-item { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-family: var(--font); color: var(--ink); }
.rail-item:hover { background: var(--sunk); }
.rail-item.on { background: var(--sunk); box-shadow: inset 3px 0 0 var(--brand); }
.rail-item b { font-size: 14px; }
.rail-item span { font-size: 11.5px; color: var(--muted); }
.rail-item .strong { color: var(--ink); font-weight: 700; font-size: 12px; }
.rail-foot { display: flex; align-items: center; gap: 6px; padding: 14px 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }

/* Dialog kasir */
dialog.sheet.wide { width: min(760px, calc(100vw - 24px)); }
.takeaway-btn { width: 100%; min-height: 52px; border-radius: 12px; justify-content: flex-start; gap: 10px; margin-bottom: 12px; font-size: 15px; }
.new-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; }
.new-t { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-family: var(--font); }
.new-t:hover { border-color: var(--brand); background: var(--brand-soft); }
.new-t:focus-visible { outline: 2px solid var(--brand); }
.opt-group { border: 0; padding: 0; margin: 0 0 12px; }
.opt-group legend { font-size: 12.5px; font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 8px; }
.opt-group .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; overflow: visible; }
.opt { cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.opt input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.opt input:disabled + span { opacity: .45; }
.opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.mod-foot { display: flex; gap: 10px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
#modSubmit { justify-content: space-between; min-height: 44px; border-radius: 12px; }
dialog.pay { width: min(720px, calc(100vw - 24px)); }
.pay-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
.pay-methods { display: grid; gap: 6px; align-content: start; }
.pay-methods label { cursor: pointer; }
.pay-methods input { position: absolute; opacity: 0; }
.pay-methods span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.pay-methods input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.pay-methods input:focus-visible + span { outline: 2px solid var(--brand); }
.pay-calc { display: grid; gap: 12px; align-content: start; }
.pay-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.pay-row.big b { font-size: 26px; }
.pay-row b { font-size: 18px; }
.pay-calc input[name=amount] { font-size: 20px; font-weight: 700; min-height: 50px; }
.pay-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-box { display: grid; place-items: center; padding: 10px; }
.qr-box svg { width: 240px; height: 240px; }
.bell-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.more-list { display: grid; gap: 8px; margin-top: 12px; }
.more-list .btn { justify-content: flex-start; gap: 10px; border-radius: 12px; min-height: 48px; }

/* Tablet */
@media (max-width: 1180px) {
  .ks-body { grid-template-columns: minmax(0, 1fr) 108px; }
  .ks[data-mode="order"] .ks-body { grid-template-columns: minmax(0, 1fr) 330px 108px; }
  .ks-order { grid-template-columns: 160px minmax(0, 1fr); }
  .ks-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
}
@media (max-width: 1000px) {
  .ks-order { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .ks-cats { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .ks-cats button { border-bottom: 0; white-space: nowrap; padding: 12px 14px; }
  .ks-cats button.on { box-shadow: inset 0 -3px 0 var(--brand); }
}
/* HP & tablet tegak: satu panel penuh + navigasi bawah */
@media (max-width: 820px) {
  .ks-body, .ks[data-mode="order"] .ks-body { grid-template-columns: minmax(0, 1fr); }
  .ks-floor, .ks-order, .ks-ticket, .ks-rail { display: none !important; }
  .ks[data-view="floor"] .ks-floor { display: block !important; }
  .ks[data-view="order"] .ks-order { display: grid !important; }
  .ks[data-view="ticket"] .ks-ticket { display: flex !important; border-left: 0; }
  .ks[data-view="rail"] .ks-rail { display: flex !important; border-left: 0; }
  .ks-mobnav { display: grid; grid-template-columns: repeat(4, 1fr); flex: none; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .ks-mobnav button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font: 600 11.5px var(--font); color: var(--muted); text-align: center; min-width: 0; }
  .ks-mobnav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ks[data-view="floor"] [data-view="floor"], .ks[data-view="order"] [data-view="order"], .ks[data-view="ticket"] [data-view="ticket"], .ks[data-view="rail"] [data-view="rail"] { color: var(--brand-ink); }
  .ks[data-mode="floor"] [data-view="order"], .ks[data-mode="floor"] [data-view="ticket"] { opacity: .4; }
  .ks-new span { display: none; }
  .ks-new { padding: 0; width: 42px; }
  .ks-top { padding: 0 10px; gap: 6px; }
  .ks-top .kbtn { width: 38px; height: 38px; }
  .ks-tables { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .tbl { min-height: 96px; padding: 10px; }
  .tbl .t-timer { font-size: 17px; }
  .ks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .pay-grid { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pay-methods span { flex-direction: column; gap: 4px; padding: 10px 6px; font-size: 12.5px; text-align: center; }
  .rail-item { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 14px 16px; }
  .rail-item .strong { margin-left: auto; }
}
.tbl .t-book { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tbl .t-book .ic { vertical-align: -2px; margin-right: 4px; }

/* ---------- Layar dapur ---------- */
.kd { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.kd .ks-top { position: sticky; top: 0; z-index: 5; }
.kd-st { max-width: 520px; overflow-x: auto; scrollbar-width: none; }
.kd-st label { flex: none; }
.kd-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kd-conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.kd-conn.ok i { background: #16a34a; }
.kd-conn.bad { color: var(--bad); }
.kd-conn.bad i { background: var(--bad); }
.muted-btn { color: var(--faint); }
.kd-sum { padding: 12px 16px 0; font-size: 14px; color: var(--muted); }
.kd-sum b { color: var(--ink); }
.kd-board { flex: 1; padding: 12px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-content: start; }
.kc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.kc > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.kc-where { display: block; font-size: 20px; }
.kc-sub { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kc-age { font-size: 28px; font-weight: 800; line-height: 1; text-align: right; }
.kc-age small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.kc.warn > header { background: #fff7e6; }
.kc.warn .kc-age { color: #b45309; }
.kc.late { border-color: #ef4444; }
.kc.late > header { background: #fdecec; }
.kc.late .kc-age { color: #b91c1c; }
.kc ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.ki { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
.ki:last-child { border-bottom: 0; }
.ki:hover { background: var(--sunk); }
.ki:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ki-q { min-width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.ki-n { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ki-n b { font-size: 16px; }
.ki-n em { font-style: normal; font-size: 13.5px; color: var(--muted); }
.ki-note { font-size: 13.5px; font-weight: 600; color: #b91c1c; }
.ki-s { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); flex: none; }
.ki.s-cooking { background: #fff7e6; }
.ki.s-cooking .ki-s { color: #b45309; }
.ki.s-ready { opacity: .5; }
.ki.s-ready .ki-n b { text-decoration: line-through; }
.ki.s-ready .ki-s { background: #16a34a; color: #fff; }
.kc > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.kd-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 4px; padding: 80px 20px; text-align: center; }
.kd-empty b { font-size: 18px; }
.kd-done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px 16px; border-top: 1px solid var(--line); background: var(--surface); position: sticky; bottom: 0; }
.kd-done #done { display: flex; flex-wrap: wrap; gap: 6px; }
.kd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font: 600 13px var(--font); cursor: pointer; color: var(--ink); }
.sold-list { max-height: 60vh; overflow-y: auto; }
.sold-row { display: flex !important; flex-direction: row; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: 14px; }
.sold-row .switch { padding: 0; }
@media (max-width: 820px) {
  .kd .ks-top { flex-wrap: wrap; height: auto; padding: 8px 10px; }
  .kd-st { order: 10; max-width: none; width: 100%; }
  .kd-conn span { display: none; }
  .kd-board { grid-template-columns: 1fr; padding: 10px; }
}
.tl-b.s-late { background: #fdecec; border-left-color: var(--bad); color: #991b1b; }
.tbl .t-book.held { color: #b45309; font-weight: 700; }
.segl { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.segl:hover { text-decoration: none; color: var(--ink); }
.segl.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 620px) { .segl .ic { display: none; } }
@media (max-width: 620px) {
  .segbar span { white-space: normal; padding: 7px 6px; line-height: 1.25; }
  .rt-head { display: none; }
  .rt-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .rt-row > span:first-child { grid-column: 1 / -1; }
  .rb-row { grid-template-columns: minmax(0, 1fr) 84px 38px; }
  .preview-amt { font-size: 22px; }
  .week { padding: 8px; gap: 2px; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); }
  .wk { min-height: 9px; border-radius: 2px; }
}
@media (max-width: 620px) { .sec-title { margin: -2px -14px 4px; padding-left: 14px; } }
.rt-col { grid-template-columns: minmax(0, 1fr); }
.auth-logo.img { width: 56px; height: 56px; object-fit: cover; padding: 0; }
.brand-foot { text-align: center; margin: 14px 0 0; letter-spacing: .02em; color: var(--faint); }
.store-url { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-s); background: var(--brand-soft); }
.store-url a { font-weight: 700; font-size: 15px; word-break: break-all; }
.notice.warn { background: #fef3e2; color: #92400e; }
.notice.info { background: var(--brand-soft); color: var(--brand-ink); }
.notice form { margin: 0; }
.ks-sub { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.ks-sub.soon { background: #fef3e2; color: #92400e; }
.ks-sub.grace { background: #fdecec; color: #991b1b; }

/* ---------- Ops Console ---------- */
.ops-side { background: #111827; border-right-color: #111827; color: #e5e7eb; }
.ops-side .side-title b { color: #fff; }
.ops-side .side-title span, .ops-side .muted { color: #9ca3af; }
.ops-side .side-nav a { color: #d1d5db; }
.ops-side .side-nav a .ic { color: #9ca3af; }
.ops-side .side-nav a:hover { background: rgba(255,255,255,.06); }
.ops-side .side-nav a.on { background: #fff; color: #111827; }
.ops-side .side-nav a.on .ic { color: #111827; }
.ops-side .side-foot { color: #e5e7eb; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.ops-side .linkbtn { color: #9ca3af; }
.ops-logo { background: #111827 !important; color: #34d399 !important; display: grid; place-items: center; border-radius: 10px !important; }
.ops-side .ops-logo { background: #1f2937 !important; }
.ops-login .auth-logo { margin: 0 auto 14px; width: 52px; height: 52px; }
.ops-bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; margin-top: 14px; }
.ops-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.ops-bars i { width: 100%; max-width: 44px; border-radius: 8px; background: #d1d5db; display: block; }
.ops-bars i.now { background: #111827; }
.ops-list { display: grid; margin-top: 8px; }
.ops-li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.ops-li:last-child { border-bottom: 0; }
.ops-li:hover { text-decoration: none; }
.ops-li:hover b { color: var(--brand-ink); }
.pill.st-active { background: #e8f7ee; color: #15803d; }
.pill.st-trial { background: var(--brand-soft); color: var(--brand-ink); }
.pill.st-suspended, .pill.st-cancelled { background: #fdecec; color: #b91c1c; }
.warn-text { color: #b45309; font-weight: 600; }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li div { display: flex; flex-direction: column; gap: 1px; }
.checks li.ok .ic { color: #16a34a; }
.checks li.bad .ic { color: var(--bad); }
.big-pass { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.cred textarea { font: 500 13px var(--font); }
.plan-box { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px; }
.inv-print { max-width: 760px; margin: 40px auto; padding: 32px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.inv-print hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.chips a.chip { text-decoration: none; }
.toasts { position: fixed; top: 70px; right: 14px; z-index: 60; display: grid; gap: 8px; width: min(380px, calc(100vw - 28px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); border-left: 4px solid var(--brand); animation: toast-in .18s ease-out; }
.toast b { display: block; font-size: 14.5px; }
.toast span { display: block; font-size: 13px; color: var(--muted); }
.toast.warn { border-left-color: #f59e0b; }
.toast.bad { border-left-color: var(--bad); background: #fff5f5; }
@keyframes toast-in { from { transform: translateY(-6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Studio denah */
.fl-head { gap: 10px; flex-wrap: wrap; }
.fl-zone { margin-top: 18px; }
.fl-zone-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fl-zone-head h2 { margin: 0; }
.fl-canvas { position: relative; height: 440px; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; overflow: auto; cursor: copy; }
.ft { position: absolute; border: 2px solid var(--brand); border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-weight: 700; cursor: move; user-select: none; touch-action: none; resize: both; overflow: hidden; }
.ft.sel { box-shadow: 0 0 0 3px var(--brand); }
.ft:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.fl-insp { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(340px, calc(100vw - 32px)); display: grid; gap: 12px; padding: 16px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.fl-insp h3 { margin: 0; }
.fl-insp[hidden] { display: none; }
.pill.st-pending { background: #fff4e5; color: #b45309; }
