@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Sora:wght@300;400;500;600&display=swap');
/* ============================================================
 * MOONBOT OFFICE — COMPONENTS MASTER
 * Konsolidasi: design-system.css + components.css + components-v2.css + components-t4.css
 * Plus mockup-direct tokens (Cormorant serif italic, card-24, locker, heatmap)
 * Single source of truth untuk semua 22 page Mini App.
 * ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Color palette — Premium Dark Luxury */
  --bg: #0A0E1A;
  --bg-elevated: #0F1424;
  --card-bg: #14182A;
  --card-bg-2: #1A1F35;
  --border: #2A2F45;
  --border-soft: #1F2438;
  --pearl: #F5F1EA;
  --pearl-dim: #C9C5BE;
  --gold: #D4AF37;
  --gold-soft: #B8941F;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --text-muted: #8A8FA8;
  --text-dim: #5C617A;

  /* Semantic colors */
  --ok: #4ADE80;
  --ok-bg: rgba(74, 222, 128, 0.12);
  --warn: #FBBF24;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --alert: #F87171;
  --alert-bg: rgba(248, 113, 113, 0.12);
  --info: #60A5FA;
  --info-bg: rgba(96, 165, 250, 0.12);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 14px;
  --space-5: 20px;
  --space-6: 28px;
  --space-7: 40px;

  --page-pad-x: 14px;

  /* Shadow */
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 24px rgba(212, 175, 55, 0.15);
}

/* ---------- 2. RESET + BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--pearl);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body { min-height: 100vh; min-height: 100dvh; }

a { color: var(--gold); text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- 3. LAYOUT — PAGE + HEADER + CONTENT ---------- */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.page-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--page-pad-x);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-back {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  color: var(--pearl);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
.page-back:active { transform: scale(0.95); }

.page-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--pearl);
  flex: 1;
  margin: 0;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.page-content {
  flex: 1;
  padding: var(--space-5) var(--page-pad-x) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ---------- 4. TYPOGRAPHY ---------- */
.t-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}

.t-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  color: var(--pearl);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.t-display-lg { font-size: 32px; }
.t-display-xl { font-size: 44px; }
.t-display-xxl { font-size: 56px; }

.t-greeting {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  font-style: italic;
  color: var(--pearl);
  line-height: 1.15;
  margin: 0 0 var(--space-4);
}
.t-greeting strong {
  font-style: normal;
  font-weight: 600;
  color: var(--gold);
}

.t-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  line-height: 1;
}
.t-num-sm { font-size: 24px; }
.t-num-md { font-size: 36px; }
.t-num-lg { font-size: 48px; }
.t-num-xl { font-size: 64px; }

.t-meta {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.t-muted { color: var(--text-muted); }
.t-dim { color: var(--text-dim); }
.t-gold { color: var(--gold); }
.t-pearl { color: var(--pearl); }
.t-ok { color: var(--ok); }
.t-warn { color: var(--warn); }
.t-alert { color: var(--alert); }

/* ---------- 5. CARD ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card-sm { padding: var(--space-4); border-radius: var(--radius-md); }

.card-hero {
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card-tappable {
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.card-tappable:active {
  transform: scale(0.98);
  border-color: var(--gold-soft);
}

.card-gold-edge {
  border: 1px solid var(--gold-soft);
  box-shadow: 0 0 0 1px var(--gold-glow);
}

/* Card title row */
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- 6. PILL — single + group ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--pearl);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.pill:active { transform: scale(0.96); }

.pill.is-active,
.pill[data-active="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

.pill-sm { padding: 4px 10px; font-size: 12px; }
.pill-lg { padding: 8px 18px; font-size: 14px; }

/* Status pill — colored dot + text */
.pill-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}
.pill-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill-status.is-ok { background: var(--ok-bg); color: var(--ok); }
.pill-status.is-warn { background: var(--warn-bg); color: var(--warn); }
.pill-status.is-alert { background: var(--alert-bg); color: var(--alert); }
.pill-status.is-info { background: var(--info-bg); color: var(--info); }
.pill-status.is-neutral { background: var(--card-bg-2); color: var(--text-muted); }

/* Pill group — horizontal row */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------- 7. VISUAL CARD GRID (2x2, 3x2) ---------- */
.visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.visual-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.visual-card {
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 92px;
}
.visual-card:active { transform: scale(0.97); }
.visual-card.is-active {
  background: var(--gold-glow);
  border-color: var(--gold);
}
.visual-card .vc-icon {
  font-size: 24px;
  line-height: 1;
}
.visual-card .vc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pearl);
}
.visual-card.is-active .vc-label { color: var(--gold); }

/* ---------- 8. LOCKER GRID — 5 floor (L1-L5) ---------- */
.locker-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.locker {
  aspect-ratio: 1;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
}
.locker-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}
.locker-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.locker.is-locked .locker-num { color: var(--text-muted); }
.locker.is-locked::after {
  content: "🔒";
  position: absolute;
  font-size: 11px;
  opacity: 0.6;
}

/* ---------- 9. BALANCE BAR (gold gradient progress) ---------- */
.balance-bar {
  position: relative;
  height: 6px;
  background: var(--card-bg-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: var(--space-3);
}
.balance-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.balance-bar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
}
.balance-bar-axis span {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ---------- 10. KPI ROW + RINGKASAN ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.kpi-row-2 { grid-template-columns: 1fr 1fr; }
.kpi-row-4 { grid-template-columns: repeat(4, 1fr); }

.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi-value {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.kpi-value-sub {
  font-size: 13px;
  color: var(--text-muted);
  display: inline;
  margin-left: 2px;
}
.kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- 11. CHECKLIST ITEMS ---------- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.checklist-item .ci-box {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.checklist-item.is-ok .ci-box {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: var(--ok);
}
.checklist-item.is-alert .ci-box {
  background: var(--alert-bg);
  border-color: var(--alert);
  color: var(--alert);
}
.checklist-item.is-pending .ci-box {
  background: transparent;
  border-color: var(--border);
}
.checklist-item .ci-text {
  flex: 1;
  color: var(--pearl);
  font-size: 14px;
}
.checklist-item .ci-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.checklist-item.is-ok .ci-tag { color: var(--ok); }
.checklist-item.is-alert .ci-tag { color: var(--alert); }
.checklist-item.is-pending .ci-tag { color: var(--text-muted); }

/* ---------- 12. BUTTON ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  color: var(--pearl);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:active { background: var(--gold-soft); }

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--gold-soft);
  color: var(--gold);
}

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }

.btn-block { width: 100%; }

.btn-row {
  display: flex;
  gap: var(--space-3);
}
.btn-row .btn { flex: 1; }

/* ---------- 13. FORM CONTROLS ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--pearl);
  font-size: 14px;
}
.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: none;
  border-color: var(--gold-soft);
}
.field-textarea { resize: vertical; min-height: 80px; }
.field-input::placeholder,
.field-textarea::placeholder { color: var(--text-dim); }

/* ---------- 14. ALERT BOX ---------- */
.alert-box {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  font-size: 13px;
}
.alert-box.is-warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.alert-box.is-alert { background: var(--alert-bg); border-color: var(--alert); color: var(--alert); }
.alert-box.is-info { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.alert-box.is-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.alert-box .ab-icon { font-size: 16px; flex-shrink: 0; }
.alert-box .ab-body strong { color: inherit; font-weight: 600; }
.alert-box .ab-body { color: var(--pearl); }
.alert-box .ab-body p { margin: 2px 0 0; color: var(--text-muted); }

/* ---------- 15. CALENDAR (real widget) ---------- */
.calendar {
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.calendar-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--pearl);
}
.calendar-nav {
  display: flex;
  gap: var(--space-2);
}
.calendar-nav button {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--pearl);
  cursor: pointer;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar-grid .cal-wk {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 0;
}
.calendar-grid .cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--pearl);
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
}
.calendar-grid .cal-day.is-muted { color: var(--text-dim); }
.calendar-grid .cal-day.is-weekend { color: var(--alert); }
.calendar-grid .cal-day.is-today { font-weight: 700; }
.calendar-grid .cal-day.is-selected {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.calendar-grid .cal-day.is-in-range {
  background: var(--gold-glow);
  color: var(--gold);
  border-radius: 0;
}
.calendar-grid .cal-day:active { transform: scale(0.92); }

/* ---------- 16. HEATMAP (7×N grid) ---------- */
.heatmap {
  display: grid;
  grid-template-columns: 40px repeat(var(--hm-cols, 24), 1fr);
  gap: 3px;
  margin-top: var(--space-3);
}
.heatmap-axis-x,
.heatmap-axis-y {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--card-bg-2);
  min-height: 14px;
}
.heatmap-cell.h-1 { background: rgba(212, 175, 55, 0.12); }
.heatmap-cell.h-2 { background: rgba(212, 175, 55, 0.28); }
.heatmap-cell.h-3 { background: rgba(212, 175, 55, 0.5); }
.heatmap-cell.h-4 { background: rgba(212, 175, 55, 0.75); }
.heatmap-cell.h-5 { background: var(--gold); }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  justify-content: flex-end;
}
.heatmap-legend-swatches {
  display: flex;
  gap: 2px;
}
.heatmap-legend-swatches span {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

/* ---------- 17. GEOFENCE CIRCLE ---------- */
.geofence {
  position: relative;
  aspect-ratio: 1;
  max-width: 280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.geofence-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed var(--border);
}
.geofence-ring.r-2 { inset: 24%; }
.geofence-ring.r-3 { inset: 36%; }
.geofence-center {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px var(--gold-glow);
  position: relative;
  z-index: 2;
}
.geofence-you {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
  top: 40%; left: 18%;
}
.geofence-label-office,
.geofence-label-you {
  position: absolute;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.geofence-label-office { top: 4px; right: 12%; }
.geofence-label-you { top: 34%; left: 4%; }

/* ---------- 18. AVATAR / LIST ROW ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.avatar.is-muted { background: var(--card-bg); color: var(--gold); border: 1px solid var(--gold-soft); }
.list-row .lr-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.list-row .lr-title { font-size: 14px; color: var(--pearl); }
.list-row .lr-sub { font-size: 11px; color: var(--text-muted); }
.list-row .lr-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.list-row .lr-meta-value {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--gold);
}
.list-row .lr-meta-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- 19. TOAST + LOADING ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--pearl);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  box-shadow: var(--shadow-card);
  z-index: 1000;
  animation: toastIn 0.25s ease-out;
}
.toast.is-ok { border-color: var(--ok); color: var(--ok); }
.toast.is-alert { border-color: var(--alert); color: var(--alert); }
.toast.is-warn { border-color: var(--warn); color: var(--warn); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skel {
  background: linear-gradient(90deg, var(--card-bg) 0%, var(--card-bg-2) 50%, var(--card-bg) 100%);
  background-size: 200% 100%;
  animation: skelShift 1.4s linear infinite;
  border-radius: var(--radius-sm);
}
@keyframes skelShift {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- 20. MODAL / SHEET ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 900;
  display: none;
}
.sheet-backdrop.is-open { display: block; }

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: var(--space-5) var(--page-pad-x);
  padding-left: max(var(--page-pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-pad-x), env(safe-area-inset-right, 0px));
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom, 20px));
  z-index: 950;
  transform: translateY(100%);
  transition: transform 0.25s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.sheet.is-open { transform: translateY(0); }
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: -8px auto 16px;
}

/* ---------- 21. BADGE ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--card-bg-2);
  color: var(--pearl);
  border: 1px solid var(--border);
}
.badge.is-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.is-gold { background: var(--gold-glow); color: var(--gold); border-color: var(--gold-soft); }
.badge.is-alert { background: var(--alert-bg); color: var(--alert); border-color: transparent; }

/* ---------- 22. EMPTY STATE ---------- */
.empty {
  text-align: center;
  padding: var(--space-7) var(--space-5);
  color: var(--text-muted);
}
.empty-icon { font-size: 36px; opacity: 0.6; margin-bottom: var(--space-3); }
.empty-title { color: var(--pearl); font-size: 15px; margin-bottom: 4px; }
.empty-sub { font-size: 12px; color: var(--text-muted); }

/* ---------- 23. UTILITY ---------- */
.row { display: flex; gap: var(--space-3); align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.col { display: flex; flex-direction: column; gap: var(--space-3); }
.grow { flex: 1; }
.hidden { display: none !important; }
.center { text-align: center; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.g-1 { gap: var(--space-1); }
.g-2 { gap: var(--space-2); }
.g-3 { gap: var(--space-3); }
.g-4 { gap: var(--space-4); }


.sheet > * { box-sizing: border-box; max-width: 100%; }
.sheet h2 { word-break: break-word; }

/* ── R3.5 Booking Availability Slot Grid ────────────────────────── */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.slot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px;
}
.slot-item .slot-hour {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.slot-item .slot-status-label {
  font-size: 9px;
  text-transform: lowercase;
  opacity: 0.8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.slot-available {
  background: rgba(212, 175, 55, 0.10);
  color: var(--gold, #D4AF37);
  border-color: rgba(212, 175, 55, 0.30);
}
.slot-available:hover,
.slot-available:active {
  background: rgba(212, 175, 55, 0.25);
  transform: scale(0.97);
}
.slot-booked {
  background: rgba(212, 175, 55, 0.85);
  color: #0A0E1A;
  border-color: var(--gold, #D4AF37);
  font-weight: 600;
}
.slot-booked .slot-status-label {
  color: #0A0E1A;
  opacity: 0.85;
  font-weight: 500;
}
.slot-past {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.08);
}
.slot-maintenance {
  background: rgba(220, 70, 70, 0.12);
  color: rgba(220, 70, 70, 0.7);
  border-color: rgba(220, 70, 70, 0.30);
}
.slot-item.slot-picked {
  outline: 2px solid var(--gold, #D4AF37);
  outline-offset: -2px;
  transform: scale(0.96);
}
.slot-legend-box {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid transparent;
}
.slot-legend-box.slot-available { background: rgba(212, 175, 55, 0.20); border-color: rgba(212, 175, 55, 0.40); }
.slot-legend-box.slot-booked    { background: rgba(212, 175, 55, 0.85); }
.slot-legend-box.slot-past      { background: rgba(255, 255, 255, 0.10); }
.slot-legend-box.slot-maintenance { background: rgba(220, 70, 70, 0.30); }

/* ── S2U Redesign 28 Mei (1-step form) ──────────────────────────── */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
  color: var(--pearl, #E8E6E0);
  cursor: pointer;
}
.check-row:last-child { border-bottom: none; }
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold, #D4AF37);
  flex-shrink: 0;
  cursor: pointer;
}
.form-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 12px 0 4px;
  font-weight: 600;
}
/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}
.modal {
  background: var(--card-bg, #11151F);
  border: 1px solid var(--gold, #D4AF37);
  border-radius: 12px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* ── S2U History Photo (28 Mei) ─────────────────────────────────── */
.s2u-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--gold, #D4AF37);
  cursor: pointer;
  flex-shrink: 0;
  background: var(--card-bg-2, #1a1f2e);
  transition: transform 0.15s ease;
}
.s2u-thumb:active { transform: scale(0.94); }
.s2u-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-style: dashed;
  border-color: rgba(255,255,255,0.12);
  cursor: default;
  font-size: 14px;
}
/* Lightbox */
.lightbox-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.lightbox-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  border: 1px solid var(--gold, #D4AF37);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}
.lightbox-caption {
  margin-top: 12px;
  color: var(--pearl, #E8E6E0);
  font-size: 13px;
  text-align: center;
}

/* ── Aset Photo (Batch1 A1) ─────────────────────────────────────── */
.aset-thumb {
  width: 42px; height: 42px;
  border-radius: 8px; object-fit: cover;
  border: 1px solid var(--gold, #D4AF37);
  cursor: pointer; flex-shrink: 0;
}
.aset-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.aset-lb-inner { position: relative; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.aset-lb-img { max-width: 100%; max-height: 80vh; border-radius: 10px; border: 1px solid var(--gold, #D4AF37); }
.aset-lb-close { position: absolute; top: -40px; right: 0; background: rgba(255,255,255,0.1); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.aset-lb-cap { margin-top: 12px; color: var(--pearl, #E8E6E0); font-size: 13px; text-align: center; }

/* ── Variant Picker Sheet (B2-2b) ───────────────────────────────── */
.vsheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 998;
}
.vsheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--ink-2, #11151F);
  border-top: 1px solid var(--gold-base, #D4AF37);
  border-radius: 18px 18px 0 0;
  padding: 16px 20px 28px; z-index: 999;
  max-height: 70vh; overflow-y: auto;
}
.vsheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2); margin: 0 auto 14px;
}
.vsheet-opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; text-align: left;
  background: rgba(212,175,55,0.06);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 10px; cursor: pointer; color: var(--pearl, #E8E6E0);
}
.vsheet-opt:active { background: rgba(212,175,55,0.16); }
.vsheet-opt.is-disabled { opacity: 0.4; cursor: not-allowed; }
.vsheet-opt-name { flex: 1; font-weight: 600; font-size: 14px; }
.vsheet-opt-price { color: var(--gold-base, #D4AF37); font-weight: 600; font-size: 13px; }
.vsheet-opt-stock { font-size: 11px; color: var(--text-muted, #8A8A8A); }

/* -- POS katalog foto (B2) -- */
.pos-card-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 6px; margin-bottom: 8px; display: block;
  background: #FFFFFF;
}
.pos-card-noimg {
  width: 100%; aspect-ratio: 1 / 1; display: flex;
  align-items: center; justify-content: center;
  font-size: 36px; border-radius: 6px; margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
}

/* coch-boxfix: contain form controls + block buttons inside padded cards */
.field-input, .field-textarea, .field-select, .btn { box-sizing: border-box; }

/* ===================== NEON RESKIN - Cyber Magenta x Violet (STATIC) ===================== */
:root{
  --bg:#0a0510;
  --bg-elevated:#130a24;
  --card-bg:#120a1e;
  --card-bg-2:#180d2a;
  --border:#3a2150;
  --border-soft:#281640;
  --pearl:#F6F2FF;
  --pearl-dim:#cfc6e6;
  --gold:#ff3dd8;
  --gold-soft:#9a6bff;
  --gold-base:#ff3dd8;
  --gold-glow:rgba(255,61,216,0.18);
  --text-muted:#9a93c0;
  --text-dim:#6a6196;
  --ok:#3dffd0;  --ok-bg:rgba(61,255,208,0.12);
  --warn:#ffd23d; --warn-bg:rgba(255,210,61,0.12);
  --alert:#ff5d7e; --alert-bg:rgba(255,93,126,0.12);
  --info:#3dd8ff; --info-bg:rgba(61,216,255,0.12);
  --shadow-card:0 2px 14px rgba(0,0,0,0.5);
  --shadow-hover:0 0 24px rgba(255,61,216,0.22);
  --neon-magenta:#ff3dd8;
  --neon-violet:#9a6bff;
  --font-display:'Chakra Petch','Cormorant Garamond',sans-serif;
  --font-body:'Sora','Inter Tight',-apple-system,BlinkMacSystemFont,sans-serif;
}
body{
  background-color:var(--bg);
  background-image:
    radial-gradient(60% 38% at 12% 0%, rgba(255,61,216,0.10), transparent 64%),
    radial-gradient(55% 40% at 95% 12%, rgba(140,92,255,0.12), transparent 66%);
  font-family:var(--font-body);
}
.page-title{ font-family:var(--font-display); color:#fff; text-shadow:0 0 6px rgba(255,61,216,.55),0 0 16px rgba(255,61,216,.35); }
.page-back{ color:var(--neon-magenta); border:1px solid rgba(255,61,216,.5); box-shadow:0 0 8px rgba(255,61,216,.35),inset 0 0 7px rgba(255,61,216,.15); }
.card{ box-shadow:0 0 0 1px rgba(140,92,255,.06),0 0 20px rgba(140,92,255,.07); }
.card-hero{ box-shadow:0 0 24px rgba(255,61,216,.12); }
.kpi-value,.lr-meta-value,.locker-num{ font-style:normal; text-shadow:0 0 7px rgba(255,61,216,.5),0 0 16px rgba(255,61,216,.28); }
.calendar-title{ font-style:normal; }
.btn-primary{ box-shadow:0 0 14px rgba(255,61,216,.5),0 0 30px rgba(255,61,216,.25),inset 0 0 14px rgba(255,255,255,.10); text-shadow:0 0 8px rgba(255,255,255,.35); }
.btn-secondary{ box-shadow:0 0 10px rgba(140,92,255,.35),inset 0 0 9px rgba(140,92,255,.12); text-shadow:0 0 7px rgba(140,92,255,.5); }
.field-input,.field-textarea,.field-select{ box-shadow:0 0 8px rgba(140,92,255,.10),inset 0 0 9px rgba(140,92,255,.05); }
.field-input:focus,.field-textarea:focus,.field-select:focus{ box-shadow:0 0 10px rgba(255,61,216,.45),inset 0 0 9px rgba(255,61,216,.12); }
.badge.is-ok{ box-shadow:0 0 9px rgba(61,255,208,.4),inset 0 0 8px rgba(61,255,208,.12); text-shadow:0 0 5px rgba(61,255,208,.5); }
.badge.is-gold{ box-shadow:0 0 9px rgba(255,61,216,.4),inset 0 0 8px rgba(255,61,216,.12); text-shadow:0 0 5px rgba(255,61,216,.5); }
.badge.is-alert{ box-shadow:0 0 9px rgba(255,93,126,.4),inset 0 0 8px rgba(255,93,126,.12); }
.avatar{ box-shadow:0 0 10px rgba(255,61,216,.45); }
.list-row,.checklist-item,.visual-card{ box-shadow:0 0 12px rgba(140,92,255,.05); }
.slot-available{ background:rgba(255,61,216,.10); color:var(--neon-magenta); border-color:rgba(255,61,216,.32); }
.slot-available:hover,.slot-available:active{ background:rgba(255,61,216,.24); }
.slot-booked{ background:rgba(255,61,216,.85); color:#0a0510; border-color:var(--neon-magenta); box-shadow:0 0 12px rgba(255,61,216,.5); }
.slot-booked .slot-status-label{ color:#0a0510; }
.slot-item.slot-picked{ outline-color:var(--neon-magenta); box-shadow:0 0 12px rgba(255,61,216,.5); }
.slot-legend-box.slot-available{ background:rgba(255,61,216,.20); border-color:rgba(255,61,216,.4); }
.slot-legend-box.slot-booked{ background:rgba(255,61,216,.85); }
.heatmap-cell.h-1{ background:rgba(255,61,216,.12); }
.heatmap-cell.h-2{ background:rgba(255,61,216,.30); }
.heatmap-cell.h-3{ background:rgba(255,61,216,.52); }
.heatmap-cell.h-4{ background:rgba(255,61,216,.74); }
.geofence-center{ box-shadow:0 0 0 6px var(--gold-glow),0 0 18px rgba(255,61,216,.5); }
.vsheet-opt{ background:rgba(255,61,216,.06); border-color:rgba(255,61,216,.22); }
.vsheet-opt:active{ background:rgba(255,61,216,.16); }

