/* Koleksi Guru Kreatif: look for the phone orders app (mobile.html). Same tokens and card style as the desktop admin. */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface-alt: #eef1f6; --border: #e3e8f0; --border-soft: #e9edf4;
  --text: #0f172a; --text-muted: #64748b; --text-faint: #94a3b8;
  --brand: #2f5bff; --brand-strong: #2447d9; --brand-soft: #eaf0ff; --accent: #2f5bff; --accent-strong: #2447d9;
  --success: #16a34a; --success-bg: #e6f6ec; --warning: #d97706; --warning-bg: #fff3df;
  --danger: #dc2626; --danger-bg: #fdeaea; --info: #2563eb; --info-bg: #e8f0ff; --neutral: #64748b; --neutral-bg: #eef1f6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04); --shadow-md: 0 8px 28px rgba(15, 23, 42, .08);
  --radius-sm: 14px; --radius-md: 20px; --radius-lg: 26px;
  --m-ease: cubic-bezier(.2, .8, .2, 1); --m-spring: cubic-bezier(.34, 1.56, .64, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020; --surface: #121a2e; --surface-alt: #18223a; --border: #243049; --border-soft: #1d2842;
    --text: #e8edf7; --text-muted: #9aa7bf; --text-faint: #6b7a96;
    --brand: #5b8cff; --brand-strong: #4a78eb; --brand-soft: #172447; --accent: #5b8cff;
    --success: #4ade80; --success-bg: rgba(74, 222, 128, .14); --warning: #fbbf24; --warning-bg: rgba(251, 191, 36, .14);
    --danger: #f87171; --danger-bg: rgba(248, 113, 113, .14); --info: #7aa7ff; --info-bg: rgba(122, 167, 255, .14);
    --neutral: #9aa7bf; --neutral-bg: #18223a;
  }
}
body { font-family: var(--font-body); }
.login-mark { width: 58px; height: 58px; border-radius: 20px; background: linear-gradient(145deg, #7ea3ff, var(--brand-strong)); box-shadow: 0 14px 28px -10px rgba(47, 91, 255, .6); animation: mPop .6s var(--m-spring); }
@keyframes mPop { from { transform: scale(.6); opacity: 0; } }
.field { border-radius: 999px; border: 1.5px solid transparent; background: var(--surface); padding: 14px 20px; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .25s; }
.field:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.btn { border-radius: 999px; transition: transform .2s var(--m-spring), box-shadow .25s, background .2s; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--brand); box-shadow: 0 12px 24px -10px rgba(47, 91, 255, .6); }

.topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 0; padding-bottom: 10px; }
.topbar h1 { font-size: 22px; letter-spacing: -.02em; }
.pending-badge { background: var(--warning-bg); color: var(--warning); padding: 5px 12px; font-size: 12.5px; }
.icon-btn { width: 40px; height: 40px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft); transition: transform .2s var(--m-spring); }
.icon-btn:active { transform: scale(.9); }
.search-row input { border-radius: 999px; border-color: transparent; box-shadow: var(--shadow-sm); padding: 13px 20px; transition: border-color .2s, box-shadow .25s; }
.search-row input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.chip { border-color: transparent; background: var(--surface); box-shadow: var(--shadow-sm); padding: 9px 16px; transition: transform .2s var(--m-spring), background .2s, color .2s, box-shadow .2s; }
.chip:active { transform: scale(.94); }
.chip.active { background: var(--brand); box-shadow: 0 10px 22px -8px rgba(47, 91, 255, .55); }

.order-row { border-radius: 24px; border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); padding: 15px 16px; animation: mRise .5s var(--m-ease) backwards; transition: transform .2s var(--m-spring), box-shadow .25s; }
.order-row:active { transform: scale(.985); }
.order-row:nth-child(2) { animation-delay: .04s } .order-row:nth-child(3) { animation-delay: .08s } .order-row:nth-child(4) { animation-delay: .12s } .order-row:nth-child(5) { animation-delay: .16s } .order-row:nth-child(6) { animation-delay: .2s } .order-row:nth-child(n+7) { animation-delay: .24s }
@keyframes mRise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.order-name { font-size: 15px; }
.order-amount { color: var(--text); }
.pill { border-radius: 999px; }

.card { border-radius: 24px; box-shadow: var(--shadow-sm); }
.btn-outline { border-radius: 999px; }
.btn-confirm { box-shadow: 0 12px 24px -10px rgba(47, 91, 255, .6); }
.detail-footer, .bulk-bar { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
#orderDetail { animation: mSlide .4s var(--m-ease); }
@keyframes mSlide { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===== bottom tabs, sales view, verify button ===== */
#salesView, #ordersView { flex: 1; padding-bottom: calc(86px + var(--safe-bottom, 0px)); }
#salesBody { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border-soft); padding: 6px 12px calc(8px + var(--safe-bottom, 0px)); gap: 8px; }
.tabs button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 8px 0 6px; border-radius: 16px; color: var(--text-faint); font-size: 12px; font-weight: 700; transition: color .2s, background .2s, transform .2s var(--m-spring); }
.tabs button:active { transform: scale(.94); }
.tabs button.on { color: var(--brand); background: var(--brand-soft); }
.tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; animation: mPop .4s var(--m-spring); }
.tab-badge[hidden] { display: none; }

.s-hero { border-radius: 28px; padding: 20px 20px 18px; color: #fff; background: radial-gradient(220px 120px at 90% -10%, rgba(255, 255, 255, .25), transparent 70%), linear-gradient(150deg, #4a74ff, #2447d9 70%, #1b34a8); box-shadow: 0 18px 36px -14px rgba(47, 91, 255, .6); animation: mRise .5s var(--m-ease) backwards; }
.s-label { font-size: 13.5px; opacity: .85; font-weight: 600; }
.s-big { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 10px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.s-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; opacity: .95; }
.s-sub span:last-child { opacity: .8; }
.dd { display: inline-flex; padding: 3px 9px; border-radius: 8px; font-weight: 800; font-size: 12.5px; background: rgba(255, 255, 255, .22); color: #fff; }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-card { position: relative; border: 1px solid var(--border-soft); background: var(--surface); border-radius: 22px; padding: 14px 14px 12px; text-align: left; box-shadow: var(--shadow-sm); font-family: inherit; color: var(--text); animation: mRise .5s var(--m-ease) .06s backwards; }
.s-card span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.s-card b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.s-card em { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--warning); margin-top: 2px; }
button.s-card { cursor: pointer; transition: transform .2s var(--m-spring); }
button.s-card:active { transform: scale(.96); }
.s-card.warn b { color: var(--warning); }
.s-panel { border: 1px solid var(--border-soft); background: var(--surface); border-radius: 26px; padding: 16px 16px 10px; box-shadow: var(--shadow-sm); animation: mRise .5s var(--m-ease) .12s backwards; }
.s-panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.s-ok { color: var(--success); font-weight: 700; text-align: center; padding: 18px 16px; }
.s-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.s-bars.dense { gap: 2px; }
.sb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.sb i { display: block; width: 100%; border-radius: 8px; background: var(--surface-alt); border: 1px solid var(--border-soft); transform-origin: bottom; animation: sbGrow .7s var(--m-ease) backwards; }
.s-bars.dense .sb i { border-radius: 4px; }
.sb.hot i { background: linear-gradient(180deg, #6d95ff, var(--brand)); border-color: transparent; }
.sb span { font-size: 10.5px; color: var(--text-faint); font-weight: 600; height: 12px; }
@keyframes sbGrow { from { transform: scaleY(0); } }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px dashed var(--border); background: none; text-align: left; font-family: inherit; color: var(--text); }
.s-row:last-child { border-bottom: 0; }
button.s-row { cursor: pointer; border-radius: 12px; transition: background .15s, transform .2s var(--m-spring); }
button.s-row:active { background: var(--surface-alt); transform: scale(.985); }
.s-row .who { display: flex; flex-direction: column; min-width: 0; }
.s-row .who b { font-size: 14.5px; }
.s-row .who small { color: var(--text-faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-row .amt { font-weight: 800; font-size: 14px; flex: none; }
.s-more { width: 100%; border: 0; background: none; padding: 12px; font-weight: 800; color: var(--brand); font-family: inherit; }

.btn-big { flex: 1.6; padding: 15px 16px; font-size: 15.5px; }
.btn-confirm:disabled { background: var(--success-bg); color: var(--success); box-shadow: none; opacity: 1; }
#refreshBtn.spin svg { animation: spin .8s linear infinite; }
