/* ============================================================
   Bilaz Studio — POS Laundry
   Design system bertema: DARK (default) & LIGHT
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Font template: Poppins */
@font-face {
  font-family: "Poppins";
  src: url("/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* ===== DARK (default) — mengikuti theme.jsx ===== */
  --bg: #0B0B0F;
  --bg-soft: #15151B;
  --sidebar: #15151B;
  --panel: #15151B;
  --panel-2: #1E1E26;
  --panel-3: #2a2a33;
  --ink: #FAFAFA;
  --ink-soft: rgba(255,255,255,0.72);
  --muted: rgba(255,255,255,0.48);
  --line: rgba(255,255,255,0.08);
  --line-soft: rgba(255,255,255,0.05);

  --accent: #00F2EA;
  --accent-2: #00cfc8;
  --accent-ink: #001a19;
  --accent-soft: rgba(0,242,234,0.14);

  --yellow: #FFB800;  --yellow-ink: #FFB800;
  --green: #00D26A;   --green-ink: #00D26A;
  --red: #FF4757;     --red-ink: #FF6b75;
  --blue: #4FACFE;

  --status-active-bg: rgba(255,184,0,0.12);
  --status-ready-bg: rgba(0,210,106,0.12);

  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 16px 40px rgba(0,0,0,0.45);
  --shadow-soft: 0 8px 22px rgba(0,0,0,0.30);
  --ring: 0 0 0 3px var(--accent-soft);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #FAFAF7;
  --bg-soft: #F1F0EB;
  --sidebar: #F1F0EB;
  --panel: #ffffff;
  --panel-2: #F1F0EB;
  --panel-3: #E8E6DF;
  --ink: #0B0B0F;
  --ink-soft: rgba(0,0,0,0.70);
  --muted: rgba(0,0,0,0.45);
  --line: rgba(0,0,0,0.08);
  --line-soft: rgba(0,0,0,0.05);

  --accent: #06C5BD;
  --accent-2: #03A39C;
  --accent-ink: #00221f;
  --accent-soft: rgba(6,197,189,0.14);

  --yellow: #C98A00;  --yellow-ink: #9a6a00;
  --green: #00A957;   --green-ink: #008a47;
  --red: #E03B49;     --red-ink: #c22634;
  --blue: #2f7ad6;

  --status-active-bg: rgba(255,184,0,0.14);
  --status-ready-bg: rgba(0,169,87,0.12);

  --shadow: 0 14px 34px rgba(11,11,15,0.10);
  --shadow-soft: 0 8px 22px rgba(11,11,15,0.07);
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: calc(18px * var(--fs));
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  transition: background .2s ease, color .2s ease;
}
button, .btn, .svc-card, .tile, .cat-tab, .nav-item { user-select: none; }
a { color: inherit; }

/* Skala ukuran FONT saja (tombol A- / A+) — layout/ikon/jarak tetap */
:root { --fs: 1; }

/* kontrol ukuran font di topbar */
.fontsize-ctl { display: inline-flex; gap: 4px; }
.fontsize-ctl button {
  width: 40px; height: 52px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font-weight: 800; font-size: calc(15px * var(--fs)); cursor: pointer; line-height: 1;
}
.fontsize-ctl button:active { transform: scale(.95); }

/* ============================================================
   APP SHELL — sidebar + content
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 96px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sb-logo {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: calc(26px * var(--fs)); color: var(--accent-ink);
  margin-bottom: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.sb-logo img { width: 100%; height: 100%; object-fit: cover; }
.sb-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: center; flex: 1; }
.nav-item {
  width: 72px;
  padding: 8px 6px;
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: calc(11.5px * var(--fs)); font-weight: 600;
  border: none; background: none; cursor: pointer;
  transition: color .15s ease;
}
.nav-item .ni-ico {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(20px * var(--fs)); line-height: 1;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}
.nav-item .ni-ico svg { width: 22px; height: 22px; display: block; }
.nav-item:hover { color: var(--ink-soft); }
.nav-item:hover .ni-ico { background: var(--panel-3); }
.nav-item.active { color: var(--accent); }
.nav-item.active .ni-ico {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 18px -6px var(--accent-soft), inset 0 1px 1px rgba(255,255,255,0.35);
  transform: translateY(-1px);
}
.sb-bottom { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.sb-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: calc(17px * var(--fs));
  text-decoration: none;
}

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

/* ===== App header (per halaman) ===== */
.appbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px clamp(16px, 2.4vw, 30px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
}
.appbar .menu-btn { display: none; }
.ab-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; line-height: 1.1; }
.ab-sub { font-size: calc(14px * var(--fs)); color: var(--muted); font-weight: 500; }
.ab-spacer { flex: 1; }
.ab-tools { display: flex; align-items: center; gap: 12px; }

/* chip info (kasir/shift) */
.ab-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 14px; text-decoration: none;
}
.ab-chip .c-meta b { display: block; font-size: calc(15px * var(--fs)); }
.ab-chip .c-meta small { font-size: calc(12px * var(--fs)); color: var(--muted); }
.ab-chip .c-ava {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--yellow), #ef8e2d); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(14px * var(--fs));
}

/* theme toggle */
.theme-toggle {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font-size: calc(22px * var(--fs)); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:active { transform: scale(.95); }

main.page { padding: clamp(16px, 2.4vw, 30px); flex: 1; }
.wrap { max-width: 1400px; margin: 0 auto; }

/* judul dalam halaman (untuk halaman tanpa appbar title) */
.page-title { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 6px; }
.page-sub { color: var(--muted); font-size: clamp(15px, 2vw, 18px); margin-bottom: 22px; }

/* ============================================================
   Flash / alert
   ============================================================ */
.flash {
  background: linear-gradient(135deg, var(--green), var(--accent-2));
  color: #042; padding: 16px 20px; border-radius: 14px;
  font-size: calc(18px * var(--fs)); font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
[data-theme="dark"] .flash { color: #021614; }
.alert-error {
  background: color-mix(in srgb, var(--red) 16%, var(--panel));
  color: var(--red-ink);
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
  padding: 14px 18px; border-radius: 12px; font-size: calc(17px * var(--fs)); font-weight: 600; margin-bottom: 16px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  border: none; border-radius: 14px; padding: 16px 22px;
  font-size: calc(19px * var(--fs)); font-weight: 800; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; transition: transform .08s ease, filter .15s ease;
  color: #fff;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-lg { font-size: calc(22px * var(--fs)); min-height: 70px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.btn-success { background: linear-gradient(135deg, var(--green), #10b981); color: #042616; }
[data-theme="light"] .btn-success { color:#fff; }
.btn-warning { background: var(--yellow); }
.btn-danger  { background: var(--red); }
.btn-gray    { background: var(--panel-3); color: var(--ink); }

/* ============================================================
   Search
   ============================================================ */
.search {
  position: relative; margin-bottom: 14px;
}
.search input {
  width: 100%; font-size: calc(14px * var(--fs)); padding: calc(13px * var(--fs)) 16px calc(13px * var(--fs)) calc(44px * var(--fs));
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 12px; outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.search .s-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.search .s-ico svg { width: calc(18px * var(--fs)); height: calc(18px * var(--fs)); }

/* ============================================================
   Category tabs (pill — mengikuti komponen Chip template)
   ============================================================ */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-tab {
  border: none; background: var(--panel-2);
  border-radius: 999px; padding: calc(8px * var(--fs)) calc(14px * var(--fs)); font-size: calc(13px * var(--fs)); font-weight: 600;
  color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s ease, color .12s ease;
}
.cat-tab svg { width: calc(15px * var(--fs)); height: calc(15px * var(--fs)); }
.cat-tab:active { transform: scale(.97); }
.cat-tab.active { background: var(--ink); color: var(--bg); }
[data-theme="dark"] .cat-tab.active { background: #fff; color: #0b1120; }

/* ============================================================
   POS layout (Kasir): grid + cart
   ============================================================ */
.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 380px); gap: 22px; align-items: start; }
.pos-layout > * { min-width: 0; }   /* cegah grid blowout (panel keranjang terpotong) */

.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.svc-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px; cursor: pointer; position: relative;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.svc-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); box-shadow: 0 12px 28px -14px rgba(0,0,0,.5); }
.svc-card:active { transform: scale(.99); }
.svc-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Foto produk (master sample) */
.svc-photo {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px;
  overflow: hidden; background: var(--panel-2); flex-shrink: 0;
}
.svc-photo .ph-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.svc-photo .ph-fallback svg { width: calc(34px * var(--fs)); height: calc(34px * var(--fs)); }
.svc-photo .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-pop {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,0,0,.55); color: var(--accent); backdrop-filter: blur(4px);
  font-size: calc(9.5px * var(--fs)); font-weight: 800; letter-spacing: .5px;
  padding: 4px 8px; border-radius: 6px; text-transform: uppercase;
}
.svc-dot { position: absolute; top: 12px; right: 12px; z-index: 2; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,.3), 0 0 8px var(--accent); }
.svc-check {
  position: absolute; top: 10px; right: 10px; z-index: 3; display: none;
  width: calc(26px * var(--fs)); height: calc(26px * var(--fs)); border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.svc-check svg { width: calc(15px * var(--fs)); height: calc(15px * var(--fs)); stroke-width: 3; }
.svc-card.selected .svc-check { display: flex; }
.svc-card.selected .svc-dot, .svc-card.selected .svc-pop { display: none; }

.svc-info { flex: 1; padding: 0 2px; }
.svc-name { font-size: calc(16px * var(--fs)); font-weight: 700; line-height: 1.25; letter-spacing: -.2px; overflow-wrap: anywhere; margin-bottom: 4px; }
.svc-dur { font-size: calc(13px * var(--fs)); color: var(--muted); display: flex; align-items: center; gap: 5px; }
.svc-dur svg { width: calc(13px * var(--fs)); height: calc(13px * var(--fs)); }
.svc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding: 0 2px; }
.svc-price { font-size: calc(18px * var(--fs)); font-weight: 800; }
.svc-price small { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 500; }
.svc-add {
  width: calc(40px * var(--fs)); height: calc(40px * var(--fs)); border-radius: 12px; flex-shrink: 0;
  background: var(--panel-3); color: var(--ink); border: none;
  cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s ease, color .14s ease;
}
.svc-add svg { width: calc(20px * var(--fs)); height: calc(20px * var(--fs)); }
.svc-add:active { transform: scale(.9); }
.svc-card:hover .svc-add, .svc-card.selected .svc-add { background: var(--accent); color: var(--accent-ink); }

/* ===== Cart ===== */
.cart {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 96px;
  display: flex; flex-direction: column; max-height: calc(100vh - 120px);
}
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cart-head h3 { font-size: calc(16px * var(--fs)); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cart-head .count { color: var(--accent); background: var(--panel-2); font-size: calc(11px * var(--fs)); font-weight: 700; padding: 2px 8px; border-radius: 999px; align-items: center; }
.cart-clear { background: none; border: none; color: var(--muted); font-size: calc(12.5px * var(--fs)); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.cart-clear svg { width: calc(14px * var(--fs)); height: calc(14px * var(--fs)); }
.cart-clear:hover { color: var(--red); }

.cust-box { margin-bottom: 14px; }
.cust-box .field { margin-bottom: 10px; }

.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 1; padding: 24px; gap: 4px; color: var(--muted); }
.cart-empty .ce-ico { width: calc(64px * var(--fs)); height: calc(64px * var(--fs)); border-radius: 20px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; color: var(--muted); margin-bottom: 8px; }
.cart-empty .ce-ico svg { width: calc(30px * var(--fs)); height: calc(30px * var(--fs)); }
.cart-empty .ce-title { font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--ink-soft); }
.cart-empty .ce-sub { font-size: calc(12.5px * var(--fs)); color: var(--muted); max-width: 200px; line-height: 1.5; }
.cart-items { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; margin-bottom: 10px; }
.ci {
  display: flex; align-items: flex-start; gap: 12px;
  border-bottom: 1px solid var(--line); padding: 12px 0;
}
.ci-ico { width: calc(52px * var(--fs)); height: calc(52px * var(--fs)); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; box-shadow: inset 0 1px 1px rgba(255,255,255,0.35); }
.ci-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-ico svg { width: calc(24px * var(--fs)); height: calc(24px * var(--fs)); }
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ci-name { font-size: calc(15px * var(--fs)); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-price { font-size: calc(13px * var(--fs)); color: var(--muted); }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; gap: 8px; }
.ci-del { background: none; border: none; color: var(--muted); cursor: pointer; display: flex; padding: 2px; }
.ci-del svg { width: calc(16px * var(--fs)); height: calc(16px * var(--fs)); }
.ci-del:hover { color: var(--red); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: calc(28px * var(--fs)); height: calc(28px * var(--fs)); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  line-height: 1; display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--ink);
}
.stepper button svg { width: calc(14px * var(--fs)); height: calc(14px * var(--fs)); }
.stepper .q { font-size: calc(15px * var(--fs)); font-weight: 700; min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }

.cart-summary { border-top: 1px solid var(--line); padding-top: 14px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; font-size: calc(14px * var(--fs)); color: var(--ink-soft); padding: 4px 0; }
.sum-row.disc span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.sum-row.disc svg { width: calc(14px * var(--fs)); height: calc(14px * var(--fs)); }
.sum-row.total { font-size: calc(15px * var(--fs)); color: var(--ink); margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.sum-row.total span:last-child { font-size: calc(24px * var(--fs)); font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.cart .btn { margin-top: 14px; }
.cart-pay { border-radius: 999px; min-height: calc(54px * var(--fs)); gap: 10px; font-size: calc(16px * var(--fs)); font-weight: 700; }
.cart-pay svg { width: calc(19px * var(--fs)); height: calc(19px * var(--fs)); }

/* sticky bottom bar (mobile) */
.mobile-bar { display: none; }

/* ============================================================
   Order cards (active / finish)
   ============================================================ */
.orders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.order-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; border-left: 6px solid;
}
.order-card.s-active { border-left-color: var(--yellow); background: var(--status-active-bg); }
.order-card.s-ready  { border-left-color: var(--green); background: var(--status-ready-bg); }
.oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.oc-cust { font-size: calc(23px * var(--fs)); font-weight: 800; }
.oc-code { font-size: calc(14px * var(--fs)); color: var(--muted); font-weight: 700; }
.cashier-tag { display: inline-block; background: var(--panel-3); color: var(--ink-soft); font-size: calc(13px * var(--fs)); font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 6px; }
.status-pill { padding: 9px 16px; border-radius: 999px; font-size: calc(16px * var(--fs)); font-weight: 800; color: #fff; white-space: nowrap; }
.status-pill.active { background: var(--yellow); }
.status-pill.ready  { background: var(--green); }
.oc-items { font-size: calc(16px * var(--fs)); margin: 6px 0 14px; color: var(--ink-soft); }
.oc-items .it { display: flex; justify-content: space-between; padding: 4px 0; }
.oc-total { font-size: calc(22px * var(--fs)); font-weight: 800; margin-bottom: 16px; }
.oc-total span { color: var(--accent); }
.oc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.oc-actions form { flex: 1; }
.oc-meta { font-size: calc(14px * var(--fs)); color: var(--muted); margin-top: 8px; }

/* ============================================================
   Payment
   ============================================================ */
.pay-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 28px; max-width: 720px; margin: 0 auto; }
.pay-order-items { margin-bottom: 18px; }
.pay-order-items .it { font-size: calc(16px * var(--fs)); }
.pay-total { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-radius: 18px; padding: 24px; text-align: center; margin-bottom: 22px; }
.pay-total .lbl { font-size: calc(20px * var(--fs)); font-weight: 600; opacity: .9; }
.pay-total .val { font-size: calc(52px * var(--fs)); font-weight: 900; }

/* ============================================================
   Empty state
   ============================================================ */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ico { font-size: calc(84px * var(--fs)); }
.empty .ico svg { width: calc(48px * var(--fs)); height: calc(48px * var(--fs)); opacity: .6; }
.empty p { font-size: calc(20px * var(--fs)); margin-top: 12px; }

/* ============================================================
   Income
   ============================================================ */
.income-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); margin-bottom: clamp(16px, 2vw, 26px); }
.income-card { border-radius: var(--radius); padding: clamp(18px, 2.2vw, 26px); color: #fff; box-shadow: var(--shadow-soft); }
.income-card .cap { font-size: calc(18px * var(--fs)); font-weight: 600; opacity: .92; }
.income-card .amt { font-size: calc(36px * var(--fs)); font-weight: 900; margin: 8px 0 4px; }
.income-card .cnt { font-size: calc(15px * var(--fs)); opacity: .9; }
.income-card.today { background: linear-gradient(135deg,#0ea5a3,#0d9488); }
.income-card.week  { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.income-card.month { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }

.recap-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 18px); margin-bottom: clamp(16px, 2vw, 22px); }
.recap-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 2vw, 22px); }
.recap-card .cap { font-size: calc(13px * var(--fs)); font-weight: 800; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }
.recap-card .amt { font-size: calc(24px * var(--fs)); font-weight: 900; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.recap-card .cnt { font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 700; }
@media (max-width: 980px) { .recap-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .recap-cards { grid-template-columns: 1fr; } }
.exp-recap-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.exp-recap-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.exp-recap-select { width: auto; min-height: 52px; padding: 10px 14px; font-size: calc(15px * var(--fs)); }
.exp-recap-btn { width: auto; min-height: 52px; padding: 12px 16px; }
.exp-recap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.exp-recap-section { margin-top: 18px; }
@media (max-width: 980px) {
  .exp-recap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .exp-recap-toolbar, .exp-recap-form { width: 100%; }
  .exp-recap-form { flex-direction: column; align-items: stretch; }
  .exp-recap-select, .exp-recap-btn { width: 100%; }
}
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; min-width: 860px; border-collapse: collapse; }
table.list th, table.list td { padding: 15px 18px; text-align: left; font-size: calc(16px * var(--fs)); }
table.list th { background: var(--panel-2); font-size: calc(14px * var(--fs)); color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
table.list tr + tr td { border-top: 1px solid var(--line); }
table.list td.amt { text-align: right; font-weight: 800; color: var(--green-ink); }
.income-list { width: 100%; min-width: 980px; border-collapse: collapse; }
.income-list th, .income-list td { padding: 14px 16px; text-align: left; font-size: calc(15px * var(--fs)); vertical-align: middle; }
.income-list th { background: transparent; font-size: calc(11.5px * var(--fs)); color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.income-list tbody tr + tr td { border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.income-list tbody tr:hover td { background: var(--panel-2); }
.income-list { table-layout: fixed; }
.income-list th:nth-child(5), .income-list td:nth-child(5) { text-align: center; }
.income-list td:nth-child(6) { text-align: right; }
.income-list th:last-child, .income-list td:last-child { text-align: right; padding-left: 10px; padding-right: 14px; }
.income-id { font-weight: 900; letter-spacing: .4px; }
.income-cust { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.income-cust .nm { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.income-cust .sub { font-size: calc(12.5px * var(--fs)); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.income-cust .it-sm { display: none; font-size: calc(12.5px * var(--fs)); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.income-items { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; display: block; }
.income-pill { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: calc(12px * var(--fs)); font-weight: 800; color: var(--ink-soft); white-space: nowrap; min-width: 72px; }
.income-total { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.income-total .val { font-weight: 900; }
.income-total .st { font-size: calc(11.5px * var(--fs)); font-weight: 900; }
.income-total .st.paid { color: var(--green-ink); }
.income-total .st.pending { color: var(--yellow-ink); }
.income-print { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; text-decoration: none; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.income-print svg { width: 18px; height: 18px; opacity: .9; }
.income-print:active { transform: scale(.97); }
.ta-right { text-align: right !important; }
.txt-muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Pemeriksaan transaksi admin */
.transaction-overview {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.transaction-stat {
  min-width: 0; min-height: 96px; padding: 14px 15px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
}
.transaction-stat.primary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel));
}
.transaction-stat-icon,
.transaction-card-icon {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; color: var(--accent); background: var(--accent-soft);
}
.transaction-stat-icon svg,
.transaction-card-icon svg { width: 21px; height: 21px; }
.transaction-stat > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.transaction-stat small { color: var(--muted); font-size: calc(10.5px * var(--fs)); font-weight: 700; }
.transaction-stat b {
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: calc(18px * var(--fs)); line-height: 1.25;
}
.transaction-stat em {
  margin-top: 2px; color: var(--muted); font-size: calc(9.5px * var(--fs));
  font-style: normal; font-weight: 600;
}
.transaction-filter-card,
.transaction-list-card {
  min-width: 0; overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 17px; background: var(--panel);
}
.transaction-card-head,
.transaction-list-head {
  min-height: 68px; padding: 14px 17px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line);
}
.transaction-card-head > span:nth-child(2),
.transaction-list-head > span:first-child { min-width: 0; }
.transaction-card-head h2,
.transaction-list-head h2 { font-size: calc(15px * var(--fs)); }
.transaction-card-head p,
.transaction-list-head p { margin-top: 2px; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.transaction-card-icon { width: 38px; height: 38px; }
.transaction-filter-count,
.transaction-page-info {
  margin-left: auto; padding: 5px 9px; border-radius: 999px; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft); font-size: calc(9.5px * var(--fs)); font-weight: 800;
}
.transaction-filter-form { padding: 15px 17px 17px; }
.transaction-search-field { position: relative; margin-bottom: 11px; }
.transaction-search-field svg {
  position: absolute; z-index: 1; left: 12px; top: 50%; width: 17px; height: 17px;
  transform: translateY(-50%); color: var(--muted); pointer-events: none;
}
.transaction-search-field input,
.transaction-filter-grid input,
.transaction-filter-grid select {
  width: 100%; min-width: 0; min-height: 43px; box-sizing: border-box;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px;
  outline: none; background: var(--panel-2); color: var(--ink);
  font: inherit; font-size: calc(11.5px * var(--fs));
}
.transaction-search-field input { padding-left: 39px; }
.transaction-search-field input:focus,
.transaction-filter-grid input:focus,
.transaction-filter-grid select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.transaction-filter-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px;
}
.transaction-filter-grid label { min-width: 0; }
.transaction-filter-grid label > span {
  display: block; margin: 0 0 5px 2px; color: var(--muted);
  font-size: calc(9.5px * var(--fs)); font-weight: 800;
}
.transaction-filter-grid input[type=date] { color-scheme: dark; }
[data-theme="light"] .transaction-filter-grid input[type=date] { color-scheme: light; }
.transaction-filter-actions {
  margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}
.transaction-reset {
  min-height: 42px; padding: 9px 12px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 11px; color: var(--muted);
  background: var(--panel-2); text-decoration: none; font-size: calc(10.5px * var(--fs)); font-weight: 800;
}
.transaction-filter-submit { width: auto; min-height: 42px; font-size: calc(11.5px * var(--fs)); }
.transaction-filter-submit svg { width: 16px; height: 16px; }
.transaction-list-head { justify-content: space-between; }
.transaction-page-info { color: var(--muted); background: var(--panel-2); }
.transaction-list { display: flex; flex-direction: column; }
.transaction-row {
  min-width: 0; padding: 13px 16px; display: grid;
  grid-template-columns: 185px minmax(220px, 1fr) 140px 135px 36px;
  align-items: center; gap: 14px; border-bottom: 1px solid var(--line);
}
.transaction-row:last-child { border-bottom: 0; }
.transaction-row:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.transaction-code { min-width: 0; display: flex; align-items: center; gap: 10px; }
.transaction-code > span {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 11px; color: var(--accent); background: var(--accent-soft);
}
.transaction-code svg { width: 18px; height: 18px; }
.transaction-code > div { min-width: 0; display: flex; flex-direction: column; }
.transaction-code b { font-size: calc(11.5px * var(--fs)); }
.transaction-code small,
.transaction-customer small,
.transaction-payment small { color: var(--muted); font-size: calc(9px * var(--fs)); }
.transaction-customer { min-width: 0; display: flex; flex-direction: column; }
.transaction-customer b {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: calc(11.5px * var(--fs));
}
.transaction-customer p {
  margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-soft); font-size: calc(9.5px * var(--fs));
}
.transaction-meta { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.transaction-status {
  padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--status-color) 45%, var(--line));
  border-radius: 999px; color: var(--status-color);
  background: color-mix(in srgb, var(--status-color) 12%, var(--panel));
  font-size: calc(9px * var(--fs)); font-weight: 900; white-space: nowrap;
}
.transaction-cashier {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: calc(9px * var(--fs));
}
.transaction-payment { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; }
.transaction-payment b { font-size: calc(12px * var(--fs)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.transaction-payment > span { font-size: calc(9px * var(--fs)); font-weight: 900; }
.transaction-payment > span.paid { color: var(--green-ink); }
.transaction-payment > span.pending { color: var(--yellow-ink); }
.transaction-print {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
  background: var(--panel-2); text-decoration: none;
}
.transaction-print:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.transaction-print svg { width: 16px; height: 16px; }
.transaction-pagination { padding: 0 16px 16px; }
.transaction-empty {
  min-height: 260px; padding: 30px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.transaction-empty > span {
  width: 50px; height: 50px; display: grid; place-items: center;
  border-radius: 14px; color: var(--muted); background: var(--panel-2);
}
.transaction-empty svg { width: 24px; height: 24px; }
.transaction-empty b { margin-top: 12px; font-size: calc(13px * var(--fs)); }
.transaction-empty p { margin-top: 4px; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
@media (max-width: 1180px) {
  .transaction-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .transaction-row { grid-template-columns: 170px minmax(190px, 1fr) 125px 125px 36px; gap: 11px; }
}
@media (max-width: 820px) {
  .transaction-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-row {
    grid-template-columns: 155px minmax(0, 1fr) 120px 36px; align-items: start;
  }
  .transaction-meta { grid-column: 2; }
  .transaction-payment { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .transaction-print { grid-column: 4; grid-row: 1 / span 2; align-self: center; }
}
@media (max-width: 640px) {
  .transaction-overview { grid-template-columns: 1fr; }
  .transaction-stat { min-height: 82px; padding: 12px; }
  .transaction-stat b { font-size: calc(16px * var(--fs)); }
  .transaction-card-head { align-items: flex-start; }
  .transaction-filter-count { display: none; }
  .transaction-filter-grid { grid-template-columns: 1fr 1fr; }
  .transaction-filter-actions { align-items: stretch; flex-direction: column-reverse; }
  .transaction-reset,
  .transaction-filter-submit { width: 100%; justify-content: center; }
  .transaction-list-head { align-items: flex-start; }
  .transaction-page-info { display: none; }
  .transaction-row {
    grid-template-columns: minmax(0, 1fr) auto; padding: 14px; gap: 12px;
  }
  .transaction-code { grid-column: 1; }
  .transaction-customer { grid-column: 1 / -1; grid-row: 2; }
  .transaction-meta { grid-column: 1; grid-row: 3; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .transaction-payment { grid-column: 1; grid-row: 4; align-items: flex-start; }
  .transaction-print { grid-column: 2; grid-row: 1; align-self: start; }
  .transaction-customer p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (max-width: 390px) {
  .transaction-filter-grid { grid-template-columns: 1fr; }
}

/* Developer Console */
.developer-page { scroll-behavior: smooth; }
.developer-sidebar .sb-logo {
  font-size: calc(13px * var(--fs)); font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
}
.developer-mode-chip {
  min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid color-mix(in srgb, #14b8a6 38%, var(--line)); border-radius: 10px;
  color: #14b8a6; background: color-mix(in srgb, #14b8a6 10%, var(--panel));
  font-size: calc(10px * var(--fs)); font-weight: 900; white-space: nowrap;
}
.developer-mode-chip > span {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 4px color-mix(in srgb, #22c55e 18%, transparent);
}
.developer-section { scroll-margin-top: 82px; margin-bottom: 18px; }
.developer-overview {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.developer-stat {
  min-width: 0; min-height: 92px; padding: 14px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
}
.developer-stat.primary {
  border-color: color-mix(in srgb, #14b8a6 48%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, #14b8a6 17%, var(--panel)), var(--panel));
}
.developer-stat > span {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; color: #14b8a6; background: color-mix(in srgb, #14b8a6 13%, var(--panel-2));
}
.developer-stat svg { width: 21px; height: 21px; }
.developer-stat > div { min-width: 0; display: flex; flex-direction: column; }
.developer-stat small { color: var(--muted); font-size: calc(9.5px * var(--fs)); font-weight: 700; }
.developer-stat b {
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: calc(17px * var(--fs));
}
.developer-stat em {
  margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: calc(8.5px * var(--fs)); font-style: normal;
}
.developer-system-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.developer-card {
  min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 17px; background: var(--panel);
}
.developer-card > header {
  min-height: 64px; padding: 14px 16px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line);
}
.developer-card > header > span,
.developer-section-title > span {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 11px; color: #14b8a6; background: color-mix(in srgb, #14b8a6 13%, var(--panel-2));
}
.developer-card > header svg,
.developer-section-title svg { width: 19px; height: 19px; }
.developer-card header h2,
.developer-section-title h2 { font-size: calc(14px * var(--fs)); }
.developer-card header p,
.developer-section-title p { margin-top: 2px; color: var(--muted); font-size: calc(9.5px * var(--fs)); }
.developer-system-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 7px 16px 14px; }
.developer-system-list > div {
  min-width: 0; padding: 10px 4px; display: flex; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line); font-size: calc(10.5px * var(--fs));
}
.developer-system-list > div:nth-last-child(-n+2) { border-bottom: 0; }
.developer-system-list span { color: var(--muted); }
.developer-system-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.developer-system-list b.ok { color: var(--green-ink); }
.developer-system-list b.warn { color: var(--yellow-ink); }
.developer-system-list b.bad { color: var(--red-ink); }
.developer-check-list { padding: 9px 16px 15px; }
.developer-check-list > div {
  min-height: 42px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line); font-size: calc(10.5px * var(--fs)); font-weight: 700;
}
.developer-check-list > div:last-child { border-bottom: 0; }
.developer-check-list i {
  width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); font-style: normal;
}
.developer-check-list .done i { color: #052e16; border-color: #22c55e; background: #22c55e; }
.developer-check-list .done i::after { content: "✓"; font-size: 11px; font-weight: 900; }
.developer-check-list .issue i { color: #451a03; border-color: #f59e0b; background: #f59e0b; }
.developer-check-list .issue i::after { content: "!"; font-size: 11px; font-weight: 900; }
.developer-section-title {
  margin-bottom: 11px; display: flex; align-items: center; gap: 11px;
}
.backup-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 14px; align-items: start; }
.backup-procedure { padding: 8px 16px; }
.backup-step { padding: 13px 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; border-bottom: 1px solid var(--line); }
.backup-step:last-child { border-bottom: 0; }
.backup-step > span {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; color: #031f1d; background: #14b8a6; font-size: calc(11px * var(--fs)); font-weight: 900;
}
.backup-step h3 { font-size: calc(11.5px * var(--fs)); }
.backup-step p { margin: 2px 0 7px; color: var(--muted); font-size: calc(9.5px * var(--fs)); }
.developer-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #67e8f9; background: #091417; border: 1px solid color-mix(in srgb, #14b8a6 24%, var(--line));
}
.backup-step code,
.code-block {
  padding: 8px 10px; display: block; overflow-x: auto;
  border-radius: 8px; font-size: 10px; line-height: 1.5; white-space: nowrap;
}
.backup-side { display: flex; flex-direction: column; gap: 14px; }
.restore-card ol { margin: 12px 18px 12px 34px; color: var(--ink-soft); font-size: calc(9.5px * var(--fs)); line-height: 1.7; }
.restore-card .code-block { margin: 0 16px; white-space: normal; overflow-wrap: anywhere; }
.restore-card li code { padding: 2px 4px; border-radius: 4px; font-size: 9px; }
.backup-files-card { padding-bottom: 8px; }
.backup-file {
  padding: 10px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line);
}
.backup-file:last-child { border-bottom: 0; }
.backup-file > span {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 10px; color: #14b8a6; background: color-mix(in srgb, #14b8a6 12%, var(--panel-2));
}
.backup-file svg { width: 16px; height: 16px; }
.backup-file > div { min-width: 0; display: flex; flex-direction: column; }
.backup-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(10px * var(--fs)); }
.backup-file small { color: var(--muted); font-size: calc(8.5px * var(--fs)); }
.developer-empty-small { padding: 22px 16px; color: var(--muted); text-align: center; font-size: calc(10px * var(--fs)); }
.developer-empty-small code { padding: 2px 5px; border-radius: 5px; }
.activity-card { overflow: visible; }
.activity-filter {
  padding: 12px; display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(130px, .7fr)) auto auto;
  gap: 8px; border-bottom: 1px solid var(--line);
}
.activity-filter input,
.activity-filter select {
  width: 100%; min-width: 0; min-height: 40px; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  outline: none; color: var(--ink); background: var(--panel-2);
  font: inherit; font-size: calc(9.5px * var(--fs));
}
.activity-filter input:focus,
.activity-filter select:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px color-mix(in srgb, #14b8a6 18%, transparent); }
.activity-search { position: relative; }
.activity-search svg {
  position: absolute; z-index: 1; left: 11px; top: 50%; width: 15px; height: 15px;
  transform: translateY(-50%); color: var(--muted); pointer-events: none;
}
.activity-search input { padding-left: 34px; }
.activity-filter .btn { min-height: 40px; padding: 8px 12px; font-size: calc(10px * var(--fs)); }
.activity-filter .btn svg { width: 15px; height: 15px; }
.activity-reset {
  min-height: 40px; padding: 8px 11px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--panel-2);
  text-decoration: none; font-size: calc(9.5px * var(--fs)); font-weight: 800;
}
.activity-list { display: flex; flex-direction: column; }
.activity-row {
  min-width: 0; padding: 12px 16px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center; gap: 11px; border-bottom: 1px solid var(--line);
}
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.activity-avatar {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  color: #fff; background: #475569; font-size: calc(10px * var(--fs)); font-weight: 900;
}
.activity-avatar.role-admin { background: #7c3aed; }
.activity-avatar.role-kasir { background: #16a34a; }
.activity-avatar.role-developer { background: #0f766e; }
.activity-main { min-width: 0; }
.activity-main > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.activity-main b { font-size: calc(10.5px * var(--fs)); }
.activity-main > div span {
  padding: 2px 6px; border-radius: 999px; color: var(--muted); background: var(--panel-2);
  font-size: calc(8px * var(--fs)); font-weight: 800;
}
.activity-main p { margin-top: 2px; font-size: calc(10px * var(--fs)); font-weight: 700; }
.activity-main small {
  display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: calc(8.5px * var(--fs));
}
.activity-row time { min-width: 95px; display: flex; flex-direction: column; align-items: flex-end; }
.activity-row time b { font-size: calc(9px * var(--fs)); }
.activity-row time small { color: var(--muted); font-size: calc(8.5px * var(--fs)); }
.developer-recommendations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.developer-recommendations article {
  min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
}
.developer-recommendations article > span {
  padding: 4px 7px; display: inline-flex; border-radius: 7px;
  color: #14b8a6; background: color-mix(in srgb, #14b8a6 12%, var(--panel-2));
  font-size: calc(8px * var(--fs)); font-weight: 900;
}
.developer-recommendations h3 { margin-top: 9px; font-size: calc(11.5px * var(--fs)); }
.developer-recommendations p { margin-top: 4px; color: var(--muted); font-size: calc(9.5px * var(--fs)); line-height: 1.55; }
@media (max-width: 1180px) {
  .developer-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .activity-search { grid-column: span 2; }
}
@media (max-width: 900px) {
  .developer-system-grid,
  .backup-layout { grid-template-columns: 1fr; }
  .developer-recommendations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .developer-mode-chip { display: none; }
  .developer-overview { grid-template-columns: 1fr; }
  .developer-stat { min-height: 82px; padding: 12px; }
  .developer-system-list { grid-template-columns: 1fr; }
  .developer-system-list > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .developer-system-list > div:last-child { border-bottom: 0; }
  .activity-filter { grid-template-columns: 1fr; }
  .activity-search { grid-column: auto; }
  .activity-filter .btn,
  .activity-reset { width: 100%; }
  .activity-row { grid-template-columns: 38px minmax(0, 1fr); align-items: start; }
  .activity-row time { grid-column: 2; min-width: 0; flex-direction: row; align-items: center; gap: 5px; }
  .developer-recommendations { grid-template-columns: 1fr; }
  .backup-step { grid-template-columns: 30px minmax(0, 1fr); }
}

/* ============================================================
   Dashboard tiles
   ============================================================ */
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat .stat-ico { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: calc(28px * var(--fs)); background: var(--panel-2); }
.stat > span:last-child { display: flex; flex-direction: column; }
.stat .num { font-size: calc(32px * var(--fs)); font-weight: 800; line-height: 1.05; }
.stat .cap { font-size: calc(15px * var(--fs)); color: var(--muted); font-weight: 600; margin-top: 4px; }
.stat.y .num { color: var(--yellow-ink); } .stat.g .num { color: var(--green-ink); } .stat.b .num { color: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tile {
  border: none; border-radius: var(--radius-lg); padding: 24px; color: #fff;
  text-decoration: none; display: flex; align-items: center; gap: 18px; min-height: 130px;
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
  transition: transform .1s ease;
}
.tile:active { transform: scale(.98); }
.tile .ico { font-size: calc(40px * var(--fs)); width: 76px; height: 76px; border-radius: 20px; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile .tile-body { flex: 1; min-width: 0; }
.tile .label { font-size: calc(24px * var(--fs)); font-weight: 800; display: block; }
.tile .desc { font-size: calc(16px * var(--fs)); opacity: .92; display: block; margin-top: 4px; }
.tile .arrow { width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center; font-size: calc(28px * var(--fs)); flex-shrink: 0; }
.tile .badge { position: absolute; top: 16px; right: 16px; background: #fff; color: #0b1120; border-radius: 999px; min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; font-size: calc(22px * var(--fs)); font-weight: 800; }
.tile.blue   { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.tile.yellow { background: linear-gradient(135deg,#f5b53f,#e0901f); }
.tile.green  { background: linear-gradient(135deg,#34d399,#10b981); }
.tile.purple { background: linear-gradient(135deg,#8b5cf6,#6d28d9); }
.tile.gray   { background: linear-gradient(135deg,#475569,#334155); }
.tile.soft { background: var(--panel); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-soft); }
.tile.soft .ico { background: var(--panel-2); }
.tile.soft .desc { color: var(--muted); }
.tile.soft .arrow { background: var(--panel-2); color: var(--accent); }

/* ============================================================
   Inputs / fields
   ============================================================ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: calc(16px * var(--fs)); font-weight: 700; margin-bottom: 7px; }
.field input[type=text], .field input[type=tel], .field input[type=number], .field input[type=password], .select-big {
  width: 100%; font-size: calc(19px * var(--fs)); padding: 14px 16px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 13px; outline: none;
}
.field input:focus, .select-big:focus { border-color: var(--accent); box-shadow: var(--ring); }
.field .hint { font-size: calc(13px * var(--fs)); color: var(--muted); margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================================
   Panels / admin
   ============================================================ */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.panel-title { font-size: calc(20px * var(--fs)); font-weight: 800; margin-bottom: 16px; }
.admin-hero { background: linear-gradient(135deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.admin-hero-ico { font-size: calc(56px * var(--fs)); }
.admin-hero-title { font-size: calc(28px * var(--fs)); font-weight: 900; }
.admin-hero-sub { font-size: calc(17px * var(--fs)); color: var(--muted); }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.astat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.astat .ico { font-size: calc(36px * var(--fs)); } .astat .num { font-size: calc(28px * var(--fs)); font-weight: 900; margin-top: 4px; } .astat .cap { font-size: calc(15px * var(--fs)); color: var(--muted); font-weight: 600; }
.astat.wide { grid-column: span 4; } .astat.wide .num { color: var(--green-ink); }
.admin-grid { display: grid; grid-template-columns: 420px 1fr; gap: 22px; align-items: start; }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.ar-ico { width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: calc(30px * var(--fs)); color: #fff; flex-shrink: 0; }
.ar-main { flex: 1; min-width: 0; }
.ar-name { font-size: calc(19px * var(--fs)); font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-sub { font-size: calc(15px * var(--fs)); color: var(--muted); }
.ar-actions { display: flex; gap: 10px; align-items: center; }
.btn-mini { border: none; border-radius: 11px; padding: 11px 16px; font-size: calc(16px * var(--fs)); font-weight: 700; cursor: pointer; color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; }
.btn-mini.is-compact { min-height: 40px; padding: 8px 14px; font-size: calc(15px * var(--fs)); border-radius: 10px; }
.btn-mini.btn-primary { color: var(--accent-ink); font-weight: 800; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .08s ease, filter .15s ease; }
.btn-mini.btn-primary:hover { filter: brightness(1.04); }
.btn-mini.btn-primary:active { transform: scale(.98); }
.cd-neworder { width: auto; gap: 8px; }
.cd-neworder svg { width: calc(16px * var(--fs)); height: calc(16px * var(--fs)); flex-shrink: 0; }
.btn-edit { background: var(--blue); } .btn-del { background: var(--red); }
.tag-off { background: color-mix(in srgb, var(--red) 18%, var(--panel)); color: var(--red-ink); font-size: calc(12px * var(--fs)); font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.tag-me  { background: var(--accent-soft); color: var(--accent); font-size: calc(12px * var(--fs)); font-weight: 800; padding: 3px 10px; border-radius: 999px; }

.icon-preview { font-size: calc(30px * var(--fs)) !important; text-align: center; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.emoji-btn { width: 50px; height: 50px; font-size: calc(24px * var(--fs)); border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 12px; cursor: pointer; }
.emoji-btn:active { background: var(--panel-3); }
.color-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 50px; height: 50px; border-radius: 13px; cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch .tick { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #fff; font-size: calc(26px * var(--fs)); font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.swatch input:checked ~ .tick { display: flex; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--ink); }
.switch-row { display: flex; align-items: center; gap: 12px; font-size: calc(16px * var(--fs)); font-weight: 600; margin: 14px 0 18px; cursor: pointer; }
.switch-row input { width: 26px; height: 26px; accent-color: var(--accent); }

.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-opt { border: 1px solid var(--line); background: var(--panel-2); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.role-opt input { display: none; }
.role-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.role-opt .r-ico { font-size: calc(30px * var(--fs)); }
.role-opt .r-txt { font-size: calc(17px * var(--fs)); font-weight: 800; }
.role-opt .r-txt small { display: block; font-size: calc(13px * var(--fs)); font-weight: 500; color: var(--muted); }

.logo-uploader { display: flex; gap: 18px; align-items: center; }
.logo-current { width: 100px; height: 100px; border-radius: 18px; background: var(--panel-2); border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; font-size: calc(46px * var(--fs)); overflow: hidden; flex-shrink: 0; }
.logo-current img { width: 100%; height: 100%; object-fit: cover; }
.logo-controls { flex: 1; } .logo-controls .btn { width: auto; display: inline-flex; }
.settings-wrap { max-width: 1380px; margin: 0 auto; }
.settings-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.settings-identity, .settings-operations { grid-column: span 7; }
.settings-payments, .settings-printer { grid-column: span 5; }
.settings-span-2 { grid-column: 1 / -1; }
.settings-card-heading { display: flex; flex-direction: column; min-width: 0; }
.settings-card-sub { color: var(--muted); font-size: calc(11.5px * var(--fs)); margin-top: 1px; }
.settings-actions {
  position: sticky; bottom: 12px; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 12px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
}
.settings-back { width: auto; min-width: 104px; }
.settings-save-copy { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.settings-save-copy strong { font-size: calc(13px * var(--fs)); }
.settings-save-copy span { color: var(--muted); font-size: calc(11px * var(--fs)); }
.settings-save { width: auto; min-width: 205px; }
.settings-save svg, .printer-test-btn svg { width: 18px; height: 18px; }

@media (max-width: 960px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-identity, .settings-payments, .settings-operations, .settings-printer { grid-column: auto; }
  .settings-span-2 { grid-column: auto; }
}
.st-label { display: inline-flex; align-items: center; gap: 10px; min-width: 240px; }
.st-label-text { font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 700; }
.st-ico {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: calc(16px * var(--fs)); color: var(--ink); flex-shrink: 0;
}
.st-ico svg { width: calc(18px * var(--fs)); height: calc(18px * var(--fs)); }
.hq-card:has(.hq-card-hd) { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding: 0; min-height: auto; display: block; }
.hq-card-hd { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.hq-card-hd .hq-card-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: calc(18px * var(--fs)); border: none; }
.hq-card-hd .hq-card-ico svg { width: calc(18px * var(--fs)); height: calc(18px * var(--fs)); }
.hq-card-hd .hq-card-title { font-size: calc(15px * var(--fs)); font-weight: 800; }
.hq-card-body { padding: 6px 20px 14px; }
.hq-set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hq-set-row-last { border-bottom: none; }
.hq-set-control { display: flex; justify-content: flex-end; min-width: 0; flex: 1; }
.hq-input { width: 100%; max-width: 520px; font-size: calc(15px * var(--fs)); padding: 11px 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); border-radius: 12px; outline: none; }
.hq-input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.hq-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.hq-toggle-row-last { border-bottom: none; }
.hq-toggle-text { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-toggle-txt { display: flex; flex-direction: column; min-width: 0; }
.hq-toggle-label { font-size: calc(13.5px * var(--fs)); font-weight: 800; color: var(--ink); }
.hq-toggle-sub { font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-top: 2px; }
.hq-toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.hq-toggle-ui { width: 44px; height: 26px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background .15s ease, border-color .15s ease; }
.hq-toggle-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.35); transition: left .15s ease; }
.hq-toggle-row:has(input:checked) .hq-toggle-ui { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
.hq-toggle-row:has(input:checked) .hq-toggle-ui::after { left: 22px; }

@media (max-width: 720px) {
  .hq-set-row { flex-direction: column; align-items: stretch; }
  .hq-set-control { justify-content: flex-start; }
  .hq-input { width: 100%; }
  .settings-wrap .logo-uploader { grid-template-columns: 1fr; }
  .settings-wrap .logo-controls { width: 100%; }
  .settings-wrap .logo-controls .btn { width: 100%; justify-content: center; }
  .st-label { min-width: 0; }
}

.st-logo-control { justify-content: flex-start; }
.settings-wrap .logo-uploader { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; }
.settings-wrap .logo-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.settings-wrap .logo-controls .hint { margin-top: 0; }
.settings-wrap .logo-controls .btn { margin-bottom: 2px; }
.settings-wrap .logo-current { width: 90px; height: 90px; border-radius: 16px; }
.settings-wrap .logo-current > svg { width: 38px; height: 38px; color: var(--muted); }
.logo-select-btn { width: auto !important; min-height: 38px; padding: 8px 13px; cursor: pointer; }
.logo-remove { margin: 5px 0 0; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.logo-remove input { width: 18px; height: 18px; }
.st-op-body { padding-top: 12px; }
.settings-tax-row .st-label { align-items: center; }
.settings-tax-row .st-label > span:last-child { display: flex; flex-direction: column; }
.settings-tax-control { position: relative; max-width: 150px; }
.settings-tax-control .hq-input { padding-right: 35px; text-align: right; }
.settings-tax-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; }
.printer-settings { padding-top: 14px; }
.printer-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.printer-spec { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.printer-spec > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.printer-spec-label { color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.printer-spec strong { color: var(--ink); font-size: calc(13px * var(--fs)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.printer-help-title { color: var(--ink); font-size: calc(13.5px * var(--fs)); font-weight: 900; margin-bottom: 4px; }
.printer-help { color: var(--muted); font-size: calc(12px * var(--fs)); line-height: 1.55; max-width: 760px; }
.printer-help a { color: var(--accent); font-weight: 800; }
.printer-help-box { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.printer-warning { margin-top: 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--red) 10%, var(--panel)); color: var(--ink); font-size: calc(11.5px * var(--fs)); line-height: 1.5; }
.printer-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.printer-test-btn { width: auto; min-height: 40px; white-space: nowrap; }
.wa-settings { padding-top: 12px; }
.wa-card-icon,
.wa-icon {
  background: color-mix(in srgb, #22c55e 16%, var(--panel-2)) !important;
  color: #22c55e !important;
  font-size: calc(11px * var(--fs)) !important;
  font-weight: 900;
}
.wa-master-toggle { padding: 4px 0 14px; }
.wa-credentials,
.wa-event-grid,
.wa-template-grid {
  display: grid;
  gap: 12px;
}
.wa-credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 0; border-top: 1px solid var(--line); }
.wa-field,
.wa-template { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.wa-field > span,
.wa-template > span,
.wa-section-title { color: var(--ink); font-size: calc(12px * var(--fs)); font-weight: 900; }
.wa-field em { color: var(--muted); font-size: calc(10px * var(--fs)); font-style: normal; font-weight: 600; }
.wa-field .hq-input,
.wa-template .hq-input { max-width: none; }
.wa-field small,
.wa-template small { color: var(--muted); font-size: calc(10.5px * var(--fs)); line-height: 1.45; }
.wa-section-title { margin: 3px 0 9px; }
.wa-event-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wa-event-card {
  display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); cursor: pointer;
}
.wa-event-card input { position: absolute; opacity: 0; pointer-events: none; }
.wa-event-check {
  width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 7px; color: transparent; background: var(--panel);
  font-size: calc(13px * var(--fs)); font-weight: 900;
}
.wa-event-card:has(input:checked) { border-color: color-mix(in srgb, #22c55e 55%, var(--line)); }
.wa-event-card:has(input:checked) .wa-event-check { color: #032b16; background: #22c55e; border-color: #22c55e; }
.wa-event-card > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.wa-event-card b { font-size: calc(12px * var(--fs)); }
.wa-event-card small { margin-top: 3px; color: var(--muted); font-size: calc(10.5px * var(--fs)); line-height: 1.4; }
.wa-variable-box { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-soft); }
.wa-variable-box > b { font-size: calc(11.5px * var(--fs)); }
.wa-variable-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.wa-variable-list span { padding: 5px 8px; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: calc(9.5px * var(--fs)); }
.wa-variable-list code { color: var(--accent); font-family: inherit; font-weight: 900; }
.wa-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wa-template textarea { min-height: 190px; resize: vertical; line-height: 1.5; font-family: inherit; }

/* Pengeluaran operasional */
.expense-overview {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.expense-stat {
  min-width: 0; min-height: 92px; padding: 15px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
}
.expense-stat.primary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel));
}
.expense-stat-icon,
.expense-card-icon {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; color: var(--accent); background: var(--accent-soft);
}
.expense-stat-icon svg,
.expense-card-icon svg { width: 21px; height: 21px; }
.expense-stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.expense-stat small { color: var(--muted); font-size: calc(10.5px * var(--fs)); font-weight: 700; }
.expense-stat b { margin-top: 3px; font-size: calc(18px * var(--fs)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-layout { display: grid; grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); gap: 14px; align-items: start; }
.expense-form-card,
.expense-list-card { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); overflow: hidden; }
.expense-form-card { position: sticky; top: 83px; }
.expense-card-head,
.expense-list-head {
  padding: 15px 17px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line);
}
.expense-card-head h2,
.expense-list-head h2 { font-size: calc(15px * var(--fs)); }
.expense-card-head p,
.expense-list-head p { margin-top: 2px; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.expense-card-icon { width: 38px; height: 38px; }
.expense-form { padding: 16px 17px 18px; }
.expense-form .field { margin-bottom: 13px; }
.expense-form .field label { font-size: calc(11.5px * var(--fs)); margin-bottom: 6px; }
.expense-form .field input,
.expense-form .field textarea,
.expense-form .select-big {
  width: 100%; min-height: 43px; padding: 9px 11px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 11px; outline: none;
  background: var(--panel-2); color: var(--ink); font: inherit; font-size: calc(12px * var(--fs));
}
.expense-form .field textarea { min-height: 68px; resize: vertical; line-height: 1.45; }
.expense-form .field input:focus,
.expense-form .field textarea:focus,
.expense-form .select-big:focus { border-color: var(--accent); box-shadow: var(--ring); }
.expense-money-input { position: relative; }
.expense-money-input > span {
  position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: calc(12px * var(--fs)); font-weight: 900;
}
.expense-money-input input { padding-left: 38px !important; font-weight: 800 !important; }
.expense-submit { width: 100%; min-height: 45px; justify-content: center; font-size: calc(12px * var(--fs)); }
.expense-submit svg { width: 17px; height: 17px; }
.expense-list-head { justify-content: space-between; }
.expense-recap-link {
  min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: var(--panel-2);
  text-decoration: none; font-size: calc(10.5px * var(--fs)); font-weight: 800; white-space: nowrap;
}
.expense-recap-link svg { width: 15px; height: 15px; }
.expense-list { display: flex; flex-direction: column; }
.expense-row {
  min-width: 0; padding: 13px 16px; display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.expense-row:last-child { border-bottom: 0; }
.expense-row:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.expense-method-icon {
  width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 12px; color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, var(--panel-2));
}
.expense-method-icon svg { width: 20px; height: 20px; }
.expense-row-main { min-width: 0; }
.expense-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.expense-row-title b { font-size: calc(12.5px * var(--fs)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-row-title span {
  flex-shrink: 0; padding: 3px 7px; border-radius: 999px; color: var(--muted);
  background: var(--panel-2); font-size: calc(9px * var(--fs)); font-weight: 800;
}
.expense-row-date { margin-top: 3px; color: var(--muted); font-size: calc(10px * var(--fs)); }
.expense-row-note { margin-top: 4px; color: var(--ink-soft); font-size: calc(10.5px * var(--fs)); line-height: 1.4; overflow-wrap: anywhere; }
.expense-row-side { display: flex; align-items: center; gap: 12px; }
.expense-row-side > strong { min-width: 110px; text-align: right; font-size: calc(12.5px * var(--fs)); font-variant-numeric: tabular-nums; }
.expense-row-actions { display: flex; gap: 6px; }
.expense-row-actions form { display: flex; }
.expense-action {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--muted);
  cursor: pointer; text-decoration: none;
}
.expense-action svg { width: 15px; height: 15px; }
.expense-action.edit:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.expense-action.delete:hover { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.expense-pagination { padding: 0 16px 16px; }
.expense-empty { min-height: 300px; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.expense-empty > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--panel-2); color: var(--muted); }
.expense-empty svg { width: 24px; height: 24px; }
.expense-empty b { margin-top: 12px; font-size: calc(13px * var(--fs)); }
.expense-empty p { margin-top: 4px; color: var(--muted); font-size: calc(11px * var(--fs)); }
.expense-back { margin-top: 14px; display: inline-flex; color: var(--muted); text-decoration: none; font-size: calc(11px * var(--fs)); font-weight: 800; }
.expense-back:hover { color: var(--accent); }

@media (max-width: 980px) {
  .expense-layout { grid-template-columns: 1fr; }
  .expense-form-card { position: static; }
}
@media (max-width: 640px) {
  .expense-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-stat:first-child { grid-column: 1 / -1; }
  .expense-stat { min-height: 82px; padding: 12px; }
  .expense-stat b { font-size: calc(16px * var(--fs)); }
  .expense-row { grid-template-columns: 38px minmax(0, 1fr); padding: 13px; gap: 10px; align-items: start; }
  .expense-method-icon { width: 38px; height: 38px; }
  .expense-row-side { grid-column: 1 / -1; justify-content: space-between; padding-top: 2px; }
  .expense-row-side > strong { min-width: 0; text-align: left; font-size: calc(14px * var(--fs)); }
  .expense-action { width: 38px; height: 38px; }
  .expense-list-head { align-items: flex-start; }
  .expense-recap-link { min-height: 38px; }
}
@media (max-width: 380px) {
  .expense-overview { grid-template-columns: 1fr; }
  .expense-stat:first-child { grid-column: auto; }
  .expense-list-head { flex-direction: column; }
  .expense-recap-link { width: 100%; justify-content: center; }
}

/* Master data kategori dan layanan */
.master-overview {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.master-stat {
  min-width: 0; min-height: 88px; padding: 14px 15px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--panel);
}
.master-stat.primary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel));
}
.master-stat-icon,
.master-card-icon {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; color: var(--accent); background: var(--accent-soft);
}
.master-stat-icon svg,
.master-card-icon svg { width: 21px; height: 21px; }
.master-stat > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.master-stat small { color: var(--muted); font-size: calc(10.5px * var(--fs)); font-weight: 700; }
.master-stat b { margin-top: 2px; font-size: calc(20px * var(--fs)); line-height: 1.2; }
.master-layout {
  display: grid; grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
  gap: 14px; align-items: start;
}
.master-form-card,
.master-list-card {
  min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 17px; background: var(--panel);
}
.master-form-card { position: sticky; top: 83px; }
.master-card-head,
.master-list-head {
  padding: 15px 17px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--line);
}
.master-card-head > span:last-child,
.master-list-head > span:first-child { min-width: 0; }
.master-card-head h2,
.master-list-head h2 { font-size: calc(15px * var(--fs)); }
.master-card-head p,
.master-list-head p { margin-top: 2px; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.master-card-icon { width: 38px; height: 38px; }
.master-form { padding: 16px 17px 18px; }
.master-form .field { margin-bottom: 13px; }
.master-form .field label { font-size: calc(11.5px * var(--fs)); margin-bottom: 6px; }
.master-form .field input[type=text],
.master-form .field input[type=number],
.master-form .select-big {
  min-height: 43px; padding: 9px 11px; border-radius: 11px;
  font-size: calc(12px * var(--fs));
}
.master-form .grid-2 { gap: 10px; }
.master-form .icon-preview {
  height: 48px; padding: 5px 10px !important; text-align: left;
  font-size: calc(22px * var(--fs)) !important;
}
.master-form .emoji-pick { gap: 6px; margin-top: 8px; }
.master-form .emoji-btn {
  width: 37px; height: 37px; border-radius: 9px;
  font-size: calc(18px * var(--fs));
}
.master-form .color-pick { gap: 7px; }
.master-form .swatch { width: 36px; height: 36px; border-radius: 10px; }
.master-form .swatch .tick { font-size: calc(18px * var(--fs)); }
.master-form .switch-row {
  min-height: 42px; margin: 10px 0 13px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2);
  font-size: calc(11px * var(--fs)); line-height: 1.35;
}
.master-form .switch-row input { width: 20px; height: 20px; flex-shrink: 0; }
.master-submit {
  width: 100%; min-height: 45px; justify-content: center;
  gap: 7px; font-size: calc(12px * var(--fs));
}
.master-submit svg { width: 17px; height: 17px; }
.master-list-head { justify-content: space-between; }
.master-head-link {
  min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: var(--panel-2);
  text-decoration: none; font-size: calc(10.5px * var(--fs)); font-weight: 800; white-space: nowrap;
}
.master-head-link svg { width: 15px; height: 15px; }
.master-list { display: flex; flex-direction: column; }
.master-row {
  min-width: 0; padding: 13px 16px; display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.master-row:last-child { border-bottom: 0; }
.master-row:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.master-row-icon {
  width: 43px; height: 43px; display: grid; place-items: center;
  border-radius: 12px; color: var(--master-color);
  background: color-mix(in srgb, var(--master-color) 15%, var(--panel-2));
}
.master-row-icon svg { width: 21px; height: 21px; }
.master-row-main { min-width: 0; }
.master-row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.master-row-title b {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: calc(12.5px * var(--fs));
}
.master-row-main > p {
  margin-top: 4px; color: var(--muted);
  font-size: calc(10px * var(--fs)); line-height: 1.4;
}
.master-row-main > p span { padding: 0 3px; opacity: .75; }
.master-badge {
  padding: 3px 7px; border-radius: 999px; color: var(--muted); background: var(--panel-2);
  font-size: calc(8.5px * var(--fs)); font-weight: 800; white-space: nowrap;
}
.master-badge.popular {
  color: #f59e0b; background: color-mix(in srgb, #f59e0b 13%, var(--panel-2));
}
.master-badge.danger {
  color: var(--red-ink); background: color-mix(in srgb, var(--red) 13%, var(--panel-2));
}
.master-row-side { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.master-type {
  color: var(--muted); font-size: calc(10px * var(--fs)); font-weight: 800; white-space: nowrap;
}
.master-price { min-width: 105px; display: flex; flex-direction: column; align-items: flex-end; }
.master-price b { font-size: calc(12.5px * var(--fs)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.master-price small { margin-top: 2px; color: var(--muted); font-size: calc(9px * var(--fs)); }
.master-actions { display: flex; gap: 6px; }
.master-actions form { display: flex; }
.master-action {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--muted);
  cursor: pointer; text-decoration: none;
}
.master-action svg { width: 15px; height: 15px; }
.master-action.edit:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.master-action.delete:hover { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.master-pagination { padding: 0 16px 16px; }
.master-empty {
  min-height: 300px; padding: 30px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.master-empty > span {
  width: 50px; height: 50px; display: grid; place-items: center;
  border-radius: 14px; background: var(--panel-2); color: var(--muted);
}
.master-empty svg { width: 24px; height: 24px; }
.master-empty b { margin-top: 12px; font-size: calc(13px * var(--fs)); }
.master-empty p { margin-top: 4px; color: var(--muted); font-size: calc(11px * var(--fs)); }
.master-back {
  margin-top: 14px; display: inline-flex; color: var(--muted);
  text-decoration: none; font-size: calc(11px * var(--fs)); font-weight: 800;
}
.master-back:hover { color: var(--accent); }

@media (max-width: 980px) {
  .master-layout { grid-template-columns: 1fr; }
  .master-form-card { position: static; }
}
@media (max-width: 640px) {
  .master-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .master-stat:first-child { grid-column: 1 / -1; }
  .master-stat { min-height: 80px; padding: 12px; }
  .master-stat b { font-size: calc(17px * var(--fs)); }
  .master-row {
    grid-template-columns: 39px minmax(0, 1fr); padding: 13px; gap: 10px; align-items: start;
  }
  .master-row-icon { width: 39px; height: 39px; }
  .master-row-side { grid-column: 1 / -1; justify-content: space-between; padding-top: 2px; }
  .master-price { min-width: 0; align-items: flex-start; }
  .master-price b { font-size: calc(14px * var(--fs)); }
  .master-action { width: 38px; height: 38px; }
  .master-list-head { align-items: flex-start; }
  .master-head-link { min-height: 38px; }
}
@media (max-width: 380px) {
  .master-overview { grid-template-columns: 1fr; }
  .master-stat:first-child { grid-column: auto; }
  .master-list-head { flex-direction: column; }
  .master-head-link { width: 100%; justify-content: center; }
  .master-form .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .settings-actions { position: static; }
  .wa-template-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-save-copy { text-align: center; order: -1; }
  .settings-back, .settings-save { width: 100%; }
  .printer-spec-grid { grid-template-columns: 1fr; }
  .printer-actions .btn { width: 100%; }
  .settings-tax-control { max-width: none; }
  .wa-credentials,
  .wa-event-grid { grid-template-columns: 1fr; }
}
.is-hidden { display: none !important; }
.users-wrap { display: flex; flex-direction: column; }
.users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hq-table { display: flex; flex-direction: column; }
.hq-table-head { display: grid; grid-template-columns: 1.6fr 0.7fr 0.7fr 100px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: calc(11.5px * var(--fs)); font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.hq-table-row { display: grid; grid-template-columns: 1.6fr 0.7fr 0.7fr 100px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.hq-table-row:last-child { border-bottom: none; }
.ht-right { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.ht-right form { margin: 0; }
.hq-user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hq-ava { width: 38px; height: 38px; border-radius: 50%; color: #fff; font-size: calc(12px * var(--fs)); font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hq-ava.admin { background: #7c3aed; }
.hq-ava.kasir { background: #16a34a; }
.hq-ava.developer { background: #0f766e; }
.hq-user-meta { min-width: 0; }
.hq-user-name { font-size: calc(13.5px * var(--fs)); font-weight: 900; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hq-user-sub { font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.hq-role-pill { font-size: calc(11px * var(--fs)); font-weight: 900; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); display: inline-flex; align-items: center; }
.hq-role-pill.admin { color: #7c3aed; border-color: color-mix(in srgb, #7c3aed 40%, var(--line)); background: color-mix(in srgb, #7c3aed 12%, var(--panel)); }
.hq-role-pill.kasir { color: #16a34a; border-color: color-mix(in srgb, #16a34a 40%, var(--line)); background: color-mix(in srgb, #16a34a 12%, var(--panel)); }
.hq-role-pill.developer { color: #14b8a6; border-color: color-mix(in srgb, #14b8a6 40%, var(--line)); background: color-mix(in srgb, #14b8a6 12%, var(--panel)); }
.hq-status-pill { font-size: calc(11px * var(--fs)); font-weight: 900; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); display: inline-flex; align-items: center; }
.hq-status-pill.on { color: var(--green-ink); background: color-mix(in srgb, var(--green) 14%, var(--panel)); border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.hq-status-pill.off { color: var(--red-ink); background: color-mix(in srgb, var(--red) 14%, var(--panel)); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.pin-text { text-align: center; letter-spacing: 14px; font-size: calc(28px * var(--fs)) !important; font-weight: 800; max-width: 220px; }

/* ============================================================
   User management
   ============================================================ */
.users-wrap { width: 100%; max-width: none; margin: 0; gap: 14px; }
.users-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.user-stat-card {
  min-width: 0; min-height: 88px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--panel); display: flex; align-items: center; gap: 13px;
}
.user-stat-card:first-child {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel));
}
.user-stat-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.user-stat-icon svg { width: 21px; height: 21px; }
.user-stat-icon.all { color: var(--accent); background: var(--accent-soft); }
.user-stat-icon.active { color: var(--green-ink); background: color-mix(in srgb, var(--green) 14%, var(--panel)); }
.user-stat-icon.admin { color: #9b7cff; background: color-mix(in srgb, #7c3aed 16%, var(--panel)); }
.user-stat-copy { display: flex; flex-direction: column; min-width: 0; }
.user-stat-copy strong { margin-top: 2px; font-size: calc(20px * var(--fs)); line-height: 1.2; font-weight: 900; }
.user-stat-copy small { color: var(--muted); font-size: calc(10.5px * var(--fs)); font-weight: 700; }

.users-toolbar.hq-card {
  min-height: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel); display: flex; align-items: center; justify-content: space-between;
}
.users-toolbar .kan-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.users-toolbar .chip { padding: 8px 12px; font-size: calc(12px * var(--fs)); }
.user-add-btn { width: auto; white-space: nowrap; }
.user-add-btn svg, .user-form-actions .btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.user-create-card { scroll-margin-top: 84px; }
.user-create-card .hq-card-hd { padding: 14px 18px; }
.user-create-card .hq-card-body { padding: 16px 18px 18px; }
.user-form-heading { display: flex; flex-direction: column; min-width: 0; }
.user-form-sub { margin-top: 1px; color: var(--muted); font-size: calc(11px * var(--fs)); }
.user-form-close {
  width: 34px; height: 34px; margin-left: auto; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 24px; line-height: 1;
}
.user-form-close:hover { color: var(--ink); }
.user-fields-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.user-fields-main { min-width: 0; padding-top: 2px; }
.user-fields-main .field:last-of-type { margin-bottom: 0; }
.user-pin-panel {
  padding: 14px; border: 1px solid var(--line); border-radius: 15px;
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
}
.user-pin-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.user-pin-heading > div { display: flex; flex-direction: column; }
.user-pin-heading strong { font-size: calc(13px * var(--fs)); }
.user-pin-heading small, .user-pin-note { color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.user-pin-lock { color: var(--accent); font-weight: 900; letter-spacing: 2px; font-size: calc(13px * var(--fs)); }
.user-pin-note {
  margin-top: 9px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--yellow-ink);
}
.user-pin-panel .pin-dots-sm { margin: 13px 0; gap: 10px; }
.user-pin-panel .pin-dots-sm .dot { width: 15px; height: 15px; }
.user-pin-panel .keypad-sm { max-width: none; gap: 7px; }
.user-pin-panel .keypad-sm .key {
  height: 41px; border-radius: 10px; font-size: calc(17px * var(--fs)); background: var(--panel);
}
.user-active-switch {
  margin: 17px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--panel-2);
}
.user-active-switch input { position: absolute; opacity: 0; pointer-events: none; }
.user-switch-ui {
  width: 42px; height: 24px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-3); position: relative; flex-shrink: 0; transition: .15s ease;
}
.user-switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: .15s ease;
}
.user-active-switch:has(input:checked) .user-switch-ui { border-color: var(--green); background: var(--green); }
.user-active-switch:has(input:checked) .user-switch-ui::after { left: 20px; }
.user-active-switch > span:last-child { display: flex; flex-direction: column; }
.user-active-switch strong { font-size: calc(12px * var(--fs)); }
.user-active-switch small { color: var(--muted); font-size: calc(10.5px * var(--fs)); font-weight: 500; }
.user-form-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.user-form-actions .btn { width: auto; }
.user-edit-panel { max-width: 920px; margin: 0 auto; }

.users-list-card { min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); }
.users-list-heading {
  min-height: 64px; padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.users-list-heading h2 { font-size: calc(15px * var(--fs)); font-weight: 900; }
.users-list-heading p { margin-top: 2px; color: var(--muted); font-size: calc(10.5px * var(--fs)); }
.users-inactive-note {
  padding: 5px 9px; border-radius: 999px; color: var(--red-ink); white-space: nowrap;
  background: color-mix(in srgb, var(--red) 12%, var(--panel)); font-size: calc(10px * var(--fs)); font-weight: 800;
}
.users-table .hq-table-head, .users-table .hq-table-row {
  grid-template-columns: minmax(230px, 1.7fr) .6fr .6fr 160px;
}
.users-table .hq-table-row { min-height: 66px; transition: background .15s ease; }
.users-table .hq-table-row:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.users-table .hq-ava { width: 40px; height: 40px; border-radius: 12px; }
.users-table .hq-user-name { font-size: calc(13px * var(--fs)); }
.users-table .hq-user-sub { margin-top: 2px; font-size: calc(10.5px * var(--fs)); }
.users-table .hq-role-pill, .users-table .hq-status-pill { border-radius: 999px; padding: 4px 9px; }
.users-table .hq-status-pill::before {
  content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor;
}
.user-action {
  min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-2); color: var(--ink-soft); text-decoration: none; cursor: pointer;
  font: inherit; font-size: calc(10.5px * var(--fs)); font-weight: 800; transition: .15s ease;
}
.user-action svg { width: 15px; height: 15px; }
.user-action.edit:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); }
.user-action.delete:hover { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.user-protected {
  min-height: 34px; padding: 6px 9px; display: inline-flex; align-items: center;
  border: 1px solid color-mix(in srgb, #14b8a6 35%, var(--line)); border-radius: 9px;
  color: #14b8a6; background: color-mix(in srgb, #14b8a6 10%, var(--panel));
  font-size: calc(10px * var(--fs)); font-weight: 800; white-space: nowrap;
}
.users-empty { padding: 46px 20px; display: flex; align-items: center; flex-direction: column; text-align: center; }
.users-empty-icon {
  width: 52px; height: 52px; border-radius: 15px; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 11px;
}
.users-empty strong { font-size: calc(14px * var(--fs)); }
.users-empty p { margin-top: 3px; color: var(--muted); font-size: calc(11px * var(--fs)); }
.users-back-link {
  align-self: flex-start; color: var(--muted); text-decoration: none;
  font-size: calc(11.5px * var(--fs)); font-weight: 700;
}
.users-back-link:hover { color: var(--accent); }
.users-pagination { min-width: 0; }

@media (max-width: 820px) {
  .user-fields-grid { grid-template-columns: 1fr; }
  .user-pin-panel { max-width: 420px; width: 100%; }
  .users-table .hq-table-head, .users-table .hq-table-row {
    grid-template-columns: minmax(210px, 1.5fr) .6fr .6fr 84px;
  }
  .user-action span { display: none; }
}
@media (max-width: 640px) {
  .users-overview { grid-template-columns: 1fr 1fr; }
  .user-stat-card:last-child { grid-column: 1 / -1; }
  .user-stat-card { min-height: 80px; padding: 12px; }
  .user-stat-copy strong { font-size: calc(17px * var(--fs)); }
  .users-toolbar.hq-card { align-items: stretch; flex-direction: column; }
  .users-toolbar .kan-tabs { display: grid; grid-template-columns: repeat(2, 1fr); }
  .users-toolbar .chip { justify-content: center; text-align: center; }
  .user-add-btn { width: 100%; justify-content: center; }
  .users-table .hq-table-head { display: none; }
  .users-table .hq-table-row {
    grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 15px;
  }
  .users-table .hq-user { grid-column: 1 / -1; }
  .users-table .hq-table-row > div:not(.hq-user)::before {
    content: attr(data-label); display: block; margin-bottom: 5px;
    color: var(--muted); font-size: calc(9px * var(--fs)); font-weight: 800; text-transform: uppercase;
  }
  .users-table .ht-right { justify-content: flex-start; }
  .user-action span { display: inline; }
  .users-list-heading { align-items: flex-start; }
}
@media (max-width: 440px) {
  .users-overview { grid-template-columns: 1fr; }
  .user-stat-card:last-child { grid-column: auto; }
  .role-pick { grid-template-columns: 1fr; }
  .user-form-actions { align-items: stretch; flex-direction: column-reverse; }
  .user-form-actions .btn { width: 100%; justify-content: center; }
  .users-table .hq-table-row { grid-template-columns: 1fr; }
  .users-table .hq-user { grid-column: auto; }
}

/* ============================================================
   Guide
   ============================================================ */
.guide-step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.guide-step .n { background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: var(--accent-ink); font-size: calc(34px * var(--fs)); font-weight: 900; width: 72px; height: 72px; border-radius: 50%; display:flex; align-items:center; justify-content:center; flex-shrink: 0; }
.guide-step .big-ico { font-size: calc(56px * var(--fs)); }
.guide-step .txt h4 { font-size: calc(22px * var(--fs)); margin-bottom: 6px; }
.guide-step .txt p { font-size: calc(17px * var(--fs)); color: var(--muted); }
.legend { display:flex; gap: 16px; flex-wrap: wrap; margin: 14px 0 24px; }
.legend .chip { display:flex; align-items:center; gap:10px; font-size: calc(17px * var(--fs)); font-weight:700; background: var(--panel); border: 1px solid var(--line); padding:12px 18px; border-radius:14px; }
.legend .dot { width: 26px; height:26px; border-radius:50%; }

/* ============================================================
   LOGIN (papan angka)
   ============================================================ */
.login-page { overflow-x: hidden; }
.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 14% 18%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 28%),
    radial-gradient(circle at 88% 78%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 30%),
    linear-gradient(color-mix(in srgb, var(--line) 58%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 58%, transparent) 1px, transparent 1px),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--bg) 88%, var(--accent)) 52%, var(--bg));
  background-size: auto, auto, 52px 52px, 52px 52px, auto;
}
.login-body::before {
  content: '';
  position: fixed;
  z-index: -2;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 32%, transparent 0 52px, color-mix(in srgb, var(--accent) 13%, transparent) 53px 54px, transparent 55px),
    radial-gradient(circle at 78% 24%, transparent 0 82px, color-mix(in srgb, var(--accent) 10%, transparent) 83px 84px, transparent 85px),
    radial-gradient(circle at 74% 78%, transparent 0 125px, color-mix(in srgb, var(--blue) 10%, transparent) 126px 127px, transparent 128px);
  animation: login-drift 18s ease-in-out infinite alternate;
}
.login-body::after {
  content: '';
  position: fixed;
  z-index: -1;
  width: 460px;
  height: 460px;
  left: -170px;
  bottom: -210px;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  box-shadow:
    0 0 0 70px color-mix(in srgb, var(--accent) 4%, transparent),
    0 0 0 140px color-mix(in srgb, var(--accent) 3%, transparent);
}
.login-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 91%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: 28px;
  box-shadow:
    0 28px 70px -30px color-mix(in srgb, var(--accent) 24%, #000),
    0 18px 45px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 36px 38px 28px;
  width: 100%;
  max-width: 430px;
  text-align: center;
  animation: pop .35s ease;
}
.login-card::before {
  content: '';
  position: absolute;
  inset: 0 18% auto;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .78;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes login-drift { to { transform: translate3d(3%, -2%, 0) scale(1.04); } }
.login-logo { font-size: calc(60px * var(--fs)); width: 110px; height: 110px; margin: 0 auto 8px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.login-logo img { width: 100%; height: 100%; object-fit: cover; }
.login-title { font-size: calc(34px * var(--fs)); font-weight: 900; }
.login-sub { font-size: calc(17px * var(--fs)); color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.login-hint { font-size: calc(19px * var(--fs)); font-weight: 700; margin-bottom: 16px; }
.login-error { background: color-mix(in srgb, var(--red) 16%, var(--panel)); color: var(--red-ink); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); border-radius: 12px; padding: 12px 16px; font-size: calc(17px * var(--fs)); font-weight: 700; margin-bottom: 16px; }
.pin-dots { display: flex; justify-content: center; gap: 18px; margin: 8px 0 26px; }
.pin-dots .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3); border: 2px solid var(--line); transition: all .15s ease; }
.pin-dots .dot.filled { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.key { border: 1px solid var(--line); background: var(--panel-2); border-radius: 18px; font-size: calc(32px * var(--fs)); font-weight: 800; color: var(--ink); height: 80px; cursor: pointer; transition: transform .06s ease, background .12s ease; }
.key:active { transform: translateY(2px); background: var(--panel-3); }
.key-clear { color: var(--red-ink); } .key-back { color: var(--yellow-ink); }
.login-foot { margin-top: 22px; font-size: calc(15px * var(--fs)); color: var(--muted); }
.login-theme { position: absolute; top: 20px; right: 20px; z-index: 2; }
.pin-dots-sm { gap: 12px; margin: 6px 0 12px; } .pin-dots-sm .dot { width: 18px; height: 18px; }
.keypad-sm { gap: 10px; max-width: 300px; } .keypad-sm .key { height: 60px; font-size: calc(26px * var(--fs)); border-radius: 14px; }

@media (max-width: 520px) {
  .login-body {
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    background-size: auto, auto, 38px 38px, 38px 38px, auto;
  }
  .login-card { max-width: 400px; padding: 18px 18px 14px; border-radius: 22px; }
  .login-logo { width: 64px; height: 64px; font-size: calc(36px * var(--fs)); margin-bottom: 6px; }
  .login-title { font-size: calc(26px * var(--fs)); line-height: 1.2; }
  .login-sub { font-size: calc(14px * var(--fs)); margin-bottom: 8px; }
  .login-hint { font-size: calc(16px * var(--fs)); margin-bottom: 8px; }
  .login-error { padding: 9px 12px; margin-bottom: 10px; font-size: calc(14px * var(--fs)); }
  .pin-dots { gap: clamp(10px, 3.5vw, 15px); margin: 5px 0 12px; }
  .pin-dots .dot { width: 18px; height: 18px; }
  .keypad { gap: 8px; }
  .login-body .key { height: clamp(52px, 15vw, 64px); border-radius: 14px; font-size: calc(26px * var(--fs)); }
  .login-foot { margin-top: 10px; font-size: calc(12px * var(--fs)); line-height: 1.4; }
  .login-theme {
    position: fixed;
    top: max(7px, env(safe-area-inset-top));
    right: max(7px, env(safe-area-inset-right));
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: calc(16px * var(--fs));
  }
}

@media (max-width: 360px) {
  .login-card { padding-inline: 14px; }
  .pin-dots { gap: 9px; }
  .pin-dots .dot { width: 16px; height: 16px; }
}

@media (min-width: 521px) and (max-height: 840px) {
  .login-body { padding-block: 12px; }
  .login-card { padding-block: 24px 20px; }
  .login-logo { width: 90px; height: 90px; font-size: calc(50px * var(--fs)); }
  .login-title { font-size: calc(30px * var(--fs)); }
  .login-sub { font-size: calc(15px * var(--fs)); margin-bottom: 12px; }
  .login-hint { font-size: calc(17px * var(--fs)); margin-bottom: 12px; }
  .login-error { padding: 10px 14px; margin-bottom: 12px; font-size: calc(15px * var(--fs)); }
  .pin-dots { gap: 15px; margin: 6px 0 18px; }
  .pin-dots .dot { width: 20px; height: 20px; }
  .keypad { gap: 10px; }
  .login-body .key { height: 68px; border-radius: 16px; font-size: calc(28px * var(--fs)); }
  .login-foot { margin-top: 14px; font-size: calc(13px * var(--fs)); }
}

@media (min-width: 521px) and (max-height: 620px) {
  .login-body { align-items: center; padding: 12px; }
  .login-card {
    display: grid;
    grid-template-columns: minmax(160px, .8fr) minmax(300px, 1.35fr);
    grid-template-areas:
      "logo form"
      "title form"
      "sub form"
      "hint form"
      "error form"
      "foot form";
    align-items: center;
    column-gap: 28px;
    width: min(720px, 100%);
    max-width: 720px;
    padding: 20px 24px;
  }
  .login-logo { grid-area: logo; width: 72px; height: 72px; font-size: calc(40px * var(--fs)); margin-bottom: 4px; }
  .login-title { grid-area: title; font-size: calc(25px * var(--fs)); line-height: 1.2; }
  .login-sub { grid-area: sub; font-size: calc(14px * var(--fs)); margin-bottom: 8px; }
  .login-hint { grid-area: hint; font-size: calc(15px * var(--fs)); margin-bottom: 8px; }
  .login-error { grid-area: error; padding: 8px 10px; margin-bottom: 8px; font-size: calc(13px * var(--fs)); }
  .login-card form { grid-area: form; }
  .pin-dots { gap: 12px; margin: 0 0 12px; }
  .pin-dots .dot { width: 16px; height: 16px; }
  .keypad { gap: 7px; }
  .login-body .key { height: clamp(46px, 12vh, 58px); border-radius: 13px; font-size: calc(24px * var(--fs)); }
  .login-foot { grid-area: foot; margin-top: 5px; font-size: calc(11px * var(--fs)); line-height: 1.4; }
  .login-theme { position: fixed; top: 7px; right: 7px; width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-card, .login-body::before { animation: none; }
}

/* ============================================================
   RECEIPT (struk)
   ============================================================ */
.receipt-body { background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: 24px 16px 60px; min-height: 100vh; }
.receipt-flash { background: var(--green); color: #042; padding: 14px 20px; border-radius: 12px; font-size: calc(17px * var(--fs)); font-weight: 700; margin-bottom: 18px; max-width: 360px; text-align: center; }
.receipt-flash.receipt-error { background: var(--red); color: #fff; }
.receipt-actions form { width: 100%; }
.receipt-actions form .btn { width: 100%; }
.print-action-form .btn { gap: 8px; justify-content: center; }
.print-action-form .btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.receipt { background: #fff; color: #111; width: 360px; max-width: 100%; padding: 26px 24px; box-shadow: var(--shadow); font-family: 'Courier New', ui-monospace, monospace; }
.r-head { text-align: center; }
.r-logo { width: 70px; height: 70px; margin: 0 auto 8px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: calc(38px * var(--fs)); overflow: hidden; }
.r-logo img { width: 100%; height: 100%; object-fit: cover; }
.r-shop { font-size: calc(22px * var(--fs)); font-weight: 800; } .r-tag { font-size: calc(13px * var(--fs)); color: #555; } .r-line { font-size: calc(12px * var(--fs)); color: #555; margin-top: 2px; }
.r-sep { border-top: 2px dashed #999; margin: 14px 0; }
.r-meta div { display: flex; justify-content: space-between; font-size: calc(13px * var(--fs)); padding: 2px 0; } .r-meta span { color: #555; }
.r-items { width: 100%; } .r-it-name { font-size: calc(14px * var(--fs)); font-weight: 700; padding-top: 6px; } .r-it-description { padding: 2px 0; color: #555; font-size: calc(9px * var(--fs)); line-height: 1.3; font-style: italic; overflow-wrap: anywhere; white-space: pre-wrap; } .r-it-calc { font-size: calc(13px * var(--fs)); color: #333; display: flex; justify-content: space-between; } .r-it-sub { font-weight: 700; }
.r-total-row { display: flex; justify-content: space-between; font-size: calc(14px * var(--fs)); padding: 3px 0; } .r-total-row.big { font-size: calc(20px * var(--fs)); font-weight: 800; } .r-total-row.unpaid b { color: #b91c1c; }
.r-foot { text-align: center; font-size: calc(14px * var(--fs)); font-weight: 700; } .r-foot .r-line { font-weight: 400; }
.receipt-actions { display: flex; flex-direction: column; gap: 12px; width: 360px; max-width: 100%; margin-top: 22px; }
.receipt-actions .btn { min-height: 48px; padding: 12px 18px; font-size: calc(16px * var(--fs)); }
@media print { .no-print { display: none !important; } .receipt-body { background:#fff; padding:0; display:block; } .receipt { box-shadow:none; width:100%; padding:0; } @page { margin: 6mm; } }

/* ============================================================
   Penyesuaian agar mirip mockup
   ============================================================ */
/* tombol "Order Tersimpan" di appbar */
.ab-saved {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 12px 18px; border-radius: 14px; font-size: calc(16px * var(--fs)); font-weight: 700; text-decoration: none;
  white-space: nowrap;
}
.ab-saved:active { transform: scale(.97); }
.ab-saved svg { width: calc(16px * var(--fs)); height: calc(16px * var(--fs)); }
/* titik hijau "sesi aktif" pada chip kasir */
.dot-on { display:inline-block; width:8px; height:8px; border-radius:50%; background: var(--green); margin-right:5px; vertical-align: middle; }

/* chip pelanggan (avatar + field) */
.cust-chip { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
.cust-ava { width: calc(36px * var(--fs)); height: calc(36px * var(--fs)); border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(13px * var(--fs)); flex-shrink: 0; }
.cust-ava[data-empty] { background: var(--panel-3); color: var(--muted); }
.cust-ava svg { width: calc(18px * var(--fs)); height: calc(18px * var(--fs)); }
.cust-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cust-fields input { width: 100%; background: none; border: none; outline: none; color: var(--ink); font-size: calc(15px * var(--fs)); padding: 2px 0; }
.cust-fields input:first-child { font-weight: 600; }
.cust-fields input::placeholder { color: var(--muted); }
.cust-chip:has(.field-err) { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent); }
.cust-fields input.field-err::placeholder { color: var(--red-ink); }

/* baris item keranjang: total per-baris di kanan */
.ci-line { font-size: calc(14px * var(--fs)); font-weight: 800; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

/* bar order mengambang (HP) — disembunyikan kecuali di HP saat ada item */
.mobile-bar {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 55;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  border-radius: 16px; padding: 16px 20px; font-size: calc(18px * var(--fs)); font-weight: 800;
  align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.mobile-bar .mb-left { display: flex; align-items: center; gap: 10px; }
.mobile-bar .mb-badge { background: rgba(0,0,0,0.22); color: #fff; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: calc(15px * var(--fs)); }

/* ============================================================
   ANTRIAN — papan kanban (mengikuti template)
   ============================================================ */
.kan-tabs { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-soft); border-radius: 12px; padding: 9px 16px;
  font-size: calc(14px * var(--fs)); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip svg { width: calc(14px * var(--fs)); height: calc(14px * var(--fs)); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-theme="dark"] .chip.active { background: #fff; color: #0b0b0f; border-color: #fff; }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kan-col { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; min-height: 200px; }
.kan-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.kan-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kan-title { font-size: calc(14px * var(--fs)); font-weight: 700; color: var(--ink); }
.kan-count { font-size: calc(12px * var(--fs)); font-weight: 700; color: var(--muted); background: var(--surface, var(--panel-2)); padding: 1px 8px; border-radius: 999px; }
.kan-body { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 14px; }
.kan-empty { padding: 22px 0; text-align: center; color: var(--muted); font-size: calc(12.5px * var(--fs)); }

.ord-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ord-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ord-code { font-size: calc(12.5px * var(--fs)); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ord-badge { font-size: calc(9.5px * var(--fs)); font-weight: 700; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .3px; }
.ord-badge.paid { color: var(--green-ink); background: var(--status-ready-bg); }
.ord-badge.unpaid { color: var(--red-ink); background: color-mix(in srgb, var(--red) 16%, transparent); }
.ord-cust { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.ord-ava { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: calc(11px * var(--fs)); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ord-cust-meta { min-width: 0; }
.ord-name { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-phone { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.ord-items { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px; }
.ord-item { font-size: calc(11.5px * var(--fs)); color: var(--ink-soft); min-width: 0; }
.ord-item > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-item small, .order-item-copy small, .pm-item-main small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(9.5px * var(--fs)); font-weight: 500; overflow-wrap: anywhere; }
.order-item-copy, .pm-item-main { display: flex; flex-direction: column; min-width: 0; }
.ord-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); gap: 8px; }
.ord-total { font-size: calc(13px * var(--fs)); font-weight: 800; color: var(--ink); }
.ord-eta { font-size: calc(11px * var(--fs)); color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ord-cashier { font-size: calc(9.5px * var(--fs)); font-weight: 700; color: var(--ink-soft); background: var(--panel-3); padding: 1px 6px; border-radius: 999px; }
.ord-actions { display: flex; gap: 8px; margin-top: 10px; }
.ord-actions form { flex: 1; }
.ord-btn {
  width: 100%; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
  border-radius: 10px; padding: 9px 10px; font-size: calc(12.5px * var(--fs)); font-weight: 800; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.ord-btn:active { transform: scale(.97); }
.ord-btn.ghost { --c: var(--muted); }
.ord-btn svg { width: calc(15px * var(--fs)); height: calc(15px * var(--fs)); flex-shrink: 0; }
.ord-icon-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 10px; width: 38px; height: 38px; flex-shrink: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: color .12s, border-color .12s, background .12s;
}
.ord-icon-btn svg { width: calc(16px * var(--fs)); height: calc(16px * var(--fs)); }
.ord-icon-btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); color: var(--ink); }
.ord-eta svg { width: calc(12px * var(--fs)); height: calc(12px * var(--fs)); }

@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kanban { grid-template-columns: 1fr; } }

/* Filter bar antrian */
.kan-filter { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.kan-search { position: relative; flex: 0 1 280px; min-width: 200px; }
.kan-search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: calc(14px * var(--fs)); font-family: inherit; outline: none; }
.kan-search input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.kan-search .s-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.kan-search .s-ico svg { width: calc(16px * var(--fs)); height: calc(16px * var(--fs)); }
.kf-spacer { flex: 1; }
.kf-select { height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: calc(14px * var(--fs)); font-weight: 600; font-family: inherit; outline: none; cursor: pointer; }
.kf-select:focus { border-color: var(--accent); }
.kf-clear { height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: calc(14px * var(--fs)); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.kan-col.is-empty-filtered { opacity: .5; }

/* filter rentang tanggal */
.kan-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.kan-dates .kd-label { font-size: calc(14px * var(--fs)); font-weight: 700; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.kan-dates .kd-label svg { width: calc(15px * var(--fs)); height: calc(15px * var(--fs)); }
.kan-dates .kd-sep { font-size: calc(14px * var(--fs)); color: var(--muted); }
.kan-dates input[type=date] {
  height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: calc(14px * var(--fs)); font-family: inherit; outline: none;
}
.kan-dates input[type=date]:focus { border-color: var(--accent); box-shadow: var(--ring); }
.kf-apply { height: 42px; padding: 0 18px; border-radius: 12px; border: none; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-size: calc(14px * var(--fs)); font-weight: 800; cursor: pointer; }
.kf-apply:active { transform: scale(.97); }
.kan-rangenote { font-size: calc(13.5px * var(--fs)); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-bottom: 14px; }

/* tombol tanda terima & bayar-muka di kartu */
.ord-actions .ord-icon-btn.ticket { color: var(--accent); }
.ord-actions .ord-icon-btn.pay { color: var(--green-ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.ord-actions .ord-icon-btn.edit { color: var(--blue); }

/* Modal edit detail/keterangan layanan dari papan antrian */
body.detail-modal-open { overflow: hidden; }
.item-detail-modal { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 18px; }
.item-detail-modal[hidden] { display: none; }
.item-detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); cursor: default; }
.item-detail-box {
  position: relative; width: min(560px, 100%); max-height: min(760px, 94vh); overflow: hidden;
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: 0 28px 80px rgba(0,0,0,.52);
}
.item-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.item-detail-head h2 { font-size: calc(20px * var(--fs)); line-height: 1.2; }
.item-detail-head p { margin-top: 3px; color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.item-detail-close { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.item-detail-close:hover { color: var(--ink); }
.item-detail-close svg { width: 18px; height: 18px; }
.item-detail-form { min-height: 0; display: flex; flex-direction: column; }
.item-detail-list { min-height: 0; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.item-detail-field { display: flex; flex-direction: column; gap: 8px; }
.item-detail-service { display: flex; flex-direction: column; gap: 2px; }
.item-detail-service b { color: var(--ink); font-size: calc(14px * var(--fs)); }
.item-detail-service small { color: var(--muted); font-size: calc(11px * var(--fs)); }
.item-detail-field textarea {
  width: 100%; min-height: 72px; resize: vertical; padding: 11px 13px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  font: inherit; font-size: calc(14px * var(--fs)); line-height: 1.45; outline: none;
}
.item-detail-field textarea::placeholder { color: var(--muted); }
.item-detail-field textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.item-detail-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 22px 20px; border-top: 1px solid var(--line); }
.item-detail-actions .btn { min-height: 44px; padding: 10px 16px; font-size: calc(13px * var(--fs)); }
.item-detail-actions .btn svg { width: 17px; height: 17px; }
@media (max-width: 520px) {
  .item-detail-modal { padding: 10px; align-items: flex-end; }
  .item-detail-box { width: 100%; max-height: 88vh; border-radius: 20px 20px 14px 14px; }
  .item-detail-head { padding: 17px 17px 14px; }
  .item-detail-list { padding: 16px 17px; }
  .item-detail-actions { padding: 13px 17px 17px; }
  .item-detail-actions .btn { flex: 1; justify-content: center; }
}

/* tag lunas di kartu finish-index */
.oc-paid-tag { display:inline-block; background: var(--status-ready-bg); color: var(--green-ink); font-size: calc(14px * var(--fs)); font-weight: 800; padding: 6px 12px; border-radius: 10px; margin-bottom: 12px; }

/* Tanda terima — kode besar */
.r-ticket-label { text-align: center; font-size: calc(11px * var(--fs)); font-weight: 800; letter-spacing: 1.5px; color: #333; margin-top: 8px; }
.r-bigcode { text-align: center; font-size: calc(34px * var(--fs)); font-weight: 900; letter-spacing: 2px; color: #111; margin-top: 2px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pager-info { font-size: calc(13px * var(--fs)); color: var(--muted); }
.pager-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-btn {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: calc(14px * var(--fs)); font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.pager-btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pager-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pager-btn.disabled { opacity: .4; cursor: default; }
.pager-gap { color: var(--muted); padding: 0 4px; }

/* pager kompak di dalam kolom kanban */
.kan-pager { padding: 4px 0 2px; }
.kan-pager .pager { margin-top: 6px; justify-content: center; }
.kan-pager .pager-info { display: none; }
.kan-pager .pager-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: calc(12.5px * var(--fs)); border-radius: 9px; }

/* ============================================================
   PELANGGAN — daftar + detail (mengikuti template)
   ============================================================ */
.cust-page { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.cust-list-pane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.cust-list { display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.cust-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; }
.cust-row:hover { background: var(--panel-2); }
.cust-row.active { background: var(--accent-soft); }
.cust-ava2 { width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800; font-size: calc(14px * var(--fs)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cust-row-meta { flex: 1; min-width: 0; }
.crn { display: block; font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crs { display: block; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.cust-tier { font-size: calc(10.5px * var(--fs)); font-weight: 800; border: 1px solid; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.cust-none { padding: 20px; text-align: center; color: var(--muted); font-size: calc(13px * var(--fs)); }

.cust-detail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; min-height: 300px; }
.cd-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cd-ava { width: 64px; height: 64px; border-radius: 50%; color: #fff; font-weight: 800; font-size: calc(22px * var(--fs)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cd-id { flex: 1; min-width: 0; }
.cd-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cd-name { font-size: calc(22px * var(--fs)); font-weight: 800; }
.cd-phone { font-size: calc(14px * var(--fs)); color: var(--muted); margin-top: 4px; }
.cd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.cd-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.cd-stat-lbl { font-size: calc(12px * var(--fs)); color: var(--muted); margin-bottom: 8px; }
.cd-stat-val { font-size: calc(20px * var(--fs)); font-weight: 800; }
.cd-hist-title { font-size: calc(15px * var(--fs)); font-weight: 700; margin-bottom: 12px; }
.cd-hist { display: flex; flex-direction: column; gap: 8px; }
.cd-hrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.cd-hcode { font-size: calc(12.5px * var(--fs)); font-weight: 700; width: 86px; flex-shrink: 0; }
.cd-hitems { flex: 1; min-width: 0; font-size: calc(12.5px * var(--fs)); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-hstatus { font-size: calc(11.5px * var(--fs)); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cd-hstatus .dot { width: 7px; height: 7px; border-radius: 50%; }
.cd-htotal { font-size: calc(13.5px * var(--fs)); font-weight: 800; width: 96px; text-align: right; flex-shrink: 0; }

@media (max-width: 900px) {
  .cust-page { grid-template-columns: 1fr; }
  .cust-list { max-height: 320px; }
  .cd-hitems { display: none; }
}

@media (max-width: 560px) {
  .cust-list-pane { padding: 12px; }
  .cust-list { max-height: 42vh; }
  .cust-detail { padding: 18px 16px; }
  .cd-ava { width: 56px; height: 56px; font-size: calc(20px * var(--fs)); }
  .cd-stats { grid-template-columns: 1fr; }
  .cd-head > .btn { width: 100% !important; }
  .cd-hrow { align-items: flex-start; gap: 10px; }
  .cd-hcode { width: auto; }
  .cd-htotal { width: auto; margin-left: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .pos-layout { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart { position: static; max-height: none; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orders-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .income-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .astat.wide { grid-column: span 2; }
  .grid-2 { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* Sidebar -> bottom nav */
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; flex-direction: row; position: fixed; bottom: 0; top: auto;
    border-right: none; border-top: 1px solid var(--line); padding: 6px; z-index: 60;
    justify-content: space-around; background: var(--sidebar);
  }
  .sb-logo, .sb-avatar { display: none; }
  .sb-nav { flex-direction: row; justify-content: space-around; gap: 2px; }
  .nav-item { width: auto; flex: 1; padding: 6px 4px; font-size: calc(10.5px * var(--fs)); }
  .nav-item .ni-ico { width: 36px; height: 36px; border-radius: 11px; font-size: calc(18px * var(--fs)); }
  .nav-item .ni-ico svg { width: 20px; height: 20px; }
  .sb-bottom { flex-direction: row; }
  .sb-bottom .nav-item.theme-side { display: none; }
  .content { padding-bottom: 76px; }
  .appbar { padding: 14px 16px; }
  .ab-chip .c-meta { display: none; }
  .ab-saved { display: none; }              /* dipindah ke bar bawah */
  .ab-title { font-size: calc(22px * var(--fs)); }
  .mobile-bar.show { display: flex; }       /* tampil saat ada item */
}
@media (max-width: 560px) {
  .income-cards { grid-template-columns: 1fr; }
  table.list { min-width: 760px; }
  table.list th, table.list td { padding: 12px 14px; }
  .income-list { min-width: 900px; }
  .income-list th, .income-list td { padding: 12px 14px; }
}
@media (max-width: 740px) {
  .income-list { min-width: 740px; }
  .income-list th:nth-child(4), .income-list td:nth-child(4) { display: none; }
  .income-cust .it-sm { display: block; }
  .income-print { width: 36px; height: 36px; border-radius: 12px; }
}
@media (max-width: 420px) {
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-tab { font-size: calc(14px * var(--fs)); padding: 9px 14px; }
  .svc-card { padding: 14px; }
  .svc-name { font-size: calc(16px * var(--fs)); }
  .svc-price { font-size: calc(17px * var(--fs)); }
  table.list { min-width: 700px; }
  table.list th, table.list td { padding: 10px 12px; }
  .income-list { min-width: 820px; }
  .income-list th, .income-list td { padding: 10px 12px; }
}

/* ============================================================
   RINGKASAN HQ — dashboard superadmin
   ============================================================ */
/* Filter periode (dropdown) */
.hq-filter {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 4px 10px 4px 12px; border-radius: 14px; height: 52px;
}
.hq-filter-ico { font-size: calc(15px * var(--fs)); }
.hq-period-select {
  appearance: none; -webkit-appearance: none;
  border: none; background: transparent; color: var(--ink);
  font-size: calc(15px * var(--fs)); font-weight: 700; cursor: pointer;
  padding: 6px 22px 6px 4px; border-radius: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a95a8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
}
.hq-period-select:focus { outline: none; box-shadow: var(--ring); }
.hq-period-select option { background: var(--panel); color: var(--ink); }

/* Tag periode pada judul panel */
.hq-period-tag {
  font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}

/* Kartu ringkasan */
.hq-stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px;
}
.hq-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; min-height: 132px;
  display: flex; flex-direction: column; gap: 10px;
}
.hq-card.is-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 12px 30px rgba(45,212,191,0.25);
}
.hq-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hq-card-label { font-size: calc(14.5px * var(--fs)); font-weight: 600; color: var(--muted); }
.hq-card.is-primary .hq-card-label { color: rgba(4,34,31,0.75); }
.hq-card-ico {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: calc(18px * var(--fs));
  background: var(--panel-2); border: 1px solid var(--line);
}
.hq-card.is-primary .hq-card-ico { background: rgba(4,34,31,0.12); border-color: transparent; }
.hq-card-val { font-size: calc(30px * var(--fs)); font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; margin-top: auto; }
.hq-card-foot { font-size: calc(13px * var(--fs)); color: var(--muted); }
.hq-card.is-primary .hq-card-foot { color: rgba(4,34,31,0.7); }

/* Pill tren */
.hq-trend {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: calc(13.5px * var(--fs)); font-weight: 700; width: max-content;
}
.hq-trend.up { color: var(--green-ink); }
.hq-trend.down { color: var(--red-ink); }
.hq-trend.flat { color: var(--muted); font-weight: 600; }
.hq-card.is-primary .hq-trend.up,
.hq-card.is-primary .hq-trend.down,
.hq-card.is-primary .hq-trend.flat { color: rgba(4,34,31,0.8); }

/* Grid panel 2 kolom */
.hq-grid2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.hq-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.hq-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hq-panel-title { font-size: calc(19px * var(--fs)); font-weight: 800; }

/* Tren chart */
.hq-chart { width: 100%; height: 230px; }
.hq-chart svg { width: 100%; height: 100%; display: block; }
.hq-chart-labels { display: flex; justify-content: space-between; margin-top: 8px; }
.hq-chart-x { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hq-chart-x .m { font-size: calc(13.5px * var(--fs)); font-weight: 700; color: var(--ink-soft); }
.hq-chart-x .v { font-size: calc(12px * var(--fs)); color: var(--muted); }

/* Donut */
.hq-donut { display: flex; align-items: center; gap: 22px; }
.hq-donut-svg { width: 150px; height: 150px; flex-shrink: 0; }
.hq-donut-num { fill: var(--ink); font-size: calc(26px * var(--fs)); font-weight: 800; text-anchor: middle; }
.hq-donut-cap { fill: var(--muted); font-size: calc(10px * var(--fs)); text-anchor: middle; }
.hq-legend { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hq-legend li { display: flex; align-items: center; gap: 10px; font-size: calc(15px * var(--fs)); }
.hq-legend .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.hq-legend .name { flex: 1; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-legend .pct { font-weight: 800; }

/* Ranking kasir */
.hq-rank { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.hq-rank-row { display: flex; align-items: center; gap: 10px; }
.hq-rank .rk { font-size: calc(15px * var(--fs)); font-weight: 800; color: var(--accent); width: 30px; }
.hq-rank .hq-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.hq-rank .nm { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-rank .ct { color: var(--muted); font-size: calc(14px * var(--fs)); }
.hq-rank .rv { font-weight: 800; }
.hq-bar { height: 7px; border-radius: 99px; background: var(--panel-2); margin-top: 8px; overflow: hidden; }
.hq-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Live badge */
.hq-live { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--fs)); font-weight: 800; color: var(--green-ink); letter-spacing: .5px; }
.hq-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: hqPulse 1.8s infinite; }
@keyframes hqPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* Feed aktivitas */
.hq-feed { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hq-feed li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.hq-feed li:hover { background: var(--panel-2); }
.hq-feed-ico { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: calc(17px * var(--fs)); font-weight: 800; }
.hq-feed-ico.done { background: var(--status-ready-bg); color: var(--green-ink); }
.hq-feed-ico.ready { background: var(--accent-soft); color: var(--accent); }
.hq-feed-ico.active { background: rgba(96,165,250,0.14); color: var(--blue); }
.hq-feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hq-feed-body .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-feed-body .s { font-size: calc(13px * var(--fs)); color: var(--muted); }
.hq-feed-amt { font-weight: 800; white-space: nowrap; }

.hq-empty { padding: 30px 10px; text-align: center; color: var(--muted); font-size: calc(15px * var(--fs)); }

/* Responsif */
@media (max-width: 1100px) {
  .hq-stats { grid-template-columns: repeat(3, 1fr); }
  .hq-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hq-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hq-card { padding: 16px; min-height: 112px; }
  .hq-card-val { font-size: calc(24px * var(--fs)); }
  .hq-donut { flex-direction: column; }
  .hq-filter { display: none; }
}

/* ============================================================
   SUPERADMIN SHELL — sidebar HQ + topbar
   ============================================================ */
.hq-side {
  width: 108px; flex-shrink: 0;
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 10px; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.hq-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 16px; text-decoration: none; }
.hq-brand-logo {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: calc(26px * var(--fs)); color: var(--accent-ink); overflow: hidden;
}
.hq-brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.hq-brand-tag { font-size: calc(12px * var(--fs)); font-weight: 800; letter-spacing: 1px; color: var(--accent); }

.hq-side-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: stretch; flex: 1; }
.hq-nav-item {
  width: 100%; padding: 12px 6px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--muted); text-decoration: none;
  font-size: calc(11.5px * var(--fs)); font-weight: 600; text-align: center;
  border: none; background: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.hq-nav-item .ni-ico { font-size: calc(22px * var(--fs)); line-height: 1; }
.hq-nav-item:hover { background: var(--panel-2); color: var(--ink-soft); }
.hq-nav-item.active { background: var(--accent-soft); color: var(--accent); }

.hq-side-foot { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding-top: 8px; border-top: 1px solid var(--line); }
.hq-tokasir {
  width: 100%; padding: 12px 6px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: calc(11.5px * var(--fs)); font-weight: 700; text-decoration: none;
  color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.hq-tokasir .ni-ico { font-size: calc(20px * var(--fs)); }
.hq-tokasir:active { transform: scale(.97); }

/* Topbar */
.hq-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px clamp(16px, 2.4vw, 30px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
}
.hq-topbar-head { min-width: 0; }

.hq-bell {
  position: relative; width: 52px; height: 52px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font-size: calc(20px * var(--fs)); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.hq-bell-dot { position: absolute; top: 11px; right: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--panel); }

.hq-role-chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 14px; text-decoration: none;
}
.hq-role-chip .c-meta b { display: block; font-size: calc(15px * var(--fs)); }
.hq-role-chip .c-meta small { font-size: calc(12px * var(--fs)); color: var(--accent); font-weight: 700; }
.hq-role-chip .c-ava {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #ec4899); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(14px * var(--fs));
}
/* Responsif: sidebar → bar bawah */
@media (max-width: 860px) {
  .hq-side {
    width: 100%; height: auto; flex-direction: row; position: fixed; bottom: 0; top: auto;
    border-right: none; border-top: 1px solid var(--line); padding: 6px; z-index: 60;
    justify-content: space-around; gap: 2px;
  }
  .hq-brand { display: none; }
  .hq-side-nav { flex-direction: row; justify-content: space-around; gap: 2px; flex: 1; }
  .hq-nav-item { padding: 8px 4px; font-size: calc(10px * var(--fs)); flex: 1; }
  .hq-nav-item .ni-ico { font-size: calc(20px * var(--fs)); }
  .hq-side-foot { flex-direction: row; width: auto; border-top: none; padding-top: 0; }
  .hq-side-foot .hq-theme-side { display: none; }
  .hq-tokasir { flex-direction: column; padding: 8px 10px; font-size: calc(10px * var(--fs)); }
  .content { padding-bottom: 78px; }
  .hq-topbar { padding: 14px 16px; }
  .hq-role-chip .c-meta { display: none; }
}

/* ===== SweetAlert2 — gaya Bilaz (ikut tema gelap/terang) ===== */
.blz-swal.swal2-popup {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-family: inherit;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.45);
}
.blz-swal .swal2-title { color: var(--ink); font-size: calc(19px * var(--fs)); font-weight: 700; }
.blz-swal .swal2-html-container { color: var(--ink-soft); font-size: calc(14px * var(--fs)); }
.blz-swal .swal2-actions { gap: 10px; margin-top: 14px; }
.blz-btn {
  border: none; cursor: pointer; font-family: inherit;
  border-radius: 12px; padding: 11px 20px; font-weight: 700; font-size: calc(13.5px * var(--fs));
  transition: filter .15s ease, background .15s ease;
}
.blz-btn:focus { outline: none; box-shadow: var(--ring); }
.blz-btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.blz-btn-danger { background: #FF4757; color: #fff; }
.blz-btn-ghost { background: var(--panel-2); color: var(--ink-soft); }
.blz-btn:hover { filter: brightness(1.06); }
.blz-swal.swal2-toast { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5); }
.blz-swal.swal2-toast .swal2-title { font-size: calc(13.5px * var(--fs)); }
.swal2-container { backdrop-filter: blur(2px); }

/* ============================================================
   Modal pembayaran (Kasir → Buat Pesanan)
   ============================================================ */
.pay-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pay-modal[hidden] { display: none; }
.pay-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.pay-modal-box {
  position: relative; width: 880px; max-width: 96%; max-height: 92vh;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55); overflow: hidden; display: flex;
}

/* kiri: ringkasan tagihan */
.pm-summary { width: 320px; flex-shrink: 0; background: var(--bg-soft); border-right: 1px solid var(--line); padding: 28px 26px; display: flex; flex-direction: column; min-width: 0; }
.pm-due-label { font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pm-due { font-size: calc(38px * var(--fs)); font-weight: 800; letter-spacing: -1px; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.pm-cust { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; }
.pm-cust-ava { width: calc(40px * var(--fs)); height: calc(40px * var(--fs)); border-radius: 50%; background: linear-gradient(135deg, #A855F7, #FE2C55); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(14px * var(--fs)); flex-shrink: 0; }
.pm-cust-ava svg { width: calc(20px * var(--fs)); height: calc(20px * var(--fs)); }
.pm-cust-name { font-size: calc(16px * var(--fs)); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pm-item { display: flex; justify-content: space-between; gap: 10px; font-size: calc(14px * var(--fs)); color: var(--ink-soft); padding: 6px 0; }
.pm-item span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* kanan: metode */
.pm-methods { flex: 1; min-width: 0; padding: 26px 28px; display: flex; flex-direction: column; }
.pm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pm-head h2 { font-size: calc(22px * var(--fs)); font-weight: 700; letter-spacing: -.3px; }
.pm-close { background: none; border: none; color: var(--muted); cursor: pointer; display: flex; padding: 6px; border-radius: 10px; }
.pm-close:hover { background: var(--panel-2); color: var(--ink); }
.pm-close svg { width: calc(22px * var(--fs)); height: calc(22px * var(--fs)); }

.pm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pm-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--panel-2); cursor: pointer; transition: border-color .14s, box-shadow .14s, background .14s; }
.pm-opt:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pm-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel-3); }
.pm-ico { width: calc(46px * var(--fs)); height: calc(46px * var(--fs)); border-radius: 12px; background: var(--panel-3); color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .14s, color .14s; }
.pm-ico svg { width: calc(24px * var(--fs)); height: calc(24px * var(--fs)); }
.pm-opt.active .pm-ico { background: var(--accent); color: var(--accent-ink); }
.pm-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-opt-text b { font-size: calc(16px * var(--fs)); font-weight: 700; }
.pm-opt-text small { font-size: calc(12.5px * var(--fs)); color: var(--muted); line-height: 1.35; }
.pm-opt-later { grid-column: span 2; }

.pm-hint { text-align: center; color: var(--muted); font-size: calc(13px * var(--fs)); min-height: 42px; display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.pm-confirm { margin-top: 8px; }

@media (max-width: 720px) {
  .pay-modal-box { flex-direction: column; max-height: 94vh; }
  .pm-summary { width: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 20px; }
  .pm-due { font-size: calc(30px * var(--fs)); margin-bottom: 14px; }
  .pm-items { max-height: 120px; }
  .pm-methods { padding: 20px; }
  .pm-grid { grid-template-columns: 1fr; }
  .pm-opt-later { grid-column: span 1; }
  .pm-hint { min-height: 30px; padding: 8px 0; }
}

/* ============================================================
   Modal dokumen (Tanda terima/Struk)
   ============================================================ */
.doc-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.doc-modal[hidden] { display: none; }
.doc-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.60); backdrop-filter: blur(6px); }
.doc-modal-box {
  position: relative; width: 980px; max-width: 96%; max-height: 96vh;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55); overflow: hidden; display: flex; flex-direction: column;
}
.doc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.doc-modal-title { font-weight: 900; font-size: calc(15px * var(--fs)); letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-modal-close { background: none; border: none; color: var(--muted); cursor: pointer; display: flex; padding: 6px; border-radius: 10px; }
.doc-modal-close:hover { background: var(--panel-2); color: var(--ink); }
.doc-modal-close svg { width: calc(22px * var(--fs)); height: calc(22px * var(--fs)); }
.doc-modal-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; background: var(--panel); }
.doc-loading { color: var(--muted); font-weight: 700; padding: 18px; text-align: center; }
.doc-ticket { flex: 1; width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; }
.doc-ticket-body {
  flex: 1; min-height: 0; overflow: auto; width: 100%;
  padding: 16px; display: flex; justify-content: center;
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.doc-actions {
  flex-shrink: 0;
  width: min(520px, 100%);
  padding: 12px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.doc-actions .btn,
.doc-actions .print-action-form .btn {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: calc(14px * var(--fs));
  justify-content: center;
  gap: 8px;
}
.doc-actions .btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.doc-actions .print-action-form { width: 100%; margin: 0; }
.doc-actions > .btn { flex: 1 1 calc(50% - 5px); }
@media (min-width: 860px) {
  .doc-ticket { flex-direction: row; align-items: stretch; }
  .doc-ticket-body { padding: 18px; }
  .doc-actions {
    width: 280px;
    padding: 18px;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    border-top: none;
    border-left: 1px solid var(--line);
    background: var(--panel);
    max-height: 100%;
    overflow: auto;
  }
  .doc-actions > .btn { flex: 0 0 auto; }
}
@media (min-width: 860px) and (max-height: 700px) {
  .doc-actions { padding: 14px; gap: 8px; }
  .doc-actions .btn { min-height: 44px; padding: 10px 12px; font-size: calc(15px * var(--fs)); }
}
@media (max-width: 520px) {
  .doc-modal { padding: 10px; }
  .doc-ticket-body { padding: 12px; }
  .doc-actions { padding: 10px 12px 12px; gap: 8px; }
}
