/* Lucky Tape — tema gelap "liquid glass" (aksen merah & biru logo). Nota cetak tetap hitam-putih. */
:root {
  --red: #E10600; --red-hi: #ff5a50; --red-text: #ff7a71; --blue: #3B5BA9; --blue-hi: #6f8fe0; --blue-text: #9db4ff;
  --green: #3ddc84; --amber: #ffbf47;
  --bg: #0b0b0e; --text: #f6f7fb; --muted: #b8bccb; --line: rgba(255,255,255,.12);
  --glass: rgba(34, 35, 44, .55); --glass-strong: rgba(28, 29, 37, .78); --glass-border: rgba(255,255,255,.15);
  --glass-hi: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%);
  --shadow: 0 10px 30px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.06) inset;
  --pastel-red: #ffd8d3; --pastel-blue: #d6e0fb; --pastel-green: #d5f5df; --ink: #14151b;
  --nav-h: 76px; --radius: 24px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 18px; background: var(--bg); }
body { margin: 0; font-family: "Plus Jakarta Sans", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text);
  line-height: 1.4; min-height: 100vh; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(60vmax 50vmax at -10% -8%, rgba(225, 90, 20, .38), transparent 60%),
    radial-gradient(45vmax 40vmax at 110% 4%, rgba(59, 91, 169, .35), transparent 62%),
    radial-gradient(50vmax 40vmax at 50% 115%, rgba(225, 6, 0, .16), transparent 65%),
    var(--bg);
  background-attachment: fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; font-weight: 800; }
h2 { font-size: 1.35rem; margin: 6px 0 12px; }
h3 { font-size: 1.12rem; margin: 4px 0 10px; }
a { color: var(--blue-text); }
[hidden] { display: none !important; }

/* ---------- Kaca (glass) ---------- */
.glass, .card, .stat, .pcard, .tile, #topbar, #bottomnav, .modal .sheet, .search .inp, .tabs a, .chip, .seg button, .quick button {
  position: relative; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); }
.card::before, .stat::before, .pcard::before, .tile::before, .modal .sheet::before, #topbar::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glass-hi); pointer-events: none; }
.card > *, .stat > *, .pcard > *, .tile > * { position: relative; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .stat, .pcard, .tile, #topbar, #bottomnav, .modal .sheet, .search .inp, .tabs a, .chip, .seg button, .quick button { background: var(--glass-strong); }
  #topbar, #bottomnav, .modal .sheet { background: #1a1b22; }
}

/* Top bar */
#topbar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 12px; margin: 8px 10px 0; padding: 10px 12px;
  border-radius: 22px; background: rgba(20, 20, 26, .6); }
#topbar h1 { font-size: 1.3rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-logo { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.25), 0 0 18px rgba(225,6,0,.45); }
#who { font-size: .78rem; color: var(--muted); text-align: right; }
#who b { display: inline-block; margin-top: 2px; padding: 1px 10px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; }
.icon-btn { position: relative; background: rgba(255,255,255,.1); border: 1px solid var(--glass-border); color: #fff; font-size: 1.9rem; width: 46px; height: 46px;
  border-radius: 50%; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; }

main { padding: 14px; max-width: 760px; margin: 0 auto; }
.loading { text-align: center; padding: 40px; color: var(--muted); }

/* Bottom nav: pil kaca melayang */
#bottomnav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; display: flex; height: var(--nav-h);
  border-radius: 28px; padding: 6px; background: rgba(18, 18, 24, .62); max-width: 740px; margin: 0 auto; }
#bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
  color: var(--muted); font-size: .78rem; font-weight: 700; border-radius: 22px; }
#bottomnav a .ic { font-size: 1.5rem; line-height: 1; filter: grayscale(.4); }
#bottomnav a.active { color: #fff; background: linear-gradient(180deg, #ff2a1f, var(--red)); box-shadow: 0 6px 18px rgba(225,6,0,.45), inset 0 1px 0 rgba(255,255,255,.35); }
#bottomnav a.active .ic { filter: none; }

/* Cards & lists */
.card { border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card.inner { background: rgba(255,255,255,.05); box-shadow: none; padding: 14px; border-radius: 20px; }
.card.tap, .tap { cursor: pointer; }
.card.tap:active { background: rgba(255,255,255,.12); }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.big { font-size: 1.5rem; font-weight: 800; }
.huge { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; }
.right { text-align: right; }
.center { text-align: center; }
.red { color: var(--red-text); } .green { color: var(--green); } .amber { color: var(--amber); } .blue { color: var(--blue-text); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px dashed var(--line); }
.list-item:last-child { border-bottom: 0; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: .78rem; font-weight: 800; background: rgba(111,143,224,.2); color: #c9d6ff; border: 1px solid rgba(157,180,255,.25); }
.badge.red { background: rgba(255,90,80,.18); color: #ffb3ad; border-color: rgba(255,120,110,.35); }
.badge.green { background: rgba(61,220,132,.16); color: #9df0bf; border-color: rgba(61,220,132,.3); }
.badge.amber { background: rgba(255,191,71,.16); color: #ffd68a; border-color: rgba(255,191,71,.3); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { border-radius: var(--radius); padding: 16px; display: block; }
.stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 700; }
.stat .val { white-space: nowrap; font-size: clamp(1.05rem, 5.4vw, 1.35rem); font-weight: 800; margin-top: 4px; letter-spacing: -.01em; }
/* Kartu terang / pastel (kontras tinggi: teks gelap) */
.stat.red-bg, .pastel-red { background: linear-gradient(150deg, #ffe3df, var(--pastel-red)); color: var(--ink); border-color: rgba(255,255,255,.6); }
.stat.blue-bg, .pastel-blue { background: linear-gradient(150deg, #e7edff, var(--pastel-blue)); color: var(--ink); border-color: rgba(255,255,255,.6); }
.pastel-green { background: linear-gradient(150deg, #e6fbec, var(--pastel-green)); color: var(--ink); border-color: rgba(255,255,255,.6); }
.light { background: #f7f8fc; color: var(--ink); }
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green, .light) .lbl,
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green, .light) .muted,
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green, .light) .small { color: #3d4152; }
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green) .red { color: #b30500; }
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green) .green { color: #0d7a35; }
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green) .blue { color: #2c4685; }
:is(.red-bg, .blue-bg, .pastel-red, .pastel-blue, .pastel-green)::before { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%); }
.stat.red-bg .badge, .pastel-red .badge { background: var(--red); color: #fff; border: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.empty .ic { font-size: 2.6rem; }

/* Grafik batang halus */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 22px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.chart .bar i { display: block; width: 100%; max-width: 36px; border-radius: 12px 12px 6px 6px; min-height: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.14); border-bottom: 0; position: relative; }
.chart .bar.on i { background: linear-gradient(180deg, #ff5a50, var(--red)); box-shadow: 0 0 20px rgba(225,6,0,.5); border-color: rgba(255,255,255,.35); }
.chart .bar i b { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: .68rem; white-space: nowrap; color: #fff; }
.chart .bar span { font-size: .74rem; color: var(--muted); font-weight: 700; }
:is(.pastel-blue, .blue-bg) .chart .bar i { background: linear-gradient(180deg, rgba(59,91,169,.45), rgba(59,91,169,.15)); border-color: rgba(59,91,169,.3); }
:is(.pastel-blue, .blue-bg) .chart .bar.on i { background: linear-gradient(180deg, #5b7bd0, var(--blue)); box-shadow: 0 0 16px rgba(59,91,169,.5); }
:is(.pastel-blue, .blue-bg) .chart .bar i b { color: var(--ink); }
:is(.pastel-blue, .blue-bg) .chart .bar span { color: #3d4152; }

/* Buttons: bulat */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 10px 22px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.18); font-weight: 800; font-size: 1.05rem; cursor: pointer; text-decoration: none; color: #fff;
  background: linear-gradient(180deg, #5a7bd0, var(--blue)); box-shadow: 0 8px 20px rgba(59,91,169,.35), inset 0 1px 0 rgba(255,255,255,.3); }
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn:disabled { opacity: .5; }
.btn.red { background: linear-gradient(180deg, #ff3b30, var(--red)); box-shadow: 0 8px 22px rgba(225,6,0,.42), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.green { background: linear-gradient(180deg, #22c065, #11924a); box-shadow: 0 8px 22px rgba(17,146,74,.38), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.light { background: rgba(111,143,224,.2); color: #dfe7ff; border-color: rgba(157,180,255,.35); box-shadow: none; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn.white { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); box-shadow: none; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn.solid-white { background: #fff; color: var(--ink); }
.btn.danger { color: var(--red-text); border-color: rgba(255,122,113,.4); }
.btn.block { width: 100%; }
.btn.sm { min-height: 46px; font-size: .95rem; padding: 6px 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }
.big-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-weight: 800; cursor: pointer; font-size: 1.02rem; text-align: center; }
.tile .ic { font-size: 2.3rem; }
.tile.primary { background: linear-gradient(160deg, #ff3b30, var(--red) 60%, #a30400); color: #fff; box-shadow: 0 12px 28px rgba(225,6,0,.45); }

/* Forms */
label.f { display: block; margin-bottom: 14px; font-weight: 700; }
label.f > span { display: block; margin-bottom: 6px; color: #dde0ea; }
.inp, select.inp, textarea.inp { width: 100%; min-height: 56px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px;
  background: rgba(255,255,255,.07); color: #fff; font-size: 1.05rem; }
.inp::placeholder { color: #8f94a6; }
select.inp option { background: #1b1c23; color: #fff; }
.inp:focus { outline: none; border-color: var(--blue-hi); box-shadow: 0 0 0 4px rgba(111,143,224,.25); background: rgba(255,255,255,.1); }
input[type=date].inp, input[type=month].inp { color-scheme: dark; }
textarea.inp { min-height: 84px; }
.search { position: sticky; top: 76px; z-index: 10; padding: 10px 14px 10px; margin: 0 -14px; background: linear-gradient(180deg, rgba(11,11,14,.96) 70%, rgba(11,11,14,0)); }
.search .inp { font-size: 1.08rem; padding-left: 48px; border-radius: 99px; background: rgba(30,31,40,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23c8ccda' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 16px center; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chip { flex: none; min-height: 46px; padding: 6px 18px; border-radius: 99px; font-weight: 800; cursor: pointer; color: #e8eaf2; box-shadow: none; }
.chip.on { background: #fff; color: var(--ink); border-color: #fff; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { min-height: 60px; border-radius: 20px; font-weight: 800; cursor: pointer; font-size: 1rem; box-shadow: none; color: #eef0f6; }
.seg button .muted { color: var(--muted); }
.seg button.on { background: linear-gradient(180deg, #ff3b30, var(--red)); border-color: rgba(255,255,255,.35); color: #fff; box-shadow: 0 6px 16px rgba(225,6,0,.35); }
.seg button.on .muted { color: #ffe0dd; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 700; min-height: 50px; }
.check input { width: 26px; height: 26px; accent-color: var(--red); }

/* POS */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pcard { border-radius: var(--radius); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; text-align: left; min-height: 130px; color: var(--text); }
.pcard:active { border-color: var(--blue-hi); }
.pcard .nm { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.pcard .pr { color: #fff; font-weight: 800; font-size: 1.15rem; margin-top: auto; }
.pcard .pr .muted { color: var(--muted); }
.pcard .incart { align-self: flex-start; background: var(--red); color: #fff; border-radius: 99px; padding: 1px 10px; font-weight: 800; font-size: .8rem; box-shadow: 0 0 14px rgba(225,6,0,.5); }
.pcard.has { border-color: rgba(255,90,80,.6); }
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 25; padding: 0 14px; }
.cartbar .btn { width: 100%; max-width: 732px; margin: 0 auto; display: flex; justify-content: space-between; min-height: 64px; font-size: 1.08rem;
  background: #fff; color: var(--ink); box-shadow: 0 12px 30px rgba(0,0,0,.5); border: 0; }
.cartbar .btn span { white-space: nowrap; }
.cartbar .btn span:last-child { background: var(--red); color: #fff; padding: 8px 16px; border-radius: 99px; margin-right: -12px; }
.pad-bottom { height: 100px; }
.qtybox { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 12px 0; }
.qtybox button { width: 66px; height: 66px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; font-size: 2rem; font-weight: 800; cursor: pointer; }
.qtybox input { width: 130px; height: 66px; text-align: center; font-size: 2rem; font-weight: 800; border: 1px solid rgba(255,255,255,.25); border-radius: 22px; background: rgba(255,255,255,.08); color: #fff; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick button { min-height: 52px; border-radius: 99px; font-weight: 800; cursor: pointer; box-shadow: none; color: #fff; }
.cart-line { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-line .q { display: flex; align-items: center; gap: 6px; }
.cart-line .q button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); font-size: 1.4rem; font-weight: 800; color: #fff; }
.cart-line .q span { min-width: 34px; text-align: center; font-weight: 800; font-size: 1.15rem; }
.totalbox { position: relative; border-radius: var(--radius); padding: 18px; background: linear-gradient(150deg, #e7edff, var(--pastel-blue)); color: var(--ink); box-shadow: var(--shadow); }
.totalbox .row { justify-content: space-between; }
.change { border-radius: 20px; padding: 14px; text-align: center; font-weight: 800; font-size: 1.6rem; background: var(--pastel-green); color: #0d6b30; }
.change.neg { background: var(--pastel-red); color: #a30400; }

/* Tables */
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { padding: 9px 6px; border-bottom: 1px dashed var(--line); text-align: left; }
table.t th { color: var(--muted); font-size: .8rem; font-weight: 700; }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
.scroll-x { overflow-x: auto; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs a { flex: none; padding: 11px 18px; border-radius: 99px; text-decoration: none; color: #e8eaf2; font-weight: 800; box-shadow: none; }
.tabs a.on { background: #fff; border-color: #fff; color: var(--ink); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.modal .sheet { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 30px 30px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  background: rgba(24, 25, 32, .82); border-bottom: 0; }
.modal .sheet > * { position: relative; }
.sheet h2 { margin-top: 0; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 100px); z-index: 60; background: #fff; color: var(--ink); padding: 14px 22px;
  border-radius: 99px; font-weight: 800; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#toast.err { background: var(--red); color: #fff; }

/* Login */
.login { max-width: 420px; margin: 0 auto; padding-top: 34px; text-align: center; }
.login img { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 60px rgba(225,6,0,.45), 0 0 120px rgba(59,91,169,.35); }
.login h1 { font-size: 2rem; margin: 18px 0 4px; letter-spacing: .02em; }
.login form { text-align: left; margin-top: 24px; }
.pin { letter-spacing: 6px; font-size: 1.4rem !important; text-align: center; }

/* Pratinjau nota (kertas putih) */
.receipt-wrap { display: flex; justify-content: center; border-radius: var(--radius); padding: 18px 0; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); }
.receipt { width: 300px; background: #fff; color: #000; padding: 12px 10px; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.receipt pre, #print-area pre { margin: 0; font-family: "Courier New", ui-monospace, monospace; font-size: 12.5px; line-height: 1.3; white-space: pre; color: #000; }
.receipt img, #print-area img { display: block; width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%; filter: grayscale(1) contrast(1.2); }

#print-area { display: none; }
@media print {
  @page { size: 58mm auto; margin: 0; }
  html, body { width: 58mm; background: #fff !important; color: #000; padding: 0; margin: 0; font-size: 10px; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; width: 58mm; padding: 2mm 2mm 6mm; background: #fff; }
  #print-area pre { font-size: 9.2px; line-height: 1.25; font-weight: 600; color: #000; }
  #print-area img { width: 18mm; height: 18mm; }
}
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
@media (prefers-reduced-transparency: reduce) {
  .card, .stat, .pcard, .tile, #topbar, #bottomnav, .modal .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1c1d25; }
}
