/* Dashboard (web/dashboard.js): Nu-kaart, signalen, weekscore, gewicht. Kleuren en lettertypes uit app.css. */
.dash [hidden] { display: none !important; }
.dash .when { display: flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) { .dash #when { display: none; } .dash .when { order: 1; } .dash .tabs { order: 2; } }
.dash .when .icon { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; min-width: 34px; min-height: 34px; cursor: pointer; font-size: 16px; }
.now-wrap { gap: 12px; }

/* vandaag in één regel */
.dayline { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.dayline .date { font-family: var(--f-display); font-weight: 700; font-size: 28px; text-transform: uppercase; line-height: 1; margin-right: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 3px 11px; font-size: 13.5px; min-height: 28px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip .dot.groen { background: var(--good); }
.chip .dot.oranje { background: var(--warning); }
.chip .dot.rood { background: var(--critical); }
.chip .dot.onbekend { box-shadow: inset 0 0 0 1.5px var(--muted); }
.chip .muted { color: var(--muted); }

/* de Nu-kaart */
.nu { border-left: 5px solid var(--accent); padding: 18px 20px; gap: 10px; }
.nu .kind { font-size: 12.5px; color: var(--muted); }
.nu-kop { font-size: clamp(28px, 6vw, 38px); text-transform: none; letter-spacing: 0; }
.nu-tekst { font-size: 17px; max-width: 64ch; }
.nu-reden { font-size: 14.5px; color: var(--muted); border-left: 3px solid var(--warning); padding: 2px 0 2px 10px; max-width: 64ch; }

/* knoppen */
.acts-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 42px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .55; cursor: default; }
.wform input { width: 6.5em; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: 17px var(--f-mono); }
.wform .unit { color: var(--muted); margin-right: 4px; }

/* signalen */
.signals { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.signals:empty { display: none; }
@media (min-width: 820px) { .signals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sig { gap: 8px; grid-template-rows: auto auto 1fr auto; }
.sig h3 { font-size: 21px; }
.sig p { font-size: 14.5px; }
.sig .sig-reden { font-size: 13px; color: var(--muted); }
.sig .acts-row { align-self: end; }

/* Even rust: stemming kiezen, de aanrader en de lijst met sessies (dashboard.js, renderRust) */
.rust-kies { gap: 14px; }
.rust-moods { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rust-vraag { font-weight: 600; margin-right: 4px; }
.mood { min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: 500 15px var(--f-body); cursor: pointer; }
.mood:hover { border-color: var(--accent-soft); }
.mood[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mood:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rust-tip { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start;
  background: var(--accent-wash); border-radius: 12px; padding: 12px; }
.rust-tip h3 { font-size: 24px; text-transform: none; letter-spacing: 0; }
.rust-tip p { font-size: 15px; max-width: 60ch; }
.rust-beeld { width: 112px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; background: var(--sunk); }
.rust-body { display: grid; gap: 6px; min-width: 0; align-content: start; }
.rust-body .acts-row { margin-top: 2px; }
.rust-of { display: grid; gap: 6px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.rust-lijst-kop { font: 600 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rust-lijst { display: grid; gap: 0; }
.rust-optie { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0;
  border-top: 1px solid var(--grid); }
.rust-lijst .rust-optie:first-child { border-top: 0; padding-top: 2px; }
.rust-optie.klein { border-top: 0; padding: 0; }
.rust-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; background: var(--sunk); }
.rust-thumb.leeg, .rust-beeld.leeg { display: block; }
.rust-titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rust-titel b { font-weight: 600; font-size: 16px; }
.rust-soort { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.rust-oms { font-size: 14px; color: var(--muted); }
.rust-effect { font-size: 13px; color: var(--good-text); }
@media (max-width: 520px) {
  /* smal: het beeld als brede strook boven de tekst, zodat tekst en knoppen de hele breedte hebben */
  .rust-tip { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rust-beeld { width: 100%; aspect-ratio: 16 / 6; object-position: center 32%; }
  .rust-tip h3 { font-size: 22px; }
  .rust-optie { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
  .rust-thumb { width: 52px; height: 52px; }
}

/* weekscore */
.habits { gap: 0; padding: 4px 16px 14px; }
.habit { display: grid; grid-template-columns: minmax(8em, 1fr) auto minmax(7.5em, auto); gap: 6px 18px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--grid); }
.habit.head { border-top: 0; padding: 8px 0 2px; }
.hname { display: grid; min-width: 0; }
.hname b { font-weight: 600; }
.hname span { font-size: 12.5px; color: var(--muted); }
.hdays { display: grid; grid-template-columns: repeat(7, 28px); gap: 5px; justify-content: center; }
.hl { text-align: center; font: 500 11.5px var(--f-mono); color: var(--muted); }
.hl.is-today { color: var(--accent); font-weight: 600; }
.d7 { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 11px var(--f-mono); font-style: normal;
  color: var(--muted); }
.d7.ja { background: var(--accent); color: var(--accent-ink); }
.d7.gepland { background: var(--accent-wash); box-shadow: inset 0 0 0 1.5px var(--accent-soft); }
.d7.nee { box-shadow: inset 0 0 0 1.5px var(--warn-text); color: var(--warn-text); font-size: 13px; }
.d7.open { border: 1.5px dashed var(--accent); }
.d7.leeg { background: radial-gradient(circle, var(--axis) 0 2.5px, transparent 3px); }
.d7.later { box-shadow: inset 0 0 0 1px var(--grid); }
.d7.is-today { outline: 2px solid var(--accent); outline-offset: 2px; }
.hscore { display: grid; justify-items: end; gap: 3px; text-align: right; }
.hscore .v { font: 500 18px var(--f-mono); font-variant-numeric: tabular-nums; }
.hscore .v small { font-size: 13px; color: var(--muted); }
.hscore .prev { font-size: 11.5px; color: var(--muted); }
.habit[data-status="achter"] .hname b { color: var(--warn-text); }
.habits .legend { padding-top: 10px; border-top: 1px solid var(--grid); }
.legend .d7.sw { display: inline-grid; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; }
.legend .d7.sw.open { border-width: 1px; }
@media (max-width: 600px) {
  .habit { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name score" "days days"; }
  .habit .hname { grid-area: name; }
  .habit .hscore { grid-area: score; grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; }
  .habit .hscore .prev { grid-column: 1 / -1; }
  .habit .hdays { grid-area: days; grid-template-columns: repeat(7, minmax(0, 1fr)); justify-content: stretch; justify-items: center; }
  .habit.head .hname, .habit.head .hscore { display: none; }
  .habit.head { grid-template-areas: "days days"; padding-bottom: 0; }
}

/* gewicht */
.weigh { gap: 12px; }
.weigh .hint { font-size: 13px; color: var(--muted); }

.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--surface); border-radius: 10px; padding: 9px 14px; font-size: 14px; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }
