/* ============================================================================
   BOTHEALTH — THEME.CSS
   Design system mengikuti pola index.html:
   light & airy, Sora + Inter, green accent sebagai satu-satunya warna fungsi,
   soft elevation, radii besar & pill geometry. Kartu "featured" tetap
   berkarakter gelap (seperti pricing index) untuk kontras yang kuat.

   Struktur file:
     1. TOKENS
     2. RESET & BASE
     3. TYPOGRAPHY
     4. LAYOUT
     5. BUTTONS
     6. CARDS
     7. FORMS
     8. TABS & SEGMENTS
     9. BADGES / PILLS / TAGS
    10. NAV
    11. FOOTER
    12. EMPTY STATE
    13. OVERLAYS (TOAST, FAB, DIALOG)
    14. CHART
    15. UTILITIES
    16. RESPONSIVE
    17. REDUCED MOTION
   ============================================================================ */


/* ============================================================================
   1. TOKENS
   ============================================================================ */
:root {
  /* ---- Color: Backgrounds ---- */
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #f2f2f7;
  --bg-card: #f2f2f7;
  --bg-card-alt: #e8e8ed;
  --bg-ghost: #f2f2f7;

  /* ---- Color: Ink & Text ---- */
  --ink: #0a0a0a;
  --ink-2: #1c1c1e;
  --ink-3: #2c2c2e;
  --white: #ffffff;

  --text-base: #0a0a0a;
  --text-light: #1c1c1e;
  --text-secondary: #636366;
  --text-muted: #aeaeb2;
  --text-faint: #aeaeb2;

  /* ---- Color: Brand ---- */
  --green: #00c853;
  --green-hover: #00a846;
  --green-d: #00a846;
  --green-border: #00c853;

  /* ---- Color: Semantic ---- */
  --negative: #ff453a;
  --warning: #ff9f0a;
  --announcement: #0a84ff;

  /* ---- Color: Borders & Lines ---- */
  --border: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.15);
  --separator: rgba(0, 0, 0, 0.08);
  --surface-light: #ffffff;
  --hairline: rgba(0, 0, 0, 0.06);
  --hairline-strong: rgba(0, 0, 0, 0.1);

  /* ---- Color: Overlays ---- */
  --overlay-green-soft: rgba(0, 200, 83, 0.08);
  --overlay-green-mid: rgba(0, 200, 83, 0.12);
  --overlay-green-strong: rgba(0, 200, 83, 0.22);
  --overlay-negative-soft: rgba(255, 69, 58, 0.08);
  --overlay-warning-soft: rgba(255, 159, 10, 0.08);
  --overlay-white-soft: rgba(0, 0, 0, 0.04);

  /* ---- Shadow (soft, light-theme) ---- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.07);

  --shadow-heavy: var(--shadow-xl);
  --shadow-medium: var(--shadow-md);
  --shadow-inset: 0 0 0 1px rgba(0, 0, 0, 0.06) inset;
  --shadow-green: 0 4px 16px rgba(0, 200, 83, 0.3);
  --shadow-green-soft: 0 8px 24px rgba(0, 200, 83, 0.15);

  /* ---- Font ---- */
  --font-title: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- Radius ---- */
  --radius-badge: 6px;
  --radius-subtle: 6px;
  --radius-card: 12px;
  --radius-section: 12px;
  --radius-lg: 20px;
  --radius-panel: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --radius-pill-full: 999px;
  --radius-circle: 50%;

  /* ---- Spacing (base 8px) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* ---- Z-index scale ---- */
  --z-nav: 100;
  --z-tabs-mobile: 45;
  --z-fab: 50;
  --z-dialog: 60;
  --z-toast: 70;

  /* ---- Motion ---- */
  --dur: 0.2s;
  --dur-fast: 0.15s;
  --dur-slow: 0.4s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.3, 0.7, 0.4, 1);

  /* ---- Layout ---- */
  --container-max: 116rem;
  --container-pad: 16px;
  --nav-height: 6.8rem;
  --mobile-tabs-height: 64px;

  /* ---- Font-size scale (rem, html = 62.5%) ---- */
  --fs-micro: 1.1rem;
  --fs-badge: 1.2rem;
  --fs-small: 1.3rem;
  --fs-caption: 1.4rem;
  --fs-button: 1.4rem;
  --fs-body: 1.6rem;
  --fs-body-lg: 1.8rem;
  --fs-heading-sm: 1.9rem;
  --fs-heading-md: 2.6rem;
  --fs-heading-lg: 3.2rem;
  --fs-heading-xl: 4rem;

  /* ---- Letter-spacing ---- */
  --ls-label: 0.4px;
  --ls-label-wide: 0.06em;
  --ls-tight: -0.02em;
  --ls-tighter: -0.03em;
}


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

html {
  font-size: 62.5%; /* 1rem = 10px */
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-base);
  color: var(--text-base);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; }
button:disabled { cursor: not-allowed; }

hr { border: none; border-top: 1px solid var(--hairline); margin: 0; }

::selection {
  background: rgba(0, 200, 83, 0.15);
  color: var(--text-base);
}

i.fa-solid,
i.fa-regular,
i.fa-brands {
  line-height: 1;
}

/* ---- Base focus ring (tidak menimpa border-radius elemen) ---- */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--overlay-green-strong);
}

/* Pertahankan bentuk tiap elemen saat focus */
.btn:focus-visible { border-radius: var(--radius-pill-full); }
.icon-btn:focus-visible,
.btn-play:focus-visible,
.fab:focus-visible,
.frap:focus-visible { border-radius: var(--radius-circle); }
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible { border-radius: var(--radius-pill-full); }
.textarea:focus-visible { border-radius: var(--radius-lg); }


/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-base);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: clamp(3.2rem, 5.5vw, 6.4rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: var(--sp-2);
}
h2 {
  font-size: clamp(2.4rem, 3.6vw, 4rem);
  line-height: 1.15;
  font-weight: 700;
}
h3 {
  font-size: var(--fs-heading-sm);
  line-height: 1.3;
}

p { margin: 0; }

.lead {
  font-size: var(--fs-body-lg);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
}
.lead:last-child { margin-bottom: 0; }

.section-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 var(--sp-4);
  font-family: var(--font-title);
  font-size: var(--fs-heading-sm);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: var(--ls-tight);
}
.section-title i { color: var(--green-d); }

.sub, .hint {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  line-height: 1.55;
}
.sub { margin: 0; }

/* Eyebrow — pill kecil hijau, seperti .subhead/.badge di index */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--sp-4);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill-full);
  background: var(--overlay-green-soft);
  border: 1px solid var(--overlay-green-strong);
  color: var(--green-d);
  font-family: var(--font-ui);
  font-size: var(--fs-badge);
  font-weight: 600;
  letter-spacing: var(--ls-label-wide);
  text-transform: uppercase;
  white-space: nowrap;
}
.eyebrow i { font-size: 1.2rem; }

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green-d); }
.text-negative { color: var(--negative); }
.text-warning { color: var(--warning); }
.text-announcement { color: var(--announcement); }

.text-center { text-align: center; }
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--ls-label-wide);
  font-weight: 600;
}
.text-title { font-family: var(--font-title); }
.text-mono { font-family: var(--font-mono); }


/* ============================================================================
   4. LAYOUT
   ============================================================================ */
.wrap,
.container {
  width: min(var(--container-max), calc(100% - (var(--container-pad) * 2)));
  margin-inline: auto;
}

main {
  padding: var(--sp-5) 0 var(--sp-7);
}
body.has-tabs-mobile main {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.section {
  padding: var(--sp-6) 0;
}
.section-sm { padding: var(--sp-5) 0; }
.section-lg { padding: var(--sp-8) 0; }

.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--sp-5); }

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}
.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: var(--sp-5) 0;
}


/* ============================================================================
   5. BUTTONS
   ============================================================================ */
/* Base — selector `a.btn` & `button.btn` memastikan tidak tertimpa .prose a */
.btn,
a.btn,
a.btn:link,
a.btn:visited,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 4.4rem;
  padding: 1.3rem 2.4rem;
  border-radius: var(--radius-pill-full);
  border: 1.5px solid transparent;
  background: var(--bg-ghost);
  color: var(--text-base);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn i { font-size: 1.5rem; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Button: primary (green brand) ---- */
.btn-primary,
a.btn-primary,
button.btn-primary {
  background: var(--green);
  color: var(--ink);
  border-color: transparent;
  box-shadow: var(--shadow-green);
  font-weight: 700;
}
.btn-primary i { color: var(--ink); }
.btn-primary:hover:not(:disabled),
a.btn-primary:hover:not(:disabled) {
  background: var(--green-hover);
  box-shadow: 0 6px 24px rgba(0, 200, 83, 0.4);
  color: var(--ink);
}

/* ---- Button: dark ink (header CTA / "Mulai gratis") ---- */
.btn-dark,
a.btn-dark,
button.btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.btn-dark i { color: var(--white); }
.btn-dark:hover:not(:disabled),
a.btn-dark:hover:not(:disabled) {
  background: var(--ink-2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: var(--white);
}

/* ---- Button: ghost / outline ---- */
.btn-ghost,
a.btn-ghost,
button.btn-ghost,
.btn-outline,
a.btn-outline,
button.btn-outline {
  background: transparent;
  color: var(--text-base);
  border-color: var(--ink-3);
}
.btn-ghost:hover:not(:disabled),
a.btn-ghost:hover:not(:disabled),
.btn-outline:hover:not(:disabled),
a.btn-outline:hover:not(:disabled) {
  background: var(--bg-ghost);
  border-color: var(--ink);
  color: var(--text-base);
}

/* ---- Button: danger ---- */
.btn-danger,
a.btn-danger,
button.btn-danger {
  background: transparent;
  color: var(--negative);
  border-color: rgba(255, 69, 58, 0.4);
}
.btn-danger:hover:not(:disabled),
a.btn-danger:hover:not(:disabled) {
  background: var(--overlay-negative-soft);
  border-color: var(--negative);
  color: var(--negative);
}

/* ---- Button: warning / Premium (gold) ---- */
.btn-warning,
a.btn-warning,
button.btn-warning,
.btn-vip,
a.btn-vip,
button.btn-vip {
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  color: var(--ink);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(255, 159, 10, 0.35);
}
.btn-warning i,
.btn-vip i { color: var(--ink); }
.btn-warning:hover:not(:disabled),
a.btn-warning:hover:not(:disabled),
.btn-vip:hover:not(:disabled),
a.btn-vip:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  box-shadow: 0 6px 24px rgba(255, 159, 10, 0.45);
  color: var(--ink);
}

/* ---- Button: light (rare) ---- */
.btn-light,
a.btn-light,
button.btn-light {
  background: var(--white);
  color: var(--ink);
  border-color: transparent;
}
.btn-light:hover:not(:disabled),
a.btn-light:hover:not(:disabled) {
  background: var(--bg-ghost);
  color: var(--ink);
}

/* ---- Button: static (indikator "Paket Aktif Kamu") ---- */
.btn-static,
a.btn-static,
button.btn-static {
  cursor: default;
  pointer-events: none;
  background: var(--overlay-green-soft);
  color: var(--green-d);
  border: 1px solid var(--overlay-green-strong);
  box-shadow: none;
  font-weight: 700;
}
.btn-static:hover { transform: none; }

/* ---- Button sizes ---- */
.btn-sm {
  min-height: 3.6rem;
  padding: 1rem 1.8rem;
  font-size: 1.3rem;
  border-radius: var(--radius-pill-full);
}
.btn-sm i { font-size: 1.3rem; }
.btn-lg {
  min-height: 5rem;
  padding: 1.5rem 3.2rem;
  font-size: 1.55rem;
}
.btn-block { width: 100%; }

/* ---- Icon button (circle, ghost-style) ---- */
.icon-btn {
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  border: 1.5px solid transparent;
  background: var(--bg-ghost);
  color: var(--text-base);
  font-size: 1.5rem;
  cursor: pointer;
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.icon-btn:hover:not(:disabled) {
  background: var(--overlay-green-soft);
  color: var(--green-d);
  transform: scale(1.05);
}
.icon-btn:active:not(:disabled) { transform: scale(0.95); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Play button (circle, green brand) ---- */
.btn-play {
  width: 5.2rem;
  height: 5.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--green);
  color: var(--ink);
  font-size: 1.9rem;
  box-shadow: var(--shadow-green);
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn-play:hover {
  background: var(--green-hover);
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(0, 200, 83, 0.4);
}
.btn-play:active { transform: scale(0.95); }


/* ============================================================================
   6. CARDS
   ============================================================================ */
.card {
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.card-hover:hover {
  background: var(--bg-surface);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card-sm { padding: var(--sp-4); }
.card-lg { padding: var(--sp-6); border-radius: var(--radius-xl); }
.card-flat {
  background: var(--bg-ghost);
  border-color: transparent;
  box-shadow: none;
}

/* Dark card — varian kontras seperti feat-large dark di index */
.card-dark {
  background: var(--ink);
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-xl);
}
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: var(--white); }
.card-dark .lead, .card-dark p, .card-dark .sub, .card-dark .hint { color: var(--text-faint); }

.card-heading {
  font-family: var(--font-title);
  font-size: var(--fs-heading-sm);
  font-weight: 700;
  margin: 0 0 var(--sp-2);
  letter-spacing: var(--ls-tight);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}


/* ============================================================================
   7. FORMS
   ============================================================================ */
.field { margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }

.field > label,
.field-label {
  display: block;
  margin-bottom: 0.7rem;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-base);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 4.6rem;
  padding: 1.2rem 1.6rem;
  font-family: var(--font-ui);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-base);
  background: var(--bg-ghost);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill-full);
  outline: none;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.input:hover,
.select:hover,
.textarea:hover {
  background: #e8e8ed;
}
.input:focus,
.select:focus,
.textarea:focus {
  background: var(--white);
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--overlay-green-soft);
}
.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.textarea {
  border-radius: var(--radius-lg);
  min-height: 11rem;
  resize: vertical;
  line-height: 1.6;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2300a846' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
  padding-right: 42px;
}
.select option {
  background: var(--white);
  color: var(--text-base);
}
.input[type='datetime-local'],
.input[type='date'] { color-scheme: light; }

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.form-row > .field {
  flex: 1 1 20rem;
  margin-bottom: 0;
}
.form-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}

.form-message {
  min-height: 2rem;
  margin-top: var(--sp-3);
  font-size: var(--fs-caption);
  font-weight: 600;
  text-align: center;
  color: var(--negative);
}
.form-message:empty { display: none; }

/* ---- Search ---- */
.search-form {
  display: flex;
  gap: var(--sp-2);
  align-items: stretch;
  width: 100%;
}
.search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.search-field > i {
  position: absolute;
  left: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.4rem;
}
.search-input { padding-left: 4.2rem; }
.search-input::-webkit-search-cancel-button { display: none; }

/* ---- OTP-style input ---- */
.input-otp {
  text-align: center;
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding-left: 1.8rem;
}


/* ============================================================================
   8. TABS & SEGMENTS
   ============================================================================ */
.tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 4.6rem;
  padding: 1.2rem 1.8rem;
  font-family: var(--font-ui);
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-pill-full);
  background: var(--bg-ghost);
  color: var(--text-secondary);
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.tab:hover { color: var(--text-base); }
.tab.active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.tab.active i { color: var(--white); }

/* ---- Chips row (scrollable) ---- */
.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding-bottom: 0.4rem;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row > * { flex: 0 0 auto; }


/* ============================================================================
   9. BADGES / PILLS / TAGS
   ============================================================================ */
.badge,
.pill,
.tag,
.mood {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill-full);
  font-size: var(--fs-badge);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.25;
}

.badge-green,
.pill-green {
  background: var(--overlay-green-soft);
  color: var(--green-d);
  border-color: var(--overlay-green-strong);
}
.badge-warning,
.pill-warning {
  background: var(--overlay-warning-soft);
  color: var(--warning);
  border-color: rgba(255, 159, 10, 0.2);
}
.badge-negative,
.pill-negative {
  background: var(--overlay-negative-soft);
  color: var(--negative);
  border-color: rgba(255, 69, 58, 0.2);
}
.badge-neutral,
.pill-neutral {
  background: var(--bg-ghost);
  color: var(--text-secondary);
  border-color: var(--hairline);
}

.badge-sm {
  padding: 0.3rem 0.9rem;
  font-size: 1.05rem;
}

/* ---- Tag (kategori) ---- */
.tag {
  background: var(--overlay-green-soft);
  color: var(--green-d);
  border-color: var(--overlay-green-strong);
}

/* ---- Mood ---- */
.mood {
  background: var(--overlay-warning-soft);
  color: var(--warning);
  border-color: rgba(255, 159, 10, 0.2);
}


/* ============================================================================
   10. NAV
   ============================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  width: min(var(--container-max), calc(100% - (var(--container-pad) * 2)));
  margin: 0 auto;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  color: var(--text-base);
}
.logo-mark {
  width: 3.6rem;
  height: 3.6rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--white);
  font-size: 1.6rem;
}
.logo-mark img,
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo-name {
  display: block;
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--ls-tighter);
  white-space: nowrap;
}
.logo-tag {
  display: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .logo-tag { display: block; }
}
@media (max-width: 420px) {
  .nav-actions .btn-label { display: none; }
}


/* ============================================================================
   11. FOOTER
   ============================================================================ */
.footer {
  padding: var(--sp-6) var(--sp-4);
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}
.footer .footer-logo {
  width: 2.2rem;
  height: 2.2rem;
  vertical-align: -0.5em;
  margin-right: 0.3em;
  object-fit: contain;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3) var(--sp-5);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 1.35rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.footer-links a:hover { color: var(--text-base); }


/* ============================================================================
   12. EMPTY STATE
   ============================================================================ */
.empty {
  text-align: center;
  padding: var(--sp-6) var(--sp-5);
}
.empty .mark,
.empty-mark {
  width: 5.6rem;
  height: 5.6rem;
  margin: 0 auto var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--overlay-green-soft);
  border: 1px solid var(--overlay-green-strong);
  color: var(--green-d);
  font-size: 2.2rem;
}
.empty h2 {
  margin: 0 0 var(--sp-2);
  font-family: var(--font-title);
  font-size: var(--fs-heading-sm);
  font-weight: 700;
}
.empty p {
  margin: 0 auto;
  max-width: 46rem;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}


/* ============================================================================
   12b. PROSE — halaman konten (privacy, terms, disclaimer, dll.)
   ============================================================================ */
.prose {
  max-width: 72rem;
  margin-inline: auto;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-secondary);
}
.prose h1 {
  margin-bottom: var(--sp-2);
  color: var(--text-base);
  font-size: clamp(2.8rem, 4vw, var(--fs-heading-lg));
  font-weight: 800;
}
.prose h2 {
  margin: var(--sp-6) 0 var(--sp-3);
  color: var(--text-base);
  font-size: var(--fs-heading-sm);
  letter-spacing: var(--ls-tight);
}
.prose h3 {
  margin: var(--sp-5) 0 var(--sp-2);
  color: var(--text-base);
  font-size: 1.7rem;
}
.prose p { margin: 0 0 var(--sp-4); }
.prose p:last-child { margin-bottom: 0; }

.prose ul {
  margin: 0 0 var(--sp-4);
  padding: 0;
  list-style: none;
}
.prose ul li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.8rem;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--radius-circle);
  background: var(--green);
}
.prose strong { color: var(--text-base); font-weight: 600; }
.prose a {
  color: var(--green-d);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.prose a:hover { border-bottom-color: var(--green-d); }

.prose .meta {
  margin-bottom: var(--sp-5);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: var(--ls-label-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Tombol di dalam .prose ----------
   Lindungi .btn dari styling `.prose a` (link hijau + border-bottom transparan).
   Spesifisitas diperkuat dengan selector ganda `.prose a.btn` / `.prose .btn`. */
.prose a.btn,
.prose button.btn,
.prose .btn {
  border-width: 1.5px;
  border-style: solid;
  border-color: transparent;
  border-bottom-width: 1.5px;
  border-bottom-style: solid;
  border-bottom-color: transparent;
  text-decoration: none;
  font-weight: 600;
}
.prose a.btn,
.prose button.btn,
.prose .btn { color: var(--text-base); }

/* Primary — teks ink gelap, tanpa garis bawah */
.prose a.btn-primary,
.prose button.btn-primary,
.prose .btn-primary {
  background: var(--green);
  color: var(--ink);
  border-color: transparent;
  border-bottom-color: transparent;
  font-weight: 700;
}
.prose a.btn-primary:hover,
.prose .btn-primary:hover {
  background: var(--green-hover);
  color: var(--ink);
  border-bottom-color: transparent;
}
.prose a.btn-primary i,
.prose .btn-primary i { color: var(--ink); }

/* Dark */
.prose a.btn-dark,
.prose .btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: transparent;
  border-bottom-color: transparent;
}
.prose a.btn-dark:hover,
.prose .btn-dark:hover {
  background: var(--ink-2);
  color: var(--white);
}

/* Outline / ghost — border simetris, teks ink */
.prose a.btn-outline,
.prose button.btn-outline,
.prose .btn-outline,
.prose a.btn-ghost,
.prose button.btn-ghost,
.prose .btn-ghost {
  background: transparent;
  color: var(--text-base);
  border-color: var(--ink-3);
  border-bottom-color: var(--ink-3);
  font-weight: 600;
}
.prose a.btn-outline:hover,
.prose .btn-outline:hover,
.prose a.btn-ghost:hover,
.prose .btn-ghost:hover {
  background: var(--bg-ghost);
  color: var(--text-base);
  border-color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Danger */
.prose a.btn-danger,
.prose .btn-danger {
  background: transparent;
  color: var(--negative);
  border-color: rgba(255, 69, 58, 0.4);
  border-bottom-color: rgba(255, 69, 58, 0.4);
}
.prose a.btn-danger:hover,
.prose .btn-danger:hover {
  background: var(--overlay-negative-soft);
  color: var(--negative);
  border-color: var(--negative);
  border-bottom-color: var(--negative);
}

/* ---------- Actions row ---------- */
.prose .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--hairline);
}
.prose .actions .btn {
  flex: 0 0 auto;
  margin: 0;
}

/* Head bar sederhana untuk halaman konten */
.page-head {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
}
.page-head .actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.page-head .btn { flex: 0 0 auto; }

@media (max-width: 480px) {
  .page-head .btn-label { display: none; }
  .prose .actions { gap: var(--sp-3); }
  .prose .actions .btn {
    flex: 1 1 auto;
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================================
   12c. STEPS GRID — untuk bagian "cara kerja" / "cara berlangganan"
   ============================================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}
.step-item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.step-num {
  width: 4.4rem;
  height: 4.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--green);
  border: none;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 200, 83, 0.3);
}
.step-title {
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--text-base);
  letter-spacing: var(--ls-tight);
}
.step-desc {
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 960px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .steps-grid { grid-template-columns: 1fr; }
}


/* ============================================================================
   12d. PLAN / PRICING CARDS
   ============================================================================ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-lg);
}

/* Featured = kartu gelap seperti di index */
.plan-card.featured {
  background: var(--ink);
  border-color: transparent;
  box-shadow: var(--shadow-xl);
}
.plan-card.featured:hover {
  border-color: transparent;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18);
}

/* Premium = gradient gelap + aksen gold */
.plan-card.premium {
  background: linear-gradient(165deg, #1c1c1e 0%, #0a0a0a 100%);
  border-color: rgba(255, 159, 10, 0.22);
  box-shadow: var(--shadow-xl);
}
.plan-card.premium:hover {
  border-color: rgba(255, 159, 10, 0.4);
  box-shadow: 0 32px 80px rgba(255, 159, 10, 0.18);
}

.plan-badge {
  position: absolute;
  top: -1.3rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-pill-full);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  color: var(--ink);
}
.plan-badge.featured {
  background: var(--green);
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.35);
}
.plan-badge.premium {
  background: linear-gradient(135deg, #ffd60a, #ff9f0a);
  box-shadow: 0 4px 12px rgba(255, 159, 10, 0.45);
}

.plan-head { margin-bottom: var(--sp-5); }
.plan-name {
  margin: 0 0 0.8rem;
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  color: var(--text-base);
}
.plan-desc {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.55;
  color: var(--text-secondary);
  min-height: 4.4rem;
}

.plan-price-box {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--hairline);
}
.plan-price {
  font-family: var(--font-title);
  font-size: 4.4rem;
  font-weight: 800;
  letter-spacing: var(--ls-tighter);
  line-height: 1;
  color: var(--text-base);
}
.plan-period {
  margin-left: 0.4rem;
  font-size: 1.35rem;
  color: var(--text-secondary);
}

.plan-limits {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: var(--sp-5);
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--bg-ghost);
  border: 1px solid transparent;
}
.plan-limit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.35rem;
}
.plan-limit-label { color: var(--text-secondary); }
.plan-limit-value {
  font-weight: 600;
  color: var(--green-d);
  padding: 0.25rem 0.9rem;
  background: var(--white);
  border-radius: var(--radius-pill-full);
  font-size: 1.25rem;
}

.plan-features {
  list-style: none;
  margin: 0 0 var(--sp-5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  font-size: 1.45rem;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--text-base);
  line-height: 1.5;
}
.plan-features li i {
  color: var(--green-d);
  margin-top: 0.35rem;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.plan-actions { margin-top: auto; }

/* Override untuk featured (gelap) */
.plan-card.featured .plan-name,
.plan-card.featured .plan-price { color: var(--white); }
.plan-card.featured .plan-desc,
.plan-card.featured .plan-period,
.plan-card.featured .plan-limit-label { color: var(--text-faint); }
.plan-card.featured .plan-price-box { border-bottom-color: rgba(255, 255, 255, 0.08); }
.plan-card.featured .plan-limits {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.plan-card.featured .plan-limit-value {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.plan-card.featured .plan-features li { color: rgba(255, 255, 255, 0.85); }
.plan-card.featured .plan-features li i { color: var(--green); }

/* Override untuk premium (gelap + gold) */
.plan-card.premium .plan-name,
.plan-card.premium .plan-price { color: var(--white); }
.plan-card.premium .plan-desc,
.plan-card.premium .plan-period,
.plan-card.premium .plan-limit-label { color: var(--text-faint); }
.plan-card.premium .plan-price-box { border-bottom-color: rgba(255, 255, 255, 0.08); }
.plan-card.premium .plan-limits {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.plan-card.premium .plan-limit-value {
  background: rgba(255, 255, 255, 0.08);
  color: var(--warning);
}
.plan-card.premium .plan-features li { color: rgba(255, 255, 255, 0.9); }
.plan-card.premium .plan-features li i { color: var(--warning); }

@media (max-width: 960px) {
  .plan-grid {
    grid-template-columns: 1fr;
    max-width: 48rem;
    margin-inline: auto;
  }
}


/* ============================================================================
   12e. EXTENDED FOOTER — multi-column footer
   ============================================================================ */
.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}

.footer-brand-col { min-width: 0; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--sp-4);
  color: var(--text-base);
}
.footer-desc {
  margin: 0 0 var(--sp-5);
  max-width: 34ch;
  font-size: 1.4rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}
.footer-socials a {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--bg-ghost);
  color: var(--text-secondary);
  font-size: 1.6rem;
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.footer-socials a:hover {
  transform: translateY(-3px);
  background: var(--green);
  color: var(--ink);
}

.footer-col h4 {
  margin: 0 0 1.7rem;
  font-family: var(--font-ui);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-base);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.footer-col a {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 1.4rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover {
  color: var(--text-base);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  font-size: 1.3rem;
  color: var(--text-muted);
}
.footer-bottom p { margin: 0; }
.footer-made i { color: var(--negative); margin: 0 0.2rem; }

@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6) var(--sp-5);
  }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-desc { max-width: 52ch; }
}
@media (max-width: 580px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}


/* ============================================================================
   12f. UTILITY — tambahan kecil untuk pricing page
   ============================================================================ */
.text-gold { color: var(--warning); }
.lead-sm { font-size: 1.55rem; }


/* ============================================================================
   12g. CONTACT LIST — baris kontak dengan ikon
   ============================================================================ */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
  padding: 0;
  list-style: none;
}
.contact-line {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--bg-ghost);
  border: 1px solid transparent;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.6;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.contact-line:hover {
  background: var(--white);
  border-color: var(--overlay-green-strong);
}
.contact-line > i {
  flex: 0 0 auto;
  width: 3.6rem;
  height: 3.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--overlay-green-soft);
  color: var(--green-d);
  font-size: 1.5rem;
}
.contact-line > span { flex: 1 1 auto; min-width: 0; }
.contact-line strong { color: var(--text-base); font-weight: 600; }
.contact-line a {
  color: var(--green-d);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.contact-line a:hover { border-bottom-color: var(--green-d); }


/* ============================================================================
   12h. AUTH PAGE — login layout
   ============================================================================ */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) 0;
}
.auth-wrap {
  width: min(46rem, 92%);
  margin-inline: auto;
}
.auth-card {
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-xl);
}
.auth-lead {
  margin-bottom: var(--sp-5);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-secondary);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--sp-6);
  color: var(--text-base);
}
.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: var(--sp-5) var(--sp-4) var(--sp-6);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-align: center;
}
.auth-foot i { color: var(--negative); }

.recaptcha-wrap {
  display: flex;
  justify-content: center;
  padding: var(--sp-2) 0;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: var(--sp-5);
  color: var(--text-secondary);
  font-size: var(--fs-caption);
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.back-home:hover { color: var(--text-base); }

@media (max-width: 560px) {
  .auth-main { padding: var(--sp-5) 0; }
  .auth-card { padding: var(--sp-5) var(--sp-4); }
  .auth-brand { margin-bottom: var(--sp-5); }
}


/* ============================================================================
   13. OVERLAYS — FAB, TOAST, DIALOG
   ============================================================================ */
/* ---- Floating Action Button ---- */
.fab,
.frap {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-fab);
  width: 5.6rem;
  height: 5.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: var(--green);
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 200, 83, 0.35), 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.fab:hover, .frap:hover {
  background: var(--green-hover);
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(0, 200, 83, 0.4), 0 6px 16px rgba(0, 0, 0, 0.12);
}
.fab:active, .frap:active { transform: scale(0.95); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: var(--z-toast);
  max-width: min(52rem, calc(100vw - 32px));
  padding: 1.3rem 2.2rem;
  border-radius: var(--radius-pill-full);
  background: var(--ink);
  border: none;
  color: var(--white);
  font-size: var(--fs-caption);
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.success {
  background: var(--green);
  color: var(--ink);
}
.toast.error {
  background: var(--negative);
  color: var(--white);
}

/* ---- Dialog ---- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-dialog);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.dialog {
  width: 100%;
  max-width: 44rem;
  padding: var(--sp-5);
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-xl);
}


/* ============================================================================
   14. CHART
   ============================================================================ */
.chart-card {
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-5);
}
.chart-legend {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}
.chart-legend .swatch {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: -1px;
}
.chart-legend .swatch.in { background: var(--green); }
.chart-legend .swatch.out { background: var(--negative); }

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-caption);
  padding: var(--sp-7) 0;
}


/* ============================================================================
   15. UTILITIES
   ============================================================================ */
.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: 0 0 auto; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }

/* Spacing */
.m-0 { margin: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Full-bleed background gradient (hero glow, seperti di index) */
.bg-glow::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  width: 80rem;
  height: 80rem;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse 60% 55% at 50% 0%,
    rgba(0, 200, 83, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}


/* ============================================================================
   16. RESPONSIVE
   ============================================================================ */
@media (max-width: 900px) {
  :root {
    --container-pad: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 6rem;
  }
  main { padding-top: var(--sp-4); }

  /* Tabs jadi bottom nav di mobile */
  .tabs-mobile-fixed {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-tabs-mobile);
    width: 100%;
    margin: 0;
    padding: 6px max(12px, env(safe-area-inset-left))
      calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--hairline);
  }
  .tabs-mobile-fixed .tab {
    min-height: 5.2rem;
    padding: 0.8rem 1rem;
    font-size: 1.15rem;
    letter-spacing: 0;
    border-radius: var(--radius-lg);
  }
  .tabs-mobile-fixed .tab:hover { transform: none; }

  .card { padding: var(--sp-4); }
  .form-row > .field { flex-basis: 100%; }
  .form-actions .btn { flex: 1 1 auto; }

  /* FAB & toast offset naik di atas bottom tabs */
  body.has-tabs-mobile .fab,
  body.has-tabs-mobile .frap {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  body.has-tabs-mobile .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 620px) {
  h1 { font-size: 2.4rem; }
  .section-title { font-size: 1.7rem; }
  .lead { font-size: 1.55rem; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .search-form { width: 100%; flex: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  .section-title { font-size: 1.6rem; }
}

@media (max-width: 380px) {
  .logo-name { font-size: 1.7rem; }
  .nav-actions { gap: 0.5rem; }
}


/* ============================================================================
   17. REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}