/* Handle — iOS Human Interface Guidelines styling. Light/dark via prefers-color-scheme.
   One tint color only (calm green). No gradients, no decorative shapes, hairline borders. */

:root {
  /* -------- iOS system colors (light) -------- */
  --systemGroupedBackground: #f2f2f7;
  --secondarySystemGroupedBackground: #ffffff;
  --tertiarySystemGroupedBackground: #f2f2f7;
  --label: #000000;
  --secondaryLabel: rgba(60, 60, 67, .6);
  --tertiaryLabel: rgba(60, 60, 67, .3);
  --quaternaryLabel: rgba(60, 60, 67, .18);
  --separator: rgba(60, 60, 67, .29);
  --opaqueSeparator: #c6c6c8;
  --systemFill: rgba(120, 120, 128, .2);
  --secondarySystemFill: rgba(120, 120, 128, .16);
  --navBg: rgba(248, 248, 248, .82);
  --cardShadow: 0 1px 1.5px rgba(0, 0, 0, .06);

  --tint: #2e9e5b;
  --tint-ink: #ffffff;
  --systemRed: #ff3b30;
  --systemOrange: #ff9500;
  --systemYellow: #ffcc00;
  --systemBlue: #007aff;
  --systemIndigo: #5856d6;
  --systemTeal: #30b0c7;
  --systemPink: #ff2d55;
  --systemPurple: #af52de;
  --systemGray: #8e8e93;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --systemGroupedBackground: #000000;
    --secondarySystemGroupedBackground: #1c1c1e;
    --tertiarySystemGroupedBackground: #2c2c2e;
    --label: #ffffff;
    --secondaryLabel: rgba(235, 235, 245, .6);
    --tertiaryLabel: rgba(235, 235, 245, .3);
    --quaternaryLabel: rgba(235, 235, 245, .16);
    --separator: rgba(84, 84, 88, .6);
    --opaqueSeparator: #38383a;
    --systemFill: rgba(120, 120, 128, .36);
    --secondarySystemFill: rgba(120, 120, 128, .32);
    --navBg: rgba(22, 22, 24, .78);
    --cardShadow: 0 1px 1.5px rgba(0, 0, 0, .5);

    --tint: #30d158;
    --systemRed: #ff453a;
    --systemOrange: #ff9f0a;
    --systemYellow: #ffd60a;
    --systemBlue: #0a84ff;
    --systemIndigo: #5e5ce6;
    --systemTeal: #40c8e0;
    --systemPink: #ff375f;
    --systemPurple: #bf5af2;
    --systemGray: #8e8e93;
    color-scheme: dark;
  }
}

/* ---------- reset ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; background: var(--systemGroupedBackground); color: var(--label);
  font-family: var(--font); font-size: 17px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html, body { overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; }
button:disabled { cursor: default; }
::selection { background: color-mix(in srgb, var(--tint) 30%, transparent); }

/* iOS type scale */
h1, h2, h3 { font-family: var(--font); font-weight: 700; margin: 0; }
h1 { font-size: 34px; line-height: 41px; letter-spacing: .01em; font-weight: 700; }
h2 { font-size: 20px; line-height: 25px; font-weight: 600; }
h3 { font-size: 17px; line-height: 22px; font-weight: 600; margin-bottom: 8px; }
p { margin: 0 0 8px; }
.tabular { font-variant-numeric: tabular-nums; }

/* press feedback instead of hover affordances */
@media (prefers-reduced-motion: no-preference) {
  .item-row, .btn, .icon-btn, .tabbar a, .seg button, .chip, .checkbox, .toggle { transition: background-color .15s ease, opacity .15s ease, transform .15s ease; }
}
.btn:active, .icon-btn:active, a.item-row:active, button.item-row:active, .fab:active { opacity: .6; }
.item-row:active { background: var(--systemFill); }

/* ---------- shell / scroll ---------- */
main { max-width: 760px; margin: 0 auto; padding: 4px 16px calc(100px + var(--safe-b)); }
main.plain { padding-top: calc(var(--safe-t) + 54px + 8px); }

/* ---------- nav bar (compact, appears on scroll under a large title; or standalone on sub-pages) ---------- */
.navbar {
  position: sticky; top: 0; z-index: 20;
  padding-top: var(--safe-t);
  min-height: calc(var(--safe-t) + 44px);
  display: flex; align-items: stretch;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.navbar.solid, .navbar.scrolled {
  background: var(--navBg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--separator);
}
.navbar-row { flex: 1; display: flex; align-items: center; gap: 4px; padding: 0 8px; min-height: 44px; }
.navbar .title {
  flex: 1; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease;
}
.navbar.scrolled .title, .navbar.solid .title { opacity: 1; transform: translateY(0); }
.navbar .side { min-width: 44px; display: flex; align-items: center; gap: 2px; }
.navbar .side.r { justify-content: flex-end; }
.navbar .back { border: 0; background: none; padding: 8px 6px 8px 2px; margin: -8px 0; color: var(--tint); display: flex; align-items: center; gap: 2px; font-size: 17px; }
.navbar .back svg { width: 22px; height: 22px; }
.navbar .action { border: 0; background: none; color: var(--tint); font-size: 17px; padding: 8px; margin: -8px; font-weight: 400; }
.navbar .action.strong { font-weight: 600; }

/* large title block, scrolls away with the page content */
.large-title { padding: 2px 16px 10px; }
.large-title h1 { color: var(--label); }
.large-title .subtitle { color: var(--secondaryLabel); font-size: 15px; margin-top: 2px; }
.large-title-extra { padding: 0 16px 8px; }

/* iOS search field */
.search-field { display: flex; align-items: center; gap: 6px; background: var(--systemFill); border-radius: 10px; padding: 0 8px; height: 36px; flex: 1; }
.search-field svg { width: 18px; height: 18px; color: var(--secondaryLabel); }
.search-field input { border: 0; background: none; flex: 1; padding: 0; height: 100%; font-size: 17px; color: var(--label); }
.search-field input::placeholder { color: var(--tertiaryLabel); }
.search-wrap { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; }
.search-cancel { border: 0; background: none; color: var(--tint); font-size: 17px; padding: 2px; white-space: nowrap; }

/* bottom toolbar (e.g. Liste's "Sammenlign priser"), sits directly above the tab bar */
.bottom-toolbar {
  position: fixed; left: 0; right: 0; bottom: calc(49px + var(--safe-b)); z-index: 25;
  padding: 8px 16px; background: var(--navBg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separator);
}
main.with-toolbar { padding-bottom: calc(160px + var(--safe-b)); }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; padding: 0 2px calc(2px + var(--safe-b));
  background: var(--navBg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separator);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 3px;
  color: var(--secondaryLabel); font-size: 10px; font-weight: 500; min-height: 49px; justify-content: center;
}
.tabbar a.on { color: var(--tint); }
.tabbar a svg { width: 25px; height: 25px; stroke-width: 1.7; }

/* ---------- inset grouped lists ---------- */
.card { background: var(--secondarySystemGroupedBackground); border-radius: 10px; box-shadow: var(--cardShadow); }
.card.list { padding: 0; overflow: hidden; }
.section { margin: 0 0 24px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 2px 7px; padding: 0 14px;
}
.section-head h2 {
  font-size: 13px; line-height: 18px; font-weight: 400; font-family: var(--font);
  color: var(--secondaryLabel); text-transform: none; letter-spacing: 0;
  display: flex; align-items: center; gap: 5px;
}
.section-head h2 svg { width: 14px; height: 14px; }
.section-foot { margin: 6px 14px 0; font-size: 13px; color: var(--secondaryLabel); }

.item-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0;
  background: none; text-align: left; min-height: 44px; position: relative;
}
/* separators inset from the left, clear of leading icons/checkboxes, iOS-style.
   Rows are either a direct child of .card.list, or wrapped one-per-row in a .swipe-row
   (SwipeRow) — :last-child alone would match every row in the latter case (each row is its
   own wrapper's only child), so the "hide the last separator" rule has to check both shapes. */
.card.list .item-row { background-clip: padding-box; }
.card.list .item-row::after {
  content: ""; position: absolute; left: 14px; right: 0; bottom: 0; height: 1px; background: var(--separator);
}
.card.list > .item-row:last-child::after,
.card.list > .swipe-row:last-child .item-row::after,
.card.list > a.item-row:last-child::after { display: none; }
.card.list .item-row.has-leading::after { left: 46px; }

.item-row.highlighted { background: color-mix(in srgb, var(--systemOrange) 10%, transparent); }
.item-row.checked .item-main .t { color: var(--secondaryLabel); text-decoration: line-through; transition: color .25s ease .15s; }
.item-main { flex: 1; min-width: 0; }
.item-main .t { font-size: 17px; font-weight: 400; color: var(--label); }
.item-main .meta { font-size: 15px; color: var(--secondaryLabel); margin-top: 1px; font-variant-numeric: tabular-nums; }
button.item-main { border: 0; background: none; text-align: left; padding: 0; display: block; width: 100%; }
.row-ico {
  color: #fff; display: flex; align-items: center; justify-content: center;
  width: 29px; height: 29px; border-radius: 7px; background: var(--row-ico-bg, var(--tint)); flex: none;
}
.row-ico svg { width: 17px; height: 17px; }
a.item-row { display: flex; }
.item-row > svg.chev, .item-row > .chev { color: var(--tertiaryLabel); flex: none; }

/* Reminders-style round checkmark */
.checkbox {
  width: 24px; height: 24px; border-radius: 50%; border: 1.7px solid var(--tertiaryLabel);
  display: grid; place-items: center; flex: none; background: none; color: #fff; padding: 0;
}
.item-row.checked .checkbox { background: var(--tint); border-color: var(--tint); }
.checkbox svg { width: 14px; height: 14px; stroke-width: 2.4; }

/* iOS "edit mode" leading delete affordance (red minus-circle), shown instead of the
   checkbox/stepper while a list is in Rediger mode — the non-gesture fallback for SwipeRow. */
.minus-circle {
  width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--systemRed); color: #fff;
  display: grid; place-items: center; flex: none; padding: 0;
}
.minus-circle svg { width: 13px; height: 13px; stroke-width: 2.6; }

.icon-btn { border: 0; background: none; padding: 8px; border-radius: 8px; display: flex; color: var(--secondaryLabel); }
.icon-btn:active { background: var(--systemFill); }
.icon-btn.tint { color: var(--tint); }
.icon-btn:disabled { opacity: .3; }

/* swipe-to-reveal actions */
.swipe-row { position: relative; overflow: hidden; }
.swipe-row .item-row { position: relative; z-index: 1; background: var(--secondarySystemGroupedBackground); touch-action: pan-y; }
.swipe-actions { position: absolute; inset: 0; display: flex; justify-content: flex-end; z-index: 0; }
.swipe-actions button {
  border: 0; color: #fff; font-size: 15px; font-weight: 600; padding: 0 18px; display: flex;
  align-items: center; justify-content: center; min-width: 76px;
}
.swipe-actions .a-delete { background: var(--systemRed); }
.swipe-actions .a-primary { background: var(--tint); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px; border-radius: 12px; border: 0; background: var(--systemFill); color: var(--label);
  font-weight: 600; font-size: 17px; height: 50px;
}
.btn.block { width: 100%; }
.btn.primary { background: var(--tint); color: var(--tint-ink); }
.btn.soft { background: none; color: var(--tint); font-weight: 400; }
.btn.danger { background: none; color: var(--systemRed); font-weight: 400; }
.btn.sm { padding: 0 12px; height: 32px; font-size: 15px; border-radius: 9px; background: var(--systemFill); font-weight: 500; }
.btn.sm.soft { background: none; color: var(--tint); }
.btn:disabled { opacity: .4; }

.fab { display: none; } /* replaced by nav bar "+" action per HIG; kept hidden for any leftover usage */

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span:first-child { display: block; font-size: 13px; font-weight: 400; color: var(--secondaryLabel); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 0 13px; border-radius: 10px; border: 0; background: var(--systemFill); color: var(--label); min-height: 44px; font-size: 17px;
}
textarea { min-height: 90px; padding: 10px 13px; resize: vertical; }
.hint { font-size: 13px; color: var(--secondaryLabel); margin-top: 4px; }
.row { display: flex; gap: 10px; align-items: flex-start; }
.row > * { flex: 1; }
.row.wrap { flex-wrap: wrap; }
.row.wrap > * { flex: none; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 17px; }
.check-row input { width: auto; min-height: auto; accent-color: var(--tint); }
.persons-row { align-items: center; gap: 10px; margin-bottom: 14px; }
.persons-row span { font-weight: 400; }

/* iOS switch (51x31) */
.toggle { position: relative; width: 51px; height: 31px; border-radius: 16px; border: 0; background: var(--systemFill); flex: none; padding: 2px; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.18), 0 1px 1px rgba(0,0,0,.1); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.toggle.on { background: var(--tint); }
.toggle.on::after { transform: translateX(20px); }

/* iOS segmented control */
.seg { display: flex; background: var(--systemFill); border-radius: 9px; padding: 2px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 7px; font-weight: 500; font-size: 13px; color: var(--label); }
.seg button.on { background: var(--secondarySystemGroupedBackground); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { border: 0; background: var(--systemFill); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--label); }
.chip.on { background: var(--tint); color: var(--tint-ink); }

/* compact stepper pill: "- N +" */
.stepper {
  display: flex; align-items: center; background: var(--systemFill); border-radius: 999px; overflow: hidden; flex: none;
}
.stepper button {
  width: 32px; height: 32px; border: 0; background: none; display: grid; place-items: center; flex: none; color: var(--tint);
}
.stepper button:disabled { color: var(--tertiaryLabel); }
.stepper button svg { width: 15px; height: 15px; stroke-width: 2.2; }
.stepper span { min-width: 26px; text-align: center; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }

.suggest-wrap { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--secondarySystemGroupedBackground); border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.14); overflow: hidden; z-index: 5; }
.suggest-list.static { position: static; margin-bottom: 14px; }
.suggest-list button { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; background: none; border-bottom: 1px solid var(--separator); font-size: 17px; }
.suggest-list button:last-child { border-bottom: 0; }

/* ---------- sheet (bottom drawer) ---------- */
.portal { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.portal-root > * { pointer-events: auto; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.38); display: flex; align-items: flex-end; z-index: 100; }
.sheet {
  width: 100%; max-height: 88vh; overflow-y: auto; background: var(--systemGroupedBackground);
  border-radius: 10px 10px 0 0; padding: 0 0 calc(16px + var(--safe-b));
  animation: sheet-up .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet .grab { width: 36px; height: 5px; background: var(--quaternaryLabel); border-radius: 3px; margin: 8px auto 2px; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 10px;
  border-bottom: 1px solid var(--separator); margin-bottom: 14px;
}
.sheet-head h2 { font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.sheet-head .icon-btn { color: var(--tint); }
.sheet > form, .sheet > .confirm-body, .sheet > .card, .sheet > p, .sheet > .card.list, .sheet > button { margin-left: 16px; margin-right: 16px; }
.sheet-actions { display: flex; gap: 10px; margin: 14px 16px 0; }
.sheet-actions .btn { flex: 1; }
.confirm-body { margin-bottom: 4px; }

/* ---------- toasts ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--safe-b)); z-index: 200;
  width: max-content; max-width: min(360px, calc(100% - 64px));
  background: color-mix(in srgb, var(--secondarySystemGroupedBackground) 88%, transparent);
  color: var(--label); border-radius: 20px; padding: 11px 16px;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  animation: toast-in .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.err { color: var(--systemRed); }
.toast.soft { color: var(--secondaryLabel); }
.toast .msg { flex: 1; font-size: 15px; }
.toast-action { border: 0; background: none; color: var(--tint); padding: 2px 4px; font-size: 14px; font-weight: 600; }
.toast-close { border: 0; background: none; color: var(--tertiaryLabel); opacity: 1; padding: 2px; }

/* ---------- misc ---------- */
.alert { background: color-mix(in srgb, var(--systemRed) 12%, transparent); color: var(--systemRed); padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 3px; background: var(--systemFill); color: var(--secondaryLabel); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.badge.soft { background: var(--systemFill); }
.badge.on { background: var(--tint); color: var(--tint-ink); }
.badge.tilbud { background: var(--systemOrange); color: #fff; }
.warn-text { color: var(--systemRed); font-weight: 500; }
.soon-text { color: var(--systemOrange); font-weight: 500; }
.muted { color: var(--secondaryLabel); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin-bottom: 4px; }

.empty { text-align: center; padding: 64px 24px 32px; color: var(--secondaryLabel); }
.empty .ico { width: 48px; height: 48px; margin: 0 auto 14px; color: var(--tertiaryLabel); }
.empty .ico svg { width: 100%; height: 100%; stroke-width: 1.4; }
.empty .big { font-weight: 600; color: var(--label); font-size: 20px; }
.empty .small { margin-top: 6px; }
.empty-actions { margin-top: 18px; }

.spin { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--systemFill); border-top-color: var(--tint); animation: spin .7s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 1.4s; } }

.week-nav { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15px; margin: 2px 2px 10px; color: var(--label); }
.week-nav .icon-btn { color: var(--tint); }
.daycard { background: var(--secondarySystemGroupedBackground); border-radius: 10px; box-shadow: var(--cardShadow); padding: 14px; margin-bottom: 16px; }
.daycard.today { box-shadow: 0 0 0 1.5px var(--tint), var(--cardShadow); }
.daycard-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.daycard-head strong { font-weight: 600; }
.meal-row { padding: 8px 0; border-top: 1px solid var(--separator); }
.meal-row:first-of-type { border-top: 0; }
.meal-label { font-size: 12px; color: var(--secondaryLabel); font-weight: 600; letter-spacing: 0; }
.meal-entry { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; }
.meal-entry span:first-child { flex: 1; font-weight: 400; }
.meal-add { border: 0; background: none; border-radius: 8px; padding: 6px 2px; font-size: 15px; color: var(--tint); display: flex; align-items: center; gap: 4px; margin-top: 2px; }

/* Budget summary card (Health/Wallet style): centered big figure, caption, thin progress
   bar, 3-column stat row. */
.budget-card { padding: 22px 20px; text-align: center; }
.budget-card .empty { padding: 8px 4px 20px; }
.budget-figure { font-size: 34px; line-height: 41px; font-weight: 700; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.budget-figure.over { color: var(--systemRed); }
.budget-caption { color: var(--secondaryLabel); font-size: 15px; margin-bottom: 16px; }
.budget-track { position: relative; height: 6px; border-radius: 3px; background: var(--systemFill); overflow: hidden; margin-bottom: 18px; }
.budget-track-fill { position: absolute; inset: 0; border-radius: 3px; background: var(--tint); }
.budget-track-fill.warn { background: var(--systemOrange); }
.budget-track-fill.over { background: var(--systemRed); }
.budget-stats { display: flex; }
.budget-stat { flex: 1; }
.budget-stat + .budget-stat { border-left: 1px solid var(--separator); }
.budget-stat .cap2 { font-size: 11px; color: var(--secondaryLabel); font-weight: 500; }
.budget-stat .val { font-size: 17px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* category rows: name + "brugt / budget" trailing, mini progress bar under the name */
.cat-row .item-main { padding-right: 4px; }
.mini-bar { height: 4px; border-radius: 2px; background: var(--systemFill); margin-top: 6px; overflow: hidden; max-width: 160px; }
.mini-bar > div { height: 100%; border-radius: 2px; background: var(--tint); }
.mini-bar > div.over { background: var(--systemRed); }

/* month switcher, centered chevron row (Calendar/Health style) */
.month-nav { justify-content: center; gap: 28px; font-size: 17px; font-weight: 600; }
.month-nav span { min-width: 9em; text-align: center; }

/* "Tilføj udgift" / "Tilføj kategori" rows (Reminders/Settings add-row pattern) */
.add-row, .add-row .t { color: var(--tint); }
.add-ico { color: var(--tint); display: flex; flex: none; }

/* amount input with a "kr." suffix */
.amount-field { position: relative; flex: 1; }
.amount-field input { padding-right: 42px; }
.amount-field .suffix { position: absolute; top: 0; right: 13px; height: 100%; display: flex; align-items: center; color: var(--secondaryLabel); pointer-events: none; }
.cat-edit-row { gap: 10px; }
.cat-edit-row .cat-name { flex: 1; }
.cat-edit-row .amount-field { width: 108px; flex: none; }

.spin.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; }

.budget-line { display: flex; align-items: center; gap: 8px; background: var(--systemFill); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 15px; }
.budget-line.over { color: var(--systemRed); }
.total-row { display: flex; justify-content: space-between; padding: 12px 2px; font-size: 17px; font-variant-numeric: tabular-nums; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .card { width: 100%; max-width: 380px; padding: 32px 24px calc(28px + var(--safe-b)); box-shadow: none; background: none; }
.login-logo { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px; background: var(--tint); color: #fff; display: flex; align-items: center; justify-content: center; }
.login-logo svg { width: 36px; height: 36px; stroke-width: 1.7; }
.login h1 { text-align: center; }
.login form .field:first-of-type { margin-top: 24px; }
.login input { background: var(--secondarySystemGroupedBackground); box-shadow: 0 0 0 1px var(--separator) inset; }

/* recipe thumbnails */
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--systemFill); }
.recipe-image { width: 100%; border-radius: 10px; margin-bottom: 10px; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Trailing tint action in a list row (e.g. Budget: "Hent") */
.item-row .action { color: var(--tint); font-size: 17px; }
/* A large title inside main.plain, which already has side padding */
.large-title.inset-none { padding: 0 0 6px; margin-top: -8px; }
