:root {
  --ink: #342a46;
  --muted: #6e6382;
  --line: #e4def2;
  --bg-soft: #f5f1fa;
  --bg-card: #ffffff;
  --accent: #9b8bc4;
  --accent-dark: #67529c;
  --accent-tint: #ece7f7;
  /* For solid fills with white text (buttons, active chips) — unlike
     --accent-dark, this never flips light in dark mode, so white text on
     it always stays readable. */
  --accent-solid: #67529c;
  --danger: #b8341f;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(52, 42, 70, 0.05), 0 4px 14px rgba(52, 42, 70, 0.08);
  --shadow-hover: 0 4px 10px rgba(52, 42, 70, 0.08), 0 10px 26px rgba(52, 42, 70, 0.14);
  color-scheme: light dark;
}

/* Dark mode: follows the system by default ([data-theme] unset), or an
   explicit choice from Instellingen ([data-theme="dark"/"light"] wins both
   directions). The login screen keeps its own fixed sand/lavender look on
   purpose — it's a pre-auth branding moment, not part of the in-app theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #efeaf7;
    --muted: #a99bc9;
    --line: #3c3454;
    --bg-soft: #1a1627;
    --bg-card: #241e35;
    --accent: #b0a0da;
    --accent-dark: #cabdec;
    --accent-tint: #352c4d;
    --accent-solid: #7d63bf;
    --danger: #e3795f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.3), 0 10px 26px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #efeaf7;
  --muted: #a99bc9;
  --line: #3c3454;
  --bg-soft: #1a1627;
  --bg-card: #241e35;
  --accent: #b0a0da;
  --accent-dark: #cabdec;
  --accent-tint: #352c4d;
  --accent-solid: #7d63bf;
  --danger: #e3795f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.3), 0 10px 26px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  letter-spacing: -0.5px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: 15px;
}

/* ---------- Landing / sign-in ---------- */

#landing {
  min-height: 100vh;
  background: #f5f1fa;
  color: #342a46;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 24px 24px;
  text-align: center;
}

.landing-stage {
  width: 100%;
  max-width: 440px;
}

.landing-scale {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 26px;
}

.landing-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid #9b8bc4;
  opacity: 0;
  animation: landing-pulse 2.6s ease-out infinite;
}

.landing-ring.r2 { animation-delay: 0.85s; }
.landing-ring.r3 { animation-delay: 1.7s; }

@keyframes landing-pulse {
  0% { transform: scale(0.55); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 0; }
}

.landing-core {
  position: absolute;
  inset: 40px;
  border-radius: 999px;
  background: #dfa23e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  box-shadow: 0 16px 30px -12px rgba(223, 162, 62, 0.7);
}

.landing-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.landing-sub {
  margin: 0 auto 24px;
  font-size: 15px;
  color: #6e6382;
  line-height: 1.5;
  max-width: 380px;
}

.landing-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #342a46;
  color: #f5f1fa;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.landing-primary svg {
  background: #fff;
  border-radius: 999px;
  padding: 3px;
  box-sizing: content-box;
}

.landing-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 13px 18px;
  border: 1.5px dashed #9b8bc4;
  border-radius: 999px;
  background: transparent;
  color: #6e6382;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: not-allowed;
}

.landing-hint {
  margin: 14px auto 0;
  max-width: 340px;
  font-size: 12px;
  line-height: 1.45;
  color: #6e6382;
}

.landing-foot {
  margin-top: 36px;
  font-size: 12px;
  color: #6e6382;
}

/* ---------- App shell ---------- */

#app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 84px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar .brand-small {
  font-weight: 800;
  font-size: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.view {
  padding: 20px 18px 8px;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.view-header h1 {
  font-size: 24px;
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn-primary, .btn-secondary, .btn-icon {
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent-solid);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(0.92);
}

.btn-secondary {
  background: var(--accent-tint);
  color: var(--accent-dark);
  border: 1px solid transparent;
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary:disabled:hover {
  border-color: transparent;
}

.btn-small {
  padding: 9px 14px;
  font-size: 13.5px;
}

.btn-icon {
  background: transparent;
  font-size: 18px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-icon:hover {
  background: var(--accent-tint);
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 28px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.section-header h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

/* ---------- Baby summary / stats ---------- */

.baby-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.baby-avatar {
  font-size: 28px;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  border-radius: 50%;
  overflow: hidden;
}

.baby-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.baby-info {
  flex: 1;
  min-width: 0;
}

.baby-name {
  font-weight: 700;
  font-size: 17px;
}

.baby-age {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-tile {
  flex: 1;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
}

.stat-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.quick-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.quick-action-btn:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.qa-icon {
  font-size: 22px;
}

/* ---------- Growth ---------- */

.subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.subtab-btn {
  flex-shrink: 0;
  border: none;
  background: var(--bg-card);
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.subtab-btn.active {
  background: var(--accent-solid);
  color: #fff;
}

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 14px;
  margin-bottom: 16px;
}

.growth-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 11px 13px;
  box-shadow: var(--shadow);
}

.entry-main {
  flex: 1;
  min-width: 0;
}

.entry-value {
  font-weight: 700;
  font-size: 15px;
}

.entry-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.entry-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
}

.entry-actions {
  display: flex;
  gap: 2px;
}

.entry-actions button {
  background: transparent;
  border: none;
  font-size: 17px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--ink);
  opacity: 0.6;
}

.entry-actions button:hover,
.entry-actions button:active {
  background: var(--accent-tint);
  color: var(--accent-dark);
  opacity: 1;
}

.entry-actions button[data-action="delete"] {
  color: var(--danger);
  opacity: 0.55;
}

.entry-actions button[data-action="delete"]:hover,
.entry-actions button[data-action="delete"]:active {
  background: rgba(184, 52, 31, 0.12);
  color: var(--danger);
  opacity: 1;
}

/* ---------- Placeholder cards (Bluetooth / photo) ---------- */

.placeholder-card {
  display: flex;
  gap: 12px;
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 16px;
}

.placeholder-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.placeholder-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--accent-dark);
}

.placeholder-text {
  font-size: 12.5px;
  color: var(--ink);
  opacity: 0.75;
  line-height: 1.4;
  margin: 3px 0 8px;
}

.photo-preview {
  display: block;
  max-width: 100%;
  max-height: 140px;
  border-radius: var(--radius);
  margin-top: 8px;
  object-fit: cover;
}

/* ---------- Milestones (groeiboekje) ---------- */

.milestone-progress {
  margin: -8px 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.milestone-progress b {
  color: var(--accent-dark);
}

.milestone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.milestone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 6px;
  box-shadow: var(--shadow);
  /* Not-yet-achieved reads as quietly pending, not as a chore list. */
  opacity: 0.55;
  filter: grayscale(0.4);
}

.milestone-card.achieved {
  opacity: 1;
  filter: none;
  border-color: var(--accent);
  background: var(--accent-tint);
  box-shadow: var(--shadow-hover);
}

.milestone-icon {
  font-size: 22px;
}

.milestone-card-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.milestone-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
}

.milestone-status {
  font-size: 10.5px;
  color: var(--muted);
}

.milestone-typical {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.2;
}

.milestone-card.achieved .milestone-status {
  color: var(--accent-dark);
  font-weight: 700;
}

.milestone-entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.milestone-entry {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.milestone-entry-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.milestone-entry-body {
  flex: 1;
  min-width: 0;
}

.milestone-entry-title {
  font-weight: 700;
  font-size: 14.5px;
}

/* A single slim row instead of a tall empty-state card — three of these
   stacked (vaccinations/memories/health) would otherwise be a lot of blank
   white space for nothing. */
.section-empty-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px;
  font-size: 13px;
  color: var(--muted);
}

.milestone-entry-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.milestone-entry-note {
  font-size: 12.5px;
  margin-top: 5px;
}

/* ---------- Bottom nav ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  gap: 4px;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 0;
  border-radius: var(--radius);
}

.nav-btn .nav-icon {
  font-size: 20px;
}

.nav-btn.active {
  color: var(--accent-dark);
  background: var(--accent-tint);
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 51, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  max-height: 88vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal form input,
.modal form select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  background: var(--bg-card);
}

.photo-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-preview-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--accent-tint);
}

.photo-picker-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-upload-btn {
  display: inline-flex;
  cursor: pointer;
}

.photo-remove-btn {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
  padding: 0;
}

.field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 2px 0 -4px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.form-actions .btn-secondary#milestone-delete-btn,
.form-actions .btn-secondary#baby-delete-btn {
  color: var(--danger);
  margin-right: auto;
}

/* ---------- Baby switcher ---------- */

.baby-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px 2px;
}

/* With a single baby there's nothing to switch between — a quiet outline
   chip (plus the small "+") instead of a bold filled pill. */
.baby-switcher.compact .baby-chip {
  padding: 5px 11px;
  font-size: 12px;
  box-shadow: none;
}

.baby-switcher.compact .baby-chip.active {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.baby-switcher.compact .baby-chip.active.sex-boy { color: #2f6fd1; border-color: #cfe1fb; }
.baby-switcher.compact .baby-chip.active.sex-girl { color: #d1447e; border-color: #f9d3e4; }

.baby-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.baby-chip.active {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: #fff;
}

.chip-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.baby-chip.sex-boy {
  background: #eaf2ff;
  border-color: #cfe1fb;
  color: #2f6fd1;
}

.baby-chip.sex-boy.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: #fff;
}

.baby-chip.sex-girl {
  background: #fdedf3;
  border-color: #f9d3e4;
  color: #d1447e;
}

.baby-chip.sex-girl.active {
  background: #ec6fa0;
  border-color: #ec6fa0;
  color: #fff;
}

.baby-chip-add {
  background: transparent;
  border: 1px dashed var(--line);
  box-shadow: none;
  color: var(--accent-dark);
}

.baby-chip-add:hover {
  border-color: var(--accent);
}

@media (min-width: 480px) {
  .modal-overlay {
    align-items: center;
  }
  .modal {
    border-radius: var(--radius-lg);
  }
}

/* ---------- Growth chart mode ---------- */

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.segmented {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.segmented-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  min-height: 32px;
}

.segmented-btn.active {
  background: var(--bg-card);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
}

.chart-unit-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.chart-unit-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.percentile-sentence {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: var(--accent-tint);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-dark);
  line-height: 1.4;
}

.curve-note {
  margin: 10px 0 0;
  text-align: center;
}

/* ---------- Logboek ---------- */

.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.day-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
  color: var(--accent-dark);
}

.day-nav-btn:hover {
  background: var(--accent-tint);
}

.day-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}

.day-label {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}

/* Kind colors: a distinct, memorable accent per quick-log action so they're
   recognizable at a glance (one-handed, half asleep, at night). */
.kind-breast { --kind-bg: #fbe8ee; --kind-fg: #9c3f5d; }
.kind-bottle { --kind-bg: #e7f1f8; --kind-fg: #2c6693; }
.kind-sleep { --kind-bg: #e8e6f5; --kind-fg: #4b4580; }
.kind-diaper { --kind-bg: #faeedc; --kind-fg: #8a5a1f; }

.quick-log-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.quick-log-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 80px;
  background: var(--kind-bg);
  border: none;
  border-radius: var(--radius-lg);
  padding: 12px 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--kind-fg);
  box-shadow: var(--shadow);
}

.quick-log-btn:hover,
.quick-log-btn:active {
  box-shadow: var(--shadow-hover);
  filter: brightness(0.97);
}

.quick-log-btn .qa-icon {
  font-size: 26px;
}

.log-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.log-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 11px 10px;
  box-shadow: var(--shadow);
}

.log-card-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.log-card-value {
  font-size: 19px;
  font-weight: 800;
  margin-top: 4px;
  color: var(--ink);
}

.log-card-value.is-zero {
  color: var(--muted);
  font-weight: 700;
}

.log-card-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}

/* ---------- Side / type pickers (breast, diaper) ---------- */

.side-choice {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.side-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--accent-tint);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 16px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
}

.side-btn:hover {
  border-color: var(--accent);
}

.side-btn.active {
  background: var(--accent-solid);
  color: #fff;
  border-color: var(--accent-solid);
}

.side-btn span:first-child {
  font-size: 22px;
}

.side-choice-compact {
  margin-bottom: 10px;
}

.side-choice-compact .side-btn {
  flex-direction: row;
  padding: 10px 8px;
  font-size: 13px;
}

.side-choice-compact .side-btn span:first-child {
  font-size: 16px;
}

/* ---------- Profile form extras ---------- */

.gestation-row {
  display: flex;
  gap: 10px;
}

.gestation-row select {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.field-help {
  font-size: 12px;
  color: var(--muted);
  margin: -2px 0 0;
  line-height: 1.4;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-form select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  width: 100%;
}

.settings-signout-row {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- Export / print report ---------- */

.export-btn {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  font-size: 14px;
}

#print-report {
  display: none;
}

@media print {
  @page {
    margin: 16mm;
  }

  body > *:not(#print-report) {
    display: none !important;
  }

  #print-report {
    display: block !important;
    color: #000;
    background: #fff;
    font-size: 11pt;
    line-height: 1.4;
  }

  #print-report h1 {
    font-size: 20pt;
    margin: 0 0 4pt;
  }

  #print-report h2 {
    font-size: 14pt;
    margin: 14pt 0 6pt;
    border-bottom: 1px solid #999;
    padding-bottom: 2pt;
  }

  #print-report h3 {
    font-size: 11pt;
    margin: 8pt 0 4pt;
  }

  #print-report p {
    margin: 2pt 0;
  }

  .print-meta,
  .print-note {
    color: #555;
    font-size: 9.5pt;
  }

  .print-section {
    break-inside: avoid;
  }

  #print-report canvas {
    width: 100% !important;
    height: auto !important;
    margin: 6pt 0;
  }

  #print-report table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6pt;
  }

  #print-report th,
  #print-report td {
    text-align: left;
    padding: 3pt 4pt;
    border-bottom: 1px solid #ddd;
    font-size: 10pt;
  }

  #print-report th {
    font-weight: 700;
  }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  /* Fixed, not themed: a toast is a dark pill with white text in both light
     and dark mode (it would otherwise invert to white-on-white when --ink
     flips for dark mode). */
  background: #2a2438;
  color: #fff;
  padding: 10px 10px 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  white-space: nowrap;
  z-index: 30;
  box-shadow: var(--shadow-hover);
}

.toast-action {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 999px;
  min-height: 36px;
}

.toast-action:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ---------- Logboek entries ---------- */

.log-day-group {
  margin-bottom: 14px;
}

.log-day-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px 2px;
}

.log-entry-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--kind-bg);
  color: var(--kind-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.log-entry.is-editable {
  cursor: pointer;
}

.log-entry.is-editable:hover {
  box-shadow: var(--shadow-hover);
}

.log-empty {
  text-align: center;
  padding: 32px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.log-empty-icon {
  font-size: 30px;
  margin-bottom: 8px;
}

.log-empty p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}
