/* =====================================================================
   SuperFamily-Kids — Design System v2
   Bersih, hangat, fotogenik (siap direkam untuk video demo).

   Palet:
     latar  #F8FAFC / #FFFFFF (putih gading)
     biru   #2563EB (aksi & navigasi)
     mint   #10B981 (sehat / hadir / selesai)  → teks di atas mint: #047857
     emas   #F5B301 (prestasi: acara, lomba/ujian, paket) → teks: #B45309
   Font: Plus Jakarta Sans. Sudut: kartu 12–16px, pill 9999px.
   Sentuh: semua tombol utama ≥44px.

   Struktur file:
     1) Design System v2 (dasar) — semua komponen inti.
     2) Blok-blok tambahan (footer, FAB, paket, landing, dsb).
     3) TEMA “KELUARGA JUARA” di PALING BAWAH — menimpa token & komponen
        (biru/emas/hijau, kedalaman kartu, aksen kartu Acara, hierarki
        tombol). Hapus blok itu saja untuk kembali ke tampilan sebelumnya.
   ===================================================================== */

:root {
  /* permukaan */
  --bg: #F8FAFC;
  --bg-warm: #FFFDF9;
  --card: #FFFFFF;
  --line: #E6EAF1;
  --line-soft: #EFF3F8;

  /* teks (semua ≥4,5:1 di atas --bg / #fff) */
  --ink: #0F172A;
  --ink-soft: #334155;
  --ink-mute: #55637A;

  /* aksen */
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-soft: #EFF5FF;
  --blue-line: #CFE0FF;

  --mint: #10B981;
  --mint-dark: #047857;
  --mint-soft: #ECFDF5;
  --mint-line: #B7EBD5;

  --amber: #F59E0B;
  --amber-dark: #92400E;
  --amber-soft: #FFFBEB;
  --amber-line: #FDE68A;

  --rose-dark: #B42318;
  --rose-soft: #FEF3F2;
  --rose-line: #FBD5D1;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 14px 38px rgba(15, 23, 42, 0.12);
  --tap: 46px;
  --bottom: 64px;
  --sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.015em; color: var(--ink); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.ico { flex: none; }
.num, .tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* ------------------------------------------------------------- app shell */

.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 30;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 4px; }
.brand:hover { text-decoration: none; }
/* Lambang merek = emblém bulat (SVG), bukan kotak gradien: tanpa klip kotak. */
.brand-mark {
  display: inline-flex; flex: none; border-radius: 50%;
  filter: drop-shadow(0 3px 7px rgba(18, 58, 114, 0.24));
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 16.5px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--blue); }
.brand-sub { font-size: 10.6px; color: var(--ink-mute); line-height: 1.35; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  font-size: 10.4px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); padding: 8px 10px 3px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--tap);
  padding: 9px 11px; border-radius: 12px;
  color: var(--ink-soft); font-weight: 700; font-size: 13.8px;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.nav-item.active { background: var(--blue-soft); color: var(--blue-dark); }
.nav-item.active .ico { stroke-width: 2.1; }
.nav-short { display: none; }

.sidebar-foot { margin-top: auto; }

/* kartu akun di sidebar */
.user-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 11px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line);
}
.user-top { display: flex; gap: 9px; align-items: center; min-width: 0; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta b { font-size: 12.7px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 10.8px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-foot { display: flex; gap: 6px; align-items: center; }
.user-plan {
  display: inline-flex; align-items: center; gap: 4px; flex: 1;
  font-size: 10.8px; font-weight: 800; border-radius: 999px; padding: 5px 9px;
  background: var(--line-soft); color: var(--ink-soft); white-space: nowrap;
}
.user-plan:hover { text-decoration: none; }
.user-plan.p-green { background: var(--mint-soft); color: var(--mint-dark); }
.user-plan.p-amber { background: var(--amber-soft); color: var(--amber-dark); }
.user-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
}
.user-btn:hover { color: var(--blue-dark); border-color: var(--blue-line); background: var(--blue-soft); text-decoration: none; }

/* ---------------------------------------------------------------- main */

.main {
  flex: 1; min-width: 0;
  margin-left: 244px;
  padding: 20px 24px 44px;
  max-width: 1180px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.page-title { font-size: clamp(21px, 2.4vw, 26px); line-height: 1.18; }
.page-emoji { display: none; }
.page-sub { margin-top: 3px; color: var(--ink-mute); font-size: 12.8px; }
.nav-toggle {
  display: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  color: var(--ink-soft); cursor: pointer;
}
.top-actions { display: none; gap: 6px; }
.top-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
}
.top-icon:hover { color: var(--blue-dark); border-color: var(--blue-line); background: var(--blue-soft); text-decoration: none; }
.date-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 12.2px; font-weight: 700; color: var(--ink-soft);
  white-space: nowrap;
}
.page-foot {
  margin-top: 24px; text-align: center; font-size: 11.6px; color: var(--ink-mute);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}

/* ------------------------------------------------------------- struktur */

.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid { display: grid; gap: 14px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.grid > *, .grid-side > *, .stats > * { min-width: 0; }
.section-gap { margin-top: 16px; }
.section-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.section-title b { font-size: 14.5px; }
.section-title span { font-size: 11.6px; color: var(--ink-mute); }
.t-center { text-align: center; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-mute); }
.tiny { font-size: 11.6px; }
.cell-strong { font-weight: 800; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* -------------------------------------------------------------- tombol */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--tap);
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.26); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-sage { background: var(--mint-dark); color: #fff; box-shadow: 0 6px 16px rgba(4, 120, 87, 0.22); }
.btn-sage:hover { background: #036b4c; }
.btn-soft { background: var(--blue-soft); color: var(--blue-dark); border-color: var(--blue-line); }
.btn-soft:hover { background: #E3EDFF; }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-line); color: var(--blue-dark); }
.btn-danger { background: var(--rose-soft); color: var(--rose-dark); border-color: var(--rose-line); }
.btn-danger:hover { background: #FDE7E4; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.btn-xs { min-height: 34px; padding: 6px 11px; font-size: 12.2px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-lg { min-height: 52px; font-size: 15px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { color: var(--blue-dark); border-color: var(--blue-line); background: var(--blue-soft); text-decoration: none; }
.icon-btn.danger:hover { color: var(--rose-dark); border-color: var(--rose-line); background: var(--rose-soft); }
.icon-btn.plain:hover { color: var(--blue-dark); border-color: var(--blue-line); background: var(--blue-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-dark); font: inherit; font-weight: 800; cursor: pointer; }
.link-danger { color: var(--rose-dark); }
.inline-form { display: inline-block; margin: 0; }

/* ---------------------------------------------------------------- kartu */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 15px 16px 0;
}
.card-title { font-size: 15.6px; font-weight: 800; line-height: 1.25; }
.card-sub { margin-top: 3px; font-size: 12.2px; color: var(--ink-mute); }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card-body { padding: 13px 16px 16px; }
.card-foot {
  border-top: 1px solid var(--line-soft); padding: 11px 16px;
  font-size: 12px; color: var(--ink-mute); background: #FCFDFF;
}
.card.highlight { border-color: var(--blue-line); box-shadow: 0 10px 26px rgba(37, 99, 235, 0.09); }

/* ------------------------------------------------------- pemilih anak */

.childswitch { display: flex; flex-direction: column; gap: 11px; }
.childswitch-top { display: flex; align-items: center; gap: 12px; }
.childswitch-id { flex: 1; min-width: 0; }
.childswitch-name { font-size: 18.5px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.childswitch-meta { font-size: 12.6px; color: var(--ink-mute); margin-top: 2px; }
.childswitch-meta b { color: var(--ink-soft); font-weight: 800; }
.childswitch-btn {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  min-height: 40px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 12.6px; font-weight: 800; color: var(--ink-soft); cursor: pointer;
}
.childswitch-btn:hover { border-color: var(--blue-line); color: var(--blue-dark); background: var(--blue-soft); text-decoration: none; }

.childbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.childbar::-webkit-scrollbar { display: none; }
.childchip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 38px; padding: 3px 12px 3px 3px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line);
  font-size: 12.8px; font-weight: 800; color: var(--ink-soft);
}
.childchip:hover { text-decoration: none; border-color: var(--blue-line); }
.childchip.is-on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.childchip-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; overflow: hidden; background: var(--blue-soft);
  color: var(--blue-dark); font-weight: 800; letter-spacing: 0.01em;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -------------------------------------------------- metrik (angka besar) */

.metrics { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.metric:hover { text-decoration: none; }
.metric-top { display: flex; align-items: center; gap: 8px; }
.metric-ico {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue-dark);
}
.metric-ico.m-mint { background: var(--mint-soft); color: var(--mint-dark); }
.metric-ico.m-amber { background: var(--amber-soft); color: var(--amber-dark); }
.metric-label { font-size: 11.8px; font-weight: 800; color: var(--ink-mute); letter-spacing: 0.01em; }
.metric-value {
  font-size: 27px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.metric-value small { font-size: 14px; font-weight: 800; color: var(--ink-mute); letter-spacing: 0; }
.metric-sub { font-size: 11.8px; color: var(--ink-mute); line-height: 1.4; }
.metric-unit { font-size: 12.5px; font-weight: 700; color: var(--ink-mute); margin-left: 2px; }

/* kartu statistik lama (masih dipakai di beberapa halaman) */
.stat {
  display: flex; gap: 11px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px; box-shadow: var(--shadow-sm); color: inherit;
}
.stat.is-link:hover { text-decoration: none; border-color: var(--blue-line); }
.stat-ico {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--blue-soft); color: var(--blue-dark);
}
.stat-ico.st-sage { background: var(--mint-soft); color: var(--mint-dark); }
.stat-ico.st-sun { background: var(--amber-soft); color: var(--amber-dark); }
.stat-ico.st-rose { background: var(--rose-soft); color: var(--rose-dark); }
.stat-ico.st-lav { background: #F4F0FF; color: #4C1D95; }
.stat-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-label { font-size: 11.7px; font-weight: 800; color: var(--ink-mute); }
.stat-value { font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11.4px; color: var(--ink-mute); line-height: 1.4; }

/* ------------------------------------------------------------ progress */

.progress { height: 8px; width: 100%; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width .3s ease; }
.progress.pr-sage > span { background: var(--mint); }
.progress.pr-amber > span { background: var(--amber); }
.progress.pr-rose > span { background: #F04438; }
.progress.thick { height: 10px; }

.donut { position: relative; flex: none; border-radius: 50%; background: conic-gradient(var(--donut-c) var(--donut-deg), var(--line-soft) 0); display: grid; place-items: center; }
.donut-hole { width: 74%; height: 74%; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.donut-val { font-size: 13.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- pil & tab */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.3px; font-weight: 800; line-height: 1.4;
  background: var(--line-soft); color: var(--ink-soft); white-space: nowrap;
}
.p-green { background: var(--mint-soft); color: var(--mint-dark); }
.p-sky, .p-blue { background: var(--blue-soft); color: var(--blue-dark); }
.p-amber { background: var(--amber-soft); color: var(--amber-dark); }
.p-rose { background: var(--rose-soft); color: var(--rose-dark); }
.p-lav { background: #F4F0FF; color: #4C1D95; }
.p-gray { background: var(--line-soft); color: var(--ink-soft); }

.tabbar {
  display: flex; gap: 6px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 8px 12px; border-radius: 999px;
  font-size: 13.2px; font-weight: 800; color: var(--ink-soft); text-align: center;
}
.tab:hover { text-decoration: none; color: var(--blue-dark); }
.tab.is-current { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.24); }
.tab.is-current .ico { color: #fff; }

/* ---------------------------------------------------------------- form */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field-label { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.field-hint { font-size: 11.4px; color: var(--ink-mute); line-height: 1.45; }
.input {
  width: 100%; min-width: 0; min-height: 44px;
  padding: 10px 13px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
  font-family: inherit; font-size: 14px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
textarea.input { resize: vertical; line-height: 1.5; }
select.input {
  appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-mute) 50%), linear-gradient(135deg, var(--ink-mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.6px; font-weight: 700; color: var(--ink-soft); }
.check input { width: 17px; height: 17px; accent-color: var(--blue); }

details.disclosure { border-radius: var(--radius); }
details.disclosure > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  min-height: var(--tap); padding: 10px 15px;
  background: #fff; border: 1.5px dashed var(--blue-line); border-radius: 999px;
  font-size: 13.4px; font-weight: 800; color: var(--blue-dark);
  box-shadow: var(--shadow-sm);
}
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before {
  content: '+'; display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft);
  font-size: 15px; line-height: 1; font-weight: 800; color: var(--blue-dark);
}
details.disclosure[open] > summary::before { content: '−'; }
details.disclosure[open] > summary { border-style: solid; margin-bottom: 10px; }
details.disclosure > .card { margin-top: 0; }

/* pilihan cepat berbentuk pil */
.pillgroup { display: flex; flex-wrap: wrap; gap: 7px; }
.pillopt {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff;
  font-size: 12.8px; font-weight: 800; color: var(--ink-soft);
  cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pillopt:hover { border-color: var(--blue-line); background: #FBFDFF; }
.pillopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pillopt:has(input:focus-visible) { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.pillopt:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.po-rose:has(input:checked) { background: var(--rose-soft); border-color: #F2A9A0; color: var(--rose-dark); }
.po-sage:has(input:checked), .po-sage.is-on { background: var(--mint-soft); border-color: var(--mint); color: var(--mint-dark); }
.po-amber:has(input:checked) { background: var(--amber-soft); border-color: var(--amber); color: var(--amber-dark); }
.po-lav:has(input:checked) { background: #F4F0FF; border-color: #C4B5FD; color: #4C1D95; }
.po-sky:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.pill-add .pillopt { min-height: 38px; font-size: 12.4px; }

/* ------------------------------------------------------ agenda hari ini */

.agenda-list { display: flex; flex-direction: column; gap: 8px; }
.agenda-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--line);
}
.agenda-row.is-done { background: #FBFEFC; border-color: var(--mint-line); }
.agenda-act { display: flex; gap: 6px; align-items: center; flex: none; }
.agenda-act form { margin: 0; }
.agenda-ico {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--blue-soft); color: var(--blue-dark);
}
.agenda-ico.a-sage { background: var(--mint-soft); color: var(--mint-dark); }
.agenda-ico.a-sun { background: var(--amber-soft); color: var(--amber-dark); }
.agenda-main { flex: 1; min-width: 0; }
.agenda-title { font-size: 13.8px; font-weight: 800; line-height: 1.35; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.agenda-meta {
  font-size: 12px; color: var(--ink-mute); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agenda-form { margin-top: 8px; }
.quick-form { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.quick-note { flex: 1 1 130px; min-width: 0; min-height: 40px; font-size: 12.8px; }
.quick-form .btn { flex: none; }
.check-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff;
  font-family: inherit; font-size: 13px; font-weight: 800; color: var(--ink-soft);
}
.check-btn:hover { border-color: var(--mint); color: var(--mint-dark); }
.check-btn.is-on { background: var(--mint-dark); border-color: var(--mint-dark); color: #fff; box-shadow: 0 4px 12px rgba(4, 120, 87, 0.26); }
.check-btn-sm { min-height: 38px; padding: 7px 12px; font-size: 12.4px; }
.done-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.8px; font-weight: 800; color: var(--mint-dark);
  background: var(--mint-soft); border-radius: 999px; padding: 4px 11px;
}
.vit-check {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff;
  font-family: inherit; font-size: 13px; font-weight: 800; color: var(--ink-soft);
}
.vit-check:hover { border-color: var(--mint); color: var(--mint-dark); }
.vit-check-form { margin: 0; }
.vit-check.is-on { background: var(--mint-dark); border-color: var(--mint-dark); color: #fff; box-shadow: 0 4px 12px rgba(4, 120, 87, 0.26); }

/* kartu vitamin */
.vit-card {
  display: flex; gap: 11px; align-items: flex-start; flex-wrap: wrap;
  padding: 12px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line);
}
.vit-card.is-taken { background: #FCFEFD; border-color: var(--mint-line); }
.vit-main { flex: 1; min-width: 140px; }
.vit-name { font-size: 13.8px; font-weight: 800; }
.vit-meta { font-size: 11.9px; color: var(--ink-mute); margin-top: 2px; }
.time-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 9px;
  background: var(--amber-soft); color: var(--amber-dark);
}
.time-tag.t-siang { background: var(--blue-soft); color: var(--blue-dark); }
.time-tag.t-malam { background: #F4F0FF; color: #4C1D95; }

.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk-day { text-align: center; font-size: 10.2px; font-weight: 800; color: var(--ink-mute); }
.wk-cell { display: grid; place-items: center; height: 26px; border-radius: 8px; background: var(--line-soft); font-size: 12px; font-weight: 800; color: var(--ink-mute); }
.wk-cell.is-on { background: var(--mint-soft); color: var(--mint-dark); }

.today-done-all {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--mint-soft); border: 1px solid var(--mint-line); color: var(--mint-dark);
  font-size: 13px; font-weight: 800;
}
.today-done-all .btn { margin-left: auto; }

/* --------------------------------------------------------------- les */

.les-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); gap: 12px; }
.les-card {
  display: flex; flex-direction: column; gap: 11px;
  padding: 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.les-card.is-warn { border-color: var(--amber-line); }
.les-head { display: flex; gap: 11px; align-items: flex-start; }
.les-title { font-size: 16px; font-weight: 800; line-height: 1.25; }
.les-meta { display: flex; flex-direction: column; gap: 1px; font-size: 12.1px; color: var(--ink-mute); margin-top: 3px; }
.les-meta b { color: var(--ink-soft); font-weight: 800; }
.quota-row { display: flex; align-items: center; gap: 10px; }
.quota-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.quota-text { display: flex; justify-content: space-between; gap: 8px; font-size: 12.2px; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.les-quota-num { font-size: 15px; font-weight: 800; color: var(--ink); }
.qbadge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  padding: 4px 10px; font-size: 11.2px; font-weight: 800;
  background: var(--mint-soft); color: var(--mint-dark);
}
.qbadge.q-done { background: var(--amber-soft); color: var(--amber-dark); }
.qbadge.q-none { background: var(--line-soft); color: var(--ink-soft); }
.les-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.les-cta { display: flex; gap: 7px; align-items: center; }
.les-cta .btn { flex: 1; }

/* ------------------------------------------------------------- sakit */

.ill-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.ill-card.is-ongoing { border-color: var(--amber-line); background: #FFFDF6; }
.ill-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.ill-main { flex: 1; min-width: 170px; }
.ill-title { font-size: 16px; font-weight: 800; line-height: 1.25; }
.ill-dates { font-size: 12.2px; color: var(--ink-mute); margin-top: 3px; }
.ill-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sym-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sym-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--rose-soft); color: var(--rose-dark);
  border-radius: 999px; padding: 4px 10px; font-size: 11.4px; font-weight: 800;
}
.med-table { display: flex; flex-direction: column; gap: 7px; }
.med-item { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px; background: #FCFDFF; }
.med-line { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.med-name { font-size: 13.4px; font-weight: 800; }
.med-dose { font-size: 12.2px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.med-note {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.8px; font-weight: 800; border-radius: 999px; padding: 4px 10px;
  background: var(--line-soft); color: var(--ink-soft);
}
.med-note.ok { background: var(--mint-soft); color: var(--mint-dark); }
.med-note.bad { background: var(--rose-soft); color: var(--rose-dark); }
.med-note.warn { background: var(--amber-soft); color: var(--amber-dark); }
.ill-note { font-size: 12.4px; color: var(--ink-soft); background: var(--bg); border-radius: var(--radius-sm); padding: 9px 11px; display: flex; gap: 7px; align-items: flex-start; }

/* baris obat di form */
.med-row { display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr; gap: 8px; align-items: end; padding: 11px; border: 1px dashed var(--line); border-radius: var(--radius-sm); margin-bottom: 9px; background: #fff; }
.med-row .field { gap: 3px; }
.med-row .med-note-field { grid-column: 1 / -1; }
.med-row .med-del { justify-self: end; }

/* ---------------------------------------------------------- tumbuh kembang */

.measure-big { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.measure-big b { font-size: 27px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.measure-big span { font-size: 12px; color: var(--ink-mute); font-weight: 700; }
.growth-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.delta-badge {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  border-radius: 999px; padding: 5px 11px; font-size: 11.8px; font-weight: 800;
  background: var(--mint-soft); color: var(--mint-dark); font-variant-numeric: tabular-nums;
}
.delta-badge.d-flat { background: var(--line-soft); color: var(--ink-soft); }
.delta-badge.d-down { background: var(--rose-soft); color: var(--rose-dark); }

.linechart { width: 100%; }
.linechart svg { width: 100%; height: auto; display: block; overflow: visible; }
.lc-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 5; }
.lc-tick, .lc-x { fill: var(--ink-mute); font-size: 10px; font-family: var(--sans); font-weight: 700; }
.lc-line { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.lc-area { fill: rgba(37, 99, 235, 0.12); }
.lc-dot { fill: #fff; stroke: var(--blue); stroke-width: 2.4; }
.lc-last { fill: var(--blue-dark); font-size: 11px; font-weight: 800; font-family: var(--sans); }
.lc-sage .lc-line { stroke: var(--mint-dark); }
.lc-sage .lc-area { fill: rgba(16, 185, 129, 0.14); }
.lc-sage .lc-dot { stroke: var(--mint-dark); }
.lc-sage .lc-last { fill: var(--mint-dark); }
.lc-sun .lc-line { stroke: #B45309; }
.lc-sun .lc-area { fill: rgba(245, 158, 11, 0.16); }
.lc-sun .lc-dot { stroke: #B45309; }
.lc-sun .lc-last { fill: var(--amber-dark); }
.lc-hint { display: block; margin-top: 6px; font-size: 11.4px; color: var(--ink-mute); }

/* ------------------------------------------------------------- tabel */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 11.2px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-mute); padding: 9px 10px; background: #F8FAFC;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .t-center { text-align: center; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }

/* ------------------------------------------------------- info & status */

.kv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.kv { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kv-label { font-size: 10.9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-mute); }
.kv-value { font-size: 13.6px; font-weight: 700; }
.kv-value.big { font-size: 17.5px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.addr { white-space: pre-line; }
.fact-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.6px; color: var(--ink-soft); }
.fact-row + .fact-row { margin-top: 7px; }
.fact-row .ico { color: var(--mint-dark); margin-top: 2px; }

.notice {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 12.8px; line-height: 1.45;
}
.notice b { display: block; font-size: 13.2px; }
.notice .btn { margin-left: auto; }
.notice-amber { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber-dark); }
.notice-amber .btn { background: #fff; border-color: var(--amber-line); color: var(--amber-dark); }

.flash {
  display: flex; gap: 9px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
  font-size: 13px; font-weight: 700; line-height: 1.45;
}
.flash-ok { background: var(--mint-soft); color: var(--mint-dark); border: 1px solid var(--mint-line); }
.flash-err { background: var(--rose-soft); color: var(--rose-dark); border: 1px solid var(--rose-line); }

.empty { text-align: center; padding: 22px 12px; color: var(--ink-mute); }
.empty p { margin-top: 8px; font-size: 13px; line-height: 1.55; }
.empty-ico {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft); color: var(--blue-dark);
}

/* ------------------------------------------------------------ hero anak */

.hero-child { display: flex; gap: 13px; align-items: center; flex-wrap: wrap; }
.hero-name { font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.hero-meta { font-size: 12.6px; color: var(--ink-mute); margin-top: 2px; }
.hero-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.child-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm); }

/* -------------------------------------------------------------- akun */

.plan-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.plan-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 6px 12px; font-size: 12.2px; font-weight: 800;
  background: var(--line-soft); color: var(--ink-soft);
}
.plan-pill.p-green { background: var(--mint-soft); color: var(--mint-dark); }
.plan-pill.p-amber { background: var(--amber-soft); color: var(--amber-dark); }

/* --------------------------------------------------------- onboarding */

.onboard .card-body { padding: 18px; }
.onboard-hero { display: flex; gap: 13px; align-items: flex-start; }
.onboard-emoji { font-size: 26px; line-height: 1; flex: none; width: 54px; height: 54px; display: grid; place-items: center; background: var(--blue-soft); border-radius: 16px; }
.onboard-title { font-size: 20px; line-height: 1.2; }
.onboard-sub { margin-top: 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; max-width: 62ch; }
.onboard-steps { display: flex; flex-direction: column; gap: 9px; margin: 16px 0 14px; }
.onboard-step {
  display: flex; gap: 11px; align-items: center; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; background: #FCFDFF;
}
.onboard-step.is-locked { opacity: 0.8; }
.onboard-num {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-dark); font-weight: 800; font-size: 12.5px;
}
.onboard-step-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.onboard-step-main b { font-size: 13.6px; }
.onboard-step-main span { font-size: 12px; color: var(--ink-mute); line-height: 1.45; }
.onboard-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink-mute); }
.onboard-quick { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* -------------------------------------------------------------- foto */

.photo-field { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.photo-input { display: none; }
.photo-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px dashed var(--blue-line); background: var(--blue-soft);
  font-family: inherit; font-size: 12.8px; font-weight: 800; color: var(--blue-dark);
}
.photo-btn:hover { background: #E3EDFF; }
.photo-thumb { display: none; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.photo-thumb.is-on { display: block; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  display: none; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-size: 16px; line-height: 1; cursor: pointer;
}
.photo-del.is-on { display: inline-flex; }
.photo-del:hover { background: var(--rose-soft); color: var(--rose-dark); border-color: var(--rose-line); }
.photo-msg { font-size: 11.6px; color: var(--ink-mute); flex: 1 1 100%; line-height: 1.4; }

/* ---------------------------------------------------------------- fab */

.fab { position: fixed; right: 18px; bottom: 22px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab-btn {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.36);
  transition: transform .18s ease, background .18s ease;
}
.fab-btn:hover { background: var(--blue-dark); transform: translateY(-2px); }
.fab-menu {
  display: flex; flex-direction: column; gap: 4px; padding: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 216px;
}
.fab-menu[hidden] { display: none; }
.fab-title { font-size: 10.6px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); padding: 3px 9px 4px; }
.fab-item { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 9px; border-radius: 11px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.fab-item:hover { background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.fab-ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--blue-soft); color: var(--blue-dark); }

/* --------------------------------------------------------------- berbagi */

.share-box {
  width: 100%; min-height: 320px; resize: vertical;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12.2px; line-height: 1.65; color: var(--ink);
  background: #FCFDFF; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px;
}
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share-note { font-size: 11.8px; color: var(--ink-mute); margin-top: 10px; line-height: 1.5; }

/* ---------------------------------------------------------------- login */

.auth-body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(720px 480px at 88% -10%, rgba(37, 99, 235, 0.1), transparent 62%),
    radial-gradient(620px 440px at -6% 10%, rgba(16, 185, 129, 0.1), transparent 60%);
}
.auth-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 28px;
  min-height: 100vh; max-width: 1000px; margin: 0 auto; padding: 28px 22px;
}
.auth-aside {
  background: linear-gradient(160deg, #1D4ED8 0%, #2563EB 52%, #0E7490 130%);
  color: #fff; border-radius: 24px; padding: 32px;
  display: flex; flex-direction: column; gap: 16px; min-height: 420px;
  box-shadow: 0 18px 40px rgba(29, 78, 216, 0.24);
}
.auth-brand { display: flex; gap: 11px; align-items: center; }
.auth-brand-name { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.auth-brand-name em { font-style: normal; color: #A7F3D0; }
.auth-brand-sub { display: block; font-size: 11.4px; color: rgba(255, 255, 255, 0.86); margin-top: 2px; }
.auth-head { font-size: 24px; line-height: 1.24; margin-top: 4px; color: #fff; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.auth-points li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.96); }
.auth-points li .ico { color: #A7F3D0; margin-top: 2px; }
.auth-aside-foot { margin: auto 0 0; font-size: 11.8px; color: rgba(255, 255, 255, 0.82); }

.auth-main { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 24px; box-shadow: var(--shadow);
}
.auth-title { font-size: 21px; line-height: 1.2; }
.auth-sub { margin: 5px 0 16px; font-size: 12.9px; color: var(--ink-mute); line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field > span { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.auth-input {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 0 13px; min-height: 48px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); }
.auth-input .ico { color: var(--ink-mute); flex: none; }
.auth-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); height: 46px; }
.auth-form .btn { margin-top: 4px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--ink-mute); font-size: 11.6px; font-weight: 700; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-alert {
  display: flex; gap: 8px; align-items: flex-start;
  border-radius: 12px; padding: 11px 12px; margin-bottom: 14px;
  font-size: 12.8px; font-weight: 700; line-height: 1.45;
  background: var(--rose-soft); color: var(--rose-dark); border: 1px solid var(--rose-line);
}
.auth-alert.a-ok { background: var(--mint-soft); color: var(--mint-dark); border-color: var(--mint-line); }
.auth-demo {
  margin-top: 14px; padding: 11px 12px; border-radius: var(--radius-sm);
  background: var(--blue-soft); border: 1px dashed var(--blue-line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.auth-demo-text { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.auth-demo b { display: flex; align-items: center; gap: 5px; font-size: 11.9px; color: var(--blue-dark); }
.auth-demo span { font-size: 11.6px; color: var(--ink-soft); line-height: 1.4; word-break: break-word; }
.auth-demo form { margin: 0; flex: none; }
.auth-demo .btn { white-space: nowrap; min-height: 40px; padding: 8px 14px; }
.auth-note { font-size: 12px; color: var(--ink-mute); line-height: 1.5; margin: 12px 0; }
.auth-foot { width: 100%; max-width: 420px; font-size: 11.8px; color: var(--ink-mute); text-align: center; line-height: 1.5; }
.auth-copy { font-size: 11.2px; color: var(--ink-mute); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }

/* ---------------------------------------------------------------- cetak */

.print-body { background: #F1F5F9; }
.print-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; max-width: 800px; margin: 16px auto 0; padding: 0 16px; }
.print-sheet { max-width: 800px; margin: 12px auto 36px; padding: 28px 32px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.print-head { display: flex; gap: 12px; align-items: center; border-bottom: 2px solid var(--line); padding-bottom: 13px; margin-bottom: 15px; }
.print-head h1 { font-size: 21px; line-height: 1.2; }
.print-head p { margin-top: 2px; font-size: 12.4px; color: var(--ink-mute); }
.print-sheet h2 { font-size: 14.5px; margin: 18px 0 6px; }
.print-sheet p, .print-sheet li { font-size: 12.6px; line-height: 1.6; }
.print-sheet ul { margin: 4px 0 0; padding-left: 18px; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.print-sheet th, .print-sheet td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.print-sheet th { background: #F8FAFC; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.print-foot { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 11px; color: var(--ink-mute); text-align: center; }

/* ------------------------------------------------- login/daftar (responsif) */

/* Di HP: satu kolom, panel kiri disembunyikan, kartu memakai lebar penuh.
   (Blok ini sempat hilang saat CSS ditulis ulang → kartu login hanya 159px.) */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    align-items: start; gap: 14px;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
    min-height: 100vh;
  }
  .auth-aside { display: none; }
  .auth-main { padding: 0; gap: 10px; width: 100%; }
  .auth-mobile-brand { display: flex; color: var(--ink); }
  .auth-mobile-brand em { font-style: normal; color: var(--blue); }
  .auth-card { padding: 20px 18px 18px; border-radius: 18px; }
  .auth-foot { max-width: none; }
  .auth-copy { display: none; }
}

@media (max-width: 560px) {
  .auth-shell { padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); gap: 10px; }
  .auth-mobile-brand { font-size: 16px; gap: 8px; }
  .auth-card { padding: 18px 16px 16px; border-radius: 16px; }
  .auth-title { font-size: 19px; }
  .auth-sub { margin: 4px 0 14px; font-size: 12.4px; }
  .auth-form { gap: 11px; }
  .auth-input { min-height: 46px; padding: 0 12px; }
  .auth-input input { height: 44px; }
  .auth-divider { margin: 13px 0 10px; }
  .auth-demo { margin-top: 12px; padding: 10px 11px; gap: 8px; }
  .auth-demo .btn { width: 100%; }
  .auth-note { margin: 10px 0; font-size: 11.7px; }
}

/* ------------------------------------------------------------ responsif */

@media (max-width: 1120px) {
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .app { display: block; }
  .sidebar {
    position: fixed; inset: auto 0 0 0; width: auto; height: auto;
    flex-direction: row; align-items: stretch; gap: 0;
    padding: 0 6px env(safe-area-inset-bottom);
    border-right: 0; border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.07);
    overflow: visible;
    z-index: 50;
  }
  .sidebar .brand, .sidebar .sidebar-foot, .sidebar .nav-label { display: none; }
  .sidebar .nav { display: contents; }
  .sidebar .nav-group { display: contents; }
  .sidebar .nav-group.nav-extra { display: none; }
  .sidebar .nav-item {
    flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; min-height: 58px; height: var(--bottom);
    padding: 8px 2px 9px; border-radius: 0;
    font-size: 10.4px; font-weight: 800; color: var(--ink-mute);
  }
  .sidebar .nav-item .ico { width: 21px; height: 21px; }
  .sidebar .nav-full { display: none; }
  .sidebar .nav-short {
    display: block; flex: none; font-size: 10.4px; line-height: 1.45;
    padding-bottom: 1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .sidebar .nav-item.active { background: transparent; color: var(--blue-dark); }
  .sidebar .nav-item.active::after {
    content: ''; position: absolute; top: 8px; width: 26px; height: 3px; border-radius: 3px; background: var(--blue);
    transform: translateY(-6px);
  }
  .sidebar .nav-item { position: relative; }
  .sidebar .nav-item.active .ico { stroke-width: 2.2; }

  .main {
    margin-left: 0;
    padding: 14px 14px calc(var(--bottom) + 30px + env(safe-area-inset-bottom));
  }
  .nav-toggle { display: none; }
  .top-actions { display: flex; }
  .fab { bottom: calc(var(--bottom) + 16px + env(safe-area-inset-bottom)); right: 14px; }
  .fab-btn { width: 52px; height: 52px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.span-2 { grid-column: span 2; }
  .card-head { padding: 13px 14px 0; }
  .card-body { padding: 12px 14px 14px; }
  .hero-actions { margin-left: 0; }
  .quick-note { flex: 1 1 100%; }
  .quick-form .btn { flex: 1 1 0; }
  .med-row { grid-template-columns: 1fr 1fr; }
  .med-row .field:first-child, .med-row .med-note-field { grid-column: 1 / -1; }
  .measure-big b { font-size: 24px; }
  .print-sheet { margin: 10px; padding: 20px 18px; }
}

@media (max-width: 560px) {
  body { font-size: 14.6px; }
  .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: minmax(0, 1fr); }
  .field.span-2 { grid-column: span 1; }
  .kv-list { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 12px; gap: 6px; }
  .metric-value { font-size: 23px; }
  .metric-value small { font-size: 12px; }
  .metric-label { font-size: 11.2px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
  .childswitch-name { font-size: 17.5px; }
  .page-title { font-size: 20.5px; }
  .page-sub { font-size: 12.2px; }
  .les-grid { grid-template-columns: minmax(0, 1fr); }
  .table th, .table td { padding: 8px; }
  .tab { font-size: 12.6px; }
  .sidebar .nav-short { font-size: 10px; }
  .med-item .med-line { gap: 4px; }
}

@media (max-width: 359px) {
  .metrics { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* email: '@' dipisah agar tidak diobfuscate Cloudflare menjadi "[email protected]" */
.email-at, .at { font-family: inherit; }

/* =====================================================================
   Beranda mode "Semua" — kartu status cepat, agenda lintas anak,
   catat cepat dengan pemilih anak (permintaan pemilik, 26 Nov 2026)
   ===================================================================== */

.qcard-list { display: flex; flex-direction: column; gap: 9px; }

.qcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px; align-items: center;
  padding: 11px 12px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--line);
  color: inherit; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.qcard:hover { text-decoration: none; border-color: var(--blue-line); box-shadow: 0 8px 20px rgba(37, 99, 235, .1); transform: translateY(-1px); }
.qcard-av { display: inline-flex; flex: none; }
.qcard-main { min-width: 0; }
.qcard-name { font-size: 14.4px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.qcard-meta { font-size: 11.8px; font-weight: 700; color: var(--ink-mute); }
.qcard-line { font-size: 12.2px; color: var(--ink-soft); line-height: 1.5; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard-line.is-muted { color: var(--ink-mute); }
.qcard-badge { flex: none; align-self: center; }

.sbadge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 6px 11px;
  font-size: 11.6px; font-weight: 800; white-space: nowrap;
  background: var(--line-soft); color: var(--ink-soft); border: 1px solid transparent;
}
.sbadge.s-mint { background: var(--mint-soft); color: var(--mint-dark); border-color: var(--mint-line); }
.sbadge.s-amber { background: var(--amber-soft); color: var(--amber-dark); border-color: var(--amber-line); }
.sbadge.s-rose { background: var(--rose-soft); color: var(--rose-dark); border-color: var(--rose-line); }
.sbadge.s-blue { background: var(--blue-soft); color: var(--blue-dark); border-color: var(--blue-line); }

/* kotak centang di kiri baris agenda (mode Semua) */
.agenda-box {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  border: 1.8px solid var(--line); background: #fff; color: #fff;
}
.agenda-box.is-on { background: var(--mint-dark); border-color: var(--mint-dark); }

/* "Catat Cepat" — dua tombol besar pemilih anak */
.catat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.catat-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1.5px solid var(--blue-line); color: var(--blue-dark);
  font-size: 13.6px; font-weight: 800; text-align: center;
  box-shadow: var(--shadow-sm);
}
.catat-btn:hover { text-decoration: none; background: var(--blue-soft); }
.catat-btn.alt { border-color: var(--line); color: var(--ink-soft); }
.catat-btn.alt:hover { border-color: var(--blue-line); color: var(--blue-dark); background: var(--blue-soft); }

.section-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 18px 0 9px;
}
.section-label b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.section-label span { font-size: 11.6px; color: var(--ink-mute); font-weight: 700; }

@media (max-width: 560px) {
  .qcard { gap: 9px; padding: 10px; }
  .qcard-name { font-size: 13.8px; }
  .qcard-line { font-size: 11.8px; }
  .sbadge { padding: 5px 9px; font-size: 10.9px; }
  .catat-btn { min-height: 50px; font-size: 12.8px; gap: 6px; }
}
@media (max-width: 359px) {
  .catat-grid { grid-template-columns: minmax(0, 1fr); }
  .qcard-badge { display: none; }
}

/* waktu kecil di judul baris agenda lintas anak */
.agenda-time { font-size: 12px; font-weight: 700; color: var(--ink-mute); }

/* baris agenda lintas anak: judul satu baris (rapi & tinggi seragam) */
.agenda-row-all .agenda-title {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agenda-row-all .agenda-title .agenda-time { white-space: nowrap; }
.agenda-row-all .agenda-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Register sangat sempit (≤380px): rapatkan agar tidak perlu menggulir */
@media (max-width: 380px) {
  .auth-shell { padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); gap: 8px; }
  .auth-card { padding: 15px 14px 14px; }
  .auth-title { font-size: 17.5px; }
  .auth-sub { margin: 3px 0 11px; font-size: 11.9px; }
  .auth-form { gap: 9px; }
  .auth-field > span { font-size: 11.4px; }
  .auth-input { min-height: 44px; padding: 0 11px; }
  .auth-input input { height: 42px; font-size: 13.5px; }
  .auth-divider { margin: 11px 0 8px; }
  .auth-demo { margin-top: 10px; padding: 9px 10px; }
  .auth-note { margin: 9px 0; font-size: 11.3px; }
}

/* =====================================================================
   Menu ke-6 (Acara) + Kalender & daftar kegiatan
   Menu bawah HP kini 6 kolom: Beranda · Profil · Sehat · Les · Sekolah · Acara
   ===================================================================== */
@media (max-width: 960px) {
  .sidebar { padding: 0 2px env(safe-area-inset-bottom); }
  .sidebar .nav-item { padding: 8px 1px 9px; gap: 2px; }
  .sidebar .nav-item .ico { width: 20px; height: 20px; }
  .sidebar .nav-short { font-size: 9.8px; letter-spacing: -.1px; }
}
@media (max-width: 380px) {
  .sidebar .nav-item { min-height: 56px; }
  .sidebar .nav-item .ico { width: 18px; height: 18px; }
  .sidebar .nav-short { font-size: 9px; }
}

/* --------------------------------------------------------- kalender */

.cal-wrap { display: flex; flex-direction: column; gap: 8px; }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 10.2px; font-weight: 800; letter-spacing: .04em; color: var(--ink-mute); text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 42px; padding: 4px 2px; border-radius: 11px;
  border: 1px solid var(--line-soft); background: #fff;
  font-size: 12.6px; font-weight: 800; color: var(--ink-soft);
  text-decoration: none; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.cal-day:hover { text-decoration: none; border-color: var(--blue-line); background: #FBFDFF; }
.cal-day.is-empty { border: 0; background: transparent; min-height: 42px; }
.cal-day.has-ev { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-dark); }
.cal-day.is-today { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, .18); }
.cal-day.is-sel { background: var(--blue); border-color: var(--blue); color: #fff; }
.cal-day.is-sel .cal-dot { background: #fff; }
.cal-num { line-height: 1.1; font-variant-numeric: tabular-nums; }
.cal-dots { display: flex; gap: 2px; height: 5px; align-items: center; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.cal-dot.p-amber { background: var(--amber); }
.cal-dot.p-rose { background: #E4526A; }
.cal-dot.p-lav { background: #7C3AED; }
.cal-dot.p-green { background: var(--mint); }
.cal-dot.p-gray { background: var(--ink-mute); }
.cal-dot.p-sky { background: var(--blue); }
.cal-legend { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.cal-legend .tiny { display: inline-flex; align-items: center; gap: 5px; }
.cat-pills .pillopt { min-height: 38px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-filter .pillopt { min-height: 32px; padding: 5px 10px; font-size: 11.6px; }
.cat-filter .pillopt.is-on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }

/* ------------------------------------------------------ baris kegiatan */

.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px; align-items: start;
  padding: 10px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff;
}
.ev-row.is-done { background: #FBFEFC; border-color: var(--mint-line); }
.ev-row.is-done .ev-title { text-decoration: line-through; color: var(--ink-mute); }
.ev-check { margin: 0; }
.ev-check .agenda-box { cursor: pointer; }
.ev-main { min-width: 0; }
.ev-title {
  font-size: 13.8px; font-weight: 800; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 3px; font-size: 11.8px; color: var(--ink-mute); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.ev-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ev-sub {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  font-size: 11.2px; font-weight: 700; color: var(--ink-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-sub .ev-meta .pill { font-size: 10.6px; padding: 3px 8px; flex: none; }
.ev-rel { color: var(--blue-dark); }
.ev-note {
  display: flex; gap: 5px; align-items: flex-start;
  margin-top: 6px; font-size: 11.8px; color: var(--ink-soft);
  background: var(--bg); border-radius: 10px; padding: 6px 9px;
}
.ev-actions { display: flex; gap: 5px; align-items: center; align-self: center; flex: none; }
.ev-actions .icon-btn { width: 34px; height: 34px; border-radius: 10px; }

@media (max-width: 560px) {
  .cal-day { min-height: 38px; font-size: 12px; border-radius: 9px; }
  .cal-day.is-empty { min-height: 38px; }
  .ev-title { font-size: 13.2px; }
  .ev-meta { font-size: 11.2px; }
}

/* =====================================================================
   Kartu Beranda "Acara & Pengingat Terdekat" + modal tambah acara cepat
   ===================================================================== */

/* badge waktu kontras: Hari Ini (mint pekat) / Besok (biru pekat) / n Hari Lagi (kuning) */
.ev-when {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 4px 10px;
  font-size: 10.9px; font-weight: 800; line-height: 1.35; white-space: nowrap;
  background: var(--sun); color: var(--amber-dark);
}
.ev-when.w-today { background: var(--mint-dark); color: #fff; }
.ev-when.w-tomorrow { background: var(--blue-dark); color: #fff; }
.ev-when.w-soon { background: var(--sun); color: var(--amber-dark); }

.ev-row.is-compact {
  grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start;
  padding: 9px 10px; border-color: var(--line-soft); background: #FFFDF9;
}
.ev-row.is-compact .ev-title { font-size: 13.4px; font-weight: 800; }
.ev-row.is-compact .ev-meta { margin-top: 4px; gap: 5px; }
.ev-row.is-compact .ev-note {
  margin-top: 5px; font-size: 11.4px; padding: 4px 8px;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ev-facts { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.ev-who {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--line-soft); color: var(--ink-soft);
  border-radius: 999px; padding: 3px 8px; font-size: 10.8px; font-weight: 800;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ev-cat { font-size: 10.8px; font-weight: 800; color: var(--ink-mute); }
.ev-sep { font-size: 10.8px; color: var(--line); }
.ev-more { display: block; margin-top: 9px; font-size: 11.6px; font-weight: 700; color: var(--ink-mute); }
.ev-more a { font-weight: 800; }
.ev-empty { text-align: center; padding: 14px 8px 4px; }
.ev-empty p { margin: 0 0 10px; font-size: 12.8px; color: var(--ink-mute); font-weight: 700; }

/* ------------------------------------------------------------- modal */

.sheet {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  padding: 0; border: 1px solid var(--line); border-radius: 20px;
  background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  overflow: hidden; color: var(--ink);
}
.sheet::backdrop { background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: #FCFDFF;
}
.sheet-title { font-size: 16px; font-weight: 800; margin: 0; }
.sheet-x {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
}
.sheet-x:hover { background: var(--rose-soft); color: var(--rose-dark); border-color: var(--rose-line); }
.sheet-body { padding: 14px 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-body .form-actions { position: sticky; bottom: 0; background: #fff; padding-top: 10px; }

@media (max-width: 560px) {
  .sheet {
    width: 100vw; max-width: 100vw; max-height: 92vh;
    margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0;
  }
  .sheet-head { padding: 12px 14px; }
  .sheet-body { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
  .sheet-body .form-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-when { font-size: 10.4px; padding: 3px 9px; }
  .ev-who { max-width: 82px; }
}

/* =====================================================================
   RONDE 26 NOV 2026 — footer, FAB, paket/harga, panduan, landing page
   ===================================================================== */

/* ------------------------------------------------------------- footer
   Ikon hati SVG sering tampak "patah" karena garis 1,8px pada ukuran 13px
   + tidak sejajar baseline teks. Di sini hati diisi penuh (fill) dan
   perataan memakai flex, bukan vertical-align. */
.page-foot {
  flex-wrap: wrap; gap: 5px 7px; line-height: 1.45;
  font-size: 11.8px; color: var(--ink-mute);
}
.foot-brand { font-weight: 800; color: var(--ink-soft); letter-spacing: 0.01em; }
.foot-sep { opacity: 0.55; }
.foot-note { display: inline-flex; align-items: center; gap: 4px; }
.page-foot .heart-ico { color: var(--rose-dark); fill: var(--rose-dark); stroke: var(--rose-dark); stroke-width: 1.2; }
@media (max-width: 420px) {
  .page-foot { font-size: 11.2px; }
  .foot-sep { display: none; }
  .foot-note { flex-basis: 100%; justify-content: center; }
}

/* ----------------------------------------------------------------- FAB
   Tombol + tidak boleh menutupi isi kartu terakhir: halaman diberi ruang
   bawah selebar FAB (+ jarak), dan FAB diberi bayangan agar terpisah. */
.main { padding-bottom: 108px; }
.fab { bottom: 20px; right: 20px; }
.fab-btn { width: 56px; height: 56px; box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32); }
.fab-menu { max-width: min(280px, calc(100vw - 36px)); }
@media (max-width: 960px) {
  .main { padding-bottom: calc(var(--bottom) + 92px + env(safe-area-inset-bottom)); }
  .fab { bottom: calc(var(--bottom) + 18px + env(safe-area-inset-bottom)); right: 14px; }
}
@media print { .fab { display: none !important; } }

/* --------------------------------------------------- flash (umpan balik) */
.flash {
  position: sticky; top: 8px; z-index: 26;
  animation: flashIn 0.22s ease-out;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* --------------------------------------------- chip "+ Tambah anak" */
.childchip.is-add {
  border-style: dashed; border-color: var(--blue-line);
  background: #fff; color: var(--blue-dark); padding: 3px 13px; gap: 5px;
}
.childchip.is-add:hover { background: var(--blue-soft); }
.childchip.is-add .childchip-name { max-width: none; }

/* --------------------------------------------------------- paket & akun */
.plan-box { gap: 6px; }
.plan-box .progress { width: 100%; margin-top: 2px; }
.plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-days { font-size: 12.4px; font-weight: 700; color: var(--ink-soft); }
.plan-facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.plan-facts li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.6px; color: var(--ink-soft); }
.plan-facts .ico { color: var(--mint-dark); margin-top: 2px; }
.plan-facts b { color: var(--ink); }
.plan-limits {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 9px;
}
.plan-limit { display: flex; flex-direction: column; gap: 3px; }
.plan-limit b { font-size: 12.4px; font-weight: 800; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.plan-limit b .ico { color: var(--blue-dark); }
.plan-limit span { font-size: 12.2px; line-height: 1.5; color: var(--ink-soft); }
.plan-box.plan-rose .plan-pill { background: var(--rose-soft); color: var(--rose-dark); }

/* panduan singkat / langkah */
.guide-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.guide-step {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 9px 11px; background: #FCFDFF;
}
.guide-num {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--blue-soft); color: var(--blue-dark);
}
.guide-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guide-main a, .guide-main b { font-size: 13px; font-weight: 800; color: var(--ink); }
.guide-main a:hover { color: var(--blue-dark); }
.guide-main span { font-size: 12px; line-height: 1.45; color: var(--ink-mute); }

/* kartu harga */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; box-shadow: var(--shadow-sm);
}
.price-card.is-highlight { border-color: var(--blue); box-shadow: 0 14px 34px rgba(37, 99, 235, 0.14); }
.price-card.is-current { border-color: var(--mint); }
.price-badge {
  align-self: flex-start; border-radius: 999px; padding: 4px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.01em;
  background: var(--blue-soft); color: var(--blue-dark);
}
.price-card.is-highlight .price-badge { background: var(--blue); color: #fff; }
.price-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.price-value {
  display: flex; align-items: baseline; gap: 3px; color: var(--ink);
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.price-cur { font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.price-value small { font-size: 12.5px; font-weight: 700; color: var(--ink-mute); margin-left: 2px; }
.price-free { font-size: 26px; color: var(--mint-dark); }
.price-per { font-size: 12px; color: var(--ink-mute); margin-top: -2px; }
.price-feats { list-style: none; margin: 10px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.price-feats li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.6px; line-height: 1.45; color: var(--ink-soft); }
.price-feats .ico { color: var(--mint-dark); margin-top: 2px; }
.price-card .btn { margin-top: auto; }
.price-current {
  margin-top: auto; display: inline-flex; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--mint-dark);
  background: var(--mint-soft); border: 1px solid var(--mint-line);
  border-radius: 999px; padding: 8px 12px;
}
.pay-info {
  display: flex; flex-direction: column; gap: 2px; margin-top: 12px;
  background: var(--blue-soft); border: 1px solid var(--blue-line);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.6px; color: var(--ink-soft);
}
.pay-info b { color: var(--blue-dark); display: inline-flex; gap: 5px; align-items: center; }
.steps-numbered .guide-step { background: #fff; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 0 13px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 12px 0;
  font-size: 13.2px; font-weight: 800; color: var(--ink);
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 17px; font-weight: 800; color: var(--blue); }
.faq[open] summary::after { content: '–'; }
.faq p { padding: 0 0 12px; font-size: 12.8px; line-height: 1.6; color: var(--ink-soft); }

/* =====================================================================
   LANDING PAGE publik (/)
   ===================================================================== */
.lp-body { background: var(--bg); color: var(--ink); }
.lp-wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 20px; }

.lp-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.lp-nav-in { display: flex; align-items: center; gap: 16px; min-height: 62px; }
.lp-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.lp-brand:hover { text-decoration: none; }
.lp-brand span { display: inline-flex; align-items: baseline; gap: 1px; font-size: 15.5px; }
.lp-brand b { font-weight: 800; letter-spacing: -0.02em; }
.lp-brand em { font-style: normal; font-weight: 800; color: var(--blue); }
.lp-links { display: flex; gap: 4px; margin-left: auto; }
.lp-links a {
  padding: 8px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.lp-links a:hover { background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.lp-nav-act { display: flex; gap: 8px; }

.lp-hero {
  background:
    radial-gradient(680px 320px at 12% -10%, #E7F0FF 0%, rgba(231, 240, 255, 0) 70%),
    radial-gradient(560px 300px at 92% 8%, #E7FBF3 0%, rgba(231, 251, 243, 0) 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.lp-hero-in {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px; align-items: center; padding: 52px 20px 58px;
}
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--blue-line); color: var(--blue-dark);
  border-radius: 999px; padding: 5px 12px; font-size: 11.8px; font-weight: 800;
}
.lp-title {
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -0.03em;
  margin-top: 14px; color: var(--ink);
}
.lp-title span { color: var(--blue-dark); }
.lp-lead { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--ink-soft); max-width: 52ch; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.lp-trust { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.lp-trust li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.8px; font-weight: 600; color: var(--ink-soft); }
.lp-trust .ico { color: var(--mint-dark); margin-top: 2px; }

/* pratinjau aplikasi (mock) */
.lp-phone {
  width: min(320px, 100%); margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: 26px; padding: 10px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.13);
}
.lp-phone-bar { display: flex; gap: 5px; padding: 2px 4px 9px; }
.lp-phone-bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.lp-phone-bar span:first-child { background: #FCA5A5; }
.lp-phone-bar span:nth-child(2) { background: #FCD34D; }
.lp-phone-bar span:last-child { background: #6EE7B7; }
.lp-phone-body { background: var(--bg); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lp-mock-greet { display: flex; align-items: center; justify-content: space-between; font-size: 12.6px; font-weight: 800; color: var(--ink); }
.lp-mock-chip { font-size: 10.4px; font-weight: 800; color: var(--blue-dark); background: var(--blue-soft); border-radius: 999px; padding: 3px 8px; }
.lp-mock-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 9px;
}
.lp-mock-av {
  width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark); font-size: 11.5px; font-weight: 800;
}
.lp-mock-av.alt { background: var(--mint-soft); color: var(--mint-dark); }
.lp-mock-card b { display: block; font-size: 11.6px; font-weight: 800; color: var(--ink); }
.lp-mock-card span:not(.lp-mock-av):not(.lp-mock-badge) { font-size: 10.8px; color: var(--ink-mute); }
.lp-mock-badge {
  font-size: 10px; font-weight: 800; color: var(--mint-dark);
  background: var(--mint-soft); border-radius: 999px; padding: 3px 7px;
}
.lp-mock-badge.warn { color: var(--amber-dark); background: var(--amber-soft); }
.lp-mock-row {
  display: flex; align-items: center; gap: 7px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; padding: 8px 9px;
  font-size: 11.2px; font-weight: 700; color: var(--ink-soft);
}
.lp-mock-tick {
  width: 18px; height: 18px; border-radius: 6px; flex: none;
  display: grid; place-items: center; font-size: 10px;
  background: var(--mint-soft); color: var(--mint-dark); border: 1px solid var(--mint-line);
}
.lp-mock-tick.off { background: #fff; border-color: var(--line); }

.lp-section { padding: 56px 0; }
.lp-section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-sec-head { display: flex; flex-direction: column; gap: 8px; max-width: 60ch; margin-bottom: 26px; }
.lp-h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.lp-sec-sub { font-size: 13.8px; line-height: 1.65; color: var(--ink-soft); }
.lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lp-feat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 7px;
}
.lp-section-alt .lp-feat { background: var(--bg); }
.lp-feat-ico {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark);
}
.lp-feat h3 { font-size: 14px; font-weight: 800; color: var(--ink); }
.lp-feat p { font-size: 12.6px; line-height: 1.55; color: var(--ink-soft); }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lp-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.lp-step-num {
  flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 13.5px; font-weight: 800;
}
.lp-step b { display: block; font-size: 13.6px; font-weight: 800; color: var(--ink); }
.lp-step span:not(.lp-step-num) { font-size: 12.6px; line-height: 1.5; color: var(--ink-soft); }
.lp-price-note {
  display: flex; gap: 7px; align-items: flex-start; margin-top: 16px;
  font-size: 12.4px; color: var(--ink-mute);
}
.lp-price-note .ico { color: var(--ink-mute); margin-top: 2px; }
.lp-faq-wrap { max-width: 820px; }

.lp-band {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background: linear-gradient(135deg, #EFF5FF, #ECFDF5);
  border: 1px solid var(--blue-line); border-radius: var(--radius); padding: 26px;
}
.lp-band-title { font-size: clamp(19px, 2.6vw, 24px); color: var(--ink); letter-spacing: -0.02em; }
.lp-band p { margin-top: 6px; font-size: 13.4px; color: var(--ink-soft); }
.lp-band-act { display: flex; gap: 10px; flex-wrap: wrap; }

.lp-foot { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; }
.lp-foot-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.lp-foot-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 12.4px; color: var(--ink-mute); }
.lp-foot-brand b { color: var(--ink); font-weight: 800; }
.lp-foot-brand em { font-style: normal; font-weight: 800; color: var(--blue); }
.lp-foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.lp-foot-links a { font-size: 12.4px; font-weight: 700; color: var(--ink-soft); }

@media (max-width: 980px) {
  .lp-hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 34px 18px 40px; }
  .lp-phone { order: 2; }
  .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .price-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-links { display: none; }
}
@media (max-width: 620px) {
  .lp-wrap { padding: 0 14px; }
  .lp-nav-in { min-height: 56px; gap: 8px; }
  .lp-nav-act .btn { min-height: 40px; padding: 8px 12px; font-size: 12.5px; }
  .lp-section { padding: 38px 0; }
  .lp-lead { font-size: 14px; }
  .lp-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lp-cta .btn { flex: 1 1 100%; }
  .lp-band { padding: 18px; }
  .lp-band-act { width: 100%; }
  .lp-band-act .btn { flex: 1 1 100%; }
  .price-card { padding: 16px; }
}
@media (max-width: 360px) {
  .lp-title { font-size: 27px; }
  .lp-brand span { font-size: 14px; }
}

/* ---------------------------------------------- sentuhan akhir (ronde 26 Nov) */
/* Chip anak jadi target sentuh 44px (sebelumnya 38px) dan tombol kecil di
   kepala kartu dinaikkan agar nyaman di HP. */
.childbar .childchip { min-height: 44px; padding: 4px 14px 4px 4px; }
.childbar .childchip.is-add { padding: 4px 15px; }
.card-actions { flex-wrap: wrap; }
.card-actions .btn-xs { min-height: 36px; }
@media (max-width: 960px) {
  .card-actions .btn-xs { min-height: 40px; }
  .card-head { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .lp-nav-act .btn-ghost { display: none; }  /* "Masuk" tetap ada di CTA & kaki halaman */
  .lp-brand span { font-size: 13.5px; }
  .lp-phone { width: 100%; }
}
@media (max-width: 960px) { .btn-xs { min-height: 40px; } }  /* target sentuh tombol kecil di HP */
/* FAB menyingkir saat halaman digulir ke bawah (tidak menutupi kartu di atasnya) */
.fab { transition: transform 0.22s ease, opacity 0.22s ease; }
.fab.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }

/* =====================================================================
   TEMA “KELUARGA JUARA” — lapisan terakhir (28 Nov 2026)
   ---------------------------------------------------------------------
   Arah: latar tetap bersih (putih + abu sangat lembut) agar teks nyaman
   dibaca; karakter “juara” datang dari AKSEN, bukan dari keramaian:
     biru   = kepercayaan & keteraturan (navigasi, aksi utama)
     emas   = prestasi (acara, lomba/ujian, paket, penyelesaian)
     hijau  = sehat / tugas selesai
   Semua teks kecil dijaga ≥4,5:1 (diaudit otomatis di .t/audit.js).

   CATATAN: blok ini menimpa beberapa komponen dasar di atasnya. Kalau ingin
   kembali ke tampilan lama, hapus blok ini saja.
   ===================================================================== */

:root {
  /* aksen juara (emas) */
  --gold: #F5B301;
  --gold-soft: #FFFAEB;
  --gold-line: #F5D489;
  --gold-deep: #B45309;      /* teks emas di latar terang (≈5,9:1) */
  --gold-deep-2: #92400E;
  --sun: #FCD34D;            /* dipakai badge “n Hari Lagi” — dulu TIDAK terdefinisi */

  /* gradien: semua stop cukup gelap agar teks putih tetap ≥4,5:1 */
  --grad-blue: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  --grad-sage: linear-gradient(135deg, #047857 0%, #036B4C 100%);
  --grad-gold: linear-gradient(135deg, #B45309 0%, #92400E 100%);

  /* bayangan berlapis: tipis, tidak “berat” */
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.05);
  --shadow-card-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 2px 5px rgba(15, 23, 42, 0.06), 0 16px 34px rgba(15, 23, 42, 0.09);
  --ring-focus: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

/* ------------------------------------------------------------- tipografi */
body { letter-spacing: -0.003em; }

/* judul halaman + aksen emas tipis (tanda “juara” tanpa menambah ikon) */
.page-title { position: relative; padding-bottom: 7px; }
.page-title::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 38px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--blue) 100%);
}
.page-sub { color: var(--ink-soft); }

/* label kelompok (Status Cepat / Agenda Hari Ini / Catat Cepat) */
.section-label { align-items: center; }
.section-label b {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; letter-spacing: -0.01em;
}
.section-label b::before {
  content: ''; flex: none; width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--blue) 100%);
}
.section-label > span {
  font-size: 11.4px; font-weight: 800; color: var(--ink-mute);
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px;
}

/* ------------------------------------------------------------ kartu */
.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.card-head { align-items: flex-start; gap: 10px; }
.card-head-main { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.card-head-text { min-width: 0; }
.card-head-ico {
  flex: none; width: 32px; height: 32px; border-radius: 11px;
  display: inline-grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark);
}
.card-title { font-size: 15.4px; }
.card-sub { color: var(--ink-mute); }

/* kaca depan kartu tetap bersih; kartu bertautan boleh sedikit terangkat */
a.card:hover { box-shadow: var(--shadow-card-hover); }
@media (hover: hover) {
  .stat:hover, .metric:hover, .qcard:hover { box-shadow: var(--shadow-card-hover); border-color: var(--blue-line); }
  .card-accent-gold:hover { border-color: var(--gold-line); }
}

/* kartu beraksen EMAS — dipakai “Acara & Pengingat Terdekat” */
.card-accent-gold {
  border-color: var(--gold-line);
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.05), 0 10px 26px rgba(180, 83, 9, 0.07);
}
.card-accent-gold .card-head {
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--gold-line);
  background: linear-gradient(180deg, #FFFCF1 0%, rgba(255, 252, 241, 0) 100%);
  border-radius: 15px 15px 0 0;
}
.card-accent-gold .card-head-ico {
  background: linear-gradient(140deg, #FDE68A, #F5B301);
  color: var(--gold-deep-2);
  box-shadow: 0 3px 9px rgba(245, 179, 1, 0.32);
}
.card-accent-gold .card-title { color: #7C2D12; }
.card-accent-gold .card-sub { color: var(--gold-deep); }

/* kartu sorotan (profil anak) */
.card.highlight {
  border-color: var(--blue-line);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05), 0 12px 28px rgba(37, 99, 235, 0.08);
}

/* stat & metric: kedalaman seragam, bukan kotak datar */
.stat, .metric, .qcard {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card-sm);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.stat-ico, .metric-ico { border-radius: 11px; }
.stat-value, .metric-value { letter-spacing: -0.02em; }
@media (hover: hover) {
  .stat:hover, .metric:hover, .qcard:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .card, .stat, .metric, .qcard, .btn, .ev-row { transition: none; }
  .stat:hover, .metric:hover, .qcard:hover { transform: none; }
}

/* ------------------------------------------------------------ tombol */
.btn {
  border-radius: 999px;
  border-width: 1.5px;
  letter-spacing: -0.01em;
  transition: background .16s ease, border-color .16s ease, color .16s ease,
              box-shadow .16s ease, transform .12s ease;
}
.btn:focus-visible,
.check-btn:focus-visible,
.catat-btn:focus-visible,
.icon-btn:focus-visible,
.fab-btn:focus-visible,
.childchip:focus-visible,
.nav-item:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.btn-primary {
  background: var(--grad-blue); color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.32);
  transform: translateY(-1px);
}
.btn-sage {
  background: var(--grad-sage); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.24);
}
.btn-sage:hover { background: linear-gradient(135deg, #036B4C 0%, #065F46 100%); transform: translateY(-1px); }
.btn-soft { background: var(--blue-soft); color: var(--blue-dark); border-color: var(--blue-line); }
.btn-soft:hover { background: #E3EDFF; border-color: var(--blue); }

/* tombol emas = aksi “acara / prestasi”; teks di atas emas selalu pekat */
.btn-gold {
  background: var(--gold-soft);
  color: var(--gold-deep);
  border-color: var(--gold-line);
  box-shadow: 0 2px 8px rgba(245, 179, 1, 0.16);
}
.btn-gold:hover {
  background: #FFF3D4;
  border-color: var(--gold);
  color: var(--gold-deep-2);
  box-shadow: 0 6px 16px rgba(245, 179, 1, 0.26);
  transform: translateY(-1px);
}
.btn-gold-solid {
  background: var(--grad-gold); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(146, 64, 14, 0.26);
}
.btn-gold-solid:hover { background: linear-gradient(135deg, #92400E 0%, #7C2D12 100%); transform: translateY(-1px); }

.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-line); color: var(--blue-dark); background: #FBFDFF; }

/* aksi angka/pilih: tetap jelas tapi tidak bersaing dengan tombol utama */
.btn-xs { border-radius: 999px; font-weight: 800; }

/* tombol centang (vitamin / agenda) */
.check-btn { border-radius: 999px; }
.check-btn:hover { background: var(--mint-soft); color: var(--mint-dark); border-color: var(--mint); }
.check-btn.is-on {
  background: var(--grad-sage); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.28);
}

/* dua tombol Catat Cepat di Beranda — hierarki: biru (sakit/obat) & emas (absen) */
.catat-btn {
  border-radius: 15px;
  background: var(--grad-blue); color: #fff; border-color: transparent;
  box-shadow: 0 5px 16px rgba(29, 78, 216, 0.24);
}
.catat-btn:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(29, 78, 216, 0.3);
}
.catat-btn.alt {
  background: var(--gold-soft); color: var(--gold-deep-2); border-color: var(--gold-line);
  box-shadow: 0 2px 8px rgba(245, 179, 1, 0.16);
}
.catat-btn.alt:hover {
  background: #FFF3D4; color: var(--gold-deep-2); border-color: var(--gold);
  box-shadow: 0 7px 18px rgba(245, 179, 1, 0.24);
}

/* ------------------------------------------------------------ badge */
.pill { border-width: 1px; border-style: solid; border-color: transparent; }
.sbadge {
  border-width: 1px;
  padding: 5px 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sbadge.s-gold { background: var(--gold-soft); color: var(--gold-deep); border-color: var(--gold-line); }

/* status paket: “Masa coba” terasa seperti lencana, bukan teks biasa */
.plan-pill { border: 1px solid transparent; }
.plan-pill.p-amber {
  background: var(--gold-soft); color: var(--gold-deep);
  border-color: var(--gold-line);
  box-shadow: 0 1px 3px rgba(245, 179, 1, 0.18);
}
.plan-pill.p-green { border-color: var(--mint-line); }
.plan-pill.p-rose { border-color: var(--rose-line); }

/* chip tanggal di kanan atas */
.date-chip { border-color: var(--line); box-shadow: var(--shadow-card-sm); }
.date-chip .ico { color: var(--gold-deep); }

/* --------------------------------------------------- navigasi kiri */
.nav-label { color: #5B6A80; }  /* 5,4:1 di atas putih — jangan dicerahkan */
.nav-item { border-radius: 12px; }
.nav-item .ico { color: #64748B; }
.nav-item:hover .ico, .nav-item.active .ico { color: var(--blue-dark); }
.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 0 0 1px var(--blue-line);
  position: relative;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold) 0%, var(--blue) 100%);
}
.nav-item.active .nav-full { font-weight: 800; }

/* ------------------------------------------------- acara & pengingat */
/* tiap baris punya pita tepi kiri sesuai jenis kegiatan → langsung terbaca.
   URUTAN PENTING: aturan latar `.ev-row.is-compact` ditulis LEBIH DULU, lalu
   warna pita per kategori memakai selektor `[data-cat]` (spesifisitas lebih
   tinggi) supaya pita kiri tidak tertimpa warna border kartu. */
.ev-row { border-left-width: 3px; border-left-style: solid; border-left-color: var(--line); }
.ev-row.is-compact { background: #FFFDF7; border-color: #F3E7CE; }
.ev-row.is-compact:hover { background: #FFFBEF; border-color: var(--gold-line); }
.ev-row.is-compact.is-done { background: #FBFEFC; border-color: var(--mint-line); }
.ev-row[data-cat="ujian"]        { border-left-color: #2563EB; }
.ev-row[data-cat="lomba"]        { border-left-color: var(--gold); }
.ev-row[data-cat="pulang"]       { border-left-color: #D97706; }
.ev-row[data-cat="dokter"]       { border-left-color: #7C3AED; }
.ev-row[data-cat="ultah"]        { border-left-color: #DB2777; }
.ev-row[data-cat="perlengkapan"] { border-left-color: var(--mint); }
.ev-row[data-cat="lainnya"]      { border-left-color: #94A3B8; }
.ev-row.is-done, .ev-row.is-done[data-cat] { border-left-color: var(--mint-line); }

/* lencana kategori: berwarna lembut + teks pekat (semua ≥4,5:1) */
.ev-cat {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 3px 9px;
  font-size: 10.6px; font-weight: 800; line-height: 1.35; white-space: nowrap;
  background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0;
}
.ev-cat.c-ujian        { background: var(--blue-soft);  color: var(--blue-dark);  border-color: var(--blue-line); }
.ev-cat.c-lomba        { background: #FFFBEB;           color: #92400E;           border-color: #FDE68A; }
.ev-cat.c-pulang       { background: #FFF7ED;           color: #9A3412;           border-color: #FED7AA; }
.ev-cat.c-dokter       { background: #F5F3FF;           color: #5B21B6;           border-color: #DDD6FE; }
.ev-cat.c-ultah        { background: #FDF2F8;           color: #9D174D;           border-color: #FBCFE8; }
.ev-cat.c-perlengkapan { background: var(--mint-soft);  color: var(--mint-dark);  border-color: var(--mint-line); }

/* badge waktu: “Hari Ini” hijau, “Besok” biru, “n Hari Lagi” emas */
.ev-when { border: 1px solid transparent; }
.ev-when.w-today { box-shadow: 0 2px 8px rgba(4, 120, 87, 0.22); }
.ev-when.w-tomorrow { box-shadow: 0 2px 8px rgba(29, 78, 216, 0.22); }
.ev-when.w-soon { border-color: #F0C64B; box-shadow: 0 2px 8px rgba(245, 179, 1, 0.22); }

/* kotak centang selesai */
.agenda-box {
  border-radius: 9px; border-width: 1.6px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.agenda-box:hover { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14); }
.agenda-box.is-on { background: var(--grad-sage); border-color: transparent; box-shadow: 0 2px 8px rgba(4, 120, 87, 0.26); }

/* daftar agenda (les / vitamin) */
.agenda-row { border-radius: 14px; }
.agenda-ico { border-radius: 11px; }
.agenda-ico.a-gold, .agenda-ico.a-sun { background: var(--gold-soft); color: var(--gold-deep); }

/* --------------------------------------------------- notifikasi / notice */
.notice { border-radius: 14px; }
.notice-amber {
  background: linear-gradient(180deg, #FFFDF4 0%, var(--amber-soft) 100%);
  border-color: var(--gold-line);
  color: var(--gold-deep-2);
}

/* ------------------------------------------------------------ footer */
.page-foot { color: var(--ink-mute); }
.foot-brand { color: var(--ink); }
.page-foot .heart-ico { color: #E11D48; fill: #E11D48; stroke: #E11D48; }

/* --------------------------------------------------- sentuhan HP */
@media (max-width: 960px) {
  .sidebar { box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08); }
  .sidebar .nav-item.active::before { display: none; }
  .sidebar .nav-item.active::after {
    background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
    width: 28px; height: 3px; border-radius: 3px;
  }
  .card-accent-gold .card-head { border-radius: 14px 14px 0 0; }
  .page-title::after { width: 32px; height: 3px; }
}
@media (max-width: 560px) {
  .card { border-radius: 15px; }
  .section-label b { font-size: 14.4px; }
  .catat-btn { min-height: 52px; }
}

/* ------------------------------------------- napas antar-kartu (mikro) */
/* Jarak antar kartu dinaikkan sedikit (14→16/18) supaya tidak terasa padat,
   tanpa mengubah struktur grid mana pun. */
.stack { gap: 16px; }
.grid { gap: 16px; }
.grid-side { gap: 18px; }
.stats { gap: 14px; }
.metrics { gap: 14px; }
.qcard-list { gap: 11px; }
.agenda-list { gap: 9px; }
.section-gap { margin-top: 20px; }
.card-body { padding: 14px 16px 16px; }
@media (max-width: 560px) {
  .grid, .stack { gap: 14px; }
  .metrics, .stats { gap: 12px; }
  .section-gap { margin-top: 16px; }
}

/* =====================================================================
   MOBILE PASS — Beranda & halaman lain di layar HP (390 / 360 / 320 px)
   ---------------------------------------------------------------------
   Tujuan: satu kolom yang lapang, teks tidak terpotong, semua tombol
   ≥44 px, dan FAB tidak menutupi apa pun. Tampilan desktop TIDAK berubah
   karena seluruh aturan berada di dalam @media (max-width: 960px) atau
   560 px, kecuali `.menu-sheet` (dialog hanya dipakai di HP).
   ===================================================================== */

/* ------------------------------------------------- tombol menu (HP) */
.nav-toggle {
  width: 44px; height: 44px; border-radius: 13px;   /* target sentuh ≥44 px */
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-soft); box-shadow: var(--shadow-card-sm);
}
.nav-toggle:hover { color: var(--blue-dark); border-color: var(--blue-line); background: var(--blue-soft); }

/* ------------------------------------------- isi dialog menu lengkap */
.menu-sheet .sheet-body { display: flex; flex-direction: column; gap: 14px; }
.menu-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line); color: inherit;
}
.menu-user:hover { text-decoration: none; border-color: var(--blue-line); }
.menu-user-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.menu-user-txt b { font-size: 13.4px; font-weight: 800; }
.menu-user-txt span { font-size: 11.8px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-user .pill { flex: none; }
.menu-nav { display: flex; flex-direction: column; gap: 12px; }
.menu-group { display: flex; flex-direction: column; gap: 3px; }
.menu-group-label {
  font-size: 10.6px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: #5B6A80; padding: 2px 4px 4px;
}
.menu-link {
  display: flex; align-items: center; gap: 11px;
  min-height: 48px; padding: 9px 11px; border-radius: 12px;
  color: var(--ink-soft); font-size: 14px; font-weight: 700;
  border: 1px solid transparent;
}
.menu-link:hover { background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.menu-link.is-on { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-dark); font-weight: 800; }
.menu-link-ico {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  display: inline-grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); color: #64748B;
}
.menu-link.is-on .menu-link-ico { background: #fff; border-color: var(--blue-line); color: var(--blue-dark); }
.menu-link-label { flex: 1; min-width: 0; }
.menu-link-chev { color: #94A3B8; flex: none; }
.menu-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 1px dashed var(--line); }

@media (max-width: 960px) {
  /* bar bawah: 6 menu utama, ikon + label, target ≥ 56 px */
  .sidebar {
    padding: 0 4px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
  }
  .sidebar .nav-item {
    min-height: 56px; height: var(--bottom);
    padding: 7px 2px calc(7px + env(safe-area-inset-bottom) * 0.25);
    gap: 3px;
  }
  .sidebar .nav-item .ico { width: 22px; height: 22px; }
  .sidebar .nav-short { font-size: 10.2px; line-height: 1.4; padding-bottom: 2px; }

  /* topbar: judul tidak boleh memakan seluruh lebar → chip/tombol tetap terlihat */
  .topbar { margin-bottom: 12px; gap: 8px; flex-wrap: nowrap; align-items: center; }
  .topbar-left { flex: 1 1 auto; gap: 9px; }
  .topbar-left > div { min-width: 0; }
  .topbar-right { flex: none; gap: 6px; }
  .page-title { font-size: 20px; padding-bottom: 6px; }
  .page-title::after { width: 30px; }
  .page-sub {
    font-size: 11.8px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
  }
  .top-actions { display: none; }              /* Akun & Bagikan ada di menu ⟩ */
  .nav-toggle { display: inline-flex; }
  .date-chip { padding: 6px 11px; font-size: 11.6px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }

  /* ruang konten: satu kolom, jarak lega, tidak menyentuh bar bawah */
  .main {
    padding: 12px 14px calc(var(--bottom) + 96px + env(safe-area-inset-bottom));
  }
  .card, .stat, .metric, .qcard, .ev-row { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 3px 10px rgba(15, 23, 42, 0.04); }
  .card-head { padding: 13px 14px 0; }
  .card-body { padding: 12px 14px 14px; }
  .section-label { margin: 16px 0 8px; }
  .section-gap { margin-top: 16px; }

  /* chip filter anak: geser horizontal, target 44 px, tepi kanan lega */
  .childbar { gap: 8px; padding: 2px 2px 4px; margin: 0 -2px; }
  .childchip { min-height: 44px; font-size: 12.6px; }
  .childchip-name { max-width: 122px; }
  .childchip.is-add { min-height: 44px; }

  /* kartu Status Cepat: avatar + nama 1 baris + progres juara + lencana */
  .qcard-list { gap: 10px; }
  .qcard {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px; padding: 12px; border-radius: 15px; align-items: start;
  }
  .qcard-av { align-self: center; }
  .qcard-name { font-size: 14.2px; line-height: 1.3; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qcard-meta { font-size: 11.4px; }
  .qcard-line { font-size: 11.9px; }
  .qcard-badge { align-self: start; padding-top: 1px; }
  .qcard-juara { margin-top: 5px; }
  .qcard-star { width: 16px; height: 16px; }

  /* Agenda hari ini: judul boleh 2 baris, aksi tetap ≥44 px */
  .agenda-list { gap: 9px; }
  .agenda-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px; padding: 10px 11px; align-items: center;
  }
  .agenda-row-all .agenda-title {
    white-space: normal; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3;
  }
  .agenda-row-all .agenda-meta { font-size: 11.4px; }
  .agenda-act .btn, .agenda-act .check-btn, .agenda-act .btn-xs {
    min-height: 44px; min-width: 44px; padding: 9px 13px; font-size: 12.6px;
  }
  .agenda-ico { width: 34px; height: 34px; }

  /* Acara & Pengingat: baris lebih lega, lencana boleh turun baris */
  .ev-list { gap: 9px; }
  .ev-row.is-compact { padding: 11px 12px; gap: 10px; border-radius: 14px; }
  .ev-facts { gap: 6px; }
  .ev-row.is-compact .ev-title { font-size: 13.8px; line-height: 1.35; }
  .ev-row.is-compact .ev-note { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ev-cat { font-size: 10.4px; padding: 3px 8px; }
  .ev-when { font-size: 10.6px; padding: 4px 9px; }

  /* Catat cepat → dua kartu aksi besar (ikon di atas, label di bawah) */
  .catat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .catat-btn {
    flex-direction: column; gap: 7px;
    min-height: 74px; padding: 13px 12px; border-radius: 16px;
    font-size: 13.4px; line-height: 1.25; text-align: center;
  }
  .catat-btn .ico { width: 20px; height: 20px; }

  /* FAB: tetap di kanan bawah, tidak menimpa bar maupun konten terakhir */
  .fab { bottom: calc(var(--bottom) + 14px + env(safe-area-inset-bottom)); right: 12px; }
  .fab-btn { width: 54px; height: 54px; }
  .page-foot { margin-top: 18px; }
}

@media (max-width: 560px) {
  .main { padding: 10px 12px calc(var(--bottom) + 100px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 19px; }
  .qcard-badge .sbadge { padding: 5px 9px; font-size: 10.8px; }
  .ev-row.is-compact { padding: 10px 11px; }
  .catat-btn { min-height: 72px; font-size: 13px; }
}

@media (max-width: 380px) {
  .main { padding: 10px 10px calc(var(--bottom) + 104px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 18px; }
  .topbar-right .date-chip { max-width: 40vw; }
  .qcard-badge { display: none; }          /* lencana Sehat/Cek Obat pindah ke teks */
  .qcard-name { font-size: 13.8px; }
  .agenda-act .btn, .agenda-act .btn-xs { padding: 8px 11px; font-size: 12px; }
  .ev-when { font-size: 10.2px; padding: 3px 8px; }
  .catat-btn { min-height: 70px; font-size: 12.6px; }
}

/* Progres “juara” di kartu anak — berlaku juga di desktop */
.qcard-juara { display: flex; flex-direction: column; gap: 4px; }
.qcard-juara-txt { font-size: 11.4px; font-weight: 700; color: var(--gold-deep); }
.qcard-juara-txt b { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.qcard .qcard-bar { height: 6px; border-radius: 4px; }
.qcard-av { position: relative; display: inline-flex; }
.qcard-star {
  position: absolute; right: -3px; bottom: -3px;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #FDE68A, #F5B301);
  border: 1.5px solid #fff; color: #7C2D12;
  box-shadow: 0 1px 4px rgba(180, 83, 9, 0.3);
}
.qcard-star .ico { width: 9px; height: 9px; fill: currentColor; stroke: currentColor; }

/* Sidebar desktop bisa dilipat jadi rail ikon (tombol sandwich) */
@media (min-width: 961px) {
  body.nav-mini .sidebar { width: 76px; padding: 16px 10px 14px; }
  body.nav-mini .brand-text,
  body.nav-mini .nav-label,
  body.nav-mini .nav-full,
  body.nav-mini .user-meta,
  body.nav-mini .user-plan { display: none; }
  body.nav-mini .nav-item { justify-content: center; padding: 11px 8px; }
  body.nav-mini .nav-item.active::before { height: 16px; }
  body.nav-mini .brand { justify-content: center; }
  body.nav-mini .user-top { justify-content: center; }
  body.nav-mini .user-foot { flex-direction: column; align-items: center; }
  body.nav-mini .main { margin-left: 76px; }
  body.nav-mini .sidebar .nav-group { gap: 2px; }
}

/* tombol kecil di HP tetap nyaman disentuh (≥44 px) & tombol menu tidak menyusut */
@media (max-width: 960px) {
  .btn-xs { min-height: 44px; padding: 9px 13px; font-size: 12.4px; }
  .card-actions .btn-xs { min-height: 44px; }
  .nav-toggle { flex: none; }
  .topbar-left { min-width: 0; }
  .date-chip { min-height: 40px; }
}
@media (max-width: 960px) {
  .btn-sm { min-height: 44px; }
  .btn-xs { min-width: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .row-actions .icon-btn { width: 40px; height: 40px; }   /* di tabel cukup 40 agar kolom aksi tidak melebar */
  .sheet-x { width: 44px; height: 44px; }
}
@media (max-width: 960px) {
  /* selektor harus lebih spesifik dari `.ev-actions .icon-btn` (34 px) di atas */
  .ev-actions .icon-btn { width: 44px; height: 44px; }
  .ev-actions { gap: 8px; }
}

/* ---------------------------------------------------- penyempurnaan akhir */
@media (max-width: 960px) {
  /* label bagian: huruf kapital kecil + spasi (mudah dipindai di layar kecil) */
  .section-label b {
    font-size: 12.4px; letter-spacing: 0.06em; text-transform: uppercase;
    color: #334155;
  }
  .section-label b::before { width: 3px; height: 14px; }
  .section-label > span { font-size: 10.8px; padding: 3px 9px; }
}
@media (max-width: 480px) {
  /* status kesehatan TETAP terlihat (jangan disembunyikan) → turun ke baris sendiri */
  .qcard { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .qcard-badge {
    display: block; grid-column: 2; justify-self: start;
    margin-top: 3px; padding-top: 0; align-self: auto;
  }
  .qcard-badge .sbadge { font-size: 10.6px; padding: 4px 9px; }
}

/* Notice (mis. kuota hampir habis) di HP: ringkas, tombol satu baris penuh */
@media (max-width: 960px) {
  .notice {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 9px; align-items: start;
    padding: 11px 12px; border-radius: 14px;
  }
  .notice > .ico { margin-top: 1px; }
  .notice b { font-size: 12.6px; line-height: 1.35; }
  .notice span { font-size: 11.7px; line-height: 1.45; }
  .notice .btn {
    grid-column: 1 / -1; margin: 7px 0 0; width: 100%;
    min-height: 44px; justify-content: center; font-size: 12.4px;
  }
}

/* =====================================================================
   FOTO & AVATAR ANAK (28 Nov 2026)
   ---------------------------------------------------------------------
   - Ada foto  → <img> penuh (object-fit: cover), ring putih + bayangan.
   - Tanpa foto → ilustrasi SVG sesuai jenis kelamin & usia
     (`lib/avatar.js`), bukan lagi sekadar inisial.
   ===================================================================== */

.avatar { background: var(--blue-soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ilustrasi: latar & ring sudah ada di dalam SVG, jadi jangan ditimpa */
.avatar-art {
  background: transparent;
  border-color: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.avatar-art svg { display: block; width: 100%; height: 100%; }

/* avatar lebih besar di kartu anak & profil */
.qcard-av .avatar { border-width: 2px; }
.childchip-av { border-width: 1.5px; }
.childchip .avatar-art { box-shadow: none; }

/* tombol kamera menempel di avatar profil */
.hero-av { position: relative; display: inline-flex; flex: none; }
.hero-av-btn {
  position: absolute; right: -2px; bottom: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--grad-blue); color: #fff;
  border: 2px solid #fff; box-shadow: 0 3px 10px rgba(29, 78, 216, 0.32);
}
.hero-av-btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.hero-av-btn .ico { width: 13px; height: 13px; }
.hero-av-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-dark); font-weight: 700; }
.hero-av-hint .ico { color: var(--blue); }

/* bingkai foto profil di panel unggah */
.photo-field { gap: 9px; }
.photo-btn { border-radius: 999px; }
.photo-thumb { border-radius: 12px; }

@media (max-width: 960px) {
  .hero-av-btn { width: 32px; height: 32px; }        /* target sentuh di HP */
  .hero-av-btn .ico { width: 15px; height: 15px; }
  .qcard-av .avatar { border-width: 1.5px; }
}

/* chip "Semua" (bukan anak): ikon kumpulan anak, bukan ilustrasi */
.childchip .chip-all {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark);
  border: 1.5px solid #fff;
}
.childchip.is-on .chip-all { background: #fff; }
