/* Prasasti Gym POS — monochrome UI */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --muted-bg: #f5f5f5;
  --muted-bg-2: #ededed;
  --border: #ebebeb;
  --border-strong: #d9d9d9;
  --text: #111111;
  --text-2: #525252;
  --text-3: #8a8a8a;
  --black: #111111;
  --white: #ffffff;
  --green: #15803d;
  --green-bg: #e7f6ec;
  --red: #b91c1c;
  --red-bg: #fdecec;
  --orange: #b45309;
  --orange-bg: #fdf1e3;
  --purple: #6d28d9;
  --purple-bg: #efe9fd;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --sidebar: 248px;
  --font: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
.ico { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--text-3); }
.green { color: var(--green); }
.red { color: var(--red); }
.orange { color: var(--orange); }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--black); color: var(--white);
  display: grid; place-items: center;
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 999px;
  color: var(--text-2); font-weight: 500; transition: background .12s, color .12s;
}
.nav a:hover { background: var(--muted-bg); color: var(--text); }
.nav a.active { background: var(--black); color: var(--white); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--muted-bg); display: grid; place-items: center;
  font-weight: 600; font-size: 12px; flex-shrink: 0;
}
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { font-size: 11px; color: var(--text-3); text-transform: capitalize; }

.main { flex: 1; min-width: 0; padding: 32px 40px 60px; }
.main.flush { padding: 0; }
.container { max-width: 1240px; margin: 0 auto; }

.topbar { display: none; }

/* ---------- Page header ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--text); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.035em; }
.page-head p { color: var(--text-2); font-size: 15px; margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--white); color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .12s, transform .05s, border-color .12s;
}
.btn:hover { background: var(--muted-bg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover { background: #2a2a2a; }
.btn-danger { color: var(--red); border-color: #f1c4c4; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; height: 36px; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.inline { display: inline; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.card-body { padding: 18px 22px; }
.card-preview { background: var(--muted-bg); border-radius: var(--radius) var(--radius) 0 0; padding: 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt { margin-top: 18px; } .mt-sm { margin-top: 10px; } .mb { margin-bottom: 18px; }

/* Stat card */
.stat { padding: 20px 22px; }
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.stat .label .ico-box { width: 30px; height: 30px; border-radius: 9px; background: var(--muted-bg); display: grid; place-items: center; color: var(--text); }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stat.dark { background: var(--black); color: var(--white); border-color: var(--black); }
.stat.dark .label { color: #bdbdbd; }
.stat.dark .label .ico-box { background: #262626; color: #fff; }
.stat.dark .hint { color: #9a9a9a; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap; letter-spacing: .01em;
}
.badge-dark { background: var(--black); color: #fff; }
.badge-gray { background: var(--muted-bg); color: var(--text-2); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-pill { border-radius: 999px; padding: 4px 10px; }
.badge-upper { text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }

/* ---------- Chips / tabs ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--text);
}
.chip .n { color: var(--text-3); font-weight: 500; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--black); color: var(--white); border-color: var(--black); }
.chip.active .n { color: #a3a3a3; }

.seg { display: inline-flex; background: var(--muted-bg); padding: 4px; border-radius: 999px; gap: 2px; }
.seg a, .seg button { border: 0; background: transparent; font: inherit; font-weight: 500; font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--text-2); }
.seg .active { background: var(--white); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .help { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--white); font: inherit; font-size: 14px; color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--black); box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.input-sm { height: 34px; font-size: 13px; padding: 0 10px; border-radius: 10px; }
.input-group { position: relative; }
.input-group .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-group .input { padding-left: 40px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 500; pointer-events: none; }
.input-prefix .input { padding-left: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .input, .filters .select { width: auto; min-width: 160px; height: 38px; }
.filters .input-group { flex: 1; min-width: 220px; }
.filters .input-group .input { width: 100%; }

.radio-list { display: flex; flex-direction: column; gap: 10px; }
.radio-list label { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
input[type=radio], input[type=checkbox] { accent-color: var(--black); width: 16px; height: 16px; }

/* Toggle */
.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #e5e5e5; transition: .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .15s; }
.switch input:checked + span { background: var(--black); }
.switch input:checked + span::before { transform: translateX(16px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { font-weight: 600; font-size: 14px; display: block; }
.setting-row span { font-size: 12px; color: var(--text-3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3); padding: 12px 16px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafafa; }
.table .right { text-align: right; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--border-strong); background: #fafafa; }
.table a.link { font-weight: 600; }
.table a.link:hover { text-decoration: underline; }
.thumb {
  width: 38px; height: 38px; border-radius: 10px; background: var(--muted-bg); display: grid; place-items: center;
  font-weight: 700; font-size: 12px; color: var(--text-2); flex-shrink: 0;
}
.prod-cell { display: flex; align-items: center; gap: 12px; }
.prod-cell b { display: block; font-weight: 600; }
.prod-cell span { font-size: 12px; color: var(--text-3); }
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty .ico-wrap { width: 48px; height: 48px; border-radius: 14px; background: var(--muted-bg); display: grid; place-items: center; margin: 0 auto 12px; color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* List rows */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .grow span { font-size: 12px; color: var(--text-3); }
a.list-item:hover { background: #fafafa; }

/* Flash */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; margin-bottom: 20px; font-weight: 500; }
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }
.flash .x { margin-left: auto; cursor: pointer; opacity: .7; background: none; border: 0; color: inherit; }

/* Bars (mini chart) */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars .bar { width: 100%; max-width: 46px; background: var(--muted-bg-2); border-radius: 8px 8px 4px 4px; min-height: 4px; position: relative; }
.bars .bar.today { background: var(--black); }
.bars .bar-col small { font-size: 11px; color: var(--text-3); }
.bars .bar:hover::after {
  content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--black); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
}
.meter { height: 6px; border-radius: 999px; background: var(--muted-bg-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--black); border-radius: 999px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--white); border-radius: 22px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-body { padding: 18px 22px 22px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--black); color: var(--white); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; max-width: 440px; }
.auth-side p { color: #a3a3a3; margin-top: 14px; max-width: 400px; font-size: 15px; }
.auth-preview { background: #1c1c1c; border-radius: 20px; padding: 18px; max-width: 360px; display: flex; flex-direction: column; gap: 10px; }
.auth-preview .opt { background: #fff; color: #111; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 2px solid transparent; }
.auth-preview .opt.sel { border-color: #111; outline: 2px solid #fff; }
.auth-preview .dot { width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid #c4c4c4; }
.auth-preview .opt.sel .dot { border: 5px solid #111; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form form { width: 100%; max-width: 360px; }
.auth-form h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.035em; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100vh; }
.pos-left { display: flex; flex-direction: column; min-width: 0; padding: 24px 28px 0; overflow: hidden; }
.pos-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pos-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.pos-search { flex: 1; }
.pos-search .input { height: 48px; border-radius: 999px; font-size: 15px; padding-left: 44px; background: var(--muted-bg); border-color: transparent; }
.pos-search .input:focus { background: #fff; border-color: var(--black); }
.pos-search .ico { left: 16px; }
.pos-cats { margin-bottom: 16px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.pos-cats .chip { flex-shrink: 0; }
.pos-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; align-content: start; padding-bottom: 28px; }
.pcard {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 10px; cursor: pointer; text-align: left;
  font: inherit; color: inherit; display: flex; flex-direction: column; gap: 10px; transition: border-color .12s, transform .08s, box-shadow .12s;
  position: relative;
}
.pcard:hover { border-color: var(--black); box-shadow: var(--shadow); }
.pcard:active { transform: scale(.98); }
.pcard .pimg { aspect-ratio: 4 / 3; background: var(--muted-bg); border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 22px; color: #b5b5b5; letter-spacing: -0.02em; }
.pcard .pname { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.pcard .pmeta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pcard .pprice { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.pcard .pstock { font-size: 11px; color: var(--text-3); }
.pcard .incart { position: absolute; top: 16px; right: 16px; }
.pcard.out { opacity: .45; cursor: not-allowed; }
.pcard.out:hover { border-color: var(--border); box-shadow: none; }

.pos-right { border-left: 1px solid var(--border); display: flex; flex-direction: column; background: var(--white); min-height: 0; }
.cart-head { padding: 22px 22px 14px; display: flex; align-items: center; justify-content: space-between; }
.cart-head h2 { font-size: 18px; font-weight: 700; }
.cart-items { flex: 1; overflow-y: auto; padding: 0 22px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .ci-info span { font-size: 12px; color: var(--text-3); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; height: 32px; }
.qty button { width: 30px; height: 30px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--text); border-radius: 999px; }
.qty button:hover { background: var(--muted-bg); }
.qty input { width: 34px; border: 0; text-align: center; font: inherit; font-weight: 600; font-size: 13px; outline: none; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ci-total { font-weight: 700; font-size: 13.5px; min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.cart-empty { text-align: center; color: var(--text-3); padding: 60px 10px; }
.cart-empty .ico-wrap { width: 56px; height: 56px; border-radius: 16px; background: var(--muted-bg); display: grid; place-items: center; margin: 0 auto 12px; color: var(--text-2); }
.cart-foot { border-top: 1px solid var(--border); padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-2); }
.sum-row.total { color: var(--text); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sum-row .input { width: 140px; height: 34px; text-align: right; }
.savings { background: var(--green-bg); color: var(--green); border-radius: 10px; padding: 8px 12px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; }

/* Option bars (meniru "offer bars" referensi) */
.opts { display: flex; flex-direction: column; gap: 10px; }
.opts.grid-2 { display: grid; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: 14px;
  cursor: pointer; background: #fff; position: relative; font-weight: 600; transition: border-color .12s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .dot { width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid #c4c4c4; flex-shrink: 0; transition: .12s; }
.opt:hover { border-color: #999; }
.opt.sel, .opt:has(input:checked) { border: 2px solid var(--black); padding: 13px 15px; }
.opt.sel .dot, .opt:has(input:checked) .dot { border: 5.5px solid var(--black); }
.opt .opt-badge { position: absolute; top: -9px; right: 12px; }

.quick-cash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick-cash button { height: 34px; border-radius: 10px; border: 1px solid var(--border-strong); background: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.quick-cash button:hover { background: var(--muted-bg); }

.success-ring { width: 64px; height: 64px; border-radius: 999px; background: var(--black); color: #fff; display: grid; place-items: center; margin: 4px auto 14px; }

.cart-fab { display: none; }
.cart-close { display: none; }

/* ---------- Detail lists ---------- */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; font-weight: 500; }

/* ---------- Print ---------- */
@media print {
  .no-print, .sidebar, .topbar { display: none !important; }
  .main { padding: 0 !important; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s;
    visibility: hidden;
  }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 30; }
  .topbar {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); z-index: 20;
  }
  .topbar .brand-name { font-size: 14px; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 26px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .dl { grid-template-columns: 110px 1fr; }

  .pos { grid-template-columns: 1fr; height: calc(100vh - 57px); height: calc(100dvh - 57px); }
  .pos-left { padding: 14px 16px 0; }
  .pos-head h1 { display: none; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding-bottom: 96px; }
  .pos-right {
    position: fixed; inset: auto 0 0 0; height: 88vh; height: 88dvh; border-radius: 22px 22px 0 0; border: 0; box-shadow: var(--shadow-lg);
    transform: translateY(105%); transition: transform .22s, visibility .22s; z-index: 50; visibility: hidden;
  }
  body.cart-open .pos-right { transform: none; visibility: visible; }
  .cart-close { display: inline-flex; }
  body.cart-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 45; }
  .cart-fab {
    display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; height: 56px; border-radius: 999px;
    background: var(--black); color: #fff; align-items: center; justify-content: space-between; padding: 0 22px; font-weight: 600; border: 0; font: inherit; font-size: 15px;
    box-shadow: var(--shadow-lg); cursor: pointer;
  }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .stat .value { font-size: 20px; }
  .filters .input, .filters .select { min-width: 0; flex: 1; }
}

/* ---------- Foto produk ---------- */
.thumb, .pcard .pimg { overflow: hidden; }
.thumb img, .pcard .pimg img, .photo-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-lg { width: 64px; height: 64px; border-radius: 14px; background: var(--muted-bg); display: grid; place-items: center; font-weight: 700; color: var(--text-2); overflow: hidden; flex-shrink: 0; }
.photo-drop {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px; background: var(--muted-bg); border: 1.5px dashed var(--border-strong);
  display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: border-color .12s;
}
.photo-drop:hover, .photo-drop.drag { border-color: var(--black); }
.photo-drop .ph { text-align: center; color: var(--text-3); font-size: 13px; padding: 16px; }
.photo-drop .ph .ico-wrap { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; margin: 0 auto 10px; color: var(--text); }
.photo-drop.has .ph { display: none; }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.quick-cash button:disabled { opacity: .35; cursor: not-allowed; }
