/* =====================================================================
   Mobile Agentic AI Day 2026 — Design System
   Mengacu pada KV: background hitam, garis neon pink / teal / yellow,
   logo gradien AI (mint → biru), font Indosat.
   ===================================================================== */
@font-face { font-family: "Indosat"; src: url("../fonts/IndosatRegular-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Indosat"; src: url("../fonts/IndosatMedium-Medium.ttf") format("truetype"); font-weight: 500 800; font-display: swap; }

:root {
  --bg: #000;
  --surface: rgba(22, 23, 28, .78);
  --surface-2: rgba(34, 35, 42, .85);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f5f6f8;
  --muted: #9aa0ad;
  --pink: #ff3fa4;
  --teal: #2dd4bf;
  --yellow: #ffc83d;
  --blue: #4b7bff;
  --mint: #5ef2c4;
  --red: #ff5a6a;
  --ai-grad: linear-gradient(135deg, var(--mint) 0%, #4fb8e6 55%, var(--blue) 100%);
  --brand-grad: linear-gradient(90deg, var(--pink), var(--teal) 55%, var(--yellow));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .55);
  --drawer-w: 290px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: "Indosat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
a { color: var(--teal); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grad-text { background: var(--ai-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pink { color: var(--pink); } .teal { color: var(--teal); } .yellow { color: var(--yellow); }

/* ---------- Background: landscape memakai gambar apa adanya, portrait diputar 90° ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #000; }
.bg::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 100vw; height: 100vh; transform: translate(-50%, -50%);
  background: url("../images/background.png") center / cover no-repeat;
  opacity: .95;
}
.bg::after { /* vignette agar konten tetap terbaca */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.75) 100%);
}
@media (orientation: portrait) {
  .bg::before { width: 100vh; height: 100vw; transform: translate(-50%, -50%) rotate(90deg); }
}
/* Halaman kerja (admin / operator) memakai background lebih redup */
body:not(.app-public) .bg::before { opacity: .55; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.55));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-event { display: inline-flex; align-items: center; }
.topbar-event img { height: 32px; width: auto; }
.topbar-brand { height: 30px; width: auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; padding: 0;
}
.icon-btn.ghost { background: none; border: 0; }
.ic { width: 22px; height: 22px; flex: none; }

/* ---------- Drawer / burger menu ---------- */
.drawer {
  position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(var(--drawer-w), 86vw);
  background: rgba(10, 10, 13, .97); border-right: 1px solid var(--line);
  transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; padding: calc(18px + var(--safe-top)) 14px calc(16px + var(--safe-bot));
  overflow-y: auto;
}
.drawer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-grad); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { padding: 4px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.drawer-logo { height: 40px; width: auto; margin-bottom: 14px; }
.drawer-user { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.drawer-user strong { display: block; font-size: .95rem; }
.drawer-user small { color: var(--muted); font-size: .78rem; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--ai-grad); color: #04121a; flex: none; }
.drawer-menu { list-style: none; margin: 0; padding: 0; flex: 1; }
.drawer-menu a {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; color: var(--text);
  margin-bottom: 2px; border: 1px solid transparent;
}
.drawer-menu a:hover { background: var(--surface-2); }
.drawer-menu a.active { background: rgba(255, 63, 164, .12); border-color: rgba(255, 63, 164, .35); color: #fff; }
.drawer-menu a.active .ic { color: var(--pink); }
.drawer-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.drawer-foot small { display: block; color: var(--muted); font-size: .75rem; padding: 10px 12px 0; }
.drawer-logout { display: flex; gap: 12px; align-items: center; padding: 12px; color: var(--red); border-radius: 12px; }
.drawer-logout:hover { background: rgba(255, 90, 106, .1); }

/* Layar lebar (tablet landscape / desktop): side menu selalu tampil */
@media (min-width: 1100px) {
  body:has(.drawer) { padding-left: var(--drawer-w); }
  body:has(.drawer) .drawer { transform: none; width: var(--drawer-w); }
  body:has(.drawer) .drawer-backdrop { display: none; }
  body:has(.drawer) [data-drawer-open] { visibility: hidden; }
  body:has(.drawer) .topbar-event { visibility: hidden; }
}

/* ---------- Page ---------- */
.page { width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px 32px; flex: 1; }
body.is-wide .page { max-width: 1180px; }
@media (orientation: landscape) and (min-width: 700px) { .page { max-width: 880px; } }
.page-head { margin-bottom: 18px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 8px 16px 8px 12px; border-radius: 999px; font-size: .88rem; font-weight: 500;
  color: var(--text); background: rgba(0,0,0,.45); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .15s, background .15s;
}
.back-btn .ic { width: 18px; height: 18px; color: var(--teal); }
.back-btn:hover { border-color: var(--teal); background: rgba(45,212,191,.08); }
.back-btn:active { transform: scale(.97); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); margin-bottom: 6px; }
.foot { text-align: center; color: #5c606b; font-size: .72rem; line-height: 1.6; padding: 16px 16px calc(16px + var(--safe-bot)); }
@media (max-width: 699px) {
  .foot span { display: block; }
  .foot .foot-sep { display: none; }
}

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow); overflow: hidden;
}
.card.accent-pink::before, .card.accent-teal::before, .card.accent-yellow::before, .card.accent-grad::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
}
.card.accent-pink::before { background: var(--pink); }
.card.accent-teal::before { background: var(--teal); }
.card.accent-yellow::before { background: var(--yellow); }
.card.accent-grad::before { background: var(--brand-grad); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title h2 { margin: 0; }
.step { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Dashboard tiles (menu) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (orientation: landscape) and (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 128px; padding: 16px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text);
  overflow: hidden; transition: transform .15s, border-color .15s; backdrop-filter: blur(12px);
}
.tile:active { transform: scale(.97); }
.tile:hover { border-color: var(--line-2); }
.tile::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.tile-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: auto; }
.tile strong { font-size: 1rem; margin-top: 12px; }
.tile small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.tile-pink::after { background: var(--pink); } .tile-pink .tile-ic { background: rgba(255,63,164,.15); color: var(--pink); }
.tile-teal::after { background: var(--teal); } .tile-teal .tile-ic { background: rgba(45,212,191,.15); color: var(--teal); }
.tile-yellow::after { background: var(--yellow); } .tile-yellow .tile-ic { background: rgba(255,200,61,.15); color: var(--yellow); }

/* ---------- Staff portal (/admin) ---------- */
.role-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .role-grid { grid-template-columns: repeat(3, 1fr); } }
.role-card {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 20px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.role-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.role-card:hover { border-color: var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 25%, transparent); }
.role-card:active { transform: scale(.98); }
.role-yellow { --c: var(--yellow); } .role-teal { --c: var(--teal); } .role-pink { --c: var(--pink); }
.role-ic {
  width: 60px; height: 60px; border-radius: 18px; flex: none; display: grid; place-items: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.role-ic .ic { width: 30px; height: 30px; }
.role-text { flex: 1; min-width: 0; }
.role-text strong { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.role-text small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.role-go { color: var(--c); opacity: .8; flex: none; }
@media (min-width: 760px) {
  .role-card { flex-direction: column; text-align: center; padding: 32px 22px 26px; }
  .role-card::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 4px; }
  .role-ic { width: 76px; height: 76px; border-radius: 22px; }
  .role-ic .ic { width: 38px; height: 38px; }
  .role-go { display: none; }
}
.login-role { display: grid; place-items: center; margin: 4px 0 18px; }
.login-role .role-ic { width: 72px; height: 72px; border-radius: 22px; }
.login-role .role-ic .ic { width: 36px; height: 36px; }

/* ---------- Daftar akun staff ---------- */
.form-actions { max-width: 440px; }
.acct-group { margin-top: 6px; }
.acct-group + .acct-group { margin-top: 22px; }
.acct-group-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.acct-group-head .role-ic { width: 34px; height: 34px; border-radius: 10px; }
.acct-group-head .role-ic .ic { width: 18px; height: 18px; }
.acct-group-head strong { font-size: 1rem; }
.acct-group-head .muted { margin-left: auto; }
.acct-row {
  display: grid; align-items: center; gap: 10px 18px; padding: 14px 4px; border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1fr) auto;
}
.acct-row:last-child { border-bottom: 0; }
.acct-row.is-off { opacity: .55; }
.acct-row.is-editing { background: rgba(255,200,61,.06); border-radius: 12px; box-shadow: inset 3px 0 0 var(--yellow); padding-left: 12px; }
.acct-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-main .avatar { width: 40px; height: 40px; font-size: .95rem; }
.acct-text, .acct-meta, .acct-login { min-width: 0; overflow-wrap: anywhere; }
.acct-text strong { display: block; line-height: 1.3; }
.acct-text small, .acct-login small { color: var(--muted); font-size: .78rem; }
.acct-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.acct-meta .chip { white-space: nowrap; }
.acct-booth { display: flex; align-items: flex-start; gap: 6px; width: 100%; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.acct-booth .ic { width: 15px; height: 15px; margin-top: 2px; color: var(--teal); }
.acct-login { display: flex; flex-direction: column; font-size: .88rem; }
.acct-actions { display: flex; gap: 8px; justify-content: flex-end; min-width: 80px; }
/* Baris item (merchandise / booth) memakai pola yang sama */
.item-badge {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  font-weight: 700; font-size: .8rem; overflow: hidden;
  width: auto; min-width: 40px; max-width: 64px; padding: 0 6px;
}
.item-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.acct-main { align-items: flex-start; }
.item-badge .ic { width: 20px; height: 20px; }
.item-row-reward { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.8fr) auto; }
.item-row-booth  { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.stock-adjust { min-width: 0; }
.stock-adjust small { display: block; color: var(--muted); font-size: .75rem; margin-bottom: 6px; }
.stock-btns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 320px; }
.stock-btns .btn-sm { width: 100%; padding: 6px 0; min-width: 0; }
@media (max-width: 899px) {
  .acct-row, .item-row-reward, .item-row-booth { grid-template-columns: minmax(0, 1fr) auto; }
  .stock-adjust { grid-column: 1 / -1; padding-left: 52px; }
  .acct-main { grid-column: 1; }
  .acct-actions { grid-column: 2; grid-row: 1; }
  .acct-meta, .acct-login { grid-column: 1 / -1; padding-left: 52px; }
  .acct-login { flex-direction: row; gap: 6px; }
  .acct-login small::after { content: ":"; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(12px); border-left: 3px solid var(--c, var(--teal)); }
.stat small { color: var(--muted); font-size: .78rem; display: block; }
.stat strong { font-size: 1.8rem; font-weight: 600; display: block; line-height: 1.2; margin-top: 4px; }
.stat em { font-style: normal; font-size: .75rem; color: var(--muted); }

/* ---------- Bars (reporting) ---------- */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.bar-track { height: 10px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--c, var(--teal)); }
.bar-row b { font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; color: #d7dae1; }
.field .hint { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.req { color: var(--pink); }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 13px 14px; font: inherit; color: var(--text);
  background: rgba(0,0,0,.45); border: 1px solid var(--line-2); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239aa0ad' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select option { background: #15161b; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,212,191,.18); }
.choice-group { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: rgba(0,0,0,.35); cursor: pointer;
}
.choice, .field label.choice { display: flex; align-items: center; gap: 12px; margin-bottom: 0; font-size: .95rem; color: var(--text); transition: border-color .15s, background .15s; line-height: 1.4; }
.choice > span { flex: 1; min-width: 0; }
.choice > .chip { flex: none; white-space: nowrap; }
.choice input[type=checkbox], .choice input[type=radio] {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0;
  width: 22px; height: 22px; border-radius: 7px; cursor: pointer;
  border: 2px solid rgba(255,255,255,.35); background: rgba(0,0,0,.4);
  display: grid; place-items: center; transition: background .15s, border-color .15s, box-shadow .15s;
}
.choice input[type=radio] { border-radius: 50%; }
.choice input[type=checkbox]::after {
  content: ""; width: 12px; height: 12px; transform: scale(0); transition: transform .15s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.choice input[type=radio]::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.choice input:checked { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 12px rgba(255,63,164,.45); }
.choice input:checked::after { transform: scale(1); }
.choice input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,63,164,.35); }
.choice input:disabled { opacity: .35; cursor: not-allowed; }
.choice:has(input:checked) { border-color: var(--pink); background: rgba(255,63,164,.1); }
.choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.choice b { color: var(--pink); font-weight: 600; }
.choice-day { justify-content: flex-start; }
.choice-day .day-date { color: var(--muted); font-size: .85rem; text-align: right; padding-left: 8px; }
.choice-day:has(input:checked) .day-date { color: #fff; }
.choice-sm { padding: 10px 12px; }
.row { display: grid; gap: 12px; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px;
  font: inherit; font-weight: 600; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  color: #fff; background: var(--surface-2); transition: transform .1s, filter .15s; text-align: center; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 8px 24px rgba(255,63,164,.3); }
.btn-teal { background: var(--teal); color: #032019; }
.btn-yellow { background: var(--yellow); color: #251a00; }
.btn-ai { background: var(--ai-grad); color: #04121a; }
.btn-outline { background: rgba(0,0,0,.3); border-color: var(--line-2); }
.btn-danger { background: rgba(255,90,106,.15); color: var(--red); border-color: rgba(255,90,106,.35); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: 10px; }
.btn-icon .ic { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
/* Semua tombol dalam baris ini selalu sama lebar */
.btn-row.equal { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.btn-row.equal > .btn { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; }
@media (max-width: 519px) { .btn-row.equal { grid-auto-flow: row; } }
/* Pengaman: teks tombol tidak pernah keluar area tombol */
.hero-cta .btn, .btn-row.equal > .btn { white-space: normal; line-height: 1.25; min-height: 50px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.04); font-size: .82rem; }

/* ---------- Chips / alerts ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid; }
.chip-pink { color: var(--pink); border-color: rgba(255,63,164,.45); background: rgba(255,63,164,.1); }
.chip-teal { color: var(--teal); border-color: rgba(45,212,191,.45); background: rgba(45,212,191,.1); }
.chip-yellow { color: var(--yellow); border-color: rgba(255,200,61,.45); background: rgba(255,200,61,.1); }
.chip-grey { color: var(--muted); border-color: var(--line-2); background: rgba(255,255,255,.04); }
.chip-red { color: var(--red); border-color: rgba(255,90,106,.45); background: rgba(255,90,106,.1); }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .9rem; border: 1px solid; }
.alert-ok { background: rgba(45,212,191,.12); border-color: rgba(45,212,191,.4); color: #b8fff3; }
.alert-err { background: rgba(255,90,106,.12); border-color: rgba(255,90,106,.4); color: #ffc4ca; }
.alert-warn { background: rgba(255,200,61,.12); border-color: rgba(255,200,61,.4); color: #ffe9b0; }
.alert-info { background: rgba(75,123,255,.12); border-color: rgba(75,123,255,.4); color: #c9d6ff; }

/* ---------- Hero (landing) ---------- */
.hero { text-align: center; padding: 10px 0 6px; }
.hero-logo { width: min(360px, 86vw); margin: 8px auto 22px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
/* Tombol halaman depan: selalu sama lebar (2 kolom sama besar, menumpuk di layar sangat kecil) */
.hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 460px; margin: 0 auto; }
.hero-cta .btn { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; }
@media (max-width: 519px) { .hero-cta { grid-template-columns: 1fr; } }
@media (orientation: landscape) and (min-width: 820px) { .hero-cta { margin: 0; } }
.hero-tag { font-weight: 600; font-size: 1.05rem; margin-bottom: 14px; }
.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 24px; }
.landing { display: grid; gap: 18px; align-items: center; }
@media (orientation: landscape) and (min-width: 820px) {
  .landing { grid-template-columns: 1.1fr 1fr; gap: 40px; min-height: calc(100dvh - 180px); }
  .landing .hero { text-align: left; }
  .landing .hero-logo { margin-left: 0; width: min(420px, 38vw); }
  .landing .hero-pills { justify-content: flex-start; }
  .app-public .page { max-width: 1080px; }
}
.flow { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.flow li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.flow .num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.flow strong { display: block; font-size: .95rem; }
.flow small { color: var(--muted); }

/* ---------- QR ---------- */
.qr-wrap { display: grid; place-items: center; gap: 14px; text-align: center; }
.qr-frame {
  position: relative; padding: 16px; background: #fff; border-radius: 22px;
  box-shadow: 0 0 0 4px rgba(255,255,255,.06), 0 0 60px rgba(45,212,191,.25);
}
.qr-frame::before { content: ""; position: absolute; inset: -4px; border-radius: 26px; padding: 3px; background: var(--brand-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.qr-frame.redeem::before { background: linear-gradient(90deg, var(--yellow), var(--pink)); }
.qr-box { width: min(64vw, 260px); aspect-ratio: 1; }
.qr-box img, .qr-box canvas { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.reg-code { font-size: 1.5rem; font-weight: 700; letter-spacing: .12em; }

/* ---------- Progress ring ---------- */
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-track { stroke: rgba(255,255,255,.08); }
.ring-bar { stroke: url(#rg); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 2rem; line-height: 1; }
.ring-label strong span { font-size: 1rem; color: var(--muted); }
.ring-label small { color: var(--muted); font-size: .75rem; }
.journey { display: flex; gap: 18px; align-items: center; }
.journey > div:last-child { flex: 1; min-width: 0; }

/* ---------- Stamps ---------- */
.stamp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .stamp-grid { grid-template-columns: repeat(3, 1fr); } }
.stamp {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px;
  border-radius: var(--radius); background: rgba(0,0,0,.4); border: 1px dashed var(--line-2);
}
.stamp strong { font-size: .88rem; line-height: 1.25; }
.stamp small { color: var(--muted); font-size: .72rem; }
.stamp-badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--line-2); color: var(--muted); font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.stamp.on { border-style: solid; border-color: rgba(45,212,191,.45); background: rgba(45,212,191,.07); }
.stamp.on .stamp-badge { border: 0; background: var(--ai-grad); color: #04121a; box-shadow: 0 0 24px rgba(94,242,196,.35); animation: pop .5s calc(var(--i) * 70ms) both; }
.stamp.on .stamp-badge .ic { width: 28px; height: 28px; stroke-width: 2.6; }
.stamp.on small { color: var(--teal); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table .actions { white-space: nowrap; text-align: right; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* Mobile: tabel jadi kartu */
@media (max-width: 699px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table.responsive td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; text-align: left; }
  .table.responsive td.actions { justify-content: flex-end; padding-top: 8px; }
  .table.responsive td.actions::before { content: none; }
  .table-wrap { margin: 0; padding: 0; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar form { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.toolbar input, .toolbar select { padding: 10px 12px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text); font-size: .85rem; }
.pager .cur { background: var(--pink); border-color: var(--pink); }

/* ---------- Scanner ---------- */
.scanner { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 1; border: 1px solid var(--line-2); }
@media (orientation: landscape) { .scanner { aspect-ratio: 4/3; } }
.scanner #reader { width: 100%; height: 100%; }
.scanner #reader video { object-fit: cover; width: 100% !important; height: 100% !important; }
.scanner #reader img, .scanner #reader__dashboard_section_csr span, #reader__dashboard { display: none !important; }
.scan-frame { position: absolute; inset: 15%; pointer-events: none; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-frame::before, .scan-frame::after { content: ""; position: absolute; inset: 0; border-radius: 18px; border: 3px solid transparent;
  border-image: none; background: linear-gradient(var(--teal), var(--teal)) top left / 34px 3px no-repeat, linear-gradient(var(--teal), var(--teal)) top left / 3px 34px no-repeat,
  linear-gradient(var(--pink), var(--pink)) top right / 34px 3px no-repeat, linear-gradient(var(--pink), var(--pink)) top right / 3px 34px no-repeat,
  linear-gradient(var(--yellow), var(--yellow)) bottom left / 34px 3px no-repeat, linear-gradient(var(--yellow), var(--yellow)) bottom left / 3px 34px no-repeat,
  linear-gradient(var(--teal), var(--teal)) bottom right / 34px 3px no-repeat, linear-gradient(var(--teal), var(--teal)) bottom right / 3px 34px no-repeat; }
.scan-frame::after { background: linear-gradient(90deg, transparent, var(--mint), transparent) 0 0 / 100% 2px no-repeat; animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0% { background-position: 0 6%; } 50% { background-position: 0 94%; } 100% { background-position: 0 6%; } }
.scanner-idle { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; padding: 20px; color: var(--muted); }
.scanner-idle .ic { width: 54px; height: 54px; margin: 0 auto; color: var(--teal); }
.scan-layout { display: grid; gap: 16px; }
@media (orientation: landscape) and (min-width: 820px) { .scan-layout { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Result sheet */
.result { display: none; }
.result.show { display: block; animation: rise .3s ease; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.result-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.result-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.result-ic .ic { width: 30px; height: 30px; stroke-width: 2.4; }
.result.ok .result-ic { background: rgba(45,212,191,.18); color: var(--teal); }
.result.warn .result-ic { background: rgba(255,200,61,.18); color: var(--yellow); }
.result.err .result-ic { background: rgba(255,90,106,.18); color: var(--red); }
.result.ok { border-color: rgba(45,212,191,.5); }
.result.warn { border-color: rgba(255,200,61,.5); }
.result.err { border-color: rgba(255,90,106,.5); }
.mini-stamps { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.mini-stamps span { flex: 1 1 0; min-width: 34px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); }
.mini-stamps span.on { background: var(--ai-grad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.reward-list { display: grid; gap: 8px; margin: 12px 0; }

/* Helpers */
.mt { margin-top: 16px; } .mb0 { margin-bottom: 0; }
.flex { display: flex; gap: 10px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; }
.hidden { display: none !important; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
@media print { .bg, .topbar, .drawer, .foot, .no-print { display: none !important; } body { background: #fff; color: #000; padding: 0 !important; } }
