/* Todo – app-specifik styling ovenpå ui.css */
:root {
  --accent: #0f766e;
  --accent-ink: #ffffff;
}
html[data-theme="dark"] {
  --accent: #2dd4bf;
  --accent-ink: #062521;
}

.top { align-items: center; }

/* Person-vælger i headeren: hvis liste man ser (og lægger opgaver på) */
.who-seg { display: none; flex: 0 0 auto; margin-top: 4px; }
body.pick-person .who-seg { display: flex; }
body.viewing-other .hero { border-color: var(--accent); }
body.viewing-other .add-form { border-color: var(--accent); }

/* Hjem: hero */
.hero { padding: 18px 18px 16px; margin-top: 4px; }
.hero-count { display: flex; align-items: baseline; gap: 10px; }
.hero-count strong { font-size: 3.4rem; line-height: 0.9; font-variant-numeric: tabular-nums; }
.hero-count span { color: var(--muted); font-size: 0.95rem; }
.hero-next { margin: 10px 0 0; font-size: 1rem; color: var(--ink); }
.hero-next:empty { display: none; }
.hero-next b { font-weight: 650; }
body.all-done .hero { display: none; }
.empty-state { margin-top: 4px; }

/* Opgaverækker */
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks:empty { display: none; }
.tasks li { display: flex; align-items: center; }
.tasks li + li { border-top: 1px solid var(--line); }
.task-row {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 10px 14px;
  border: 0; background: none; text-align: left; font-size: 1rem;
}
.task-row:active { background: var(--surface-2); }
.task-row[disabled] { cursor: default; }
.task-row .task-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tasks li.open .task-title { font-weight: 600; }
.tasks li.next .task-row { box-shadow: inset 3px 0 0 var(--accent); }
.tasks li.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.tasks .del { margin: 5px 6px 5px 0; color: var(--muted); }
.tasks .del:active { color: var(--danger); }
.tasks .who { font-size: 0.72rem; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: 999px; flex: 0 0 auto; }
.tasks li.empty { padding: 14px; color: var(--muted); font-size: 0.9rem; }

/* Udfoldede handlinger under en række (Redigér / Flyt / Fjern) */
.tasks li.task-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px 10px 50px; background: var(--surface-2);
  border-top: 1px dashed var(--line);
}
.tasks li.task-actions .btn.sm { padding: 6px 10px; min-height: 34px; font-size: 0.84rem; gap: 6px; }
.tasks li.task-actions .btn + .btn { margin-top: 0; }
.tasks li.task-actions .btn.sm .ic { width: 16px; height: 16px; }
.tasks li.task-actions .btn.ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.tasks li.task-actions .btn.danger-text { color: var(--danger); }
.tasks li.task-edit { display: block; padding: 8px 10px 10px; background: var(--surface-2); border-top: 1px dashed var(--line); }
.tasks li.task-edit .edit-form { margin: 0; }
.tasks li.task-edit .edit-cancel { margin-top: 4px; }
.tasks .more { margin: 5px 6px 5px 0; color: var(--muted); flex: 0 0 auto; }
.tasks .btn svg, .tasks .icon-btn svg { pointer-events: none; }
.tasks li.expanded .more { color: var(--accent); }

.add-form { margin-top: 14px; }
.home-dock { margin-top: 14px; }
.home-dock:empty { display: none; }

.segmented.mini { padding: 2px; border-radius: 9px; }
.segmented.mini button { padding: 5px 12px; font-size: 0.8rem; border-radius: 7px; min-height: 28px; }

/* Indkøb */
#shopDock { margin-top: 14px; }
#shopDock:has(.hidden:only-child) { display: none; }
#view-shop .empty-state { margin-top: 0; }

/* Uge */
.page-title { font-size: 1.7rem; margin: 16px 0 12px; }
#weekSeg { margin-top: 4px; }
.week { list-style: none; margin: 0; padding: 0; }
.week-row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 14px; border: 0; background: none; text-align: left;
}
.week-row:active { background: var(--surface-2); }
.week-row .day { flex: 0 0 auto; width: 3.2rem; }
.week-row .day strong { display: block; font-family: var(--font-display); font-size: 1.45rem; line-height: 1; font-weight: 400; }
.week-row .day span { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.week-row .bar { flex: 1; min-width: 0; }
.week-row .bar .meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.week-row .bar .meta b { color: var(--ink); font-weight: 600; }
.week-row.today .day strong { color: var(--accent); }
.week-row.today .day span { color: var(--accent); }
.week-row.past { opacity: 0.6; }
.week-row.missed { opacity: 1; }
.week-row.missed .bar .meta b { color: var(--warn); }
.week-hint { margin: -4px 0 12px; font-size: 0.86rem; color: var(--warn); }
.week-row .ic { color: var(--muted); flex: 0 0 auto; }
.back { justify-content: flex-start; padding-left: 4px; margin-top: 2px; }
.back .ic { width: 18px; height: 18px; }

/* Ugeplan */
.lead-text { margin: 0 2px 14px; }
.plan-day { margin-bottom: 12px; }
.plan-day .day-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 10px; font-weight: 650;
}
.plan-day .day-head .count { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.plan-day .tasks li:first-child { border-top: 1px solid var(--line); }
.plan-day .add-plan { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding-left: 14px; }
.plan-day .add-plan:focus-within { box-shadow: none; border-color: var(--line); }
.plan-day .add-plan .icon-btn { background: var(--surface-2); color: var(--accent); }
.plan-day .empty { padding: 4px 14px 12px; color: var(--muted); font-size: 0.88rem; }
