/* Tampilan mengikuti aplikasi katering Gudeg Ploso dan ERP Mie Sooka: sidebar melayang bergradasi, isi di panel putih membulat,
   Plus Jakarta Sans 12px. Warna memakai hijau Apoteko. */
:root {
  --ink: #0F2A28;
  --quiet: #55666A;
  --line: #E1E8E6;
  --line-soft: #EDF2F0;
  --line-input: #D5DFDC;
  --ground: #EBF0EE;
  --panel: #FFFFFF;
  --soft: #F7FAF9;
  --brand: var(--sb-2);
  --accent: #0A6B63;
  --accent-dark: #07504A;
  --accent-soft: #E3F1EC;
  --accent-pick: #F1F8F5;
  --accent-line: #BCDCD2;
  --red: #B42318;
  --red-soft: #FDE9E7;
  --amber: #8A3D0B;
  --amber-soft: #FDF1DC;
  --orange: #D97706;
  --blue: #3730A3;
  --blue-soft: #ECEFFE;
  --grey-soft: #EEF2F1;
  --sb-1: #0F5C56;
  --sb-2: #0B3F3C;
  --sb-3: #052624;
  --sb-sorot: rgba(74, 186, 166, 0.3);
  --sb-aktif: rgba(140, 222, 204, 0.22);
  --sb-aktif-garis: #8CDECC;
  --sb-bayang: rgba(5, 38, 36, 0.3);
  --gelap: radial-gradient(120% 90% at 0% 0%, var(--sb-sorot) 0%, transparent 60%), linear-gradient(135deg, var(--sb-1) 0%, var(--sb-2) 55%, var(--sb-3) 100%) var(--sb-2);
  --mono: ui-monospace, Consolas, monospace;
}

/* ------------------------------------------------------------------ tema warna (palet sama dengan aplikasi katering), dipilih di Pengaturan */
:root[data-tema="biru"] {
  --accent: #1D4E89; --accent-dark: #163E6E; --accent-soft: #EAF1FB; --accent-pick: #F3F7FD; --accent-line: #BFD3EE; --ground: #EDF0F5;
  --sb-1: #15335A; --sb-2: #0A1B30; --sb-3: #050E1A; --sb-sorot: rgba(76, 128, 196, 0.34); --sb-aktif: rgba(127, 176, 238, 0.24); --sb-aktif-garis: #7FB0EE; --sb-bayang: rgba(5, 14, 26, 0.3);
}
:root[data-tema="merah"] {
  --accent: #853F42; --accent-dark: #5C232A; --accent-soft: #F5E6E5; --accent-pick: #FBF4F3; --accent-line: #E6C4C2; --ground: #F4F0F0;
  --sb-1: #5C232A; --sb-2: #48151E; --sb-3: #34070F; --sb-sorot: rgba(170, 91, 91, 0.34); --sb-aktif: rgba(226, 169, 166, 0.22); --sb-aktif-garis: #E2A9A6; --sb-bayang: rgba(52, 7, 15, 0.28);
}
:root[data-tema="sage"] {
  --accent: #476859; --accent-dark: #214339; --accent-soft: #E3ECE7; --accent-pick: #F1F6F3; --accent-line: #BCD0C5; --ground: #EDF1EF;
  --sb-1: #355649; --sb-2: #214339; --sb-3: #142B24; --sb-sorot: rgba(108, 142, 125, 0.36); --sb-aktif: rgba(146, 180, 162, 0.24); --sb-aktif-garis: #92B4A2; --sb-bayang: rgba(33, 67, 57, 0.28);
}
:root[data-tema="ungu"] {
  --accent: #705B97; --accent-dark: #462C66; --accent-soft: #ECE8F8; --accent-pick: #F6F4FC; --accent-line: #CFC7EE; --ground: #F0EEF5;
  --sb-1: #462C66; --sb-2: #31164B; --sb-3: #1F0C31; --sb-sorot: rgba(132, 115, 178, 0.36); --sb-aktif: rgba(172, 160, 232, 0.24); --sb-aktif-garis: #ACA0E8; --sb-bayang: rgba(49, 22, 75, 0.28);
}
:root[data-tema="oranye"] {
  --accent: #815A33; --accent-dark: #704B20; --accent-soft: #F3EADF; --accent-pick: #FAF5EF; --accent-line: #E0CBB6; --ground: #F3F0EC;
  --sb-1: #704B20; --sb-2: #5A3C19; --sb-3: #3E2911; --sb-sorot: rgba(175, 136, 105, 0.36); --sb-aktif: rgba(205, 166, 140, 0.24); --sb-aktif-garis: #CDA68C; --sb-bayang: rgba(62, 41, 17, 0.28);
}
:root[data-tema="abu"] {
  --accent: #475569; --accent-dark: #334155; --accent-soft: #E2E8F0; --accent-pick: #F1F5F9; --accent-line: #CBD5E1; --ground: #ECEFF3;
  --sb-1: #475569; --sb-2: #334155; --sb-3: #1E293B; --sb-sorot: rgba(148, 163, 184, 0.34); --sb-aktif: rgba(148, 163, 184, 0.26); --sb-aktif-garis: #CBD5E1; --sb-bayang: rgba(30, 41, 59, 0.28);
}
:root[data-tema="hitam"] {
  --accent: #18181B; --accent-dark: #18181B; --accent-soft: #E4E4E7; --accent-pick: #F4F4F5; --accent-line: #D4D4D8; --ground: #ECECEE;
  --sb-1: #27272A; --sb-2: #18181B; --sb-3: #09090B; --sb-sorot: rgba(161, 161, 170, 0.34); --sb-aktif: rgba(212, 212, 216, 0.26); --sb-aktif-garis: #FAFAFA; --sb-bayang: rgba(0, 0, 0, 0.28);
}
:root[data-tema="kuning"] {
  --accent: #6A604A; --accent-dark: #57503D; --accent-soft: #EFEAE0; --accent-pick: #F8F5EF; --accent-line: #DCCFB8; --ground: #F2F0EB;
  --sb-1: #57503D; --sb-2: #433D2E; --sb-3: #29251B; --sb-sorot: rgba(166, 147, 112, 0.30); --sb-aktif: rgba(207, 180, 138, 0.24); --sb-aktif-garis: #CFB48A; --sb-bayang: rgba(59, 54, 41, 0.28);
}

/* ukuran huruf: seluruh tampilan ikut (CSS zoom), cetakan tidak. --zoom dipakai supaya tinggi setinggi layar tetap pas saat diperbesar. */
@media screen {
  :root[data-huruf="xs"] { zoom: 0.85; --zoom: 0.85; }
  :root[data-huruf="s"] { zoom: 0.92; --zoom: 0.92; }
  :root[data-huruf="l"] { zoom: 1.1; --zoom: 1.1; }
  :root[data-huruf="xl"] { zoom: 1.2; --zoom: 1.2; }
}

/* ganti tema: warna berpindah perlahan (kelas dipasang sebentar oleh pengaturan.js) */
:root.ganti-tema, :root.ganti-tema *, :root.ganti-tema *::before, :root.ganti-tema *::after {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease !important; }
@media (prefers-reduced-motion: reduce) { :root.ganti-tema, :root.ganti-tema * { transition: none !important; } }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ kerangka: sidebar melayang + panel isi */
.shell { display: flex; align-items: flex-start; gap: 8px; min-height: 100vh; padding: 8px; }
.side-frame { flex: 0 0 236px; position: sticky; top: 8px; height: calc(100vh / var(--zoom, 1) - 16px); border-radius: 16px; overflow: clip; background: var(--sb-3);
  box-shadow: 0 8px 20px var(--sb-bayang), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.side { position: relative; height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 14px 10px 12px; color: #fff;
  background: radial-gradient(120% 22% at 15% 0%, var(--sb-sorot) 0%, transparent 70%), linear-gradient(180deg, var(--sb-2) 0%, var(--sb-3) 100%); }
.brand { flex: none; display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.logo { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: #fff; color: var(--sb-2); box-shadow: 0 0 8px var(--sb-aktif); }
.brand-name { display: block; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 11.5px; color: rgba(255, 255, 255, 0.7); }
.tombol-menu { display: none; }

.sb-akun { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); }
.sb-akun:empty { display: none; }
.sb-akun-baris { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sb-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 999px; background: #fff; color: var(--sb-2); font-size: 11.5px; font-weight: 800; }
.sb-akun strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-akun small { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.7); }
.keluar { flex: none; margin-left: auto; padding: 4px 9px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 11px; font-weight: 700; }
.keluar:hover { background: rgba(255, 255, 255, 0.2); }
.sb-akun-kaki { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: rgba(255, 255, 255, 0.8); }
.sb-akun-kaki i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
.sb-akun-kaki a { color: #fff; font-weight: 700; }

/* menu mengisi sisa tinggi sidebar tanpa scroll: tinggi tiap menu menyesuaikan layar */
#nav { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }
.sb-grup { display: contents; }
.nav-judul { flex: none; padding: 8px 10px 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.92); }
.sb-grup:first-child .nav-judul { padding-top: 0; }
#nav a { flex: 1 1 0; display: flex; align-items: center; gap: 10px; min-height: 24px; max-height: 34px; padding: 0 10px; border-radius: 9px; color: rgba(255, 255, 255, 0.86); font-weight: 500; text-decoration: none; }
#nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
#nav a[aria-current="page"] { background: linear-gradient(90deg, var(--sb-aktif) 0%, rgba(255, 255, 255, 0.08) 100%); color: #fff; font-weight: 700;
  box-shadow: inset 3px 0 0 var(--sb-aktif-garis), 0 0 8px var(--sb-aktif); }
#nav a:active { transform: scale(0.98); }
#nav svg { width: 17px; height: 17px; flex: none; }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 10.5px; line-height: 17px; font-weight: 700; text-align: center; }
.sb-hias { position: absolute; right: -34px; bottom: 6px; width: 180px; height: 180px; color: #fff; opacity: 0.1; transform: rotate(-12deg); pointer-events: none; }
.sb-hias svg { width: 100%; height: 100%; animation: hias-masuk 0.45s ease-out; }
@keyframes hias-masuk { from { opacity: 0; transform: rotate(-12deg) scale(0.85); } }

.isi { flex: 1 1 560px; min-width: 0; min-height: calc(100vh / var(--zoom, 1) - 16px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
main { flex: 1 1 auto; min-width: 0; padding: 24px 28px 48px; outline: none; }
.page { max-width: 1320px; display: flex; flex-direction: column; gap: 16px; }
.page-head, .kepala { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.page-head h1, .kepala h1 { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; }
.page-head p, .kepala p { margin-top: 4px; color: #475467; }
.aksi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ kartu dan panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.panel-head a { font-size: 12px; color: var(--accent); font-weight: 700; text-decoration: none; }
.panel-head a:hover { text-decoration: underline; }
.panel-head .sub { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; color: var(--quiet); }
.panel-note { padding: 10px 18px; color: var(--quiet); }
.panel-gelap { background: var(--gelap); border: 0; color: #fff; box-shadow: 0 16px 36px -18px var(--sb-bayang); }
.panel-gelap .panel-head { border-color: rgba(255, 255, 255, 0.12); }
.panel-gelap .panel-head a { color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--accent-line); background: var(--accent-pick); }
.kpi-label { font-size: 11.5px; font-weight: 600; color: #475467; }
.kpi-value { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 11px; color: var(--quiet); }
.kpi.alert .kpi-value { color: var(--red); }
.kpi.warn .kpi-value { color: var(--amber); }
.kpi.lead { background: var(--gelap); border-color: transparent; color: #fff; box-shadow: 0 16px 36px -18px var(--sb-bayang); }
.kpi.lead .kpi-label, .kpi.lead .kpi-sub { color: rgba(255, 255, 255, 0.75); }

/* ubin angka ringkasan: ikon dalam kotak warna; .gelap = ubin utama, .bahaya = tint merah, .awas = tint oranye */
.ubin-baris { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ubin { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: inherit; text-decoration: none; }
a.ubin:hover { border-color: var(--accent-line); }
.ubin-ikon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); }
.ubin-ikon svg { width: 20px; height: 20px; }
.ubin-teks { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ubin-teks span { font-size: 11.5px; font-weight: 600; color: #475467; }
.ubin-teks b { font-size: clamp(15px, 1.4vw, 20px); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ubin-teks small { font-size: 11px; color: var(--quiet); }
.ubin.gelap { background: var(--gelap); border-color: transparent; color: #fff; box-shadow: 0 16px 36px -18px var(--sb-bayang); }
.ubin.gelap .ubin-ikon { background: rgba(255, 255, 255, 0.14); color: #fff; }
.ubin.gelap .ubin-teks span, .ubin.gelap .ubin-teks small { color: rgba(255, 255, 255, 0.75); }
.ubin.bahaya { background: #FEF6F5; border-color: #F3D0CC; }
.ubin.bahaya .ubin-ikon { background: var(--red-soft); color: var(--red); }
.ubin.bahaya .ubin-teks b { color: var(--red); }
.ubin.awas .ubin-ikon { background: var(--amber-soft); color: var(--amber); }
.ubin.awas .ubin-teks b { color: var(--amber); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }
.dua-kolom { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.kanan-kolom { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line-soft); }
.row-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 8px 18px; border: 0; background: none; text-align: left; }
.row-btn:hover { background: var(--accent-pick); }
.row-main { min-width: 0; }
.row-title { font-weight: 700; }
.row-sub { font-size: 11px; color: var(--quiet); }
.row-side { flex: none; text-align: right; }
.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.tanda { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.tanda svg { width: 16px; height: 16px; }
.tanda.merah { background: var(--red-soft); color: var(--red); }
.tanda.oranye { background: var(--amber-soft); color: var(--amber); }
.row-btn .tanda + .row-main { flex: 1 1 auto; }

.bars { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 84px; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; }
.bar-track { height: 8px; border-radius: 999px; background: var(--grey-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.bar-fill.red { background: #D2452F; }
.bar-fill.amber { background: var(--orange); }
.bar-fill.grey { background: #9AA8A5; }
.bar-fill.blue { background: #4F5BD5; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.green { background: var(--accent-soft); color: var(--accent-dark); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.grey { background: var(--grey-soft); color: var(--quiet); }

/* ------------------------------------------------------------------ bilah alat, isian, tabel */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line-soft); }
.search { flex: 1 1 240px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-input); border-radius: 10px; background: #fff; }
select.filter { min-height: 36px; padding: 0 10px; border: 1px solid var(--line-input); border-radius: 10px; background: #fff; font-weight: 600; }
.search:focus, select.filter:focus, .cell:focus, .param input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-input); border-radius: 9px; background: #fff; font-size: 12px; font-weight: 600; }
.seg button:hover { background: var(--accent-pick); }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg .c { opacity: 0.75; margin-left: 4px; font-size: 11px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--accent-pick); color: #475467; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
th button { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
th button:hover { color: var(--ink); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--accent-pick); }
.name-btn { padding: 0; border: 0; background: none; text-align: left; font-weight: 700; }
.name-btn:hover { color: var(--accent); text-decoration: underline; }
.empty { padding: 28px 16px; color: var(--quiet); text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-input); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--ground); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:disabled { border-color: var(--line); background: var(--grey-soft); color: var(--quiet); cursor: not-allowed; }
.params { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; }
.param { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: #475467; }
.param input { width: 96px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-input); border-radius: 10px; background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }

.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 30px; height: 30px; border: 1px solid var(--line-input); border-radius: 8px; background: #fff; font-size: 15px; line-height: 1; }
.stepper button:hover { background: var(--accent-pick); }
.stepper .q { min-width: 52px; text-align: center; font-weight: 700; }
.check { width: 16px; height: 16px; accent-color: var(--accent); }
tr.off td { color: #98A2A0; }

/* ------------------------------------------------------------------ laci dan dialog */
.drawer-bg { position: fixed; inset: 0; z-index: 20; background: rgba(5, 38, 36, 0.45); }
.drawer { position: fixed; top: 8px; right: 8px; bottom: 8px; z-index: 21; width: min(580px, calc(100% - 16px)); display: flex; flex-direction: column; overflow: hidden; background: var(--ground); border-radius: 16px; box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 16px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.drawer-head p { margin-top: 2px; color: var(--quiet); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.x { width: 32px; height: 32px; flex: none; border: 1px solid var(--line-input); border-radius: 9px; background: #fff; font-size: 16px; line-height: 1; }
.x:hover { background: var(--ground); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.tile { padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tile .kpi-value { font-size: 16px; }
.calc { display: grid; gap: 6px; padding: 12px 18px; }
.calc div { display: flex; justify-content: space-between; gap: 16px; }
.calc .total { padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.advice { padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.advice.red { background: var(--red-soft); color: var(--red); }
.advice.green { background: var(--accent-soft); color: var(--accent-dark); }

.dialog-bg { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; background: rgba(5, 38, 36, 0.5); }
.dialog { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: #fff; border-radius: 16px; }
.sp-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.sp-head h2 { font-size: 16px; font-weight: 800; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ------------------------------------------------------------------ halaman khusus */
.chat-page { height: calc(100vh / var(--zoom, 1) - 88px); }
.chat-panel { flex: 1 1 auto; min-height: 320px; display: flex; flex-direction: column; overflow: hidden; }
.chat-log { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.chat-awal { margin: auto; max-width: 620px; display: flex; flex-direction: column; gap: 12px; text-align: center; color: var(--quiet); }
.chat-awal .seg { justify-content: center; }
.chat-awal .seg button { min-height: 34px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-soft); }
.msg { max-width: min(760px, 88%); padding: 9px 13px; border-radius: 12px; }
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: 4px 0 6px; padding-left: 20px; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; }
.msg.bot { align-self: flex-start; background: var(--ground); }
.msg.err { align-self: flex-start; background: var(--red-soft); color: var(--red); }
.msg.wait { color: var(--quiet); }
.msg-meta { margin-top: 4px; font-size: 11px; color: var(--quiet); }
.advice code { font-family: var(--mono); font-size: 11.5px; }

.fk-awal { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 14px; }
.fk-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: min(560px, 100%); min-height: 150px; padding: 14px; border: 2px dashed var(--accent-line); border-radius: 14px; background: var(--accent-pick); text-align: center; cursor: pointer; }
.fk-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.fk-status { color: var(--quiet); }
.fk-gambar { display: block; max-width: 100%; max-height: 420px; border-radius: 10px; }
.fk-atas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.fk-foto { padding: 8px; overflow: auto; max-height: 440px; }
.fk-foto .fk-gambar { max-height: none; width: 100%; }
.fk-kepala { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; }
.fk-total { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.fk-tabel td { vertical-align: top; padding: 6px 5px; }
.fk-tabel th { padding: 8px 5px; }
.fk-produk { min-width: 220px; }
.fk-aksi { padding: 10px 18px; border-top: 1px solid var(--line-soft); }
.cell { box-sizing: border-box; min-height: 32px; padding: 0 8px; border: 1px solid var(--line-input); border-radius: 9px; background: #fff; }
.cell.n { width: 60px; }
.cell.m { width: 94px; }
.cell.wide { width: 100%; }
.cell.rs-aturan { min-width: 200px; }
.advice.peringatan { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.advice.peringatan::before { content: "!"; display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: rgba(138, 61, 11, 0.12); font-weight: 800; }
.advice.peringatan:hover { text-decoration: underline; }
.pengingat { display: flex; flex-direction: column; gap: 1px; overflow: hidden; border-radius: 14px; border: 1px solid #F1DDB8; }
.pengingat .advice { padding: 9px 14px; border-radius: 0; }
.ks-dicari { padding: 8px 14px; }
.ks-susun { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.ks-cari { position: sticky; top: 16px; }
.ks-cari .rows { max-height: 560px; overflow-y: auto; }
.ks-kepala { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ks-cek { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-weight: 700; }
.ks-resep { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.ks-qty { display: flex; gap: 4px; }
.ks-bayar { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.ks-garis { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ks-metode { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ks-isi { display: flex; gap: 4px; }
.ks-isi .btn { min-height: 32px; padding: 0 8px; }
.ks-tahan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ks-aksi { display: flex; gap: 6px; justify-content: flex-end; }
.ks-batal { max-width: 460px; }
.struk { max-width: 340px; }
.struk-kepala { text-align: center; }
.etiket-susun { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.etiket { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--ink); border-radius: 4px; font-size: 14px; break-inside: avoid; }
.etiket-aturan { margin: 6px 0; font-size: 17px; font-weight: 700; text-align: center; }
.hr-teks { margin: 0; padding: 12px 18px; white-space: pre-wrap; font-family: inherit; }
.hr-baris { display: flex; justify-content: space-between; gap: 12px; padding: 9px 18px; border-top: 1px solid var(--line-soft); }
.hr-fisik { display: flex; flex-direction: column; gap: 8px; padding: 12px 18px; }
.x.kecil { width: 28px; height: 28px; font-size: 14px; }

/* ------------------------------------------------------------------ halaman Pengaturan */
.pilih-tema { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 16px 18px 18px; }
.pilih-tema button { display: flex; flex-direction: column; gap: 10px; margin: 1px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; }
.pilih-tema button:hover { border-color: var(--accent-line); }
.pilih-tema button[aria-checked="true"] { margin: 0; border: 2px solid var(--accent); }
.tema-contoh { display: flex; height: 74px; overflow: hidden; border-radius: 10px; border: 1px solid var(--line-soft); }
.tema-sisi { flex: 0 0 32%; display: flex; flex-direction: column; gap: 5px; padding: 10px 7px; }
.tema-sisi i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); }
.tema-sisi i:first-child { background: rgba(255, 255, 255, 0.75); }
.tema-isi { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.tema-isi i { height: 6px; width: 70%; border-radius: 3px; background: rgba(21, 23, 28, 0.18); }
.tema-isi i + i { width: 45%; background: rgba(21, 23, 28, 0.1); }
.tema-isi b { margin-top: auto; width: 44px; height: 14px; border-radius: 5px; }
.tema-nama { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tema-nama strong { display: block; font-size: 13px; }
.tema-nama small { display: block; font-size: 11.5px; color: #475467; }
.tema-nama em { flex: none; padding: 2px 8px; border-radius: 999px; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; }
.atur-huruf { display: flex; flex-direction: column; gap: 10px; max-width: 560px; padding: 16px 18px 18px; }
.slider-huruf { width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.huruf-label { display: flex; justify-content: space-between; }
.huruf-label button { width: 32px; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 600; color: #475467; text-align: center; }
.huruf-label button:first-child { text-align: left; }
.huruf-label button:last-child { text-align: right; }
.huruf-label button.aktif { font-weight: 800; color: var(--accent-dark); }
.tautan { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 700; }
.tautan:hover { text-decoration: underline; }
.param .cell { min-height: 36px; color: var(--ink); font-size: 12px; }

/* ------------------------------------------------------------------ gerak: halaman masuk berurutan, laci dan dialog meluncur, kartu terangkat saat disorot */
@keyframes naik { from { opacity: 0; transform: translateY(10px); } }
@keyframes pudar { from { opacity: 0; } }
@keyframes geser-masuk { from { opacity: 0.4; transform: translateX(32px); } }
@keyframes muncul { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes isi-batang { from { transform: scaleX(0); } }
main.masuk .page > * { animation: naik 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
main.masuk .page > :nth-child(2) { animation-delay: 0.04s; }
main.masuk .page > :nth-child(3) { animation-delay: 0.08s; }
main.masuk .page > :nth-child(4) { animation-delay: 0.12s; }
main.masuk .page > :nth-child(5) { animation-delay: 0.16s; }
main.masuk .page > :nth-child(n+6) { animation-delay: 0.2s; }
main.masuk .ubin-baris > *, main.masuk .kpis > * { animation: naik 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
main.masuk .ubin-baris > :nth-child(2), main.masuk .kpis > :nth-child(2) { animation-delay: 0.1s; }
main.masuk .ubin-baris > :nth-child(3), main.masuk .kpis > :nth-child(3) { animation-delay: 0.14s; }
main.masuk .ubin-baris > :nth-child(4), main.masuk .kpis > :nth-child(4) { animation-delay: 0.18s; }
main.masuk .ubin-baris > :nth-child(5), main.masuk .kpis > :nth-child(5) { animation-delay: 0.22s; }
main.masuk .bar-fill { transform-origin: left; animation: isi-batang 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
.drawer-bg, .dialog-bg { animation: pudar 0.2s ease both; }
.drawer { animation: geser-masuk 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.dialog { animation: muncul 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.btn, .seg button, .stepper button, .x, .keluar, #nav a, .row-btn, .ubin, .kpi, .pilih-tema button, .search, select.filter, .cell, .param input, .tautan {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.2s ease, transform 0.16s ease; }
.btn:active, .seg button:active, .stepper button:active, .x:active { transform: scale(0.97); }
.btn.primary { box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
a.ubin:hover, a.kpi:hover, .pilih-tema button:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px color-mix(in srgb, var(--sb-2) 70%, transparent); }
a.ubin.gelap:hover, a.kpi.lead:hover { box-shadow: 0 18px 36px -16px var(--sb-bayang); }
td { transition: background-color 0.14s ease; }

/* warna: panel isi bergradasi lembut di atas, judul halaman berikon */
.isi { background: linear-gradient(180deg, var(--accent-pick) 0, var(--panel) 260px); }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.judul-ikon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--gelap); color: #fff; box-shadow: 0 10px 22px -14px var(--sb-bayang); }
.judul-ikon svg { width: 19px; height: 19px; }
.page-head h1 + p, .page-head p { margin-top: 6px; }
.fk-drop::before { content: ""; width: 26px; height: 26px; margin-bottom: 14px; background: var(--accent-dark); border-radius: 0;
  box-shadow: 0 0 0 12px var(--accent-soft);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.fk-drop { transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease; }
.fk-drop:hover { transform: translateY(-1px); }

/* ------------------------------------------------------------------ cari cepat (Ctrl+K): obat dan menu dari halaman mana pun */
kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--soft); color: var(--quiet); font: 600 10.5px/1.5 inherit; font-family: inherit; }
.palet-bg { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(5, 20, 19, 0.45); backdrop-filter: blur(2px); animation: pudar 0.16s ease both; }
.palet { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45); animation: muncul 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.palet-cari { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.palet-cari svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.palet-cari input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 15px; font-weight: 500; }
.palet-daftar { flex: 1; overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.palet-judul { padding: 10px 10px 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); }
.palet-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.palet-item[aria-selected="true"] { background: var(--accent-soft); }
.palet-item .tanda { width: 32px; height: 32px; }
.palet-item .row-main { flex: 1; }
.palet-item .row-side { display: flex; align-items: center; gap: 8px; }
.palet-kosong { padding: 28px 16px; text-align: center; color: var(--quiet); }
.palet-kaki { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 16px; border-top: 1px solid var(--line-soft); background: var(--soft); font-size: 11px; color: var(--quiet); }
@media (max-width: 900px) { .palet-bg { padding-top: 8px; } .palet { max-height: 85vh; } }

@media (prefers-reduced-motion: reduce) {
  main.masuk .page > *, main.masuk .ubin-baris > *, main.masuk .kpis > *, main.masuk .bar-fill, .drawer, .dialog, .drawer-bg, .dialog-bg, .palet, .palet-bg { animation: none !important; }
  a.ubin:hover, a.kpi:hover, .pilih-tema button:hover, .fk-drop:hover, .btn:active { transform: none; }
}

/* ------------------------------------------------------------------ kasir: mengikuti mockup Apoteko POS (kartu obat, keranjang di kanan, langkah Bayar) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tautan.merah { color: var(--red); }

/* Halaman Mulai untuk apotek yang baru mendaftar */
.mulai-maju { height: 8px; margin: 14px 0 18px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mulai-maju span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s; }
.mulai-daftar { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.mulai-langkah { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.mulai-langkah.beres { background: var(--accent-pick); border-color: var(--accent-line); }
.mulai-nomor { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.mulai-langkah.beres .mulai-nomor { background: var(--accent); color: #fff; }
.mulai-nomor svg { width: 18px; height: 18px; }
.mulai-isi { flex: 1; min-width: 0; }
.mulai-judul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mulai-judul h2 { margin: 0; font-size: 16px; font-weight: 800; }
.mulai-isi > p { margin: 4px 0 0; color: #475467; }
.mulai-aksi { margin-top: 12px; }
.mulai-isi .panel { margin-top: 14px; }
.mulai-aksi .panel-note { margin-top: 8px; }
.spanduk-lg { margin-bottom: 14px; }
.spanduk-lg a { color: inherit; text-decoration: underline; font-weight: 800; }

/* Halaman Langganan */
.lg-status { padding: 18px 20px; display: grid; gap: 14px; }
.lg-status-isi { display: flex; gap: 14px; align-items: flex-start; }
.lg-status-ikon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; }
.lg-status-ikon svg { width: 22px; height: 22px; }
.lg-status h2 { margin: 2px 0 4px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.lg-status p { color: #475467; }
.lg-jalur { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.lg-jalur span { display: block; height: 100%; border-radius: inherit; }
.lg-green .lg-status-ikon { background: var(--accent-soft); color: var(--accent-dark); } .lg-green .lg-jalur span { background: var(--accent); }
.lg-blue .lg-status-ikon { background: var(--blue-soft); color: var(--blue); } .lg-blue .lg-jalur span { background: var(--blue); }
.lg-amber .lg-status-ikon { background: var(--amber-soft); color: var(--amber); } .lg-amber .lg-jalur span { background: var(--amber); }
.lg-red .lg-status-ikon { background: var(--red-soft); color: var(--red); } .lg-red .lg-jalur span { background: var(--red); }
.lg-isi { padding: 16px 18px 18px; }
.lg-paket { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.lg-pkt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; text-align: left; transition: border-color 0.12s, box-shadow 0.12s; }
.lg-pkt:hover:not(:disabled) { border-color: var(--accent-line); }
.lg-pkt.dipilih { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--accent-pick); }
.lg-pkt-nama { font-size: 13px; font-weight: 800; color: #475467; text-transform: uppercase; letter-spacing: 0.04em; }
.lg-pkt-harga { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lg-pkt-lama { font-size: 12.5px; color: #475467; font-weight: 600; }
.lg-pkt-ket { font-size: 12px; color: var(--quiet); }
.lg-pkt-pilih { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 800; color: var(--accent-dark); }
.lg-pkt-pilih svg { width: 15px; height: 15px; }
.lg-pkt.dipilih .lg-pkt-pilih { background: var(--accent); color: #fff; }
.lg-langkah { display: grid; gap: 18px; padding: 16px 18px 18px; }
.lg-l { display: flex; gap: 14px; }
.lg-l > div { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: start; }
.lg-no { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.lg-reks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 8px; }
.lg-rek { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px dashed var(--accent-line); border-radius: 14px; background: var(--accent-pick); }
.lg-rek b { display: block; font-size: 16px; letter-spacing: 0.02em; }
.lg-form { margin-top: 8px; }
.ksx-tahan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ksx { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: stretch; height: calc(100vh / var(--zoom, 1) - 150px); min-height: 560px; }
.ksx-kiri { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.ksx-cari { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 10px 0 14px; border: 1.5px solid var(--accent-line); border-radius: 14px; background: #fff; box-shadow: 0 6px 16px -12px color-mix(in srgb, var(--sb-2) 60%, transparent); }
.ksx-cari:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.ksx-cari svg { width: 19px; height: 19px; flex: none; color: var(--accent); }
.ksx-cari input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; font-weight: 500; }
.ksx-kat-baris { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ksx-kat-baris::-webkit-scrollbar { display: none; }
.ksx-kat { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line-input); border-radius: 999px; background: #fff; font-weight: 700; color: #475467; white-space: nowrap; transition: background-color 0.16s, color 0.16s, border-color 0.16s; }
.ksx-kat i { width: 8px; height: 8px; border-radius: 50%; }
.ksx-kat .ksx-sub { font-size: 10.5px; }
.ksx-kat:hover { border-color: var(--accent-line); }
.ksx-kat[aria-pressed="true"] { background: var(--sb-2); border-color: var(--sb-2); color: #fff; }
.ksx-kat[aria-pressed="true"] .ksx-sub { color: rgba(255, 255, 255, 0.7); }
.ksx-hasil { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.ksx-hasil-kepala { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; font-size: 13px; }
.ksx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-content: start; }
.ksx-sub { font-size: 11.5px; color: var(--quiet); font-weight: 500; }
.ksx-obat { position: relative; min-height: 128px; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; color: var(--ink);
  transition: border-color 0.16s, background-color 0.16s, transform 0.16s, box-shadow 0.2s; }
button.ksx-obat:hover { border-color: var(--accent-line); background: var(--accent-pick); transform: translateY(-2px); box-shadow: 0 14px 26px -20px color-mix(in srgb, var(--sb-2) 70%, transparent); }
button.ksx-obat:active { transform: scale(0.98); }
.ksx-obat.dipilih { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ksx-obat.habis { background: var(--soft); color: #6B7A77; }
.ksx-obat-atas { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ksx-gol { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--g-bg); color: var(--g-fg); font-size: 10.5px; font-weight: 800; }
.ksx-gol::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g-dot); }
.ksx-kosong { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.ksx-jml { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; animation: muncul 0.2s ease both; }
.ksx-nama { font-size: 14px; font-weight: 800; line-height: 1.25; }
.ksx-obat-bawah { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ksx-obat-bawah b { font-size: 14.5px; color: var(--accent-dark); }
.ksx-ed { padding: 2px 7px; border-radius: 7px; background: var(--amber-soft); color: var(--amber); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.ksx-obat-aksi { margin-top: auto; display: flex; gap: 6px; }
.ksx-mini { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-input); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 700; color: #475467; transition: background-color 0.16s, border-color 0.16s, color 0.16s; }
.ksx-mini:hover { border-color: var(--accent-line); color: var(--ink); }
.ksx-mini.garis { border-style: dashed; border-color: var(--accent-line); background: var(--accent-pick); color: var(--accent-dark); }
.ksx-mini.aktif { border: 2px solid var(--accent); background: var(--accent-pick); color: var(--accent-dark); }
.ksx-obat-aksi .ksx-mini { flex: 1; padding: 0 6px; }

.ksx-kanan { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 40px -30px color-mix(in srgb, var(--sb-2) 60%, transparent); }
.ksx-atas { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.ksx-kepala { display: flex; align-items: center; justify-content: space-between; }
.ksx-kepala h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.ksx-jenis { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--grey-soft); }
.ksx-jenis button { height: 38px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: #475467; transition: background-color 0.16s, color 0.16s, box-shadow 0.16s; }
.ksx-jenis button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 800; box-shadow: 0 1px 3px rgba(15, 42, 40, 0.14); }
.ksx-resep { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; animation: naik 0.25s ease both; }
.ksx-biaya { display: flex; gap: 8px; }
.ksx-isi { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 4px 18px; }
.ksx-berhenti { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid #F3C4BE; border-radius: 14px; background: var(--red-soft); color: #8F1D14; animation: naik 0.25s ease both; }
.ksx-berhenti b { font-size: 13px; }
.ksx-berhenti span { line-height: 1.45; }
.ksx-berhenti button { align-self: flex-start; height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--red); color: #fff; font-weight: 800; }
.ksx-item { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); animation: naik 0.22s ease both; }
.ksx-item:last-child { border-bottom: 0; }
.ksx-item-atas { display: flex; align-items: flex-start; gap: 8px; }
.ksx-item-nama { flex: 1; min-width: 0; line-height: 1.3; }
.ksx-item-nama b, .ksx-item.jasa b { font-size: 13.5px; }
.ksx-item.jasa .ksx-item-atas b:first-child { flex: 1; }
.ksx-nilai { font-weight: 800; font-size: 13.5px; white-space: nowrap; padding-top: 1px; }
.ksx-item-bawah { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ksx-step { display: inline-flex; align-items: center; border: 1px solid var(--line-input); border-radius: 11px; overflow: hidden; }
.ksx-step button { width: 34px; height: 34px; border: 0; background: #fff; font-size: 17px; font-weight: 700; color: var(--ink); }
.ksx-step button:hover { background: var(--accent-pick); }
.ksx-step input { width: 42px; height: 34px; border: 0; border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.ksx-step input:focus { outline: none; background: var(--accent-pick); }
.ksx-satuan { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--grey-soft); }
.ksx-satuan button { height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; font-size: 11.5px; font-weight: 700; color: #475467; }
.ksx-satuan button[aria-pressed="true"] { background: var(--sb-2); color: #fff; }
.ksx-harga { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.ksx-harga .cell { width: 86px; min-height: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.ksx-kosong-besar { margin: auto 0; padding: 32px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--quiet); }
.ksx-kosong-besar b { color: var(--ink); font-size: 14px; }
.ksx-kaki { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 14px 18px 16px; border-top: 1px solid var(--line); background: var(--soft); }
.ksx-garis { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #475467; }
.ksx-garis .cell { width: 110px; min-height: 30px; text-align: right; }
.ksx-total { display: flex; align-items: baseline; justify-content: space-between; }
.ksx-total b:first-child { font-size: 15px; }
.ksx-total b.num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.ksx-tombol { display: flex; gap: 8px; }
.ksx-tombol .btn { min-height: 54px; border-radius: 14px; font-size: 14px; }
.ksx-tombol .btn:first-child { width: 96px; flex: none; }
.ksx-tombol .ksx-bayar { flex: 1; font-size: 16px; font-weight: 800; }

/* langkah Bayar */
.ksb { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; min-height: calc(100vh / var(--zoom, 1) - 110px); }
.ksb-ringkas { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 22px; color: #fff; background: var(--gelap); box-shadow: 0 18px 40px -24px var(--sb-bayang); animation: naik 0.3s ease both; }
.ksb-kembali-tautan { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 6px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 700; }
.ksb-kembali-tautan:hover { background: rgba(255, 255, 255, 0.18); }
.ksb-kembali-tautan svg { width: 18px; height: 18px; }
.ksb-judul { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ksb-judul h1 { font-size: 19px; font-weight: 800; }
.ksb-judul span { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 11.5px; font-weight: 700; }
.ksb-daftar { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.ksb-baris { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.ksb-total { display: flex; align-items: baseline; justify-content: space-between; }
.ksb-total span { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, 0.8); }
.ksb-total b { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.ksb-kanan { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 22px; background: #fff; animation: naik 0.3s ease 0.05s both; }
.ksb-kepala { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ksb-kepala h2 { font-size: 17px; font-weight: 800; }
.ksb-metode-baris { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ksb-metode { height: 54px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 14px; font-weight: 800; color: #475467; transition: background-color 0.16s, border-color 0.16s, color 0.16s; }
.ksb-metode:hover { border-color: var(--accent-line); }
.ksb-metode[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-pick); color: var(--accent-dark); }
.ksb-tunai { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.ksb-kolom { display: flex; flex-direction: column; gap: 10px; }
.ksb-terima { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.ksb-terima span { font-size: 12px; font-weight: 700; color: var(--quiet); }
.ksb-terima b { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.ksb-cepat-baris { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ksb-cepat { height: 46px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-pick); font-size: 14px; font-weight: 800; color: var(--accent-dark); }
.ksb-cepat:hover { background: var(--accent-soft); }
.ksb-sisa { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #E8EFFB; color: #1E3A8A; animation: naik 0.22s ease both; }
.ksb-sisa > span:first-child { display: flex; justify-content: space-between; align-items: center; }
.ksb-sisa b.num { font-size: 18px; }
.ksb-metode2 { display: flex; gap: 6px; }
.ksb-metode2 button { height: 34px; padding: 0 12px; border: 1px solid #B8C9EE; border-radius: 10px; background: #fff; font-weight: 800; color: #1E3A8A; }
.ksb-metode2 button[aria-pressed="true"] { border-color: #1E3A8A; background: #1E3A8A; color: #fff; }
.ksb-kembali { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 16px; background: #E7F4EC; color: #166534; font-weight: 800; transition: background-color 0.2s, color 0.2s; }
.ksb-kembali b { font-size: 26px; }
.ksb-kembali.kurang { background: var(--red-soft); color: var(--red); }
.ksb-papan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.ksb-k { height: 58px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 21px; font-weight: 800; color: var(--ink); transition: background-color 0.12s, transform 0.12s; }
.ksb-k:hover { background: var(--accent-pick); border-color: var(--accent-line); }
.ksb-k:active { transform: scale(0.95); }
.ksb-info { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); line-height: 1.6; animation: naik 0.22s ease both; }
.ksb-info b:first-child { font-size: 15px; }
.ksb-catatan { align-self: flex-start; padding: 6px 10px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 600; }
.btn.ksb-selesai { min-height: 58px; border-radius: 16px; font-size: 17px; font-weight: 800; }
@media (max-width: 1100px) { .ksx { grid-template-columns: minmax(0, 1fr) 340px; } .ksb { grid-template-columns: 340px minmax(0, 1fr); } .ksb-tunai { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .ksx, .ksb { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .ksx-hasil { max-height: 60vh; }
  .ksx-kanan { min-height: 420px; }
  .ksb-metode-baris { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ksx-item, .ksx-berhenti, .ksx-resep, .ksx-jml, .ksb-ringkas, .ksb-kanan, .ksb-sisa, .ksb-info { animation: none !important; } button.ksx-obat:hover, button.ksx-obat:active, .ksb-k:active { transform: none; } }

/* warna dan susunan mengikuti mockup Apoteko POS: kartu putih di atas latar hijau-abu, angka mono, kepala Penjualan */
.ksx, .ksb { --mono-pos: 'JetBrains Mono', ui-monospace, Consolas, monospace; }
.ksx .num, .ksb .num { font-family: var(--mono-pos); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ksx { grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head kanan" "tahan kanan" "kiri kanan"; gap: 14px 18px; padding: 18px 18px 18px 20px; border-radius: 24px; background: var(--ground);
  height: calc(100vh / var(--zoom, 1) - 96px); margin: -4px -8px 0; }
.ksx-head { grid-area: head; display: flex; align-items: center; gap: 14px; min-width: 0; }
.ksx-tahan { grid-area: tahan; }
.ksx-kiri { grid-area: kiri; }
.ksx-kanan { grid-area: kanan; border-radius: 20px; border-color: #E1E8E6; box-shadow: 0 24px 48px -32px color-mix(in srgb, var(--sb-2) 70%, transparent); }
.ksx-judul { display: flex; flex-direction: column; line-height: 1.2; flex: none; }
.ksx-judul span { font-size: 12px; font-weight: 700; color: var(--quiet); }
.ksx-judul h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ksx-cari { flex: 1; max-width: 460px; margin-left: auto; height: 50px; border-radius: 14px; }
.ksx-scan { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11.5px; font-weight: 800; flex: none; }
.ksx-scan svg { width: 16px; height: 16px; color: currentColor; }
.ksx-orang { flex: none; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px 0 8px; border: 1px solid #E1E8E6; border-radius: 14px; background: #fff; line-height: 1.2; }
.ksx-orang b { display: block; font-size: 13px; }
.ksx-orang small { display: block; font-size: 11px; color: var(--quiet); }
.ksx-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.ksx-kat { height: 42px; padding: 0 16px; border-radius: 22px; border-color: #D5DFDC; font-size: 12.5px; }
.ksx-kat[aria-pressed="true"] { background: var(--sb-2); border-color: var(--sb-2); }
.ksx-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
/* keranjang dan kartu digambar ulang setiap ketukan, jadi tidak diberi animasi masuk supaya tidak berkedip */
.ksx-item, .ksx-berhenti, .ksx-jml, .ksb-ringkas, .ksb-kanan, .ksb-sisa, .ksb-info { animation: none; }
.ksx-obat { min-height: 136px; border-radius: 18px; border-color: #E1E8E6; padding: 13px 14px; gap: 6px; box-shadow: 0 1px 2px rgba(15, 42, 40, 0.04); }
button.ksx-obat:hover { background: #F7FBF9; }
.ksx-obat.dipilih { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 10px 22px -16px color-mix(in srgb, var(--accent) 80%, transparent); }
.ksx-obat.habis { background: #F2F5F4; }
.ksx-nama { font-size: 14.5px; }
.ksx-obat-bawah b { font-size: 15px; font-weight: 700; color: var(--accent-dark); }
.ksx-jml { min-width: 28px; height: 28px; border-radius: 14px; font-size: 13px; font-family: var(--mono-pos); }
.ksx-hasil-kepala b { font-size: 13.5px; }

.ksx-atas { padding: 18px 20px 12px; border-bottom: 0; }
.ksx-kepala h2 { font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.ksx-hitung { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.ksx-jenis { border-radius: 14px; background: #EEF2F1; }
.ksx-jenis button { height: 42px; border-radius: 11px; font-size: 13.5px; }
.ksx-isi { padding: 0 20px; }
.ksx-item { gap: 8px; padding: 12px 0; border-bottom-color: #EDF2F0; }
.ksx-item-nama b, .ksx-item.jasa b { font-size: 14px; }
.ksx-nilai { font-family: var(--mono-pos); font-weight: 700; font-size: 14px; }
.ksx-step { gap: 8px; border: 0; overflow: visible; }
.ksx-step button { width: 36px; height: 36px; border: 1px solid #D5DFDC; border-radius: 12px; font-size: 18px; }
.ksx-step input { width: 34px; height: 36px; border: 0; background: none; font-family: var(--mono-pos); font-size: 15px; font-weight: 700; }
.ksx-satuan { margin-left: auto; padding: 3px; border-radius: 11px; background: #EEF2F1; }
.ksx-satuan button { height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12px; }
.ksx-satuan button[aria-pressed="true"] { background: var(--sb-2); }
.ksx-harga { margin-left: 0; flex-basis: 100%; justify-content: flex-end; }
.ksx-harga .cell { width: 96px; min-height: 28px; border-color: transparent; background: #F4F7F6; font-family: var(--mono-pos); font-size: 12px; }
.ksx-harga .cell:hover, .ksx-harga .cell:focus { border-color: var(--accent-line); background: #fff; }
.ksx-item .tags .chip.amber { padding: 3px 8px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 600; }
.ksx-item .tags .chip.red { padding: 3px 8px; border-radius: 8px; font-size: 11.5px; }
.ksx-berhenti { border-color: #F3C4BE; }
.ksx-kaki { padding: 14px 20px 18px; border-top-color: #E1E8E6; background: #F7FAF9; gap: 10px; }
.ksx-garis { font-size: 13px; }
.ksx-total b.num { font-size: 26px; }
.ksx-tombol { gap: 10px; }
.ksx-tombol .btn { min-height: 60px; border-radius: 16px; }
.ksx-tombol .btn:first-child { width: 110px; border-color: #D5DFDC; background: #fff; font-weight: 800; color: var(--ink); }
.ksx-tombol .ksx-bayar { gap: 10px; font-size: 17px; box-shadow: 0 10px 22px -10px rgba(5, 38, 36, 0.6); }
.ksx-tombol .ksx-bayar svg { width: 20px; height: 20px; }
.ksx-tombol .ksx-bayar:disabled { background: #C6D1CE; border-color: #C6D1CE; color: #3F4E4B; box-shadow: none; font-size: 14.5px; }
.ksb { padding: 20px; border-radius: 24px; background: var(--ground); margin: -4px -8px 0; min-height: calc(100vh / var(--zoom, 1) - 96px); gap: 20px; }
.ksb-ringkas { width: auto; border-radius: 24px; padding: 22px; }
.ksb-kanan { border-radius: 24px; border-color: #E1E8E6; padding: 22px 24px; }
.ksb-total b { font-size: 36px; }
.ksb-terima b { font-size: 36px; }
.ksb-k { height: 60px; border-radius: 16px; border-color: #E1E8E6; font-size: 23px; font-weight: 700; font-family: var(--mono-pos); }
.ksb-cepat { height: 52px; border-radius: 14px; font-size: 15px; font-weight: 700; }
.ksb-metode { height: 60px; border-radius: 16px; font-size: 15px; }
.ksb-kembali b { font-size: 30px; }
.btn.ksb-selesai { min-height: 62px; border-radius: 18px; font-size: 18px; box-shadow: 0 10px 22px -10px rgba(5, 38, 36, 0.6); }
@media (max-width: 1440px) { .ksx-orang { display: none; } }

/* stok opname: gaya Apoteko POS, satu kartu per batch dengan hitungan fisik dan panel hasil di kanan */
.opx-khusus { margin-left: 4px; }
.opx-daftar { gap: 8px; }
.opx-baris { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); grid-template-areas: "info info info info" "sistem fisik cocok hasil"; align-items: center; gap: 10px 18px; padding: 12px 16px; border: 1px solid #E1E8E6; border-radius: 16px; background: #fff; transition: border-color 0.16s, box-shadow 0.2s, background-color 0.16s; }
.opx-baris.cocok { border-color: #BFE3CC; background: #FBFEFC; }
.opx-baris.beda { border-color: #F1D49A; background: #FFFCF5; box-shadow: inset 3px 0 0 #D97706; }
.opx-info { grid-area: info; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.opx-baris > .opx-angka:nth-child(2) { grid-area: sistem; }
.opx-baris > .opx-angka:nth-child(3) { grid-area: fisik; }
.opx-baris > .ksx-mini { grid-area: cocok; align-self: end; height: 36px; }
.opx-hasil { grid-area: hasil; }
.opx-nama { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.opx-nama b { font-size: 14px; font-weight: 800; }
.opx-angka { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.opx-angka:nth-child(2) { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 4px; width: 92px; }
.opx-angka:nth-child(2) > .ksx-sub:first-child { flex-basis: 100%; }
.opx-angka > b { font-size: 17px; font-weight: 700; }
.opx-baris .ksx-step input { width: 52px; }
.opx-hasil { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; align-self: end; min-height: 36px; }
.opx-hasil .cell { width: 150px; min-height: 32px; font-size: 12px; }
.opx-tanda { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.opx-tanda.cocok { background: #E7F4EC; color: #166534; }
.opx-tanda.beda { background: var(--amber-soft); color: var(--amber); }
.opx-lagi { align-self: center; height: 40px; margin: 4px 0 8px; }
.opx-maju { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--gelap); color: #fff; }
.opx-maju-teks { display: flex; align-items: baseline; gap: 6px; }
.opx-maju-teks b:first-child { font-size: 24px; font-weight: 800; }
.opx-maju-teks span { flex: 1; color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.opx-maju-teks b:last-child { font-size: 15px; }
.opx-batang { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.opx-batang i { display: block; height: 100%; border-radius: 999px; background: #8CDECC; transition: width 0.3s ease; }
.opx-segmen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opx-segmen button { height: 38px; font-size: 12px; padding: 0 4px; }
.opx-segmen button .num { color: var(--quiet); font-size: 11px; }
.opx-statistik { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; }
.opx-statistik div { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.opx-statistik b { font-size: 20px; font-weight: 700; }
.opx-beda { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.opx-beda > b { font-size: 13px; }
.opx-beda .ksx-garis { align-items: flex-start; color: var(--ink); line-height: 1.35; }
.opx-minus { color: var(--red); }
.opx .ksx-total b.num { font-size: 22px; }
.ksx-tombol .btn.ksx-bayar:first-child { width: auto; flex: 1; border-color: var(--accent); background: var(--accent); color: #fff; }
.ksx-tombol .btn.ksx-bayar:first-child:hover { background: var(--accent-dark); }
.ksx-tombol .btn.ksx-bayar:first-child:disabled { border-color: #C6D1CE; background: #C6D1CE; color: #3F4E4B; }
@media (max-width: 600px) { .opx-baris { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "info info" "sistem fisik" "cocok hasil"; } .opx-hasil { justify-content: flex-start; } .opx-baris > .ksx-mini { align-self: center; } }
@media (max-width: 900px) {
  .ksx { grid-template-areas: "head" "tahan" "kiri" "kanan"; padding: 12px; margin: 0; height: auto; }
  .ksx-head { flex-wrap: wrap; }
  .ksx-cari { flex-basis: 100%; max-width: none; margin-left: 0; }
  .ksb { padding: 12px; margin: 0; }
}

/* tombol cari cepat di sidebar (pengganti bilah atas) */
.sb-cari { flex: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 10px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.82); font-size: 12px; font-weight: 600; text-align: left; transition: background-color 0.16s ease, border-color 0.16s ease; }
.sb-cari:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.26); color: #fff; }
.sb-cari svg { flex: none; }
.sb-cari span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-cari kbd { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.8); }
@media (max-width: 900px) {
  .sb-cari { width: 40px; height: 40px; margin-left: auto; padding: 0; justify-content: center; border: 0; background: rgba(255, 255, 255, 0.12); }
  .sb-cari span, .sb-cari kbd { display: none; }
  .sb-cari + .tombol-menu { margin-left: 0; }
}

/* ------------------------------------------------------------------ halaman Akun: profil, daftar pengguna, dialog ganti sandi */
.avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; font-weight: 800; }
.avatar.besar { width: 56px; height: 56px; font-size: 18px; background: rgba(255, 255, 255, 0.16); color: #fff; border: 2px solid rgba(255, 255, 255, 0.3); }
.profil { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 18px; padding: 20px 24px; border-radius: 18px; color: #fff; background: var(--gelap); box-shadow: 0 20px 40px -26px var(--sb-bayang); }
.profil::after { content: ""; position: absolute; right: -70px; top: -90px; width: 240px; height: 240px; border-radius: 50%; box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.03), 0 0 0 80px rgba(255, 255, 255, 0.02); pointer-events: none; }
.profil-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profil-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.profil-info strong { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.profil-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; opacity: 0.9; }
.profil-aksi { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.profil .btn { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); color: #fff; }
.profil .btn:hover { background: rgba(255, 255, 255, 0.18); }
.profil .btn.primary { background: #fff; border-color: #fff; color: var(--sb-2); }
.profil .btn.primary:hover { background: rgba(255, 255, 255, 0.9); }
.kartu-sandi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 20px; border-radius: 16px; background: var(--amber-soft); border: 1px solid #F1DDB8; color: var(--amber); }
.kartu-sandi > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kartu-sandi code { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); word-break: break-all; }
.kartu-sandi small { font-size: 11.5px; }
.pengguna-daftar { list-style: none; margin: 0; padding: 0; }
.pengguna { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); transition: background-color 0.16s ease; }
.pengguna:hover { background: var(--accent-pick); }
.pengguna.off { opacity: 0.6; }
.pengguna-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pengguna-info strong { font-size: 13px; }
.pengguna-info strong small { font-weight: 600; color: var(--quiet); }
.pengguna-info > span { font-size: 11.5px; color: var(--quiet); }
.pengguna-info .tags { margin-top: 4px; }
.pengguna-aksi { display: flex; flex-wrap: wrap; gap: 6px; }
.pin-isi { display: inline-flex; gap: 6px; }
.pin-isi .cell { width: 96px; }
.form-baris { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px 18px; background: var(--soft); }
.form-baris .param { flex: 1 1 200px; }
.sandi-dialog { max-width: 440px; gap: 16px; margin-top: 8vh; }
.sandi-kepala { display: flex; align-items: flex-start; gap: 12px; }
.sandi-kepala > div { flex: 1; }
.sandi-kepala h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.sandi-kepala p { margin-top: 2px; color: var(--quiet); font-size: 12px; }
.sandi-isian { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; }
.sandi-isian small { font-size: 11.5px; font-weight: 500; color: var(--quiet); }
.sandi-isian small.salah, .sandi-galat { color: var(--red) !important; font-weight: 600 !important; }
.sandi-galat:empty { display: none; }
.isian { position: relative; display: flex; align-items: center; }
.isian input { width: 100%; height: 44px; padding: 0 48px 0 14px; border: 1px solid var(--line-input); border-radius: 12px; background: #fff; font-size: 14px; font-weight: 500; transition: border-color 0.15s, box-shadow 0.15s; }
.isian input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.mata { position: absolute; right: 4px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--quiet); }
.mata:hover { background: var(--accent-soft); color: var(--ink); }
.mata svg { width: 18px; height: 18px; }
.kekuatan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.kekuatan i { height: 5px; border-radius: 999px; background: var(--grey-soft); transition: background-color 0.2s ease; }
.kekuatan[data-skor="1"] i:nth-child(-n+1) { background: var(--orange); }
.kekuatan[data-skor="2"] i:nth-child(-n+2) { background: #CA8A04; }
.kekuatan[data-skor="3"] i:nth-child(-n+3) { background: #16A34A; }
.kekuatan[data-skor="4"] i { background: #15803D; }
.kabar { position: fixed; left: 50%; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px; background: var(--sb-2); color: #fff; font-weight: 700;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5); transform: translateX(-50%); animation: kabar-masuk 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; transition: opacity 0.3s ease, transform 0.3s ease; }
.kabar svg { width: 18px; height: 18px; color: #86EFAC; }
.kabar.pergi { opacity: 0; transform: translate(-50%, 8px); }
@keyframes kabar-masuk { from { opacity: 0; transform: translate(-50%, 16px); } }
@media (prefers-reduced-motion: reduce) { .kabar { animation: none; transition: none; } }

/* ------------------------------------------------------------------ sambutan di atas Ringkasan: kartu bergradasi warna tema */
.sambutan { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px;
  padding: 24px 28px; border-radius: 20px; color: #fff; background: var(--gelap); box-shadow: 0 22px 44px -26px var(--sb-bayang); }
.sambutan::before { content: ""; position: absolute; right: -90px; top: -120px; width: 340px; height: 340px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 0 0 50px rgba(255, 255, 255, 0.03), 0 0 0 100px rgba(255, 255, 255, 0.02); }
.sambutan-hias { position: absolute; right: 28%; bottom: -46px; width: 170px; height: 170px; color: #fff; opacity: 0.06; transform: rotate(-12deg); pointer-events: none; }
.sambutan-hias svg { width: 100%; height: 100%; }
.sambutan-teks { position: relative; flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sambutan-tgl { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.sambutan h1 { margin-top: 4px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.sambutan p { color: rgba(255, 255, 255, 0.78); font-size: 12.5px; }
.sambutan-pil { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sambutan-pil a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; transition: background-color 0.16s ease, transform 0.16s ease; }
.sambutan-pil a:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
.sambutan-pil a.awas { background: rgba(242, 196, 109, 0.16); border-color: rgba(242, 196, 109, 0.4); }
.sambutan-pil a.awas b { color: #F7D48E; }
.sambutan-pil svg { width: 15px; height: 15px; opacity: 0.85; }
.sambutan-pil b { font-weight: 800; }
.sambutan-aksi { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.sambutan .btn { justify-content: flex-start; min-height: 40px; border-radius: 12px; }
.sambutan-utama { background: #fff; border-color: #fff; color: var(--sb-2); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5); }
.sambutan-utama:hover { background: rgba(255, 255, 255, 0.9); }
.sambutan-kedua { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.sambutan-kedua:hover { background: rgba(255, 255, 255, 0.18); }
.sambutan-kedua kbd { margin-left: auto; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.85); }
.ringkas-ingat:empty { display: none; }
.ringkas-ingat .pengingat { flex-direction: row; flex-wrap: wrap; gap: 8px; overflow: visible; border: 0; border-radius: 0; }
.ringkas-ingat .advice { flex: 1 1 280px; padding: 10px 14px; border: 1px solid #F1DDB8; border-radius: 14px; }
@media (max-width: 640px) {
  .sambutan { padding: 20px; }
  .sambutan-aksi { flex-direction: row; flex-wrap: wrap; min-width: 0; width: 100%; }
  .sambutan-aksi .btn { flex: 1 1 140px; justify-content: center; }
  .sambutan-aksi kbd { display: none; }
}

@media (max-width: 1100px) { .dua-kolom { grid-template-columns: minmax(0, 1fr); } }
/* layar pendek: sidebar dirapatkan supaya semua menu tetap muat tanpa scroll. Saat huruf diperbesar, batas tingginya ikut dikalikan zoom. */
@media (max-height: 800px) {
  .side { gap: 8px; padding: 10px 10px 8px; }
  .brand { padding-bottom: 8px; }
  .sb-akun { padding: 8px; }
  .sb-akun-kaki { display: none; }
  .nav-judul { padding: 5px 10px 2px; }
  #nav a { min-height: 21px; }
}
@media (max-height: 880px) {
  :root[data-huruf="l"] .side { gap: 8px; padding: 10px 10px 8px; }
  :root[data-huruf="l"] .brand { padding-bottom: 8px; }
  :root[data-huruf="l"] .sb-akun { padding: 8px; }
  :root[data-huruf="l"] .sb-akun-kaki { display: none; }
  :root[data-huruf="l"] .nav-judul { padding: 5px 10px 2px; }
  :root[data-huruf="l"] #nav a { min-height: 21px; }
}
@media (max-height: 960px) {
  :root[data-huruf="xl"] .side { gap: 8px; padding: 10px 10px 8px; }
  :root[data-huruf="xl"] .brand { padding-bottom: 8px; }
  :root[data-huruf="xl"] .sb-akun { padding: 8px; }
  :root[data-huruf="xl"] .sb-akun-kaki { display: none; }
  :root[data-huruf="xl"] .nav-judul { padding: 5px 10px 2px; }
  :root[data-huruf="xl"] #nav a { min-height: 21px; }
}
@media (max-width: 520px) {
  .ubin-baris { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ubin { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .ubin-ikon { width: 32px; height: 32px; border-radius: 10px; }
  .ubin-ikon svg { width: 16px; height: 16px; }
  .ubin-teks b { font-size: 15px; }
}
@media (max-width: 900px) {
  .ks-susun { grid-template-columns: minmax(0, 1fr); }
  .ks-cari { position: static; }
  .chat-page { height: auto; }
  .chat-panel { height: 70vh; }
  .shell { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; }
  .side-frame { flex: none; position: static; height: auto; }
  .side { height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; }
  .brand { border: 0; padding: 0; }
  .tombol-menu { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.12); color: #fff; }
  #nav, .sb-akun, .sb-hias { display: none; }
  .side.buka #nav { display: flex; flex-basis: 100%; overflow: visible; }
  .side.buka .sb-akun:not(:empty) { display: flex; flex-basis: 100%; }
  #nav a { flex: none; min-height: 38px; max-height: none; }
  .isi { min-height: 0; }
  main { padding: 16px 16px 40px; }
}

@media (pointer: coarse) {
  .btn, .search, select.filter, .cell, .param input, .seg button, .ks-cek, .chat-awal .seg button { min-height: 44px; }
  .stepper button, .x { width: 44px; height: 44px; }
  .row-btn { min-height: 48px; }
  .check { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { .sb-hias svg { animation: none; } #nav a:active { transform: none; } }

@media print {
  body { background: #fff; }
  .shell, .dialog-actions { display: none !important; }
  .dialog-bg { position: static; padding: 0; background: none; }
  .dialog { max-width: none; padding: 0; border-radius: 0; }
}

/* ------------------------------------------------------------------ kasir gaya tablet: layar penuh, sidebar ikon, tombol besar untuk jari */
.ksx-riwayat { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 50px; padding: 0 14px; border: 1px solid #E1E8E6; border-radius: 14px; background: #fff; font-weight: 700; color: #475467; transition: border-color 0.16s, background-color 0.16s; }
.ksx-riwayat:hover { border-color: var(--accent-line); background: #F7FBF9; }
.ksx-riwayat svg { width: 18px; height: 18px; color: var(--accent); }
.ksx-riwayat b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-dark); display: inline-grid; place-items: center; font-size: 11.5px; }
.ksx-item-nama { display: flex; flex-direction: column; gap: 2px; }
.ksx-item-nama .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
/* satu baris: jumlah, satuan, harga. Kalau tetap tidak muat (huruf besar), harga turun ke baris berikutnya */
.ksx-item-bawah { gap: 6px; }
.ksx-step { gap: 4px; }
.ksx-step input { width: 32px; }
.ksx-satuan button { height: 30px; padding: 0 7px; }
.ksx-harga { flex-basis: auto; margin-left: auto; gap: 3px; }
.ksx-harga .cell { width: 62px; min-height: 32px; padding: 0 7px; }

@media (min-width: 701px) {
  body.mode-kasir .shell { flex-direction: row; align-items: flex-start; gap: 8px; padding: 8px; }
  body.mode-kasir .side-frame { flex: 0 0 64px; position: sticky; top: 8px; height: calc(100vh / var(--zoom, 1) - 16px); }
  body.mode-kasir .side { height: 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; padding: 12px 8px; }
  body.mode-kasir .brand { justify-content: center; padding: 2px 0 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  body.mode-kasir .brand > div:last-child, body.mode-kasir .sb-cari span, body.mode-kasir .sb-cari kbd, body.mode-kasir .nav-judul,
  body.mode-kasir #nav a > span, body.mode-kasir .sb-hias, body.mode-kasir .tombol-menu, body.mode-kasir .sb-akun { display: none; }
  body.mode-kasir .sb-cari { justify-content: center; height: 40px; padding: 0; }
  body.mode-kasir #nav { display: flex; gap: 2px; }
  body.mode-kasir #nav a { flex: 1 1 0; justify-content: center; padding: 0; min-height: 30px; max-height: 42px; border-radius: 11px; }
  body.mode-kasir #nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 10px var(--sb-aktif); }
  body.mode-kasir #nav svg { width: 19px; height: 19px; }
  body.mode-kasir .isi { min-height: calc(100vh / var(--zoom, 1) - 16px); background: var(--ground); }
  body.mode-kasir main { padding: 0; }
  body.mode-kasir .page { max-width: none; }
  body.mode-kasir .ksx { grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh / var(--zoom, 1) - 18px); min-height: 0; margin: 0; border-radius: 15px; }
  body.mode-kasir .ksx { grid-template-areas: "head kanan" "tahan kanan" "kiri kanan"; grid-template-rows: auto auto minmax(0, 1fr); }
  body.mode-kasir .ksx-cari { flex: 1 1 auto; max-width: 460px; margin-left: auto; }
  body.mode-kasir .ksx-hasil { max-height: none; }
  body.mode-kasir .ksx-kanan { min-height: 0; }
  body.mode-kasir .ksx-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  body.mode-kasir .ksx-head { flex-wrap: nowrap; }
  body.mode-kasir .ksb { grid-template-columns: 360px minmax(0, 1fr); min-height: calc(100vh / var(--zoom, 1) - 18px); padding: 14px; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  body.mode-kasir .ksx { grid-template-columns: minmax(0, 1fr) 340px; padding: 14px; gap: 12px; }
  body.mode-kasir .ksx-orang { display: none; }
  body.mode-kasir .ksx-riwayat span { display: none; }
  body.mode-kasir .ksx-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  body.mode-kasir .ksb { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (min-width: 701px) and (max-width: 860px) {
  body.mode-kasir .ksx { grid-template-columns: minmax(0, 1fr) 300px; }
  body.mode-kasir .ksx-judul, body.mode-kasir .ksx-scan { display: none; }
  body.mode-kasir .ksx-cari { max-width: none; margin-left: 0; }
  body.mode-kasir .ksx-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  body.mode-kasir .ksx-tombol .btn:first-child { width: 74px; }
  body.mode-kasir .ksx-bayar .num { display: none; }
}
/* layar tablet mendatar (tinggi sekitar 768px): papan angka dirapatkan supaya tombol Selesai terlihat tanpa gulir */
@media (min-width: 701px) and (max-height: 860px) {
  body.mode-kasir .ksb-kanan { gap: 10px; padding: 16px 18px; }
  body.mode-kasir .ksb-metode { height: 44px; }
  body.mode-kasir .ksb-terima { padding: 8px 14px; }
  body.mode-kasir .ksb-terima b { font-size: 26px; }
  body.mode-kasir .ksb-cepat { height: 38px; }
  body.mode-kasir .ksb-k { height: 46px; font-size: 19px; }
  body.mode-kasir .ksb-kembali { padding: 8px 14px; }
  body.mode-kasir .ksb-kembali b { font-size: 22px; }
  body.mode-kasir .btn.ksb-selesai { min-height: 50px; }
}

/* ------------------------------------------------------------------ kasir alur "cari dulu": kotak cari besar, hasil berupa daftar ringkas */
.ksx-head .ksx-riwayat { margin-left: auto; }
.ksx-cari.kso-cari, body.mode-kasir .ksx-cari.kso-cari { flex: none; max-width: none; margin: 0; height: 58px; border-width: 2px; border-radius: 16px; }
.kso-cari input { font-size: 16px; font-weight: 600; }
.kso-cari svg { width: 21px; height: 21px; }
.kso-daftar { display: flex; flex-direction: column; gap: 6px; }
.kso { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 10px 14px; border: 1px solid #E1E8E6; border-radius: 14px; background: #fff; text-align: left; color: var(--ink); transition: border-color 0.14s, background-color 0.14s, box-shadow 0.14s; }
button.kso:hover { border-color: var(--accent-line); background: #F7FBF9; }
button.kso:active { background: var(--accent-pick); }
.kso.aktif { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 10px 22px -18px color-mix(in srgb, var(--accent) 80%, transparent); background: #F7FBF9; }
.kso.dipilih:not(.aktif) { border-color: var(--accent-line); }
.kso-utama { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kso-titik { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.kso-nama { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.kso-nama b { font-size: 14.5px; font-weight: 800; }
.kso-nama .ksx-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kso-letak { color: var(--accent-dark); font-weight: 700; }
.kso-kanan { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.kso-kanan b { font-family: var(--mono-pos); font-size: 14.5px; color: var(--accent-dark); }
.kso-jml { flex: none; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--mono-pos); font-size: 13px; font-weight: 800; }
.kso-plus { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); font-size: 22px; font-weight: 700; line-height: 1; }
button.kso:hover .kso-plus, .kso.aktif .kso-plus { background: var(--accent); color: #fff; }
.kso.habis { background: #FBFCFC; border-style: dashed; }
.kso.habis .kso-nama b { color: #475467; }
.kso-pengganti { display: flex; flex-direction: column; gap: 6px; padding-left: 22px; }
.kso-ganti { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--accent-line); border-radius: 12px; background: var(--accent-pick); text-align: left; color: var(--ink); }
.kso-ganti:hover { background: var(--accent-soft); }
.kso-ganti > span:first-child { min-width: 0; }
.kso-beda { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--amber); }
.kso-tambah { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.kso-aksi { display: flex; gap: 6px; padding-left: 22px; }
.kso-petunjuk { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--accent-soft) 60%, #fff); color: #34413F; line-height: 1.5; }
.kso-petunjuk > svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }
.kso-petunjuk b { display: block; font-size: 15px; color: var(--ink); }
.kso-petunjuk kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line-input); border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 700 11px/18px var(--mono-pos, monospace); text-align: center; }
.kso-kosong { margin-top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px; border: 1px dashed var(--line-input); border-radius: 16px; background: #fff; color: var(--quiet); }
.kso-kosong b { font-size: 15px; color: var(--ink); }
@media (pointer: coarse) { .kso-petunjuk kbd, .kso-petunjuk span { display: none; } .kso-petunjuk b { margin-top: 1px; } }
@media (max-width: 860px) { .kso-plus { display: none; } .kso-pengganti, .kso-aksi { padding-left: 0; } }

/* impor: layar pemetaan kolom */
.imp-satuan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); color: #7A4A06; font-weight: 600; }
.imp-satuan input { width: 180px; }
