/* ================================================================
   FERPEDIA DASHBOARD CSS v3 — BLUE THEME
   Tema: Natural Navy (#163B5C) + Putih — Modern, Elegan, Premium
   ================================================================ */

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── VARS ────────────────────────────────────────────────── */
:root {
  --c-bg:       #F7F9FC;
  --c-bg2:      #FFFFFF;
  --c-bg3:      #F7F9FC;
  --c-bg4:      #EAF2F8;
  --c-border:   #DFE7EF;
  --c-blue:     #163B5C;
  --c-blue2:    #28577A;
  --c-text:     #172B3A;
  --c-text2:    #647789;
  --c-text3:    #647789;
  --c-green:    #1F8A55;
  --c-amber:    #B7791F;
  --c-cyan:     #0E7490;
  --c-red:      #D14343;
  --hdr-h:      54px;
  --bnav-h:     60px;
  --r:          14px;
  --r-sm:       10px;
  --r-xs:       8px;
}

/* ── BASE ────────────────────────────────────────────────── */
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
svg { display: block; overflow: visible; }

/* ── HEADER ──────────────────────────────────────────────── */
.hdr {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--hdr-h);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 0 16px;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

.hdr-brand {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.hdr-logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  object-fit: cover;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.hdr-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-blue2);
}

.hdr-right {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.hdr-btn {
  width: 36px; height: 36px;
  min-width: 36px; min-height: 36px;
  border-radius: 9px;
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-text2);
  -webkit-transition: color 0.15s, border-color 0.15s;
  transition: color 0.15s, border-color 0.15s;
}

.hdr-btn:hover { color: var(--c-text); border-color: rgba(40,87,122,0.35); }

.hdr-avatar {
  width: 34px; height: 34px;
  min-width: 34px; min-height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--c-blue);
  display: block;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.hdr-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ── SEARCH DRAWER ───────────────────────────────────────── */
.search-drawer {
  position: -webkit-sticky;
  position: sticky;
  top: var(--hdr-h);
  z-index: 39;
  background: var(--c-bg);
  border-bottom: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  -webkit-transition: max-height 0.2s ease, border-color 0.2s;
  transition: max-height 0.2s ease, border-color 0.2s;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

.search-drawer.open {
  max-height: 64px;
  border-bottom-color: var(--c-border);
}

.search-inner {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--c-text3);
}

.search-inner svg { -webkit-flex-shrink: 0; flex-shrink: 0; }

.search-inner input {
  -webkit-flex: 1; flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--c-text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  caret-color: var(--c-blue2);
}

.search-inner input::placeholder { color: var(--c-text3); }

.search-x {
  width: 28px; height: 28px;
  min-width: 28px;
  border-radius: 6px;
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-text2);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* ── PAGE ────────────────────────────────────────────────── */
.page {
  padding-bottom: calc(var(--bnav-h) + 20px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  isolation: isolate;
}

/* ── SALDO CARD ──────────────────────────────────────────── */
.saldo-card {
  margin: 16px;
}

.saldo-card-inner {
  background: var(--c-bg2);
  box-shadow: inset 0 0 0 1px #DFE7EF;
  border-radius: 18px;
  padding: 20px;
}

.sc-top {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 8px;
}

.sc-user { min-width: 0; -webkit-flex: 1; flex: 1; }

.sc-greet {
  font-size: 0.75rem;
  color: var(--c-text2);
  margin-bottom: 3px;
}

.sc-name {
  font-size: 1rem;
  font-weight: 700;
  min-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-icon {
  width: 38px; height: 38px;
  min-width: 38px; min-height: 38px;
  border-radius: 10px;
  background: #EAF2F8;
  border: 1px solid #DFE7EF;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: var(--c-blue2);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.sc-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text2);
  margin-bottom: 4px;
}

.sc-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-text);
  min-height: 44px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-divider {
  height: 1px;
  background: var(--c-border);
  margin: 16px 0;
}

.sc-actions {
  display: -webkit-flex;
  display: flex;
  gap: 8px;
}

.sc-btn {
  -webkit-flex: 1; flex: 1;
  min-width: 0;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-transition: opacity 0.15s;
  transition: opacity 0.15s;
}

.sc-btn:hover, .sc-btn:active { opacity: 0.8; }
.sc-btn svg { -webkit-flex-shrink: 0; flex-shrink: 0; }

.sc-btn-primary  { background: var(--c-blue);  color: #fff; }
.sc-btn-secondary{
  background: #EAF2F8;
  color: #163B5C;
  box-shadow: inset 0 0 0 1px #DFE7EF;
}
.sc-btn-ghost    {
  background: var(--c-bg3);
  color: var(--c-text2);
  box-shadow: inset 0 0 0 1px var(--c-border);
}

/* ── STATS ROW ───────────────────────────────────────────── */
.stats-row {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.stat-box {
  -webkit-flex: 1 1 calc(50% - 4px);
  flex: 1 1 calc(50% - 4px);
  max-width: calc(50% - 4px);
  min-width: 0;
  background: var(--c-bg2);
  box-shadow: inset 0 0 0 1px var(--c-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.stat-box-wide {
  -webkit-flex: 1 1 calc(50% - 4px);
  flex: 1 1 calc(50% - 4px);
  max-width: calc(50% - 4px);
}

.stat-dot {
  width: 8px; height: 8px;
  min-width: 8px; min-height: 8px;
  border-radius: 50%;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.stat-dot-green  { background: var(--c-green); }
.stat-dot-amber  { background: var(--c-amber); }
.stat-dot-purple { background: var(--c-blue2); }
.stat-dot-cyan   { background: var(--c-cyan); }

.stat-body {
  min-width: 0;
  -webkit-flex: 1; flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 2px;
}

.stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-val-sm { font-size: 0.82rem; }

.stat-lbl {
  font-size: 0.62rem;
  color: var(--c-text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── PROMO ───────────────────────────────────────────────── */
.promo {
  margin: 0 16px 16px;
}

.promo-inner {
  background: #F7F9FC;
  box-shadow: inset 0 0 0 1px #DFE7EF;
  border-radius: 16px;
  padding: 20px;
}

.promo-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-amber);
  margin-bottom: 8px;
}

.promo-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-text);
  margin-bottom: 8px;
  max-width: 280px;
}

.promo-desc {
  font-size: 0.8rem;
  color: #647789;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 300px;
}

.promo-cta {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  background: var(--c-blue);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  -webkit-transition: opacity 0.15s;
  transition: opacity 0.15s;
}

.promo-cta:hover, .promo-cta:active { opacity: 0.85; }
.promo-cta svg { -webkit-flex-shrink: 0; flex-shrink: 0; }

/* ── ORDERS ──────────────────────────────────────────────── */
.orders {
  padding: 0 16px;
  margin-bottom: 8px;
}

.orders-head {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 10px;
}

.orders-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.orders-link {
  font-size: 0.75rem;
  color: var(--c-blue2);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.orders-list {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 6px;
}

/* ── ORDER ITEM ──────────────────────────────────────────── */
.order-item {
  background: var(--c-bg2);
  box-shadow: inset 0 0 0 1px var(--c-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  -webkit-transition: box-shadow 0.15s;
  transition: box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.order-item:hover {
  box-shadow: inset 0 0 0 1px #DFE7EF;
}

.order-icon {
  width: 42px; height: 42px;
  min-width: 42px; min-height: 42px;
  border-radius: 10px;
  background: var(--c-bg3);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  overflow: hidden;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  color: var(--c-text3);
}

.order-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.order-icon svg { width: 18px; height: 18px; }

.order-info {
  -webkit-flex: 1; flex: 1;
  min-width: 0;
  overflow: hidden;
}

.order-name {
  font-size: 0.84rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-date {
  font-size: 0.7rem;
  color: var(--c-text2);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-right {
  text-align: right;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.order-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-amber);
  white-space: nowrap;
}

/* ── BADGE ───────────────────────────────────────────────── */
.badge {
  display: -webkit-inline-block;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
}

.badge-pending    { background: #FDF3DC; color: #9A6A00; }
.badge-success    { background: #E4F4EA; color: #1F7A4D; }
.badge-failed     { background: #FCE9E9; color: #B42318; }
.badge-berhasil   { background: #E4F4EA; color: #1F7A4D; }
.badge-gagal      { background: #FCE9E9; color: #B42318; }
.badge-dibatalkan { background: #FCE9E9; color: #B42318; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--c-text3);
}

.empty-state svg {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  opacity: 0.25;
}

.empty-state p {
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ── SKELETON ────────────────────────────────────────────── */
.sk {
  background: var(--c-bg3);
  border-radius: 6px;
  -webkit-animation: sk-pulse 1.4s ease-in-out infinite;
  animation: sk-pulse 1.4s ease-in-out infinite;
}

@-webkit-keyframes sk-pulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.55; }
}
@keyframes sk-pulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.55; }
}

.sk-name  { display: block; width: 110px; height: 18px; border-radius: 6px; }

.order-sk {
  background: var(--c-bg2);
  box-shadow: inset 0 0 0 1px var(--c-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.sk-icon  { width: 42px; height: 42px; min-width: 42px; border-radius: 10px; }

.order-sk-body {
  -webkit-flex: 1; flex: 1;
  min-width: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 7px;
}

.order-sk-right {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  gap: 6px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.sk-line      { height: 11px; }
.sk-line-lg   { width: 130px; }
.sk-line-md   { width: 65px; }
.sk-line-sm   { width: 80px; }
.sk-badge     { width: 52px; height: 18px; border-radius: 100px; }

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  height: var(--bnav-h);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 9999;
  visibility: visible !important;
  opacity: 1 !important;
  -webkit-transition: none !important;
  transition: none !important;
  pointer-events: auto !important;
  will-change: auto;
}

.bnav-item {
  -webkit-flex: 1; flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 3px;
  color: var(--c-text3);
  font-size: 0;
  padding: 8px 0;
  -webkit-transition: color 0.15s;
  transition: color 0.15s;
  min-width: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bnav-item span {
  font-size: 0.58rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bnav-item svg { -webkit-flex-shrink: 0; flex-shrink: 0; }

.bnav-active { color: var(--c-blue2); }

.bnav-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--c-blue2);
}

/* ── SECTION HEADER ──────────────────────────────────────── */
.sec-header {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 10px;
}

.sec-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.sec-link {
  font-size: 0.75rem;
  color: var(--c-blue2);
  white-space: nowrap;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--hdr-h);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding: 0 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 12px;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

.back-btn {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 9px;
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-text2);
  -webkit-transition: color 0.15s, border-color 0.15s;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.back-btn svg { width: 18px; height: 18px; display: block; }
.back-btn:hover { color: var(--c-text); border-color: rgba(40,87,122,0.35); }

.page-title {
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--bnav-h) + 12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  -webkit-transform: translateX(-50%) translateY(12px);
  transform: translateX(-50%) translateY(12px);
  background: var(--c-bg3);
  box-shadow: inset 0 0 0 1px var(--c-border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 200;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  -webkit-transform: translateX(-50%) translateY(0);
  transform: translateX(-50%) translateY(0);
}

.toast-success { color: var(--c-green); }
.toast-error   { color: var(--c-red); }
.toast-info    { color: var(--c-blue2); }

/* ── MODAL / SHEET ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,42,67,0.5);
  z-index: 100;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-justify-content: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-sheet {
  background: var(--c-bg2);
  box-shadow: inset 0 0 0 1px var(--c-border);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px;
  width: 100%;
  max-width: 480px;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  -webkit-transition: -webkit-transform 0.25s ease;
  transition: transform 0.25s ease;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.modal-overlay.open .modal-sheet {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.modal-handle {
  width: 32px; height: 4px;
  background: var(--c-border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 360px) {
  .sc-amount { font-size: 1.6rem; min-height: 36px; }
  .sc-btn    { font-size: 0.68rem; padding: 8px 4px; }
  .stats-row { gap: 6px; }
  .stat-box  {
    -webkit-flex: 1 1 calc(50% - 3px);
    flex: 1 1 calc(50% - 3px);
    max-width: calc(50% - 3px);
    padding: 10px 10px;
  }
}

@media (max-width: 319px) {
  .stat-box {
    -webkit-flex: 1 1 100%;
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .stat-box {
    -webkit-flex: 1 1 calc(25% - 6px);
    flex: 1 1 calc(25% - 6px);
    max-width: calc(25% - 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    -webkit-animation-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    -webkit-transition-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════
   ALIAS VARIABEL CSS
   ══════════════════════════════════════════════════════════ */
:root {
  /* Background aliases */
  --bg:              var(--c-bg);
  --bg2:             var(--c-bg2);
  --bg3:             var(--c-bg3);
  --bg4:             var(--c-bg4);

  /* Border alias */
  --border:          var(--c-border);

  /* Blue aliases (menggantikan purple) */
  --purple:          var(--c-blue);
  --purple-light:    var(--c-blue2);
  --purple-dark:     #102A43;

  /* Gold alias */
  --gold-light:      #163B5C;

  /* Text aliases */
  --text:            var(--c-text);
  --text2:           var(--c-text2);
  --text3:           var(--c-text3);

  /* Sizing aliases */
  --header-h:        var(--hdr-h);
  --bottom-nav-h:    var(--bnav-h);

  /* Transition alias */
  --t:               0.2s ease;
}

/* ══════════════════════════════════════════════════════════
   BOTTOM NAVIGATION — .bottom-nav / .nav-item
   ══════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  height: var(--bnav-h);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 9999;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.nav-item {
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 3px;
  color: var(--c-text3);
  padding: 8px 0;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  -webkit-transition: color 0.15s;
  transition: color 0.15s;
  min-width: 0;
  font-family: inherit;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: block;
}

.nav-item span {
  font-size: 0.58rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1;
}

.nav-item.active {
  color: var(--c-blue2);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--c-blue2);
}
