/* KeluargaKu — palet: soft blue, teal, putih, abu-abu lembut */
:root {
  --fc-teal: #2f8f9d;
  --fc-teal-dark: #23707c;
  --fc-blue: #6ea8d8;
  --fc-blue-soft: #eaf3fb;
  --fc-teal-soft: #e4f4f5;
  --fc-bg: #f5f8fa;
  --fc-ink: #1f2d3a;
  --fc-muted: #66788a;
  --fc-line: #e2e9ef;
  --fc-ok: #2e9d6b;
  --fc-warn: #d99a1c;
  --fc-danger: #d2475b;
  --fc-radius: 16px;
  --bs-primary: var(--fc-teal);
  --bs-primary-rgb: 47, 143, 157;
  --bs-link-color: var(--fc-teal-dark);
  --bs-link-hover-color: #185a64;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "DejaVu Sans", sans-serif;
  --bs-body-bg: var(--fc-bg);
  --bs-body-color: var(--fc-ink);
  --bs-body-font-size: 1rem;
  --bs-border-radius: 12px;
  --bs-border-radius-lg: var(--fc-radius);
}
body { background: var(--fc-bg); color: var(--fc-ink); -webkit-font-smoothing: antialiased; }
.btn-primary { --bs-btn-bg: var(--fc-teal); --bs-btn-border-color: var(--fc-teal); --bs-btn-hover-bg: var(--fc-teal-dark);
  --bs-btn-hover-border-color: var(--fc-teal-dark); --bs-btn-active-bg: var(--fc-teal-dark); --bs-btn-disabled-bg: var(--fc-teal); }
.btn-outline-primary { --bs-btn-color: var(--fc-teal-dark); --bs-btn-border-color: var(--fc-teal); --bs-btn-hover-bg: var(--fc-teal); --bs-btn-hover-border-color: var(--fc-teal); }
.btn { min-height: 44px; font-weight: 600; }
.btn-sm { min-height: 34px; }
.form-control, .form-select { border-color: #cfdbe5; }
.form-control:focus, .form-select:focus { border-color: var(--fc-teal); box-shadow: 0 0 0 .25rem rgba(47,143,157,.2); }

/* Layout aplikasi */
.fc-shell { min-height: 100vh; }
.fc-brand { color: var(--fc-teal-dark); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.01em; }
.fc-brand i { color: var(--fc-teal); }
.fc-brand-lg { font-size: 1.9rem; }
.fc-sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: #fff; border-right: 1px solid var(--fc-line); padding: 1.25rem 1rem; z-index: 20; }
.fc-nav { margin-top: 1.5rem; gap: .2rem; }
.fc-nav .nav-link { color: var(--fc-ink); border-radius: 12px; padding: .7rem .9rem; display: flex; align-items: center; gap: .7rem; font-weight: 500; }
.fc-nav .nav-link:hover { background: var(--fc-blue-soft); }
.fc-nav .nav-link.active { background: var(--fc-teal-soft); color: var(--fc-teal-dark); font-weight: 700; }
.fc-sidebar-foot { border-top: 1px solid var(--fc-line); padding-top: 1rem; }
.fc-content { min-height: 100vh; }
.fc-topbar { position: sticky; top: 0; z-index: 15; background: #fff; border-bottom: 1px solid var(--fc-line); padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.fc-main { padding: 1.25rem 1rem 6.5rem; max-width: 1100px; }
@media (min-width: 992px) {
  .fc-content { margin-left: 250px; }
  .fc-main { padding: 2rem 2rem 3rem; }
}
.fc-bottomnav { position: fixed; inset: auto 0 0 0; z-index: 30; background: #fff; border-top: 1px solid var(--fc-line);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); }
.fc-bottomnav a, .fc-bottomnav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: .55rem 0 .45rem;
  color: var(--fc-muted); text-decoration: none; font-size: .72rem; background: none; border: 0; min-height: 58px; }
.fc-bottomnav i { font-size: 1.35rem; }
.fc-bottomnav a.active { color: var(--fc-teal-dark); font-weight: 700; }
.d-contents { display: contents; }

/* Halaman publik */
.fc-public { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem;
  background: linear-gradient(160deg, var(--fc-blue-soft), var(--fc-teal-soft)); }
.fc-public-card { width: 100%; max-width: 440px; background: #fff; border-radius: 24px; padding: 2rem 1.5rem; box-shadow: 0 12px 40px rgba(31,45,58,.08); }
@media (min-width: 576px) { .fc-public-card { padding: 2.5rem 2.25rem; } }

/* Kartu */
.fc-card { background: #fff; border: 1px solid var(--fc-line); border-radius: var(--fc-radius); padding: 1.25rem; height: 100%; }
.fc-card-link { text-decoration: none; color: inherit; display: block; transition: box-shadow .15s, transform .15s; }
.fc-card-link:hover { box-shadow: 0 8px 24px rgba(31,45,58,.08); transform: translateY(-1px); color: inherit; }
.fc-stat { font-size: 1.8rem; font-weight: 800; line-height: 1.1; color: var(--fc-teal-dark); }
.fc-section-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.fc-pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.fc-pagehead h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.fc-settings-link { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; }
.fc-settings-link i.lead-icon { font-size: 1.5rem; color: var(--fc-teal); width: 2rem; text-align: center; }

/* Avatar */
.fc-avatar { border-radius: 50%; object-fit: cover; background: var(--fc-blue-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fc-avatar-sm { width: 40px; height: 40px; }
.fc-avatar-md { width: 56px; height: 56px; }
.fc-avatar-lg { width: 96px; height: 96px; }
.fc-avatar-empty { color: var(--fc-blue); }
.fc-avatar-md.fc-avatar-empty { font-size: 1.7rem; }
.fc-avatar-lg.fc-avatar-empty { font-size: 3rem; }
.fc-avatar-sm.fc-avatar-empty { font-size: 1.2rem; }

/* Progres kuota */
progress.fc-progress { width: 100%; height: 10px; border: 0; border-radius: 10px; background: var(--fc-line); overflow: hidden; display: block; appearance: none; -webkit-appearance: none; }
progress.fc-progress::-webkit-progress-bar { background: var(--fc-line); border-radius: 10px; }
progress.fc-progress::-webkit-progress-value { background: var(--fc-teal); border-radius: 10px; }
progress.fc-progress::-moz-progress-bar { background: var(--fc-teal); border-radius: 10px; }
progress.fc-progress.is-full::-webkit-progress-value { background: var(--fc-danger); }
progress.fc-progress.is-full::-moz-progress-bar { background: var(--fc-danger); }

/* Tab anak */
.fc-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--fc-line); margin-bottom: 1.25rem; scrollbar-width: none; }
.fc-tabs::-webkit-scrollbar { display: none; }
.fc-tab { padding: .7rem 1rem; white-space: nowrap; color: var(--fc-muted); text-decoration: none; border-bottom: 3px solid transparent; font-weight: 600; }
.fc-tab.active { color: var(--fc-teal-dark); border-bottom-color: var(--fc-teal); }
.fc-tab.disabled { opacity: .55; cursor: not-allowed; }
.fc-tab .badge { font-size: .6rem; vertical-align: middle; }

/* Timeline riwayat */
.fc-timeline { list-style: none; margin: 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--fc-line); }
.fc-timeline li { position: relative; padding: 0 0 1.25rem 1.25rem; }
.fc-timeline li::before { content: ""; position: absolute; left: -1.8rem; top: .3rem; width: .85rem; height: .85rem; border-radius: 50%; background: var(--fc-teal); border: 3px solid var(--fc-bg); }

.fc-empty-icon { font-size: 3rem; color: var(--fc-blue); }
.fc-chart-wrap { position: relative; height: 320px; }
.fc-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.8rem; letter-spacing: .25em; font-weight: 700; color: var(--fc-teal-dark); background: var(--fc-teal-soft); border-radius: 12px; padding: .6rem 1rem; display: inline-block; user-select: all; }
.fc-otp { text-align: center; letter-spacing: .5em; font-size: 1.8rem; font-weight: 700; }
.fc-steps { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.fc-step { flex: 1; text-align: center; font-size: .8rem; color: var(--fc-muted); border-top: 4px solid var(--fc-line); padding-top: .4rem; }
.fc-step.done { border-top-color: var(--fc-teal); color: var(--fc-teal-dark); font-weight: 700; }
.table > :not(caption) > * > * { padding: .75rem .75rem; }
.fc-note { background: var(--fc-blue-soft); border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; color: #35566f; }
.visually-hidden-focusable:not(:focus):not(:focus-within) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Lebar formulir (menggantikan atribut style inline agar sesuai CSP) */
.fc-w-520 { max-width: 520px; } .fc-w-560 { max-width: 560px; } .fc-w-600 { max-width: 600px; }
.fc-w-640 { max-width: 640px; } .fc-w-360 { max-width: 360px; }

/* Tabel: garis halus konsisten */
.table { --bs-table-border-color: var(--fc-line); --bs-table-bg: transparent; }
.table > :not(:last-child) > :last-child > * { border-bottom-color: var(--fc-line); }
.table > :not(caption) > * > * { border-bottom-width: 1px; }
.table > :not(:first-child) { border-top: 0; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--fc-muted); }

/* Obat & jadwal */
.min-w-0 { min-width: 0; }
.fc-occ { padding: .9rem 1rem; border-bottom: 1px solid var(--fc-line); }
.fc-occ:last-child { border-bottom: 0; }
.fc-occ-time { font-weight: 800; font-size: 1.15rem; color: var(--fc-teal-dark); min-width: 3.4rem; font-variant-numeric: tabular-nums; }
.fc-occ-overdue { background: #fff8e6; }
.fc-occ-actions .btn { min-height: 44px; }
.fc-choice { padding: .75rem .75rem .75rem 2.25rem; border: 1px solid var(--fc-line); border-radius: 12px; margin-bottom: .5rem; }
.fc-choice .form-check-input { margin-top: .35rem; }
[hidden] { display: none !important; }
