/* =========================================================
   ARTORY MONITORING — tema anak-anak, colorful & playful
   ========================================================= */
:root {
  --red: #FF4D4D; --orange: #FF9F1C; --yellow: #FFD23F; --green: #3BCE6E; --teal: #2EC4B6;
  --blue: #3A86FF; --purple: #8338EC; --pink: #FF5DA2;
  --bg: #FFF8EC; --bg-dot: #F3E6CC; --card: #FFFFFF; --card2: #FFF9F0; --ink: #2B2B52; --muted: #7C7A9C;
  --line: #EFE6D6; --shadow: 0 6px 0 rgba(43, 43, 82, .08), 0 14px 30px rgba(43, 43, 82, .08);
  --sky1: #7FD3FF; --sky2: #C9F0FF; --hill1: #7BD389; --hill2: #4CAF6A;
  --r: 22px;
  --font-h: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
  --font-b: 'Nunito', system-ui, sans-serif;
}
[data-theme="dark"] {
  --bg: #17142E; --bg-dot: #221E40; --card: #221E40; --card2: #2A2550; --ink: #F3F0FF; --muted: #A9A4CF;
  --line: #36305E; --shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 14px 30px rgba(0, 0, 0, .3);
  --sky1: #1D1A4A; --sky2: #3B2F7A; --hill1: #2F6B48; --hill2: #1F4D33;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-b); color: var(--ink); background: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 2px, transparent 2px); background-size: 26px 26px;
  -webkit-font-smoothing: antialiased; transition: background-color .4s, color .4s;
}
h1, h2, h3, h4 { font-family: var(--font-h); margin: 0; letter-spacing: -.01em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 8px; }
.grow { flex: 1; }
.center { justify-content: center; }
code { background: var(--card2); padding: 2px 7px; border-radius: 8px; font-size: .85em; border: 1px solid var(--line); }
.neg { color: var(--red) !important; }
.pos { color: #19A855 !important; }
[data-theme="dark"] .pos { color: #5BE38D !important; }

/* ---------- tombol ---------- */
.btn {
  border: 0; border-radius: 16px; padding: 12px 20px; font-family: var(--font-h); font-weight: 600; font-size: 15px;
  background: var(--ink); color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .18); transition: transform .15s, box-shadow .15s, filter .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn-big { width: 100%; padding: 15px; font-size: 18px; border-radius: 18px; }
/* gradasi dibuat 2 putaran identik (awal = akhir = pink) supaya loop-nya mulus tanpa garis sambungan */
.btn-rainbow {
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple), var(--pink), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple), var(--pink));
  /* 1 putaran warna = 3x lebar tombol (gradasi lebar & lembut); geser 60% = tepat 1 putaran → loop mulus */
  background-size: 600% 100%; background-position: 0% 0; animation: rainbowMove 10s linear infinite; text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
@keyframes rainbowMove { from { background-position: 0% 0; } to { background-position: 60% 0; } }
.btn-pink { background: var(--pink); } .btn-blue { background: var(--blue); } .btn-green { background: var(--green); }
.btn-red { background: var(--red); } .btn-orange { background: var(--orange); }
.btn-ghost { background: var(--card2); color: var(--ink); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn-white { background: #fff; color: #2B2B52; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 20px; box-shadow: 0 4px 0 var(--line); transition: transform .2s; }
.icon-btn:hover { transform: rotate(-10deg) scale(1.08); }

/* =========================================================
   LOGIN
   ========================================================= */
.login { position: fixed; inset: 0; overflow: hidden; display: grid; place-items: center; z-index: 5; }
.login.leaving .login-center { animation: flyOut .6s ease-in forwards; }
.login.leaving .sky { animation: fadeOut .6s .1s forwards; }
@keyframes flyOut { to { transform: translateY(-60px) scale(.9); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky1), var(--sky2) 70%); }
.sun { position: absolute; width: 130px; height: 130px; right: 9%; top: 9%; border-radius: 50%; background: radial-gradient(circle, #FFE66D 55%, #FFD23F 56%); box-shadow: 0 0 0 18px rgba(255, 230, 109, .3), 0 0 0 40px rgba(255, 230, 109, .15); animation: sunPulse 4s ease-in-out infinite; }
[data-theme="dark"] .sun { background: radial-gradient(circle at 35% 35%, #FFF6D5 55%, #E8DDB0 56%); box-shadow: 0 0 40px rgba(255, 246, 213, .4); width: 90px; height: 90px; }
@keyframes sunPulse { 50% { transform: scale(1.06) rotate(10deg); } }
/* pelangi = busur SVG utuh; kaki busur tersembunyi di balik bukit */
.rainbow { position: absolute; left: 50%; bottom: -60px; width: min(1000px, 120vw); height: auto; transform: translateX(-50%);
  opacity: .5; animation: rise 1.4s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none; }
@keyframes rise { from { transform: translateX(-50%) translateY(200px); opacity: 0; } }
.cloud { position: absolute; width: 160px; height: 50px; background: #fff; border-radius: 50px; opacity: .9; animation: drift linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 24px; top: -36px; }
.cloud::after { width: 54px; height: 54px; right: 26px; top: -24px; }
[data-theme="dark"] .cloud, [data-theme="dark"] .cloud::before, [data-theme="dark"] .cloud::after { background: #5A4E9E; }
.c1 { top: 12%; animation-duration: 48s; } .c2 { top: 30%; animation-duration: 64s; animation-delay: -30s; transform: scale(.7); } .c3 { top: 6%; animation-duration: 80s; animation-delay: -55s; transform: scale(.5); }
@keyframes drift { from { left: -200px; } to { left: 110%; } }
#floaters { position: absolute; inset: 0; pointer-events: none; }
.floater { position: absolute; animation: floaty ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .08)); opacity: .9; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-28px) rotate(12deg); } }
.blob { position: absolute; width: 180px; height: 180px; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; opacity: .25; filter: blur(2px); animation: morph 10s ease-in-out infinite; }
@keyframes morph { 50% { border-radius: 63% 37% 41% 59% / 58% 64% 36% 42%; transform: translate(20px, -20px) rotate(40deg) scale(1.1); } }
.hills { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; }
.hills svg { width: 100%; height: 100%; display: block; }
/* kura-kura jalan di depan kartu login (z-index di atas .login-center) supaya tidak pernah terpotong */
.turtle-walk { position: absolute; bottom: 14px; z-index: 3; pointer-events: none; left: -140px; animation: walk 26s linear infinite; }
.turtle-walk .turtle { animation: bob .6s ease-in-out infinite; }
@keyframes walk { to { left: 110%; } }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-2deg); } }
.turtle .leg { animation: legs .6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.turtle .l2 { animation-delay: -.3s; }
@keyframes legs { 50% { transform: translateX(5px); } }
.turtle .eye { animation: blink 4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.login-center { position: relative; z-index: 2; width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; margin-top: -40px; }
.login-logo { width: min(300px, 80%); color: #2B2B52; filter: drop-shadow(0 6px 0 rgba(255, 255, 255, .7)); animation: logoIn 1s cubic-bezier(.2, 1.6, .4, 1) both, logoBob 4s 1s ease-in-out infinite; }
[data-theme="dark"] .login-logo { color: #fff; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .3)); }
@keyframes logoIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
@keyframes logoBob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
.logo-svg { width: 100%; height: auto; display: block; overflow: visible; }
.logo-star { transform-box: fill-box; transform-origin: center; animation: spinStar 5s ease-in-out infinite; }
@keyframes spinStar { 0%, 70%, 100% { transform: rotate(0) scale(1); } 80% { transform: rotate(180deg) scale(1.3); } 90% { transform: rotate(360deg) scale(1); } }
.logo-a path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s ease-out forwards; }
.logo-a .st2 { animation-delay: .25s; } .logo-a .st3 { animation-delay: .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tagline { margin: 4px 0 16px; font-family: var(--font-h); font-size: 17px; color: #2B2B52; background: rgba(255, 255, 255, .75); padding: 4px 16px; border-radius: 99px; animation: pop .6s .5s both; }
[data-theme="dark"] .tagline { background: rgba(0, 0, 0, .3); color: #fff; }
.tagline b { color: var(--pink); }
@keyframes pop { from { transform: scale(0); opacity: 0; } }

.login-card { width: 100%; background: var(--card); border-radius: 30px; padding: 30px 28px 22px; position: relative; overflow: hidden;
  box-shadow: 0 10px 0 rgba(43, 43, 82, .12), 0 30px 60px rgba(43, 43, 82, .2); border: 3px solid #fff; animation: cardIn .8s .3s cubic-bezier(.2, 1.4, .4, 1) both; }
[data-theme="dark"] .login-card { border-color: var(--line); }
@keyframes cardIn { from { transform: translateY(60px) scale(.9); opacity: 0; } }
.login-card.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px) rotate(-1deg); } 40%, 80% { transform: translateX(10px) rotate(1deg); } }
.card-crayons { position: absolute; top: 0; left: 0; right: 0; display: flex; height: 8px; }
.card-crayons i { flex: 1; } .card-crayons i:nth-child(1) { background: var(--red); } .card-crayons i:nth-child(2) { background: var(--yellow); } .card-crayons i:nth-child(3) { background: var(--green); } .card-crayons i:nth-child(4) { background: var(--blue); } .card-crayons i:nth-child(5) { background: var(--purple); }
.login-card h2 { font-size: 26px; text-align: center; }
.login-card > .muted { text-align: center; margin: 4px 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 800; font-size: 14px; }
.field > span { padding-left: 4px; }
.input-wrap { display: flex; align-items: center; background: var(--card2); border: 2.5px solid var(--line); border-radius: 16px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(58, 134, 255, .18); transform: scale(1.01); }
.input-wrap .ico { padding: 0 4px 0 14px; font-size: 18px; font-weight: 800; color: var(--muted); }
.input-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px 12px; font-size: 16px; font-weight: 700; outline: none; }
.peek { border: 0; background: none; font-size: 18px; padding: 0 12px; }
.login-err { color: var(--red); font-weight: 800; min-height: 20px; margin: 0 0 8px; text-align: center; font-size: 14px; }
.demo-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* =========================================================
   APP LAYOUT
   ========================================================= */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; animation: fadeIn .5s; }
@keyframes fadeIn { from { opacity: 0; } }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; background: var(--card); border-right: 3px dashed var(--line); z-index: 10; }
.side-logo { width: 170px; margin: 0 auto; color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav button { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 10px 12px; border-radius: 18px; font-family: var(--font-h); font-size: 16px; font-weight: 500; text-align: left; transition: background .2s, transform .2s; }
.nav button:hover { background: var(--card2); transform: translateX(4px); }
.nav .ni { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c) 18%, transparent); transition: transform .3s cubic-bezier(.2, 1.8, .4, 1); }
.nav button:hover .ni { transform: rotate(-12deg) scale(1.1); }
.nav button.active { background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 5px 0 rgba(0, 0, 0, .15); }
.nav button.active .ni { background: var(--c); transform: rotate(-6deg); }
.side-mascot { margin-top: auto; display: flex; flex-direction: column; align-items: center; }
.side-mascot .turtle { animation: bob 1.4s ease-in-out infinite; }
.mascot-bubble { background: var(--yellow); color: #2B2B52; font-family: var(--font-h); font-size: 13.5px; padding: 10px 14px; border-radius: 18px; position: relative; text-align: center; margin-bottom: 10px; box-shadow: 0 4px 0 rgba(0, 0, 0, .1); }
.mascot-bubble::after { content: ''; position: absolute; bottom: -8px; left: 50%; border: 8px solid transparent; border-top-color: var(--yellow); border-bottom: 0; transform: translateX(-50%); }
.mascot-bubble.pop { animation: pop .4s cubic-bezier(.2, 1.8, .4, 1); }

.main { padding: 22px 30px 60px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 34px; position: relative; display: inline-block; }
.topbar h1::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 10px; background: var(--yellow); opacity: .55; z-index: -1; border-radius: 6px; transform: rotate(-1deg); }
.topbar p { margin: 4px 0 0; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.kurs-pill { background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 4px 0 var(--line); }
.admin-chip { display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 5px 12px 5px 5px; box-shadow: 0 4px 0 var(--line); }
.admin-chip small { display: block; color: var(--muted); font-size: 12px; }
.admin-ava { width: 34px; height: 34px; border-radius: 12px; background: #EDE4FF; display: grid; place-items: center; font-size: 20px; }

.page.enter > * { animation: slideUp .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.page.enter > *:nth-child(2) { animation-delay: .07s; } .page.enter > *:nth-child(3) { animation-delay: .14s; }
@keyframes slideUp { from { transform: translateY(26px); opacity: 0; } }
/* setelah animasi masuk selesai, render ulang (filter, tambah keranjang) tidak dianimasikan lagi */
.page.settled > *, .page.settled .prod, .page.settled .tbl tbody tr, .page.settled .timeline li, .page.settled .bar { animation: none; }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; overflow: hidden; background: var(--card); border-radius: var(--r); padding: 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); border: 2px solid var(--line); transition: transform .25s cubic-bezier(.2, 1.8, .4, 1); }
.stat:hover { transform: translateY(-4px) rotate(-1deg); }
.stat-ico { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--c); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12); flex-shrink: 0; }
.stat:hover .stat-ico { animation: wiggle .5s; }
@keyframes wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.stat small { color: var(--muted); font-weight: 700; }
.stat b { display: block; font-family: var(--font-h); font-size: 25px; font-weight: 600; }
.stat-deco { position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--c); opacity: .12; }

/* ---------- panel, toolbar, chips ---------- */
.panel { background: var(--card); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); border: 2px solid var(--line); margin-bottom: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.toolbar .btn { margin-left: auto; }
.search { display: flex; align-items: center; gap: 6px; background: var(--card2); border: 2.5px solid var(--line); border-radius: 16px; padding: 0 12px; min-width: 240px; flex: 1; max-width: 340px; }
.search:focus-within { border-color: var(--pink); }
.search input { border: 0; background: transparent; outline: none; padding: 11px 4px; width: 100%; font-weight: 700; }
.search.sm { max-width: none; min-width: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 2px solid var(--line); background: var(--card2); border-radius: 99px; padding: 7px 13px; font-weight: 800; font-size: 13px; transition: all .2s; }
.chips button:hover { transform: translateY(-2px); }
.chips button.on { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
[data-theme="dark"] .chips button.on:not([style]) { color: var(--bg); }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 14.5px; }
.tbl th { text-align: left; font-family: var(--font-h); font-weight: 500; color: var(--muted); font-size: 13px; padding: 4px 12px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.tbl td { background: var(--card2); padding: 10px 12px; white-space: nowrap; transition: background .2s; }
.tbl tbody tr { animation: slideUp .45s var(--d, 0s) both; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--yellow) 16%, var(--card2)); }
.tbl td:first-child { border-radius: 16px 0 0 16px; } .tbl td:last-child { border-radius: 0 16px 16px 0; }
.tbl .empty { text-align: center; padding: 30px; border-radius: 16px; }
.sub { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.det { white-space: normal !important; max-width: 280px; }
.who { display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 0; }
.who b { display: block; font-family: var(--font-h); font-weight: 600; font-size: 15.5px; transition: color .2s; }
.who small { color: var(--muted); font-size: 12px; font-weight: 700; }
.who:hover b { color: var(--pink); text-decoration: underline wavy; text-underline-offset: 4px; }
.ava { position: relative; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: block; transition: transform .3s cubic-bezier(.2, 1.8, .4, 1); }
.ava svg, .ava img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; }
.who:hover .ava { transform: scale(1.12) rotate(-8deg); }
.dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--card); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(59, 206, 110, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(59, 206, 110, 0); } }
.credit { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); padding: 5px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; }
.credit.zero { background: var(--line); color: var(--muted); }
.lvl { display: inline-flex; align-items: center; gap: 4px; background: var(--c); color: #fff; padding: 5px 12px; border-radius: 99px; font-family: var(--font-h); font-weight: 600; font-size: 14px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); white-space: nowrap; }
.lvl.sm { font-size: 13px; padding: 4px 10px; }
.tix { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-h); font-weight: 600; font-size: 15.5px; }
.coin { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF1A8, #FFD23F 50%, #F2A900); color: #A86A00; font-style: normal; font-family: var(--font-h); font-weight: 700; font-size: 12px; border: 2px solid #E09A00; box-shadow: 0 2px 0 #C98500; }
.coin.big { width: 46px; height: 46px; font-size: 22px; border-width: 3px; box-shadow: 0 4px 0 #C98500; }
.live { color: #19A855; font-weight: 800; animation: blinkTxt 1.4s infinite; }
@keyframes blinkTxt { 50% { opacity: .5; } }
.pill { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--line); font-weight: 800; font-size: 13px; color: var(--muted); }
.pill.on { background: color-mix(in srgb, var(--green) 18%, transparent); color: #159947; }
[data-theme="dark"] .pill.on { color: #5BE38D; }

/* switch on/off */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 54px; height: 30px; border-radius: 99px; background: #D6D2E8; position: relative; transition: background .3s; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .1); }
.switch span i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); transition: transform .35s cubic-bezier(.2, 1.8, .4, 1); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span i { transform: translateX(24px); }
.switch em { font-style: normal; font-weight: 900; font-size: 12px; color: var(--muted); width: 26px; }
.switch input:checked ~ em { color: #19A855; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-back, .drawer-back { position: fixed; inset: 0; background: rgba(30, 22, 70, .45); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fadeIn .25s; }
.modal-back.closing, .drawer-back.closing { animation: fadeOut .25s forwards; }
.modal { position: relative; background: var(--card); border-radius: 30px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 12px 0 rgba(0, 0, 0, .15), 0 40px 80px rgba(0, 0, 0, .3); animation: modalIn .45s cubic-bezier(.2, 1.4, .4, 1); }
.modal.wide { width: min(1000px, 100%); }
.modal.sm { width: min(460px, 100%); }
.modal.clear { background: transparent; box-shadow: none; overflow: visible; }
.modal-back.closing .modal { animation: modalOut .22s forwards; }
@keyframes modalIn { from { transform: translateY(40px) scale(.85); opacity: 0; } }
@keyframes modalOut { to { transform: scale(.9); opacity: 0; } }
.modal .x { position: absolute; right: 14px; top: 14px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: #2B2B52; font-weight: 900; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); transition: transform .2s; }
.modal .x:hover { transform: rotate(90deg); }
.m-head { padding: 24px 26px 20px; background: var(--c); color: #fff; border-radius: 30px 30px 0 0; position: relative; overflow: hidden; }
.m-head::after { content: ''; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.m-head h3 { font-size: 24px; } .m-head p { margin: 4px 0 0; opacity: .9; font-weight: 700; }
.form { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.form input:not([type=file]), .form select { width: 100%; background: var(--card2); border: 2.5px solid var(--line); border-radius: 14px; padding: 11px 14px; font-weight: 700; outline: none; transition: border-color .2s; }
.form input:focus, .form select:focus { border-color: var(--blue); }
.form .field { margin: 0; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.ava-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.ava-pick button { border: 3px solid transparent; background: none; border-radius: 50%; padding: 0; transition: transform .2s; }
.ava-pick button svg { width: 100%; display: block; }
.ava-pick button.on { border-color: var(--pink); transform: scale(1.1); }

/* ---------- profil ---------- */
.prof-banner { position: relative; overflow: hidden; display: flex; gap: 20px; align-items: center; padding: 28px 28px 24px; background: linear-gradient(120deg, var(--c), color-mix(in srgb, var(--c) 55%, var(--pink))); color: #fff; border-radius: 30px 30px 0 0; }
.banner-shapes i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); animation: floaty 7s ease-in-out infinite; }
.banner-shapes i:nth-child(1) { width: 120px; height: 120px; right: 8%; top: -40px; }
.banner-shapes i:nth-child(2) { width: 60px; height: 60px; right: 30%; bottom: -20px; animation-delay: -2s; }
.banner-shapes i:nth-child(3) { width: 30px; height: 30px; right: 22%; top: 20px; border-radius: 6px; animation-delay: -4s; }
.banner-shapes i:nth-child(4) { width: 18px; height: 18px; right: 4%; bottom: 20px; animation-delay: -1s; }
.prof-ava { position: relative; width: 112px; height: 112px; flex-shrink: 0; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); animation: pop .5s .1s cubic-bezier(.2, 1.8, .4, 1) both; }
.prof-ava svg, .prof-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ava-edit { position: absolute; right: -6px; bottom: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; cursor: pointer; border: 3px solid #fff; transition: transform .2s; font-size: 16px; }
.ava-edit:hover { transform: scale(1.15) rotate(-10deg); }
.prof-id { position: relative; }
.prof-id h2 { font-size: 30px; text-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.prof-id p { margin: 4px 0 10px; font-weight: 700; opacity: .95; }
.prof-id .lvl { background: #fff; color: var(--c); box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.prof-id .pill { background: rgba(255, 255, 255, .25); color: #fff; }
.prof-body { padding: 22px 26px 28px; display: flex; flex-direction: column; gap: 22px; }
.prof-body h4 { font-size: 18px; margin-bottom: 12px; }
.prof-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
.big-tix, .mini-stat { background: var(--card2); border: 2px solid var(--line); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.big-tix { background: linear-gradient(135deg, #FFF4C2, #FFE07A); border-color: #FFD23F; color: #2B2B52; }
.big-tix .tix { font-size: 30px; } .big-tix .coin { width: 32px; height: 32px; font-size: 16px; }
.big-tix .muted { color: #8A6D1F; font-weight: 700; font-size: 13px; }
.big-tix small, .mini-stat small { font-weight: 800; color: var(--muted); font-size: 12.5px; }
.big-tix small { color: #8A6D1F; }
.mini-stat b { font-family: var(--font-h); font-weight: 600; font-size: 17px; }
.mini-stat .muted { font-size: 12px; font-weight: 700; }
.prof-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.journey { background: var(--card2); border: 2px dashed var(--line); border-radius: 22px; padding: 16px 20px 22px; }
.journey h4 b { color: var(--pink); }
.road { position: relative; height: 12px; background: var(--line); border-radius: 99px; margin: 30px 36px 62px; }
.road-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #9AA0B5, var(--teal), var(--orange), var(--blue), var(--purple)); animation: grow 1.4s .3s cubic-bezier(.2, 1, .3, 1) both; }
@keyframes grow { from { width: 0; } }
.stop { position: absolute; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.stop span { width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); display: grid; place-items: center; font-size: 19px; filter: grayscale(1); opacity: .7; transition: all .3s; }
.stop.done span { border-color: var(--c); filter: none; opacity: 1; background: color-mix(in srgb, var(--c) 18%, var(--card)); }
.stop.here span { transform: scale(1.25); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 25%, transparent); animation: here 1.6s ease-in-out infinite; }
@keyframes here { 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--c) 10%, transparent); } }
.stop small { position: absolute; top: 48px; text-align: center; font-weight: 800; font-size: 12px; white-space: nowrap; }
.stop small em { font-style: normal; color: var(--muted); font-weight: 700; font-size: 11px; }
.walker { position: absolute; top: -46px; transform: translateX(-50%); animation: walkerIn 1.4s .3s cubic-bezier(.2, 1, .3, 1) both; pointer-events: none; }
.walker .turtle { animation: bob .6s ease-in-out infinite; }
@keyframes walkerIn { from { left: 0; } }

.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pack { position: relative; background: var(--c); color: #fff; border-radius: 24px; padding: 18px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 70%, #000); animation: slideUp .5s var(--d) both; transition: transform .3s cubic-bezier(.2, 1.8, .4, 1); }
.pack:hover { transform: translateY(-6px) rotate(-1deg); }
.pack.current { outline: 4px solid var(--yellow); outline-offset: 4px; }
.pack-top b { display: block; font-family: var(--font-h); font-size: 22px; font-weight: 600; }
.pack-top small { font-weight: 800; opacity: .9; }
.chest { width: 120px; margin: 8px 0 4px; transition: transform .3s; }
.pack:hover .chest { animation: wiggle .6s; }
.pack-price { font-family: var(--font-h); font-size: 22px; font-weight: 700; }
.pack-price small { display: block; font-family: var(--font-b); font-size: 12px; font-weight: 700; opacity: .85; }
.pack ul { list-style: none; padding: 10px 0 0; margin: 10px 0 14px; font-size: 12.5px; font-weight: 700; line-height: 1.55; border-top: 2px dashed rgba(255, 255, 255, .45); width: 100%; }
.pack .btn { margin-top: auto; width: 100%; }
.ribbon { position: absolute; top: -12px; right: -6px; background: #E63946; color: #fff; font-family: var(--font-h); font-size: 12px; padding: 5px 12px; border-radius: 99px; border: 3px solid #fff; transform: rotate(6deg); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); animation: ribbon 2s ease-in-out infinite; }
@keyframes ribbon { 50% { transform: rotate(-4deg) scale(1.06); } }

.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; }
.lv-hist { list-style: none; padding: 0; margin: 0; position: relative; }
.lv-hist::before { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 4px; background: var(--line); border-radius: 4px; }
.lv-hist li { display: flex; gap: 12px; align-items: center; padding: 6px 0; position: relative; }
.lv-hist li span { width: 46px; height: 46px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 21px; border: 4px solid var(--card); flex-shrink: 0; }
.lv-hist small { display: block; color: var(--muted); font-weight: 700; }
.mini-tx { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-tx li { display: flex; gap: 10px; align-items: center; background: var(--card2); border-radius: 16px; padding: 9px 12px; }
.mini-tx li div { flex: 1; min-width: 0; }
.mini-tx li b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.mini-tx li small { color: var(--muted); font-weight: 700; font-size: 12px; }
.mini-tx em { font-style: normal; font-family: var(--font-h); font-weight: 600; white-space: nowrap; }
.tx-ico { width: 36px; height: 36px; border-radius: 12px; background: color-mix(in srgb, var(--c) 18%, transparent); display: grid; place-items: center; flex-shrink: 0; }

/* ---------- confirm / topup / receipt ---------- */
.confirm, .topup { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.confirm .chest { margin: 0 auto; width: 130px; animation: floaty 3s ease-in-out infinite; }
.receipt { background: var(--card2); border-radius: 18px; padding: 12px 16px; border: 2px dashed var(--line); }
.receipt div { display: flex; justify-content: space-between; padding: 4px 0; font-weight: 700; }
.coin-stack { display: flex; justify-content: center; gap: 4px; }
.coin-stack .coin { animation: coinJump 1.2s ease-in-out infinite; }
.coin-stack .coin:nth-child(2) { animation-delay: .15s; } .coin-stack .coin:nth-child(3) { animation-delay: .3s; }
@keyframes coinJump { 0%, 100% { transform: translateY(0) rotateY(0); } 40% { transform: translateY(-14px) rotateY(180deg); } }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick button { border: 2.5px solid var(--line); background: var(--card2); border-radius: 16px; padding: 10px 6px; font-family: var(--font-h); font-weight: 600; font-size: 15px; transition: all .2s; }
.quick button small { display: block; font-family: var(--font-b); font-weight: 800; font-size: 11.5px; color: var(--muted); }
.quick button:hover { transform: translateY(-3px); border-color: var(--green); }
.quick button.on { background: var(--green); border-color: var(--green); color: #fff; }
.quick button.on small { color: #fff; }
.topup .field { text-align: left; margin: 0; }
.convert { font-family: var(--font-h); font-size: 20px; }
.convert b { font-size: 34px; color: var(--orange); }
.convert small { display: block; font-family: var(--font-b); color: var(--muted); font-weight: 700; font-size: 12.5px; }
.lvl-preview { min-height: 22px; font-weight: 800; animation: pop .4s; }

.levelup { position: relative; text-align: center; color: #fff; padding: 50px 20px 30px; }
.rays { position: absolute; left: 50%; top: 36%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(var(--c) 0 10deg, color-mix(in srgb, var(--c) 60%, #fff) 10deg 20deg); animation: spin 12s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.lu-badge { font-size: 90px; width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 0 rgba(0, 0, 0, .15); animation: luPop .8s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes luPop { from { transform: scale(0) rotate(-180deg); } }
.levelup h2 { font-size: 46px; margin-top: 16px; text-shadow: 0 4px 0 rgba(0, 0, 0, .2); animation: pop .5s .3s both; }
.levelup p { font-size: 18px; margin: 4px 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.lu-name { display: inline-block; font-family: var(--font-h); font-size: 32px; font-weight: 700; background: #fff; color: var(--c); padding: 6px 26px; border-radius: 99px; margin: 8px 0 20px; animation: pop .5s .5s both; }

.receipt-card { padding: 26px 26px 24px; text-align: center; }
.rc-top .turtle { animation: bob 1s ease-in-out infinite; }
.rc-top h2 { font-size: 26px; color: var(--green); }
.rc-top p { color: var(--muted); font-weight: 700; margin: 4px 0 14px; }
.rc-who { display: inline-flex; align-items: center; gap: 8px; background: var(--card2); padding: 5px 14px 5px 5px; border-radius: 99px; margin-bottom: 12px; }
.rc-who .ava { width: 32px; height: 32px; }
.receipt-card ul { list-style: none; padding: 12px 0; margin: 0; border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); text-align: left; }
.receipt-card li, .rc-total, .rc-bal { display: flex; justify-content: space-between; padding: 4px 0; font-weight: 700; }
.rc-total { font-family: var(--font-h); font-size: 20px; padding-top: 12px; }
.rc-total b { color: var(--red); }
.rc-bal { margin-bottom: 18px; color: var(--muted); }
.rc-bal em { color: var(--ink); font-style: normal; font-size: 18px; }
.receipt-card .btn { width: 100%; }

/* =========================================================
   PRODUK
   ========================================================= */
.cat-tabs { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.cat-tabs button { display: flex; align-items: center; gap: 8px; border: 3px solid var(--line); background: var(--card); padding: 10px 18px 10px 10px; border-radius: 20px; font-family: var(--font-h); font-size: 17px; font-weight: 500; box-shadow: 0 5px 0 var(--line); transition: all .25s cubic-bezier(.2, 1.8, .4, 1); }
.cat-tabs button span { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); font-size: 20px; }
.cat-tabs button em { font-style: normal; background: var(--card2); border-radius: 99px; padding: 1px 9px; font-size: 13px; font-weight: 700; }
.cat-tabs button:hover { transform: translateY(-3px); }
.cat-tabs button.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 70%, #000); }
.cat-tabs button.on span { background: rgba(255, 255, 255, .25); animation: wiggle .5s; }
.cat-tabs button.on em { background: rgba(255, 255, 255, .25); }
.cat-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--c); color: #fff; border-radius: 28px; padding: 22px 28px; margin-bottom: 22px; box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 70%, #000); }
.cat-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .2) 2px, transparent 2px); background-size: 18px 18px; }
.cat-hero > div { position: relative; }
.cat-hero h2 { font-size: 30px; text-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.cat-hero p { margin: 6px 0 0; font-weight: 700; max-width: 520px; }
.hero-art { width: 170px; flex-shrink: 0; animation: floaty 4s ease-in-out infinite; }
.hero-art svg { width: 100%; display: block; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.prod { background: var(--card); border-radius: 24px; padding: 10px; border: 2px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slideUp .5s var(--d, 0s) both; transition: transform .3s cubic-bezier(.2, 1.8, .4, 1); }
.prod:hover { transform: translateY(-6px) rotate(-.8deg); }
.prod-img { position: relative; border-radius: 18px; overflow: hidden; background: var(--card2); aspect-ratio: 5 / 4; }
.prod-img svg, .prod-img img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s cubic-bezier(.2, 1.6, .4, 1); }
.prod:hover .prod-img svg, .prod:hover .prod-img img { transform: scale(1.08) rotate(2deg); }
.pimg .spk { animation: twinkle 2s ease-in-out infinite; transform-origin: center; }
@keyframes twinkle { 50% { opacity: .2; } }
.pimg .steam { animation: steam 2s ease-in-out infinite; }
@keyframes steam { 50% { transform: translateY(-4px); opacity: .5; } }
.tag { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.prod-info { padding: 10px 6px 6px; flex: 1; }
.prod-info h3 { font-size: 17px; font-weight: 600; }
.prod-info p { margin: 3px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; padding: 6px; gap: 6px; }
.prod-foot .tix { background: #FFF4C2; color: #8A5A00; padding: 5px 10px 5px 5px; border-radius: 99px; font-size: 16px; }
.add { border: 0; background: var(--pink); color: #fff; padding: 8px 14px; border-radius: 14px; font-weight: 800; box-shadow: 0 4px 0 #D63C80; transition: transform .15s; }
.add:hover { transform: scale(1.06); } .add:active { transform: translateY(3px); box-shadow: 0 1px 0 #D63C80; }
.stepper { display: flex; align-items: center; background: var(--pink); border-radius: 14px; box-shadow: 0 4px 0 #D63C80; color: #fff; animation: pop .3s; }
.stepper button { border: 0; background: none; color: #fff; width: 32px; height: 34px; font-size: 18px; font-weight: 900; }
.stepper b { min-width: 18px; text-align: center; }
.stepper.sm button { width: 28px; height: 30px; }

.cart-fab { position: fixed; right: 28px; bottom: 28px; z-index: 30; border: 0; border-radius: 99px; padding: 16px 22px; font-size: 22px; background: var(--ink); color: var(--bg); box-shadow: 0 8px 0 rgba(0, 0, 0, .2), 0 18px 30px rgba(0, 0, 0, .2); display: flex; align-items: center; gap: 8px; transition: transform .2s; }
.cart-fab b { background: var(--pink); color: #fff; border-radius: 99px; min-width: 30px; height: 30px; display: grid; place-items: center; font-size: 16px; padding: 0 8px; }
.cart-fab:hover { transform: scale(1.06) rotate(-3deg); }
.cart-fab.bump { animation: bump .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bump { 40% { transform: scale(1.25) rotate(-8deg); } }
.fly { position: fixed; z-index: 60; font-size: 28px; pointer-events: none; transition: transform .6s cubic-bezier(.5, -0.3, .7, 1), opacity .6s; margin: -14px 0 0 -14px; }

.drawer-back { place-items: stretch end; padding: 0; }
.drawer { width: min(420px, 100vw); height: 100vh; background: var(--card); display: flex; flex-direction: column; animation: drawerIn .4s cubic-bezier(.2, 1.2, .4, 1); border-radius: 30px 0 0 30px; box-shadow: -10px 0 40px rgba(0, 0, 0, .2); }
.drawer-back.closing .drawer { animation: drawerOut .25s forwards; }
@keyframes drawerIn { from { transform: translateX(100%); } }
@keyframes drawerOut { to { transform: translateX(100%); } }
.d-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 12px; }
.d-head h3 { font-size: 24px; }
.d-head .x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card2); font-weight: 900; }
.d-body { flex: 1; overflow: auto; padding: 0 22px 10px; }
.d-body h4 { margin: 18px 0 10px; }
.cart-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cart-lines li { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 18px; padding: 8px; animation: slideUp .3s; }
.ci-img { width: 56px; height: 46px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--card); display: block; }
.ci-img svg, .ci-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-info { flex: 1; min-width: 0; }
.ci-info b { display: block; font-size: 14px; }
.ci-info small { color: var(--muted); font-weight: 700; }
.empty-cart { text-align: center; color: var(--muted); font-weight: 700; padding: 10px 20px; }
.empty-cart .turtle { animation: bob 1.2s ease-in-out infinite; }
.mem-pick { display: flex; flex-direction: column; gap: 6px; }
.mem-pick button { display: flex; align-items: center; gap: 10px; border: 2.5px solid var(--line); background: var(--card2); border-radius: 16px; padding: 7px 10px; text-align: left; transition: all .2s; position: relative; }
.mem-pick button:hover { transform: translateX(4px); border-color: var(--blue); }
.mem-pick button.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--card2)); }
.mem-pick button.low small { color: var(--red); }
.mem-pick .ava { width: 36px; height: 36px; }
.mp-name { flex: 1; } .mp-name b { display: block; font-size: 14px; } .mp-name small { color: var(--muted); font-weight: 800; font-size: 12px; }
.mem-pick .check { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 900; animation: pop .3s; }
.d-foot { padding: 14px 22px 22px; border-top: 3px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.sum { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.sum .tix { font-size: 24px; }
.sum.small { color: var(--muted); font-size: 14px; }
.warn-line { margin: 0; color: var(--red); font-weight: 800; font-size: 14px; }
.warn-line a { color: var(--blue); }

/* =========================================================
   TRANSAKSI
   ========================================================= */
.chart-panel h4 { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.legend { font-family: var(--font-b); font-size: 13px; font-weight: 800; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--c); margin-right: -6px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 190px; align-items: end; padding-top: 20px; }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.bar-col small { color: var(--muted); font-weight: 800; font-size: 12px; white-space: nowrap; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.bar { position: relative; width: min(28px, 40%); height: max(var(--h), 4px); border-radius: 10px 10px 4px 4px; animation: barUp .9s var(--d) cubic-bezier(.2, 1.4, .4, 1) both; transform-origin: bottom; }
.bar.in { background: linear-gradient(var(--green), #2AA75A); } .bar.out { background: linear-gradient(var(--orange), #E5820A); }
.bar em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--muted); white-space: nowrap; padding-bottom: 2px; }
@keyframes barUp { from { transform: scaleY(0); } }
.tabs { display: inline-flex; background: var(--card2); padding: 5px; border-radius: 18px; gap: 4px; margin-bottom: 14px; border: 2px solid var(--line); }
.tabs button { border: 0; background: none; padding: 9px 16px; border-radius: 14px; font-family: var(--font-h); font-size: 15px; font-weight: 500; transition: all .2s; }
.tabs button.on { background: var(--ink); color: var(--bg); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
#txType { margin-bottom: 6px; }
.ttype { display: inline-block; padding: 4px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.tbl a { color: var(--ink); font-weight: 800; }

/* =========================================================
   LOG
   ========================================================= */
.log-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.log-day { margin-top: 16px; }
.day-chip { display: inline-block; background: var(--yellow); color: #2B2B52; font-family: var(--font-h); font-weight: 600; padding: 5px 14px; border-radius: 99px; margin-bottom: 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, .1); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 30px; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: repeating-linear-gradient(var(--line) 0 8px, transparent 8px 14px); }
.timeline li { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0; position: relative; animation: slideUp .45s var(--d) both; }
.tl-ico { width: 46px; height: 46px; border-radius: 16px; background: color-mix(in srgb, var(--c) 22%, var(--card)); border: 3px solid var(--card); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; position: relative; transition: transform .3s; }
.timeline li:hover .tl-ico { transform: rotate(-10deg) scale(1.1); }
.tl-body { flex: 1; background: var(--card2); border-radius: 16px; padding: 10px 14px; border-left: 5px solid var(--c); }
.tl-body p { margin: 0; font-weight: 700; }
.tl-body small { color: var(--muted); font-weight: 700; font-size: 12.5px; }

/* =========================================================
   PENGATURAN
   ========================================================= */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.set-card { background: var(--card); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); border: 2px solid var(--line); border-top: 8px solid var(--c); animation: slideUp .5s both; }
.set-card.wide { grid-column: 1 / -1; }
.set-card h4 { font-size: 19px; margin-bottom: 14px; }
.set-card .form { padding: 0; }
.big-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-toggle button { border: 3px solid var(--line); background: var(--card2); border-radius: 20px; padding: 16px; font-family: var(--font-h); font-size: 17px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: all .25s cubic-bezier(.2, 1.8, .4, 1); }
.big-toggle button span { font-size: 36px; transition: transform .4s; }
.big-toggle button:hover span { transform: scale(1.2) rotate(15deg); }
.big-toggle button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card2)); box-shadow: 0 5px 0 var(--c); transform: translateY(-3px); }
.big-toggle .flag { width: 54px; height: 36px; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); border: 2px solid var(--line); }
.big-toggle .flag svg { width: 100%; height: 100%; display: block; }
.big-toggle .sun-ico { animation: spin 10s linear infinite; display: inline-block; }
.kurs-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kurs-box b { font-family: var(--font-h); font-size: 20px; }
.kurs-box .input-wrap { flex: 1; min-width: 150px; }
.kurs-prev { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.kurs-prev span { background: var(--card2); border-radius: 10px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
.add-prod { display: grid; grid-template-columns: 1fr 240px; gap: 22px; align-items: start; }
.art-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.art-pick > * { border: 3px solid var(--line); background: var(--card2); border-radius: 14px; padding: 0; overflow: hidden; aspect-ratio: 5 / 4; transition: transform .2s; cursor: pointer; }
.art-pick svg { width: 100%; height: 100%; display: block; }
.art-pick > *:hover { transform: scale(1.08); }
.art-pick > .on { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 30%, transparent); }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 20px; }
.upload small { font-size: 10px; font-weight: 800; }
.preview-side { position: sticky; top: 20px; }
.prod.demo { animation: none; margin-top: 6px; }
.catalog-list { margin-top: 18px; background: var(--card2); border-radius: 18px; padding: 12px 16px; }
.catalog-list summary { cursor: pointer; font-family: var(--font-h); font-size: 16px; }
.catalog-list ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.catalog-list li { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 6px 10px 6px 6px; }
.catalog-list li b { flex: 1; font-size: 14px; }
.catalog-list li small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.catalog-list .ci-img { width: 46px; height: 38px; }
.catalog-list .tix { font-size: 13px; } .catalog-list .coin { width: 18px; height: 18px; font-size: 10px; }
.del { border: 0; background: none; font-size: 16px; opacity: .6; transition: all .2s; }
.del:hover { opacity: 1; transform: scale(1.2) rotate(-10deg); }

/* ---------- toast & confetti ---------- */
.toasts { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 18px; font-weight: 800; box-shadow: 0 6px 0 rgba(0, 0, 0, .2); animation: toastIn .45s cubic-bezier(.2, 1.6, .4, 1); }
.toast.warn { background: var(--red); color: #fff; }
.toast.out { animation: toastOut .4s forwards; }
@keyframes toastIn { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0; } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.empty { text-align: center; color: var(--muted); font-weight: 700; padding: 30px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .prof-stats { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .packs { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 8px; border-right: 0; border-top: 3px dashed var(--line); }
  .side-logo, .side-mascot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav button { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11px; border-radius: 14px; flex: 1; }
  .nav button:hover { transform: none; }
  .nav .ni { width: 34px; height: 34px; font-size: 18px; }
  .main { padding: 16px 16px 110px; }
  .topbar h1 { font-size: 27px; }
  .kurs-pill, .admin-chip { display: none; }
  .cart-fab { bottom: 96px; right: 16px; }
  .settings-grid, .add-prod { grid-template-columns: 1fr; }
  .search { max-width: none; min-width: 0; flex-basis: 100%; }
  .toolbar .btn { margin-left: 0; }
  /* tabel jadi kartu */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: var(--card2); border-radius: 18px; margin-bottom: 10px; padding: 8px 4px; }
  .tbl td { background: none !important; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; white-space: normal; border-radius: 0 !important; text-align: right; }
  .tbl td::before { content: attr(data-label); font-weight: 800; color: var(--muted); font-size: 12px; text-align: left; }
  .tbl td:first-child { border-bottom: 2px dashed var(--line); padding-bottom: 10px; }
  .tbl td:first-child::before { display: none; }
  .prof-banner { flex-direction: column; text-align: center; }
  .prof-id .row { justify-content: center; }
  .road { margin: 30px 18px 62px; }
  .stop span { width: 32px; height: 32px; font-size: 15px; }
  .stop small { font-size: 10px; }
  .stop small em { display: none; }
  .cat-hero .hero-art { width: 110px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .bars { gap: 4px; } .bar em { display: none; }
}
@media (max-width: 480px) {
  .stats { gap: 10px; } .stat { padding: 12px; gap: 10px; } .stat-ico { width: 42px; height: 42px; font-size: 21px; } .stat b { font-size: 19px; }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .prod-foot { flex-direction: column; align-items: stretch; } .add { width: 100%; } .stepper { justify-content: space-between; }
  .prof-stats { grid-template-columns: 1fr; }
  .cat-tabs button { font-size: 15px; padding: 8px 12px 8px 8px; }
  .cat-hero { padding: 18px; } .cat-hero h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* =========================================================
   V2 — revisi: akses, inventory, laporan, kedaluwarsa, bonus
   ========================================================= */
.btn-teal { background: var(--teal); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); margin-right: auto; }
.nowrap { flex-wrap: nowrap; }
.small { font-size: 13px; }
.req { color: var(--red); font-style: normal; }
.form-err { color: var(--red); font-weight: 800; font-size: 14px; margin: 0; min-height: 4px; }
.text-in { width: 100%; background: var(--card2); border: 2.5px solid var(--line); border-radius: 14px; padding: 11px 14px; font-weight: 700; outline: none; }
.text-in:focus { border-color: var(--blue); }
.hint { margin: 0 0 6px; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.contact { font-weight: 700; font-size: 13.5px; }
.small-line { font-size: 13.5px; margin-top: -6px !important; }
.nav button { position: relative; }
.nav-badge { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-weight: 900; min-width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; animation: here 1.6s infinite; --c: var(--red); }

/* segmented toggle */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card2); border: 2px solid var(--line); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; border-radius: 12px; padding: 9px; font-family: var(--font-h); font-weight: 500; font-size: 15px; transition: all .2s; }
.seg button.on { background: var(--ink); color: var(--bg); box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }

/* kedaluwarsa PIX */
.exp-warn { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 900; color: #B26A00; background: #FFF1CC; padding: 2px 7px; border-radius: 8px; vertical-align: middle; }
.exp-box { background: var(--card2); border: 2px dashed var(--line); border-radius: 20px; padding: 12px 16px; }
.exp-box.warn { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 8%, var(--card2)); }
.exp-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.exp-alert { background: var(--orange); color: #fff; padding: 3px 10px; border-radius: 99px; font-weight: 800; font-size: 12.5px; }
.exp-list { display: flex; flex-wrap: wrap; gap: 6px; }
.exp-chip { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 5px 10px; display: flex; flex-direction: column; }
.exp-chip small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.exp-chip.soon { border-color: var(--orange); }
.exp-chip.soon small { color: #B26A00; }

/* credit adjust */
.qty-big { display: flex; align-items: center; justify-content: center; gap: 18px; }
.qty-big button { width: 52px; height: 52px; border-radius: 18px; border: 0; background: var(--orange); color: #fff; font-size: 26px; font-weight: 900; box-shadow: 0 5px 0 #D9820A; }
.qty-big button:active { transform: translateY(3px); box-shadow: 0 2px 0 #D9820A; }
.qty-big b { font-family: var(--font-h); font-size: 44px; min-width: 60px; }
.credit-preview { font-family: var(--font-h); font-size: 20px; }
.credit-preview b { font-size: 26px; }

/* bonus topup */
.bonus-tiers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.bonus-tiers span { font-size: 12.5px; font-weight: 800; background: var(--card2); border: 2px dashed var(--line); padding: 4px 10px; border-radius: 99px; transition: all .25s; }
.bonus-tiers span.on { background: var(--pink); color: #fff; border-color: var(--pink); transform: scale(1.06); }
.quick button small i { font-style: normal; color: var(--pink); font-weight: 900; }
.quick button.on small i { color: #fff; }
.bonus-line { display: block; font-family: var(--font-b); font-size: 13.5px; font-weight: 800; color: var(--pink); min-height: 4px; }
.tu-hint { font-size: 13.5px; font-weight: 700; color: var(--muted); min-height: 4px; }
.tu-hint b { color: var(--pink); }

/* batal transaksi */
.receipt.left div span { color: var(--muted); }
.receipt.left div b { text-align: right; max-width: 65%; }
.effect { margin: 0; font-weight: 700; background: var(--card2); border-radius: 14px; padding: 10px; }
.mini-btn { border: 2px solid var(--line); background: var(--card2); border-radius: 10px; padding: 5px 10px; font-weight: 800; font-size: 12.5px; white-space: nowrap; transition: transform .15s; }
.mini-btn:hover { transform: translateY(-2px); }
.mini-btn.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.mini-btn.green { color: #148A43; border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
[data-theme="dark"] .mini-btn.green { color: #5BE38D; }
.tbl tr.canceled td { opacity: .55; }
.tbl tr.canceled td:nth-child(n+4) b, .tbl tr.canceled .det { text-decoration: line-through; }
.tbl tr.canceled .cancel-note { text-decoration: none; display: block; color: var(--red); opacity: 1; }
.mini-tx li.canceled { opacity: .5; }
.mini-tx li.canceled em { text-decoration: line-through; }

/* laporan */
.rep-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.tbl tfoot td { background: var(--ink); color: var(--bg); padding: 12px; font-weight: 800; white-space: nowrap; }
.tbl tfoot td:first-child { border-radius: 16px 0 0 16px; } .tbl tfoot td:last-child { border-radius: 0 16px 16px 0; }
.tbl tfoot .sub { color: inherit; opacity: .7; }
.rep-head { display: flex; gap: 16px; align-items: center; padding: 24px 26px 18px; background: linear-gradient(120deg, #3A86FF, #8338EC); color: #fff; border-radius: 30px 30px 0 0; }
.rep-head h2 { font-size: 26px; } .rep-head p { margin: 4px 0 0; font-weight: 700; }
.ava.big { width: 72px; height: 72px; border: 4px solid #fff; border-radius: 50%; }
.rep-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.rep-stats > div { background: color-mix(in srgb, var(--c) 12%, var(--card2)); border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; }
.rep-stats small { font-weight: 800; color: var(--muted); font-size: 12px; }
.rep-stats b { font-family: var(--font-h); font-size: 19px; font-weight: 600; }
.rep-stats span { font-size: 12px; font-weight: 700; color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 100px 1fr 90px; gap: 10px; align-items: center; font-weight: 800; font-size: 14px; }
.hbar div { height: 16px; background: var(--line); border-radius: 99px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--c); border-radius: 99px; animation: grow 1s cubic-bezier(.2, 1, .3, 1) both; }
.hbar b { text-align: right; font-family: var(--font-h); font-weight: 600; }
.top-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.top-list li { display: flex; justify-content: space-between; background: var(--card2); border-radius: 12px; padding: 6px 12px; }

/* inventory */
.alert-strip { background: color-mix(in srgb, var(--orange) 14%, var(--card)); border: 2px solid var(--orange); border-radius: 18px; padding: 12px 16px; margin-bottom: 18px; font-weight: 700; font-size: 14px; animation: slideUp .5s both; }
.stock-cell { min-width: 150px; }
.stock-cell b { font-family: var(--font-h); font-size: 17px; font-weight: 600; }
.stock-bar { position: relative; height: 8px; background: var(--line); border-radius: 99px; margin: 4px 0 2px; }
.stock-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); border-radius: 99px; }
.stock-bar span { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .35; }
.tbl.inv tr.st-out td { background: color-mix(in srgb, var(--red) 8%, var(--card2)); }
.tbl.inv tr.st-low td { background: color-mix(in srgb, var(--orange) 8%, var(--card2)); }
.inv-log { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.inv-log li { background: var(--card2); border-radius: 14px; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.inv-log li > span { font-family: var(--font-h); font-weight: 600; grid-row: span 2; }
.inv-log small { color: var(--muted); font-weight: 700; font-size: 12px; }
.prod.out { filter: grayscale(.7); }
.prod.out:hover { transform: none; }
.stock-flag { position: absolute; right: 8px; top: 8px; font-size: 11.5px; font-weight: 900; padding: 3px 9px; border-radius: 99px; color: #fff; }
.stock-flag.out { background: var(--red); } .stock-flag.low { background: var(--orange); }
.add:disabled, .stepper button:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* karyawan & akses */
.staff-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.staff-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.staff-list li { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 16px; padding: 8px 10px; }
.staff-list li > div { flex: 1; min-width: 0; }
.staff-list li small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-list li.inactive { opacity: .55; }
.role { font-size: 12px; font-weight: 900; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.role.admin { background: var(--ink); color: var(--bg); }
.role.staff { background: color-mix(in srgb, var(--yellow) 40%, transparent); color: #8A6100; }
[data-theme="dark"] .role.staff { color: var(--yellow); }
.perm-box { background: var(--card2); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.perm-box p { margin: 0 0 4px; }
.perm { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; font-size: 14px; }
.perm input { display: none; }
.perm span { width: 42px; height: 24px; border-radius: 99px; background: #D6D2E8; position: relative; flex-shrink: 0; transition: background .25s; }
.perm span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.2, 1.8, .4, 1); }
.perm input:checked + span { background: var(--green); }
.perm input:checked + span::after { transform: translateX(18px); }
.tiers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tier-row { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.tier-row .input-wrap { flex: 1; }
.tier-row .input-wrap.pct { flex: 0 0 90px; }
.tier-row .input-wrap input { padding: 9px 8px; }
.set-card .kurs-box + .muted { margin-top: 8px; }
.set-card #expPreset { margin-bottom: 10px; }

@media (max-width: 1100px) { .rep-stats { grid-template-columns: repeat(2, 1fr); } .staff-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .nav-badge { right: 4px; top: 2px; transform: none; min-width: 18px; height: 18px; font-size: 10px; }
  .hbar { grid-template-columns: 80px 1fr 70px; font-size: 12.5px; }
  .tbl tfoot { display: none; }
  .rep-head { flex-direction: column; text-align: center; }
}

/* cetak laporan: hanya isi jendela laporan / tabel */
@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .cart-fab, #toasts, #confetti, .login, .modal .x, .rep-bar .chips, .rep-bar button, .mini-btn, .stats, .chart-panel, .tabs { display: none !important; }
  .app { display: block; } .main { padding: 0; }
  .modal-back:not(.hidden) ~ * { display: none; }
  body:has(.modal-back:not(.hidden)) .app { display: none !important; }
  .modal-back { position: static; background: none; backdrop-filter: none; padding: 0; display: block; }
  .modal { box-shadow: none; max-height: none; width: 100% !important; overflow: visible; }
  * { animation: none !important; }
}
/* pengaturan di HP: kartu & baris bonus tidak boleh melebar */
.set-card { min-width: 0; }
.tier-row .input-wrap input { min-width: 0; width: 100%; }
@media (max-width: 560px) {
  .tier-row { flex-wrap: wrap; }
  .tier-row .input-wrap { flex: 1 1 140px; }
  .staff-list li { flex-wrap: wrap; }
}

/* ===== V3: login karyawan, absensi, menu Karyawan ===== */
.login-tabs { display: flex; gap: 6px; background: var(--card2); border-radius: 16px; padding: 5px; margin-bottom: 14px; }
.login-tabs button { flex: 1; border: 0; background: none; border-radius: 12px; padding: 9px 6px; font-family: var(--font-h); font-weight: 600; font-size: 14.5px; color: var(--muted); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.login-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.reg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.reg-row > .field { min-width: 0; }
.login-err .ok-msg { color: #148A43; }
[data-theme="dark"] .login-err .ok-msg { color: #5BE38D; }
button.admin-chip { cursor: pointer; font: inherit; color: inherit; text-align: left; transition: transform .15s; }
button.admin-chip:hover { transform: translateY(-2px); }
.duty-pill { display: inline-flex; align-items: center; gap: 7px; border: 2px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 8px 14px; font: 700 13.5px/1 var(--font-b, inherit); cursor: pointer; box-shadow: 0 4px 0 var(--line); white-space: nowrap; transition: transform .15s; }
.duty-pill:hover { transform: translateY(-2px); }
.duty-pill.on { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); background: color-mix(in srgb, var(--green) 12%, var(--card)); }
.duty-pill.off { color: var(--muted); }
.duty-pill i, .duty.on i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: dutyPulse 1.6s infinite; display: inline-block; }
.duty-pill em { font-style: normal; background: var(--orange); color: #fff; border-radius: 99px; padding: 3px 8px; font-size: 11.5px; }
@keyframes dutyPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.duty { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13.5px; }
.duty.on { color: #148A43; } [data-theme="dark"] .duty.on { color: #5BE38D; }
.duty.off { color: var(--muted); flex-direction: column; align-items: flex-start; gap: 2px; }
.duty small { font-weight: 700; font-size: 11.5px; }
.pending-panel { border: 2px dashed var(--orange); }
.left-align { text-align: left; }
.form.flush { padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nowrap { flex-wrap: nowrap; }
.att-grid { width: 100%; border-collapse: separate; border-spacing: 6px; }
.att-grid th { font-family: var(--font-h); font-weight: 500; font-size: 13px; color: var(--muted); text-align: left; white-space: nowrap; }
.att-grid tbody th { color: var(--ink); font-size: 14px; }
.att { display: block; background: color-mix(in srgb, #5B5BD6 14%, var(--card2)); border-radius: 12px; padding: 6px 8px; font-weight: 800; font-size: 12.5px; white-space: nowrap; margin-bottom: 4px; }
.att small { display: block; color: var(--muted); font-size: 11px; }
.att.live { background: color-mix(in srgb, var(--green) 20%, var(--card2)); }
.att.off { background: var(--card2); color: var(--muted); text-align: center; }
.shift-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.shift-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--card2); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.shift-list li span { color: var(--muted); font-weight: 700; }
.shift-list li small { color: var(--muted); font-weight: 800; min-width: 62px; text-align: right; }
.shift-list em.live { font-style: normal; color: #148A43; }
@media (max-width: 760px) {
  .duty-pill { padding: 7px 10px; font-size: 12px; }
  .reg-row { grid-template-columns: 1fr; }
}

/* ===== Maskot sidebar bisa diklik ===== */
.side-mascot { position: relative; }
#sideMascot { cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; transition: transform .2s; }
#sideMascot:hover { transform: scale(1.06) rotate(-3deg); }
#sideMascot:active { transform: scale(.92); }
.turtle .t-hat, .turtle .t-head, .turtle .t-legs { transform-box: fill-box; transform-origin: 50% 100%; }
.turtle .t-head { transform-origin: 0% 50%; }
/* 1. lompat + topi jamur terbang */
.pet-jump .turtle { animation: petJump .9s cubic-bezier(.3, 0, .4, 1) !important; transform-origin: 50% 100%; }
.pet-jump .t-hat { animation: petHat .9s cubic-bezier(.2, .7, .3, 1); }
@keyframes petJump { 0% { transform: none; } 15% { transform: scale(1.15, .8); } 45% { transform: translateY(-38px) scale(.92, 1.1); } 75% { transform: translateY(0) scale(1.18, .78); } 88% { transform: scale(.95, 1.06); } 100% { transform: none; } }
@keyframes petHat { 0%, 15% { transform: none; } 55% { transform: translateY(-46px) rotate(340deg); } 85% { transform: translateY(2px) rotate(720deg); } 100% { transform: rotate(720deg); } }
/* 2. putar */
.pet-spin .turtle { animation: petSpin 1s cubic-bezier(.5, -.3, .4, 1.3) !important; }
@keyframes petSpin { 0% { transform: none; } 30% { transform: translateY(-14px) rotate(-20deg); } 80% { transform: translateY(-6px) rotate(370deg); } 100% { transform: rotate(360deg); } }
/* 3. sembunyi di cangkang lalu muncul */
.pet-hide .t-head { animation: petHead 1.5s ease-in-out; }
.pet-hide .t-legs { animation: petLegs 1.5s ease-in-out; }
.pet-hide .turtle { animation: petShake 1.5s ease-in-out !important; }
@keyframes petHead { 0% { transform: none; } 15%, 70% { transform: translateX(-16px) scale(.2); opacity: 0; } 85% { transform: translateX(4px) scale(1.2); opacity: 1; } 100% { transform: none; } }
@keyframes petLegs { 0% { transform: none; } 15%, 70% { transform: scaleY(.1); } 85% { transform: scaleY(1.2); } 100% { transform: none; } }
@keyframes petShake { 20%, 30%, 40%, 50%, 60% { transform: translateX(-3px) rotate(-3deg); } 25%, 35%, 45%, 55%, 65% { transform: translateX(3px) rotate(3deg); } 85% { transform: translateY(-10px); } }
/* 4. joget */
.pet-dance .turtle { animation: petDance 1.3s ease-in-out !important; transform-origin: 50% 100%; }
.pet-dance .t-hat { animation: petBob .33s ease-in-out 4 alternate; }
@keyframes petDance { 0%, 100% { transform: none; } 12.5%, 62.5% { transform: rotate(-12deg) translateX(-6px); } 37.5%, 87.5% { transform: rotate(12deg) translateX(6px); } 25%, 75% { transform: translateY(-8px); } }
@keyframes petBob { to { transform: translateY(-6px) rotate(-15deg); } }
/* 5. sayang (membesar + berdenyut) */
.pet-love .turtle { animation: petLove 1.2s ease-in-out !important; }
@keyframes petLove { 0%, 100% { transform: none; } 20% { transform: scale(1.15); } 35% { transform: scale(1.02); } 50% { transform: scale(1.18); } 70% { transform: scale(1.04); } }
/* combo 5x klik cepat */
.pet-party .turtle { animation: petParty 1.4s ease-in-out !important; }
.pet-party .t-hat { animation: petHat .9s cubic-bezier(.2, .7, .3, 1) 2; }
@keyframes petParty { 0% { transform: none; } 20% { transform: translateY(-30px) rotate(180deg) scale(1.1); } 40% { transform: translateY(0) rotate(360deg); } 60% { transform: translateY(-24px) rotate(540deg) scale(1.15); } 80% { transform: rotate(720deg); } 100% { transform: rotate(720deg); } }
/* partikel emoji */
.pet-fx { position: absolute; left: 50%; bottom: 46px; font-size: 20px; pointer-events: none; z-index: 5; animation: petFx 1.1s cubic-bezier(.15, .8, .3, 1) both; }
@keyframes petFx { 0% { transform: translate(-50%, 0) scale(.3); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)) scale(1.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .side-mascot [class*="t-"], .side-mascot .turtle { animation-duration: .01s !important; } }

/* ===== Kura-kura login bisa diklik ===== */
.turtle-walk { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.turtle-walk.paused { animation-play-state: paused; }
.turtle-walk:hover > .turtle { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .9)); }
.walk-bubble { position: absolute; bottom: 118px; left: 50%; transform: translateX(-50%) scale(0); transform-origin: 50% 100%; background: #fff; color: #2B2B52; font-family: var(--font-h); font-size: 14px; padding: 9px 14px; border-radius: 16px; white-space: nowrap; box-shadow: 0 6px 0 rgba(0, 0, 0, .08); pointer-events: none; opacity: 0; transition: transform .35s cubic-bezier(.2, 1.8, .4, 1), opacity .2s; }
.walk-bubble::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.walk-bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }
.turtle-walk .pet-fx { bottom: 40px; }

/* ===== Pembayaran demo (QRIS / VA / e-wallet) ===== */
.pay-demo { text-align: center; }
.pay-head { background: var(--pc); padding: 18px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; border-radius: 26px 26px 0 0; }
.pay-badge { background: #fff; color: var(--pc); font-family: var(--font-h); font-weight: 700; font-size: 18px; padding: 6px 16px; border-radius: 12px; letter-spacing: .02em; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.demo-tag { position: absolute; left: 16px; top: 50%; transform: translateY(-50%) rotate(-6deg); background: #FFD23F; color: #2B2B52; font-weight: 900; font-size: 11px; padding: 4px 9px; border-radius: 8px; letter-spacing: .1em; }
.pay-body { padding: 18px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: slideUp .4s both; }
.pay-title { margin: 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.pay-amount { font-family: var(--font-h); font-size: 34px; font-weight: 700; color: var(--ink); line-height: 1; }
.qr-frame { position: relative; width: 210px; padding: 12px; background: #fff; border-radius: 20px; border: 3px solid var(--pc); box-shadow: 0 8px 0 color-mix(in srgb, var(--pc) 25%, transparent); overflow: hidden; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.qr-svg { display: block; width: 100%; height: auto; }
.qr-scan { position: absolute; left: 8px; right: 8px; height: 3px; top: 10px; background: linear-gradient(90deg, transparent, var(--pc), transparent); box-shadow: 0 0 12px var(--pc); animation: qrScan 2.2s ease-in-out infinite alternate; z-index: 2; border-radius: 3px; }
@keyframes qrScan { to { top: calc(100% - 13px); } }
.qr-merchant { margin: 0; line-height: 1.3; } .qr-merchant b { display: block; font-size: 14px; letter-spacing: .04em; } .qr-merchant small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.va-box { width: 100%; background: color-mix(in srgb, var(--pc) 8%, var(--card2)); border: 2px dashed color-mix(in srgb, var(--pc) 50%, var(--line)); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.va-box small { color: var(--muted); font-weight: 700; font-size: 12px; }
.va-box b { font-family: ui-monospace, Consolas, monospace; font-size: 24px; letter-spacing: .06em; color: var(--pc); }
.pay-timer { font-size: 13px; font-weight: 700; color: var(--muted); }
.pay-timer b { color: var(--red); font-variant-numeric: tabular-nums; }
.pay-steps { text-align: left; margin: 0; padding: 10px 14px 10px 32px; background: var(--card2); border-radius: 14px; font-size: 13px; font-weight: 700; width: 100%; box-sizing: border-box; }
.pay-steps li { padding: 2px 0; }
.pay-note { margin: 0; font-size: 12px; color: var(--muted); font-weight: 700; }
.pay-body .form-actions { width: 100%; }
.pay-check { padding: 34px 0 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pay-check b { font-family: var(--font-h); font-size: 20px; } .pay-check small { color: var(--muted); font-weight: 700; }
.pay-spin { width: 64px; height: 64px; border-radius: 50%; border: 7px solid var(--line); border-top-color: var(--pc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-tick { width: 84px; height: 84px; }
.pay-tick circle { fill: #3BCE6E; transform-origin: center; animation: pop .45s cubic-bezier(.2, 1.8, .4, 1); }
.pay-tick path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: tickDraw .45s .3s forwards; }
@keyframes tickDraw { to { stroke-dashoffset: 0; } }
.pay-check.ok b { color: #148A43; } [data-theme="dark"] .pay-check.ok b { color: #5BE38D; }

/* ===== ID klien ART-001 ===== */
.mcode { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 13px; letter-spacing: .04em; color: #5B3FD6; background: color-mix(in srgb, #8338EC 12%, var(--card)); border: 2px solid color-mix(in srgb, #8338EC 30%, var(--line)); padding: 4px 9px; border-radius: 10px; white-space: nowrap; }
[data-theme="dark"] .mcode { color: #C7B4FF; }
.mcode-btn { border: 0; background: none; padding: 0; cursor: pointer; transition: transform .15s; }
.mcode-btn:hover { transform: scale(1.08) rotate(-2deg); }
.mcode.on-banner { vertical-align: middle; font-size: 13px; background: rgba(255, 255, 255, .25); color: #fff; border-color: rgba(255, 255, 255, .45); margin-left: 6px; }

/* ===== Form daftar karyawan muat di layar (tidak terpotong) ===== */
.login { overflow: hidden; place-items: center; } /* jangan bisa di-scroll: latar ikut tergulung */
.login-center { padding: 0; }
.login-center:has(#regForm:not(.hidden)) .login-logo { width: min(190px, 60%); }
.login-center:has(#regForm:not(.hidden)) .tagline { margin-bottom: 10px; }
#regForm { padding: 22px 24px 18px; }
#regForm h2 { font-size: 23px; }
#regForm > .muted { margin: 2px 0 12px; }
#regForm .field { margin-bottom: 10px; gap: 4px; }
#regForm .input-wrap input { padding: 10px 10px; }
#regForm .login-tabs { margin-bottom: 10px; }
#regForm .input-wrap:focus-within { transform: none; }
@media (max-height: 820px) { .login-center:has(#regForm:not(.hidden)) { zoom: .88; } }
@media (max-height: 720px) { .login-center { zoom: .82; margin-top: 0; } .login-center:has(#regForm:not(.hidden)) { zoom: .74; } }

/* ===== Sesi dibayar PIX ===== */
.qty-big input { width: 110px; border: 0; background: transparent; text-align: center; font: inherit; color: inherit; outline: none; }
.sess-ico { font-size: 34px; line-height: 1; }

/* ===== Masa aktif PIX model kuota ===== */
.exp-box.quota { padding: 14px 16px; }
.quota-main { display: flex; align-items: center; gap: 14px; }
.quota-ico { font-size: 30px; }
.quota-main > div:nth-child(2) { flex: 1; }
.quota-main small { display: block; color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.quota-main b { font-family: var(--font-h); font-size: 22px; }
.quota-left { display: inline-block; margin-left: 10px; background: color-mix(in srgb, var(--green) 16%, var(--card)); color: #148A43; font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; vertical-align: middle; }
.quota-left.soon { background: color-mix(in srgb, var(--red) 15%, var(--card)); color: var(--red); }
[data-theme="dark"] .quota-left { color: #5BE38D; }
.quota-bal { text-align: right; }
.quota-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 700; }

/* ===== Kelas Floor 2 ===== */
.prod.cls .prod-img { position: relative; }
.cls-tag { background: #3A86FF !important; color: #fff !important; }
.cls-edit { position: absolute; bottom: 8px; right: 8px; width: 34px; height: 34px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .92); box-shadow: 0 3px 0 rgba(0, 0, 0, .12); cursor: pointer; font-size: 15px; }
.cls-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cls-meta span { background: var(--card2); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 800; color: var(--muted); }
.cls-price { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.cls-price small { color: var(--muted); font-weight: 800; font-size: 12px; }
.cls-pick { max-height: 52vh; overflow: auto; }
.cls-pick button[disabled] { opacity: .5; cursor: not-allowed; }
.cls-pick .ava img, .cls-pick .ava svg { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
