/* ============================================================
   Vanguard Goals — app.css
   Vanguard Synapse Tech design system (mørk, høj kontrast, quantum-glow)
   bygget til en tæt økonomi-app: tokens først, komponenter bagefter.
   ============================================================ */

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  color-scheme: dark;
  /* Flader */
  --bg: #04071a; --bg-2: #070c26; --bg-3: #0b1233;
  --surface: rgba(12, 18, 50, 0.72);
  --card-g: linear-gradient(180deg, rgba(14, 20, 56, 0.80), rgba(7, 11, 32, 0.94));
  /* Blæk */
  --ink: #eef2ff; --ink-2: #aab4d6; --ink-3: #6d79a8;
  /* Brand (fra logoet) */
  --cyan: #36e2ff; --cyan-2: #8ff2ff; --blue: #3b7bff; --violet: #8b5cf6; --magenta: #ff2fd2; --pink: #ff6fc8;
  --line: rgba(130, 160, 255, 0.14); --line-2: rgba(130, 160, 255, 0.30);
  /* Temaafhængige flader og blæk (lyst tema overskriver dem) */
  --on: #fff; --fill-rgb: 255, 255, 255; --chrome-rgb: 4, 7, 26; --node-rgb: 14, 20, 56;
  --ok-ink: #9ff5d0; --bad-ink: #ffb3c8; --wrn-ink: #ffd9a3; --sav-ink: #e3d4ff; --info-ink: #d6e2ff;
  --glow: 0.55; --page-glow-1: rgba(59, 123, 255, 0.16); --page-glow-2: rgba(255, 47, 210, 0.10); --page-glow-3: rgba(54, 226, 255, 0.08);
  /* Semantik */
  --ok: #3ddc97; --bad: #ff5c8a; --wrn: #ffb347; --sav: #b388ff;
  /* Motorens gamle variabelnavne */
  --pri: var(--cyan-2); --prl: var(--blue); --mu: var(--ink-3); --br: var(--line); --cd: transparent;
  /* Typografi */
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  /* Layout */
  --topbar: 64px; --side: 236px; --bottom: 62px; --r: 18px; --r-sm: 10px;
  --sa-b: env(safe-area-inset-bottom, 0px); --sa-t: env(safe-area-inset-top, 0px);
}

/* ------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; min-height: 100vh;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px; opacity: 0.28;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, var(--page-glow-1), transparent 60%),
    radial-gradient(800px 500px at 90% 10%, var(--page-glow-2), transparent 60%),
    radial-gradient(700px 400px at 50% 110%, var(--page-glow-3), transparent 60%);
}
.bg-field { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0.55; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
a { color: var(--cyan-2); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: rgba(54, 226, 255, 0.5); }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding-left: 1.1rem; }
code { font-family: var(--font-mono); font-size: 0.82em; color: var(--cyan-2); }
strong { font-weight: 600; color: var(--on); }
em { color: var(--ink-2); }
::selection { background: rgba(54, 226, 255, 0.3); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ Typografi */
.eyebrow, .mono {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--cyan);
}
.mono { letter-spacing: 0.12em; color: var(--ink-3); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0.2rem 0 1.2rem; }
.sec-title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.1; letter-spacing: -0.01em; margin-top: 0.3rem;
}
.sec-title em, .brand__name em, .grad {
  font-style: normal; background: linear-gradient(92deg, var(--cyan-2) 0%, var(--cyan) 38%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-tools { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.sub-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 1.6rem 0 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line-2);
}
.hint { font-size: 0.78rem; color: var(--ink-3); margin-top: -0.3rem; margin-bottom: 0.65rem; line-height: 1.5; }
.info-box {
  background: rgba(59, 123, 255, 0.10); border: 1px solid rgba(59, 123, 255, 0.35); border-radius: var(--r-sm);
  padding: 0.6rem 0.95rem; font-size: 0.83rem; color: var(--ink-2); margin-bottom: 0.9rem; line-height: 1.55;
}
.info-box.warn { background: rgba(255, 179, 71, 0.08); border-color: rgba(255, 179, 71, 0.4); }
.gt { color: var(--ok); } .rt { color: var(--bad); } .st { color: var(--sav); } .wt { color: var(--wrn); }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Knapper */
button {
  font: inherit; font-weight: 600; font-size: 0.84rem; color: var(--ink); cursor: pointer;
  background: rgba(54, 226, 255, 0.10); border: 1px solid rgba(54, 226, 255, 0.30);
  padding: 0.5rem 0.95rem; border-radius: var(--r-sm); line-height: 1.2;
  transition: transform 0.25s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.25s, background 0.25s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
button:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(54, 226, 255, 0.22); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.bs { background: linear-gradient(135deg, rgba(54, 226, 255, 0.30), rgba(59, 123, 255, 0.32)); border-color: rgba(54, 226, 255, 0.6); color: var(--on); }
.bs:hover { box-shadow: 0 0 26px rgba(54, 226, 255, 0.35), 0 0 60px rgba(255, 47, 210, 0.12); }
.bsec { background: rgba(var(--fill-rgb), 0.04); border-color: var(--line-2); color: var(--ink-2); }
.bsec:hover { color: var(--on); }
.bc { background: transparent; border-color: var(--line); color: var(--ink-3); }
.bc:hover { color: var(--ink); box-shadow: none; }
.bd { background: rgba(255, 92, 138, 0.10); border-color: rgba(255, 92, 138, 0.45); color: var(--bad-ink); padding: 0.28rem 0.6rem; font-size: 0.77rem; }
.bd:hover { border-color: var(--bad); box-shadow: 0 0 16px rgba(255, 92, 138, 0.3); }
.be { background: rgba(255, 179, 71, 0.10); border-color: rgba(255, 179, 71, 0.45); color: var(--wrn-ink); padding: 0.28rem 0.6rem; font-size: 0.77rem; }
.be:hover { border-color: var(--wrn); box-shadow: 0 0 16px rgba(255, 179, 71, 0.3); }
.bv { background: rgba(179, 136, 255, 0.14); border-color: rgba(179, 136, 255, 0.5); color: var(--sav-ink); }
.bv:hover { border-color: var(--sav); box-shadow: 0 0 18px rgba(179, 136, 255, 0.35); }
.sm { padding: 0.32rem 0.65rem; font-size: 0.76rem; }
.xs { padding: 0.18rem 0.45rem; font-size: 0.7rem; }
.btn-pill { border-radius: 999px; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.85em 1.6em; }
.btn-pill.bs { animation: btn-breathe 3.8s ease-in-out infinite; }
@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(54, 226, 255, 0.16), inset 0 0 14px rgba(54, 226, 255, 0.06); }
  50% { box-shadow: 0 0 36px rgba(54, 226, 255, 0.34), 0 0 70px rgba(255, 47, 210, 0.16), inset 0 0 22px rgba(54, 226, 255, 0.12); }
}
.icon-btn {
  width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%;
  background: rgba(var(--fill-rgb), 0.03); border-color: var(--line-2); font-size: 1rem;
}
.abtn { display: flex; gap: 0.28rem; justify-content: flex-end; flex-wrap: wrap; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ Felter */
.fg { margin-bottom: 0.78rem; }
.fg label, .field__label {
  display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.3rem;
}
.fg label .bdg { letter-spacing: 0.04em; margin-left: 0.3rem; }
input[type=number], input[type=text], input[type=date], input[type=month], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 0.55rem 0.72rem; font: inherit; font-size: 0.92rem; color: var(--ink);
  background: rgba(var(--fill-rgb), 0.035); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color 0.25s, box-shadow 0.35s var(--ease-out), background 0.25s; min-height: 40px;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--cyan); background: rgba(54, 226, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(54, 226, 255, 0.12), 0 0 24px rgba(54, 226, 255, 0.16);
}
input:disabled, select:disabled { opacity: 0.5; }
select option { background: var(--bg-3); color: var(--ink); }
textarea { resize: vertical; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--bg-3) inset; transition: background-color 99999s ease-out 0s;
}
input[type=checkbox], input[type=radio] { accent-color: var(--cyan); width: 16px; height: 16px; cursor: pointer; }
.check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.88rem; color: var(--ink-2); cursor: pointer; padding: 0.35rem 0; }
.check input { width: 18px; height: 18px; flex: none; }
.check:hover { color: var(--on); }

/* ------------------------------------------------------------ Kort og gitre */
.card {
  position: relative; background: var(--card-g); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.15rem 1.2rem; margin-bottom: 1.1rem; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  isolation: isolate; overflow: clip;
}
.card::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.5s; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(54, 226, 255, 0.09), transparent 48%);
}
.card:hover::after { opacity: 1; }
.card.glow { border-color: rgba(54, 226, 255, 0.3); box-shadow: 0 0 30px rgba(54, 226, 255, 0.14), 0 14px 40px rgba(0, 0, 0, 0.3); }
.card h3 {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
  margin: 0 0 0.85rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line);
}
.card h3::before { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); box-shadow: 0 0 10px var(--cyan); flex: none; }
.card h3 .bdg { letter-spacing: 0.05em; }
.card h4 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; margin: 0.9rem 0 0.4rem; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-bottom: 1.1rem; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 1.1rem; }
.sc {
  position: relative; background: var(--card-g); border: 1px solid var(--line); border-radius: 14px; padding: 0.95rem 1rem; text-align: center;
  box-shadow: inset 3px 0 0 var(--line-2);
}
.sc .lbl { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.3rem; }
.sc .val { font-family: var(--font-display); font-size: 1.42rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--on); }
.sc .sub { font-size: 0.74rem; color: var(--ink-3); margin-top: 0.25rem; }
.sc.pos, .sc.inc { box-shadow: inset 3px 0 0 var(--ok); } .sc.neg, .sc.exp { box-shadow: inset 3px 0 0 var(--bad); } .sc.sv { box-shadow: inset 3px 0 0 var(--sav); }
.sc.glow { border-color: rgba(54, 226, 255, 0.35); }

/* ------------------------------------------------------------ Tabeller */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; border-bottom-color: var(--line-2); background: rgba(var(--chrome-rgb), 0.6); }
thead[style*="sticky"] th, thead.sticky th { position: sticky; top: 0; z-index: 1; }
tbody tr:hover td { background: rgba(54, 226, 255, 0.035); }
.amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.aml td { opacity: 0.45; }
.fcneg td { background: rgba(255, 92, 138, 0.07) !important; }
.dep-row td { color: var(--ok-ink); } .wit-row td { color: var(--bad-ink); }
.auto-row td { background: rgba(59, 123, 255, 0.06) !important; font-style: italic; }
.total-row td { font-weight: 700; border-top: 2px solid var(--line-2); background: rgba(var(--fill-rgb), 0.02) !important; }
.fam-row td { background: rgba(179, 136, 255, 0.06) !important; }
small { color: var(--ink-3); }
body.one-person #dFlowTable th:nth-child(3), body.one-person #dFlowTable td:nth-child(3) { display: none; }

/* ------------------------------------------------------------ Badges og chips */
.bdg, .imp-chip {
  display: inline-block; padding: 0.14rem 0.5rem; border-radius: 999px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid; white-space: nowrap; vertical-align: middle;
}
.bm, .bl, .chip-new { background: rgba(59, 123, 255, 0.14); border-color: rgba(59, 123, 255, 0.45); color: var(--info-ink); }
.bq, .chip-check, .fm-bdg { background: rgba(255, 179, 71, 0.12); border-color: rgba(255, 179, 71, 0.45); color: var(--wrn-ink); }
.bh { background: rgba(179, 136, 255, 0.14); border-color: rgba(179, 136, 255, 0.5); color: var(--sav-ink); }
.ba, .chip-sure, .free-bdg { background: rgba(61, 220, 151, 0.12); border-color: rgba(61, 220, 151, 0.45); color: var(--ok-ink); }
.auto-bdg { background: rgba(54, 226, 255, 0.12); border-color: rgba(54, 226, 255, 0.45); color: var(--cyan-2); }
.tax-bdg { background: rgba(255, 92, 138, 0.12); border-color: rgba(255, 92, 138, 0.45); color: var(--bad-ink); }
.chip-dup { background: rgba(var(--fill-rgb), 0.05); border-color: var(--line-2); color: var(--ink-2); }
.chip-in { background: rgba(61, 220, 151, 0.1); border-color: rgba(61, 220, 151, 0.4); color: var(--ok-ink); }
.fm-bdg { font-size: 0.58rem; padding: 0.1rem 0.4rem; }
.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.78rem; color: var(--ink-2); background: rgba(var(--fill-rgb), 0.03); }

/* ------------------------------------------------------------ Bokse */
.wbox { background: rgba(255, 92, 138, 0.08); border: 1px solid rgba(255, 92, 138, 0.4); border-left-width: 4px; padding: 1rem 1.2rem; border-radius: var(--r-sm); margin-bottom: 1.2rem; display: none; font-size: 0.9rem; }
.eban { background: rgba(255, 179, 71, 0.1); border: 1px solid rgba(255, 179, 71, 0.45); padding: 0.4rem 0.8rem; border-radius: var(--r-sm); margin-bottom: 0.78rem; font-size: 0.82rem; color: var(--wrn-ink); display: none; align-items: center; gap: 0.5rem; }
.eban.on { display: flex; }
.ehigh { border-color: var(--wrn) !important; box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.18), 0 0 30px rgba(255, 179, 71, 0.18) !important; }
.ssec { background: rgba(var(--fill-rgb), 0.025); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.95rem; margin-bottom: 0.78rem; }
.ssec-t { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.55rem; }
.fbox { background: rgba(var(--fill-rgb), 0.025); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; margin-top: 0.8rem; }
.fr { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.27rem 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.fr:last-child { border-bottom: none; }
.fr.bold { font-weight: 700; font-size: 0.89rem; }
.fr span:first-child { color: var(--ink-2); } .fr.bold span:first-child { color: var(--on); }
.fsep { height: 1px; background: var(--line-2); margin: 0.3rem 0; }
.nbox { background: linear-gradient(135deg, rgba(61, 220, 151, 0.12), rgba(54, 226, 255, 0.06)); border: 1px solid rgba(61, 220, 151, 0.35); border-radius: 12px; padding: 0.8rem 1.1rem; margin-top: 0.8rem; }
.nbox .nlbl { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ok); }
.nbox .nval { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; color: var(--ok); text-align: right; font-variant-numeric: tabular-nums; }
.nbox .nbr { font-size: 0.73rem; color: var(--ink-3); margin-top: 0.16rem; }
.nbox.blue { background: linear-gradient(135deg, rgba(59, 123, 255, 0.14), rgba(54, 226, 255, 0.06)); border-color: rgba(59, 123, 255, 0.4); }
.nbox.blue .nlbl, .nbox.blue .nval { color: var(--cyan-2); }
.pg { background: rgba(var(--fill-rgb), 0.025); border: 1px solid var(--line); border-radius: 12px; padding: 0.68rem 0.9rem; margin-bottom: 0.78rem; }
.pg-t { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.44rem; }
.po { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.popt { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-2); cursor: pointer; font-size: 0.8rem; font-weight: 500; color: var(--ink-2); background: rgba(var(--fill-rgb), 0.02); transition: all 0.2s; }
.popt:hover { color: var(--on); border-color: var(--cyan); }
.popt:has(input:checked) { border-color: var(--cyan); background: rgba(54, 226, 255, 0.1); color: var(--on); box-shadow: 0 0 14px rgba(54, 226, 255, 0.18); }
.popt.wo:has(input:checked) { border-color: var(--wrn); background: rgba(255, 179, 71, 0.1); }
.popt input { width: auto; }
.sav-row { display: flex; align-items: center; gap: 0.6rem; background: rgba(61, 220, 151, 0.07); border: 1px solid rgba(61, 220, 151, 0.3); border-radius: 12px; padding: 0.6rem 0.85rem; margin-top: 0.6rem; flex-wrap: wrap; }
.sav-row label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ok); white-space: nowrap; }
.sav-row input { width: 130px; }
.final-free { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.lock-ban { background: rgba(255, 92, 138, 0.1); border: 1px solid rgba(255, 92, 138, 0.4); border-radius: var(--r-sm); padding: 0.55rem 1.1rem; margin-bottom: 1rem; display: none; align-items: center; gap: 0.8rem; font-size: 0.85rem; color: var(--bad-ink); flex-wrap: wrap; }
.lock-ban.on { display: flex; }
body.mlocked .ls input, body.mlocked .ls select { opacity: 0.45; pointer-events: none; }
body.mlocked .ls button:not(.unlock-ok) { opacity: 0.35; pointer-events: none; }

/* ------------------------------------------------------------ Prognose */
.fc-ctrl { display: flex; gap: 0.45rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.9rem; }
.fc-presets { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.fc-pb { background: rgba(var(--fill-rgb), 0.03); color: var(--ink-2); padding: 0.3rem 0.65rem; font-size: 0.78rem; border-radius: 999px; border-color: var(--line-2); }
.fc-pb.sel, .fc-pb:hover { background: rgba(54, 226, 255, 0.14); color: var(--on); border-color: var(--cyan); }
.fc-snap { background: linear-gradient(135deg, rgba(61, 220, 151, 0.12), rgba(54, 226, 255, 0.05)); border: 1px solid rgba(61, 220, 151, 0.35); border-radius: var(--r); padding: 0.9rem 1.3rem; margin-bottom: 1.2rem; display: none; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.fc-snap .sl { font-size: 0.82rem; color: var(--ok-ink); font-weight: 600; }
.fc-snap .sv2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-snap.neg-snap { background: linear-gradient(135deg, rgba(255, 92, 138, 0.12), rgba(255, 47, 210, 0.05)); border-color: rgba(255, 92, 138, 0.4); }
.fc-snap.neg-snap .sl { color: var(--bad-ink); }

/* ------------------------------------------------------------ Betalingsfri måneder, betalingsdato */
.fm-wrap { background: rgba(255, 179, 71, 0.06); border: 1px solid rgba(255, 179, 71, 0.3); border-radius: 12px; padding: 0.62rem 0.88rem; margin-top: 0.6rem; }
.fm-title { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wrn); margin-bottom: 0.42rem; }
.fm-grid { display: flex; gap: 0.28rem; flex-wrap: wrap; }
.fm-pill { display: inline-flex; align-items: center; gap: 0.22rem; padding: 0.22rem 0.55rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.76rem; font-weight: 600; cursor: pointer; color: var(--ink-2); background: rgba(var(--fill-rgb), 0.02); transition: all 0.15s; user-select: none; }
.fm-pill:hover { border-color: var(--wrn); color: var(--wrn-ink); }
.fm-pill.free { background: rgba(255, 179, 71, 0.18); border-color: var(--wrn); color: var(--wrn-ink); }
.pmt-cell { display: flex; align-items: center; gap: 0.35rem; justify-content: flex-end; }
.pmt-date { width: 140px; padding: 0.3rem 0.4rem; font-size: 0.8rem; min-height: 34px; }
.pmt-stat { font-size: 0.95rem; width: 1.2rem; text-align: center; flex-shrink: 0; }
.pmt-ok { color: var(--ok); } .pmt-warn { color: var(--wrn); } .pmt-dbl { color: var(--bad); }
.pmt-na { color: var(--ink-3); font-size: 0.8rem; }
.dbl-ban { background: rgba(255, 92, 138, 0.08); border: 1px solid rgba(255, 92, 138, 0.4); border-left-width: 4px; padding: 1rem 1.2rem; border-radius: var(--r-sm); margin-bottom: 1.2rem; display: none; font-size: 0.9rem; }
.dbl-ban.on { display: block; }
.dbl-ban ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }

/* ------------------------------------------------------------ Månedsnavigator */
.mn-panel { background: rgba(var(--fill-rgb), 0.02); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 1.1rem; display: none; }
.mn-panel.open { display: block; }
.mn-tog { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 1rem; cursor: pointer; font-size: 0.8rem; color: var(--ink-3); }
.mn-body-wrap { padding: 0.7rem 1rem 0.8rem; }
.yr-grp { margin-bottom: 0.3rem; }
.yr-hdr { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0; cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-2); }
.yr-hdr:hover { color: var(--on); }
.yr-pills { display: flex; gap: 0.25rem; flex-wrap: wrap; padding-left: 0.9rem; margin-top: 0.25rem; }
.mp { padding: 0.22rem 0.55rem; border-radius: 999px; font-size: 0.74rem; cursor: pointer; transition: all 0.12s; border: 1px solid transparent; color: var(--ink-3); }
.mp:hover { background: rgba(54, 226, 255, 0.12); color: var(--on); }
.mp.mp-cur { background: var(--cyan); color: #04071a; font-weight: 700; box-shadow: 0 0 14px rgba(54, 226, 255, 0.5); }
.mp.mp-lock { background: rgba(var(--fill-rgb), 0.06); border-color: var(--line-2); color: var(--ink-2); }
.mp.mp-has { color: var(--ink-2); }

/* ------------------------------------------------------------ Import */
.imp-drop { border: 1.5px dashed rgba(54, 226, 255, 0.4); border-radius: var(--r); padding: 1.6rem 1rem; text-align: center; color: var(--ink-2); cursor: pointer; background: rgba(54, 226, 255, 0.03); transition: 0.2s; font-size: 0.86rem; }
.imp-drop:hover, .imp-drop.over { border-color: var(--cyan); background: rgba(54, 226, 255, 0.08); color: var(--on); box-shadow: inset 0 0 40px rgba(54, 226, 255, 0.08); }
.imp-drop strong { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--on); margin-bottom: 0.3rem; }
.imp-alt { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.8rem; flex-wrap: wrap; }
.imp-alt .hint { margin: 0; }
#pasteBox { margin-top: 0.8rem; }
#pasteArea { width: 100%; font-family: var(--font-mono); font-size: 0.78rem; padding: 0.6rem; }
.imp-note { padding: 0.75rem 1rem; border-radius: var(--r-sm); font-size: 0.87rem; margin-top: 0.9rem; line-height: 1.55; border: 1px solid; border-left-width: 4px; }
.imp-note.ok { background: rgba(61, 220, 151, 0.08); border-color: rgba(61, 220, 151, 0.45); color: var(--ok-ink); }
.imp-note.warn { background: rgba(255, 179, 71, 0.08); border-color: rgba(255, 179, 71, 0.45); color: var(--wrn-ink); }
.imp-note.bad { background: rgba(255, 92, 138, 0.08); border-color: rgba(255, 92, 138, 0.45); color: var(--bad-ink); }
.imp-note.info { background: rgba(59, 123, 255, 0.1); border-color: rgba(59, 123, 255, 0.45); color: var(--info-ink); }
.imp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin-top: 0.9rem; }
.imp-fact { background: rgba(var(--fill-rgb), 0.025); border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem 0.7rem; }
.imp-fact .k { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.imp-fact .v { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; color: var(--cyan-2); font-variant-numeric: tabular-nums; }
.imp-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.8rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.imp-bar .sp { margin-left: auto; }
.imp-cnt { font-size: 0.78rem; color: var(--ink-3); } .imp-cnt b { color: var(--cyan-2); }
tr.imp-off { opacity: 0.42; }
tr.imp-dup td { background: rgba(var(--fill-rgb), 0.02); }
.imp-act { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.imp-act select { padding: 0.28rem 0.4rem; font-size: 0.79rem; max-width: 230px; min-height: 32px; }
.imp-hint-btn { background: rgba(54, 226, 255, 0.06); border: 1px dashed rgba(54, 226, 255, 0.5); color: var(--cyan-2); padding: 0.14rem 0.5rem; font-size: 0.7rem; border-radius: 999px; }
.adv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.adv-big { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.adv-calc { width: 100%; font-size: 0.88rem; margin: 0.5rem 0 0.9rem; }
.adv-calc td { padding: 0.34rem 0.1rem; border-bottom: 1px dashed var(--line); }
.adv-calc tr.sum td { border-top: 2px solid var(--line-2); border-bottom: none; font-weight: 700; padding-top: 0.5rem; color: var(--on); }
.adv-list { margin: 0.35rem 0 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.65; }
.adv-list li { margin-bottom: 0.15rem; }
.usg-bar { height: 6px; border-radius: 4px; background: rgba(var(--fill-rgb), 0.08); overflow: hidden; margin-top: 0.25rem; min-width: 80px; }
.usg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 10px rgba(54, 226, 255, 0.5); border-radius: 4px; }
.usg-txt { font-size: 0.72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bank-card { box-shadow: inset 3px 0 0 var(--blue), 0 14px 40px rgba(0, 0, 0, 0.28); }
#goalsView .usg-bar { max-width: 90px; margin-left: auto; }

/* ------------------------------------------------------------ Konti */
.acc-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.acc-pill { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; background: rgba(var(--fill-rgb), 0.025); border: 1px solid var(--line); border-radius: 14px; padding: 0.55rem 0.85rem; min-width: 140px; cursor: pointer; color: var(--ink-2); text-align: left; transition: 0.2s; }
.acc-pill:hover { border-color: var(--cyan); color: var(--on); transform: translateY(-1px); }
.acc-pill.sel { border-color: var(--cyan); background: rgba(54, 226, 255, 0.1); box-shadow: 0 0 18px rgba(54, 226, 255, 0.2); color: var(--on); }
.acc-pill .an { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.acc-pill .ab { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.acc-pill.add { justify-content: center; align-items: center; color: var(--cyan-2); border-style: dashed; min-width: 120px; }
.imp-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.9rem; }
.imp-ctl .fg { margin-bottom: 0; }
#accView .amt { white-space: nowrap; }

/* ------------------------------------------------------------ Toast */
.toast-c { position: fixed; bottom: calc(1.5rem + var(--sa-b)); right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { background: rgba(var(--chrome-rgb), 0.92); backdrop-filter: blur(14px); border: 1px solid var(--line-2); color: var(--ink); padding: 0.65rem 1.05rem; border-radius: 12px; font-size: 0.83rem; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(10px); transition: all 0.3s var(--ease-out); min-width: 220px; max-width: min(90vw, 420px); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-left: 3px solid var(--ok); } .toast.err { border-left: 3px solid var(--bad); }

/* ============================================================ APP-SKAL */
.app { min-height: 100vh; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: calc(var(--topbar) + var(--sa-t)); padding: var(--sa-t) clamp(12px, 2vw, 24px) 0;
  display: flex; align-items: center; gap: 1rem;
  background: rgba(var(--chrome-rgb), 0.72); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); flex: none;
  background: url('../assets/logo-1-1.jpg') 50% 39% / 230% no-repeat;
  box-shadow: 0 0 16px rgba(54, 226, 255, 0.25), inset 0 0 10px rgba(255, 47, 210, 0.2);
  animation: mark-breathe 4s ease-in-out infinite;
}
@keyframes mark-breathe {
  0%, 100% { box-shadow: 0 0 12px rgba(54, 226, 255, 0.2), inset 0 0 8px rgba(255, 47, 210, 0.15); }
  50% { box-shadow: 0 0 24px rgba(54, 226, 255, 0.5), 0 0 46px rgba(255, 47, 210, 0.25), inset 0 0 12px rgba(255, 47, 210, 0.3); }
}
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
.brand__name em { font-weight: 600; }
.topbar__household { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; padding-left: 1rem; border-left: 1px solid var(--line); }
.monthctl { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.mpick { width: auto; min-height: 36px; padding: 0.3rem 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; }
.arr-btn { width: 34px; height: 36px; padding: 0; display: inline-grid; place-items: center; background: rgba(var(--fill-rgb), 0.03); border-color: var(--line-2); font-size: 0.72rem; border-radius: var(--r-sm); }
.lock-btn { padding: 0.42rem 0.75rem; font-size: 0.78rem; white-space: nowrap; }
.lbtn-locked { background: rgba(255, 92, 138, 0.12); border-color: rgba(255, 92, 138, 0.5); color: var(--bad-ink); }
.topbar__actions { display: flex; align-items: center; gap: 0.5rem; }
.sync-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border-radius: 999px; background: rgba(var(--fill-rgb), 0.03); border-color: var(--line-2); font-size: 0.74rem; color: var(--ink-2); white-space: nowrap; }
.sync-pill.dirty { border-color: rgba(255, 179, 71, 0.6); color: var(--wrn-ink); }
.sync-pill.err { border-color: rgba(255, 92, 138, 0.6); color: var(--bad-ink); }
.cloud-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cloud-dot.dirty { background: var(--wrn); box-shadow: 0 0 8px var(--wrn); }
.cloud-dot.err { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.cloud-dot.busy { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: dot-pulse 1s ease-in-out infinite; }
@keyframes dot-pulse { 50% { opacity: 0.3; } }
#assistBtn.on { border-color: var(--magenta); box-shadow: 0 0 18px rgba(255, 47, 210, 0.35); }

.sidenav {
  position: fixed; top: calc(var(--topbar) + var(--sa-t)); left: 0; bottom: 0; z-index: 50; width: var(--side); padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.2rem;
  background: rgba(var(--chrome-rgb), 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-right: 1px solid var(--line); overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; padding: 0.6rem 0.8rem; border-radius: 12px;
  background: transparent; border: 1px solid transparent; color: var(--ink-2); font-size: 0.86rem; font-weight: 500;
}
.nav-item:hover { background: rgba(54, 226, 255, 0.06); color: var(--on); transform: none; box-shadow: none; border-color: transparent; }
.nav-item.active { background: rgba(54, 226, 255, 0.12); border-color: rgba(54, 226, 255, 0.35); color: var(--on); box-shadow: 0 0 20px rgba(54, 226, 255, 0.15), inset 0 0 18px rgba(54, 226, 255, 0.05); }
.nav-item .ni { width: 22px; text-align: center; font-size: 1rem; color: var(--cyan); flex: none; }
.sidenav__foot { margin-top: auto; padding: 0.8rem 0.8rem 0; display: flex; justify-content: space-between; gap: 0.5rem; border-top: 1px solid var(--line); }
.sidenav__foot .mono { font-size: 0.56rem; }

.main { padding-top: calc(var(--topbar) + var(--sa-t)); margin-left: var(--side); min-height: 100vh; }
.wrap { max-width: 1260px; margin: 0 auto; padding: 1.5rem clamp(16px, 3vw, 40px) 5rem; }
.sec { display: none; animation: sec-in 0.45s var(--ease-out); }
.sec.active { display: block; }
@keyframes sec-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.bottomnav { display: none; }
.sheet-bg { display: none; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; transform: translateY(105%); transition: transform 0.4s var(--ease-out);
  background: rgba(var(--chrome-rgb), 0.96); backdrop-filter: blur(20px); border-top: 1px solid var(--line-2); border-radius: 22px 22px 0 0;
  padding: 0.6rem 1rem calc(1rem + var(--sa-b)); display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem;
}
.sheet.open { transform: none; }
.sheet__grab { grid-column: 1 / -1; width: 44px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 0.6rem; }
.sheet-item { display: flex; align-items: center; gap: 0.7rem; text-align: left; padding: 0.75rem 0.9rem; border-radius: 12px; background: rgba(var(--fill-rgb), 0.03); border-color: var(--line); font-size: 0.86rem; }
.sheet-item .ni { color: var(--cyan); font-size: 1rem; }
.sheet-item.active { border-color: rgba(54, 226, 255, 0.4); background: rgba(54, 226, 255, 0.1); }

/* ------------------------------------------------------------ Assistent */
.assist {
  position: fixed; top: calc(var(--topbar) + var(--sa-t)); right: 0; bottom: 0; z-index: 70; width: min(420px, 100vw); transform: translateX(105%); transition: transform 0.45s var(--ease-out);
  display: flex; flex-direction: column; background: rgba(var(--chrome-rgb), 0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-left: 1px solid var(--line-2);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
}
.assist.open { transform: none; }
.assist__head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
.assist__title { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; margin-top: 0.15rem; }
.assist__body { flex: 1; overflow-y: auto; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.msg { max-width: 92%; padding: 0.6rem 0.85rem; border-radius: 14px; font-size: 0.86rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.user { margin-left: auto; background: rgba(54, 226, 255, 0.14); border: 1px solid rgba(54, 226, 255, 0.35); border-bottom-right-radius: 4px; }
.msg.ai { background: rgba(var(--fill-rgb), 0.04); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.sys { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 0.78rem; max-width: 100%; }
.msg.ai p { margin: 0 0 0.4rem; } .msg.ai p:last-child { margin: 0; }
.msg.ai ul { margin: 0.2rem 0 0.4rem; }
.msg .typing { display: inline-flex; gap: 4px; }
.msg .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: dot-pulse 1s ease-in-out infinite; }
.msg .typing i:nth-child(2) { animation-delay: 0.2s; } .msg .typing i:nth-child(3) { animation-delay: 0.4s; }
.proposal { border: 1px solid rgba(179, 136, 255, 0.5); background: rgba(179, 136, 255, 0.08); border-radius: 14px; padding: 0.7rem 0.85rem; font-size: 0.84rem; }
.proposal .pt { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sav); margin-bottom: 0.4rem; }
.proposal ul { padding-left: 1rem; margin: 0.2rem 0 0.6rem; }
.proposal.done { opacity: 0.6; }
.assist__quick { display: flex; gap: 0.35rem; flex-wrap: wrap; padding: 0.4rem 1rem; border-top: 1px solid var(--line); }
.chip { padding: 0.3rem 0.65rem; border-radius: 999px; font-size: 0.74rem; background: rgba(var(--fill-rgb), 0.03); border-color: var(--line-2); color: var(--ink-2); }
.chip:hover { color: var(--on); }
.assist__input { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.7rem 1rem calc(0.8rem + var(--sa-b)); border-top: 1px solid var(--line); }
.assist__input textarea { flex: 1; min-height: 42px; max-height: 140px; font-size: 0.9rem; }

/* ============================================================ PORTEN (login / opret / opsætning) */
.gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.2rem; overflow-y: auto; background: radial-gradient(1000px 600px at 50% -10%, rgba(59, 123, 255, 0.18), transparent 60%), rgba(var(--chrome-rgb), 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.is-booting .gate { display: grid; }
.gate__inner { width: min(500px, 100%); animation: sec-in 0.6s var(--ease-out); }
.gate__inner.wide { width: min(760px, 100%); }
.gate-card { position: relative; background: var(--card-g); border: 1px solid var(--line-2); border-radius: 24px; padding: 1.8rem 1.7rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(54, 226, 255, 0.08); overflow: hidden; }
.gate-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--angle), transparent 0deg, transparent 220deg, rgba(54, 226, 255, 0.5) 260deg, var(--cyan) 290deg, #fff 305deg, var(--magenta) 330deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: spin-angle 6s linear infinite; opacity: 0.8; }
@keyframes spin-angle { to { --angle: 360deg; } }
.gate-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 1.2rem; }
.gate-logo .brand__mark { width: 52px; height: 52px; }
.gate-logo .brand__name { font-size: 1rem; }
.gate-logo .tag { display: block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.2rem; }
.gate-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.gate-lead { color: var(--ink-2); font-size: 0.93rem; line-height: 1.6; margin-bottom: 1.2rem; }
.gate-actions { display: grid; gap: 0.6rem; margin-top: 1rem; }
.gate-actions .btn-pill { width: 100%; }
.gate-foot { margin-top: 1rem; font-size: 0.8rem; color: var(--ink-3); text-align: center; line-height: 1.6; }
.gate-foot a { cursor: pointer; }
.gate-err { color: var(--bad-ink); font-size: 0.85rem; min-height: 1.2rem; margin-top: 0.6rem; }
.gate-ok { color: var(--ok-ink); font-size: 0.85rem; margin-top: 0.6rem; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1.2rem; }
.trust div { border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem 0.6rem; font-size: 0.72rem; color: var(--ink-2); line-height: 1.4; background: rgba(var(--fill-rgb), 0.02); }
.trust b { display: block; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 0.2rem; }
.rkey { font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: 0.08em; padding: 1rem; border: 1px dashed rgba(54, 226, 255, 0.55); border-radius: 14px; text-align: center; background: rgba(54, 226, 255, 0.05); word-break: break-all; color: var(--on); user-select: all; }
.wiz-steps { display: flex; gap: 0.35rem; margin-bottom: 1.2rem; }
.wiz-step { height: 3px; flex: 1; background: var(--line); border-radius: 3px; }
.wiz-step.on { background: linear-gradient(90deg, var(--cyan), var(--magenta)); box-shadow: 0 0 10px rgba(54, 226, 255, 0.5); }
.pick-list { display: grid; gap: 0.4rem; }
.pick { display: grid; grid-template-columns: auto 1fr 130px; gap: 0.6rem; align-items: center; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--fill-rgb), 0.02); }
.pick:has(input[type=checkbox]:checked) { border-color: rgba(54, 226, 255, 0.4); background: rgba(54, 226, 255, 0.06); }
.pick input[type=number] { min-height: 34px; padding: 0.3rem 0.5rem; }
.pick .pn { font-size: 0.86rem; }
.pick .pn small { display: block; font-size: 0.7rem; }

/* ============================================================ FORSIDE (widgets) */
.home-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.widget { grid-column: span 6; margin-bottom: 0; }
.widget.w-12 { grid-column: span 12; } .widget.w-4 { grid-column: span 4; } .widget.w-8 { grid-column: span 8; }
.w-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.w-head h3 { flex: 1; margin-bottom: 0.7rem; }
.w-head .lnk { font-size: 0.74rem; color: var(--ink-3); cursor: pointer; white-space: nowrap; margin-bottom: 0.7rem; }
.w-head .lnk:hover { color: var(--cyan-2); }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.kpi > div { padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--fill-rgb), 0.02); min-width: 0; }
.kpi .k { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.kpi .v { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 0.15rem; white-space: nowrap; }
.kpi .s { font-size: 0.7rem; color: var(--ink-3); margin-top: 0.1rem; }
.verdict { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.75rem 0.9rem; border-radius: 14px; border: 1px solid var(--line-2); margin-top: 0.8rem; font-size: 0.9rem; line-height: 1.5; }
.verdict.ok { border-color: rgba(61, 220, 151, 0.45); background: rgba(61, 220, 151, 0.07); }
.verdict.warn { border-color: rgba(255, 179, 71, 0.45); background: rgba(255, 179, 71, 0.07); }
.verdict.bad { border-color: rgba(255, 92, 138, 0.45); background: rgba(255, 92, 138, 0.07); }
.verdict .ic { font-size: 1.3rem; line-height: 1; }
.tips { display: grid; gap: 0.5rem; }
.tip { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--fill-rgb), 0.02); font-size: 0.85rem; line-height: 1.5; }
.tip .ic { font-size: 1.25rem; line-height: 1.1; flex: none; }
.tip .tt { font-weight: 600; color: var(--on); }
.tip .ta { margin-left: auto; flex: none; }
.tip.warn { border-color: rgba(255, 179, 71, 0.4); } .tip.bad { border-color: rgba(255, 92, 138, 0.4); } .tip.ok { border-color: rgba(61, 220, 151, 0.4); } .tip.info { border-color: rgba(59, 123, 255, 0.4); }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.todo li { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--fill-rgb), 0.02); font-size: 0.86rem; }
.todo li.done { opacity: 0.5; text-decoration: line-through; }
.todo li .ic { flex: none; }
.todo li button { margin-left: auto; }
.mbars { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 0.5rem; }
.mbar { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.mbar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--cyan), var(--blue)); box-shadow: 0 0 10px rgba(54, 226, 255, 0.35); min-height: 2px; }
.mbar.neg i { background: linear-gradient(180deg, var(--magenta), var(--bad)); box-shadow: 0 0 10px rgba(255, 92, 138, 0.4); border-radius: 0 0 4px 4px; }
.mbar.cur i { outline: 1px solid #fff; }
.mbar .l { font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.06em; color: var(--ink-3); text-align: center; margin-top: 0.25rem; white-space: nowrap; }
.mbars-axis { height: 1px; background: var(--line-2); margin: 0 0 0.2rem; }
.goal-card { display: grid; grid-template-columns: 62px 1fr; gap: 0.9rem; align-items: center; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--fill-rgb), 0.02); margin-bottom: 0.5rem; }
.goal-card .gname { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.goal-card .gmeta { font-size: 0.76rem; color: var(--ink-3); margin-top: 0.15rem; }
.goal-card .gline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.4rem; font-size: 0.78rem; color: var(--ink-2); }
.ring { width: 62px; height: 62px; }
.ring circle { fill: none; stroke-width: 6; }
.ring .bgc { stroke: rgba(var(--fill-rgb), 0.08); }
.ring .fgc { stroke: url(#ringGrad); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.8s var(--ease-out); filter: drop-shadow(0 0 4px rgba(54, 226, 255, 0.5)); }
.ring text { fill: var(--on); font-family: var(--font-display); font-weight: 700; font-size: 15px; text-anchor: middle; dominant-baseline: central; }
.flow-svg { width: 100%; height: auto; display: block; }
.flow-svg .nd { fill: rgba(var(--node-rgb), 0.9); stroke: var(--line-2); }
.flow-svg .nd.hi { stroke: var(--cyan); filter: drop-shadow(0 0 6px rgba(54, 226, 255, 0.45)); }
.flow-svg .nd.neg { stroke: var(--bad); }
.flow-svg .lk { fill: none; stroke: rgba(130, 160, 255, 0.35); stroke-width: 1.5; }
.flow-svg .lk.hot { stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(54, 226, 255, 0.6)); }
.flow-svg .pulse { fill: var(--on); filter: drop-shadow(0 0 6px var(--cyan)); }
.flow-svg .t1 { fill: var(--on); font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.flow-svg .t2 { fill: var(--ink-3); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.flow-svg .t3 { fill: var(--cyan-2); font-family: var(--font-mono); font-size: 10px; }
.flow-svg .t3.neg { fill: var(--bad); }
/* Pengestrømmen som liste på smalle skærme */
.flow-list { display: none; }
@media (max-width: 640px) { .flow-svg { display: none; } .flow-list { display: block; } }
.fl-item { display: flex; flex-direction: column; }
.fl-n { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .7rem; row-gap: .05rem; align-items: baseline; padding: .55rem .75rem; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(var(--node-rgb), .9); }
.fl-n.hi { border-color: var(--cyan); box-shadow: 0 0 10px rgba(54, 226, 255, .3); }
.fl-kids { display: flex; flex-direction: column; gap: .45rem; margin: .45rem 0 0 .9rem; padding-left: .8rem; border-left: 2px solid rgba(54, 226, 255, .45); }
.fl-amt { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); white-space: nowrap; text-align: right; }
.fl-sub { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-label { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--on); overflow-wrap: anywhere; }
.fl-val { font-family: var(--font-mono); font-size: .76rem; color: var(--cyan-2); white-space: nowrap; text-align: right; }
.fl-val.neg { color: var(--bad); }
.flow-svg .lk-amt { paint-order: stroke; stroke: rgba(var(--node-rgb), 0.85); stroke-width: 3px; stroke-linejoin: round; }
.customize { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.4rem; }
.empty { text-align: center; color: var(--ink-3); padding: 1.5rem 1rem; font-size: 0.86rem; }
.hero-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.hero-strip .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.1; }
.install-bar { display: none; align-items: center; gap: 0.8rem; padding: 0.6rem 0.9rem; border: 1px solid rgba(54, 226, 255, 0.35); border-radius: 14px; background: rgba(54, 226, 255, 0.06); margin-bottom: 1rem; font-size: 0.84rem; }
.install-bar.on { display: flex; flex-wrap: wrap; }
.install-bar .sp { flex: 1; }

/* ============================================================ Indstillinger */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.set-grid .card { margin-bottom: 0; }
.person-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: end; margin-bottom: 0.5rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; font-size: 0.84rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }


/* ============================================================ Lyst tema (lyseblåt) */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef4fc; --bg-2: #e4eef9; --bg-3: #f7faff;
  --surface: rgba(255, 255, 255, 0.86);
  --card-g: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.98));
  --ink: #0d1a3d; --ink-2: #3b4a70; --ink-3: #66759b;
  --cyan: #0b8fb0; --cyan-2: #0a6f8c; --blue: #2457d6; --violet: #6d3fd8; --magenta: #c21fb3; --pink: #d0347f;
  --line: rgba(36, 72, 150, 0.13); --line-2: rgba(36, 72, 150, 0.26);
  --ok: #0a8f5d; --bad: #d42a5b; --wrn: #c77700; --sav: #6d3fd8;
  --on: #0d1a3d; --fill-rgb: 30, 70, 150; --chrome-rgb: 247, 250, 255; --node-rgb: 255, 255, 255;
  --ok-ink: #076b46; --bad-ink: #b0204b; --wrn-ink: #8f5400; --sav-ink: #5a2fb8; --info-ink: #1f46b8;
  --glow: 0.35; --page-glow-1: rgba(59, 123, 255, 0.10); --page-glow-2: rgba(194, 31, 179, 0.05); --page-glow-3: rgba(11, 143, 176, 0.07);
}
:root[data-theme="light"] body::before { opacity: 0.55; }
:root[data-theme="light"] .bg-field { opacity: 0.16; filter: invert(1) hue-rotate(180deg) saturate(1.3); }
:root[data-theme="light"] .grain { opacity: 0.02; }
:root[data-theme="light"] .card, :root[data-theme="light"] .gate-card { box-shadow: 0 10px 30px rgba(30, 60, 120, 0.10); }
:root[data-theme="light"] .sc, :root[data-theme="light"] .kpi > div, :root[data-theme="light"] .tip, :root[data-theme="light"] .goal-card { background-color: rgba(255, 255, 255, 0.7); }
:root[data-theme="light"] .bs { background: linear-gradient(135deg, #18a6c9, #2f64e0); border-color: #1d7fbf; color: #fff; }
:root[data-theme="light"] .btn-pill.bs { color: #fff; }
:root[data-theme="light"] .mp.mp-cur { color: #fff; }
:root[data-theme="light"] .flow-svg .pulse { fill: var(--cyan); }
:root[data-theme="light"] .rkey { color: var(--ink); }
:root[data-theme="light"] input:-webkit-autofill, :root[data-theme="light"] input:-webkit-autofill:hover, :root[data-theme="light"] input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #f3f8ff inset; }
:root[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.95); }
:root[data-theme="light"] .sheet-bg { background: rgba(20, 40, 90, 0.25); }
.theme-btn .t-dark, :root[data-theme="light"] .theme-btn .t-light { display: inline; }
.theme-btn .t-light, :root[data-theme="light"] .theme-btn .t-dark { display: none; }

/* Inde i appen */
.native .install-bar { display: none !important; }
.native body { -webkit-user-select: none; user-select: none; }
.native input, .native textarea, .native .msg, .native td, .native .rkey { -webkit-user-select: text; user-select: text; }

/* ============================================================ Responsivt */
@media (max-width: 1000px) {
  :root { --side: 76px; }
  .nav-item { justify-content: center; padding: 0.7rem 0; }
  .nav-item .nl, .sidenav__foot { display: none; }
  .topbar__household { display: none; }
}
@media (max-width: 820px) {
  :root { --topbar: 56px; }
  .sidenav { display: none; }
  .main { margin-left: 0; padding-bottom: calc(var(--bottom) + var(--sa-b)); }
  .wrap { padding: 1rem 16px calc(2rem + var(--bottom) + var(--sa-b)); }
  .brand__name { display: none; }
  .topbar { gap: 0.35rem; padding-left: 10px; padding-right: 10px; }
  .brand__mark { width: 32px; height: 32px; }
  .monthctl { gap: 0.2rem; margin-left: 0; flex: 1; justify-content: center; }
  .lock-btn { padding: 0.4rem 0.5rem; font-size: 0.85rem; }
  .lock-btn .lt { display: none; }
  .topbar input.mpick { font-size: 14px; padding: 0.25rem 0.3rem; min-height: 34px; width: 126px; flex: none; }
  .arr-btn { width: 26px; height: 34px; }
  .sync-pill #syncTxt { display: none; }
  .sync-pill { padding: 0.45rem; }
  .topbar__actions { gap: 0.25rem; }
  .icon-btn { width: 34px; height: 34px; font-size: 0.9rem; }
  /* på telefonen ligger tema og indstillinger under Mere → Indstillinger */
  .topbar__actions .theme-btn, .topbar__actions .set-btn, .topbar__actions .help-top { display: none; }
  .kpi { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
  .kpi > div { padding: 0.5rem 0.55rem; }
  .kpi .v { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sc .val { font-size: 1.25rem; }
  .bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--bottom) + var(--sa-b)); padding-bottom: var(--sa-b);
    background: rgba(var(--chrome-rgb), 0.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  }
  .bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: transparent; border: none; border-radius: 0; color: var(--ink-3); font-size: 0.62rem; font-weight: 600; padding: 0; }
  .bn-item .ni { font-size: 1.15rem; color: var(--ink-2); transition: color 0.2s, text-shadow 0.3s; }
  .bn-item.active { color: var(--on); } .bn-item.active .ni { color: var(--cyan); text-shadow: 0 0 12px rgba(54, 226, 255, 0.8); }
  .bn-item:hover { transform: none; box-shadow: none; }
  .sheet-bg { display: block; position: fixed; inset: 0; z-index: 72; background: rgba(var(--chrome-rgb), 0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .sheet-bg.open { opacity: 1; pointer-events: auto; }
  .assist { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: min(86vh, 100%); transform: translateY(105%); border-left: none; border-top: 1px solid var(--line-2); border-radius: 22px 22px 0 0; }
  .assist.open { transform: none; }
  .g2, .g3, .g4, .set-grid, .imp-ctl { grid-template-columns: 1fr; }
  .g3 .sc, .g4 .sc { text-align: left; }
  .widget, .widget.w-4, .widget.w-8 { grid-column: span 12; }
  .home-grid { gap: 0.8rem; }
  .po { flex-direction: column; } .fc-ctrl { flex-direction: column; }
  .card { padding: 1rem 0.95rem; border-radius: 16px; }
  .sec-title { font-size: 1.35rem; }
  .toast-c { left: 1rem; right: 1rem; bottom: calc(var(--bottom) + var(--sa-b) + 0.8rem); }
  .toast { min-width: 0; max-width: 100%; }
  .pick { grid-template-columns: auto 1fr; } .pick input[type=number] { grid-column: 2; }
  .trust { grid-template-columns: 1fr; }
  .gate { padding: 0.8rem; align-items: start; }
  .gate-card { padding: 1.4rem 1.2rem; border-radius: 20px; }
  input[type=number], input[type=text], input[type=date], input[type=month], input[type=email], input[type=password], select, textarea { font-size: 16px; }
  .pmt-date { width: 128px; }
  table { font-size: 0.82rem; } th, td { padding: 0.45rem 0.45rem; }
  .abtn { flex-direction: column; align-items: flex-end; }
  .monthctl { margin-left: auto; }
}
@media (min-width: 821px) { .sheet, .sheet-bg { display: none; } }
@media (hover: none) { .card::after { display: none; } button:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .bg-field { display: none; }
}

/* ============================================================ Print */
@media print {
  :root { --ink: #111; --ink-2: #333; --ink-3: #555; --line: #ccc; --line-2: #999; --cyan: #0a6a8a; --cyan-2: #0a6a8a; --ok: #0a7a4a; --bad: #b00040; --sav: #5a2fb8; --wrn: #a15c00; }
  body { background: #fff !important; color: #111; font-size: 12px; }
  body::before, body::after, .bg-field, .grain, .topbar, .sidenav, .bottomnav, .assist, .sheet, .sheet-bg, .toast-c, .gate, .install-bar, .sec-tools { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; } .wrap { padding: 0; max-width: none; }
  .card, .sc, .widget, .tip, .kpi > div, .goal-card { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; color: #111; }
  .card h3 { color: #0a6a8a; } .sc .val, strong, .kpi .v { color: #111; }
  th { background: #f3f3f3 !important; color: #333; }
  button { display: none !important; }
  .sec.active { display: block; }
}

/* ============================================================ 2.2: sprog, premium, hjælp, lynguide, lønsedler */
.lang-pick { width: auto; min-width: 9rem; padding: 0.4rem 0.7rem; font-size: 0.85rem; }
.gate-lang { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }
.gate-lang .lang-pick { background: rgba(var(--fill-rgb), 0.04); }

/* Premium */
.prem-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; color: #1a1030; background: linear-gradient(90deg, var(--cyan-2), var(--pink)); vertical-align: middle; }
.prem-lock { display: flex; gap: 1rem; align-items: flex-start; border-color: rgba(255, 111, 200, 0.35); }
.prem-lock__ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #1a1030; background: linear-gradient(135deg, var(--cyan-2), var(--pink)); }
.sec.prem-locked > :not(.sec-head):not(.prem-lock) { display: none !important; }
.prem-line { margin-top: 0.35rem; font-size: 0.82rem; }
.fc-pb.prem-pb::after { content: " \2605"; color: var(--pink); }
body.pw-open { overflow: hidden; }
.pw-bg { position: fixed; inset: 0; z-index: 200; background: rgba(2, 4, 16, 0.62); backdrop-filter: blur(6px); }
.pw { position: fixed; z-index: 201; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card-g); border: 1px solid var(--line-2); border-radius: 22px; padding: 1.4rem 1.4rem 1.2rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(54, 226, 255, 0.12); animation: pw-in 0.35s var(--ease-out); }
@keyframes pw-in { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.pw-x { position: absolute; top: 0.8rem; right: 0.8rem; }
.pw-title { font-family: var(--font-display); font-size: 1.5rem; margin: 0.2rem 0 0.4rem; }
.pw-why { margin: 0 0 0.8rem; color: var(--pink); font-weight: 600; }
.pw-list { list-style: none; margin: 0.6rem 0 1rem; padding: 0; display: grid; gap: 0.55rem; }
.pw-list li { display: flex; gap: 0.7rem; align-items: flex-start; }
.pw-list li strong { display: block; font-size: 0.92rem; }
.pw-list li span:not(.pw-ic) { display: block; font-size: 0.82rem; color: var(--ink-2); }
.pw-ic { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(54, 226, 255, 0.12); color: var(--cyan-2); font-size: 0.95rem; }
.pw-consent { align-items: flex-start; margin: 0 0 0.7rem; font-size: 0.8rem; line-height: 1.4; }
.pw-consent input { margin-top: 0.1rem; }
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.pw-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; text-align: left; padding: 0.9rem 1rem; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(var(--fill-rgb), 0.03); }
.pw-plan:first-child { border-color: rgba(54, 226, 255, 0.55); background: rgba(54, 226, 255, 0.08); }
.pw-plan__t { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.pw-plan__p { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.pw-plan__s { font-size: 0.78rem; color: var(--ink-3); }
.pw-save { color: var(--ok); margin-left: 0.3rem; }
.pw-free { margin: 1rem 0 0; font-size: 0.78rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 0.8rem; }
@media (max-width: 480px) { .pw-plans { grid-template-columns: 1fr; } .pw { padding: 1.1rem 1rem; } }

/* Besked til alle */
.notice-bar { display: flex; gap: 0.7rem; align-items: center; padding: 0.65rem 0.9rem; margin-bottom: 1rem; border-radius: 14px; border: 1px solid rgba(54, 226, 255, 0.4); background: rgba(54, 226, 255, 0.08); font-size: 0.88rem; }
.notice-bar.warn { border-color: rgba(255, 179, 71, 0.5); background: rgba(255, 179, 71, 0.09); }
.notice-bar .sp { flex: 1; }
body.has-ad .main { padding-bottom: calc(var(--bottom) + 70px + var(--sa-b)); }

/* Hjælp */
.help-q { font-weight: 800; font-family: var(--font-display); }
.help-hero { display: grid; gap: 1rem; }
.help-search input { width: 100%; }
.help-topic h3 { display: flex; align-items: center; gap: 0.5rem; }
.help-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(54, 226, 255, 0.12); color: var(--cyan-2); font-size: 0.9rem; }
.help-art { border-top: 1px solid var(--line); padding: 0.55rem 0; }
.help-art summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 0.6rem; }
.help-art summary::-webkit-details-marker { display: none; }
.help-art summary::after { content: "+"; color: var(--cyan-2); font-weight: 700; }
.help-art[open] summary::after { content: "\2013"; }
.help-art__body { padding: 0.4rem 0 0.3rem; color: var(--ink-2); font-size: 0.9rem; }
.help-art__body p { margin: 0 0 0.6rem; }
.help-art__body ol, .help-art__body ul { margin: 0 0 0.6rem; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.help-art.flash { animation: flash 1.6s var(--ease-out); border-radius: 10px; }
@keyframes flash { 0%, 40% { background: rgba(54, 226, 255, 0.14); } 100% { background: transparent; } }

/* Kom godt i gang */
.start-prog { display: flex; align-items: center; gap: 0.7rem; margin: -0.2rem 0 0.7rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-3); }
.start-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(var(--fill-rgb), 0.08); overflow: hidden; }
.start-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); border-radius: 6px; transition: width 0.6s var(--ease-out); }
.start-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.start-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--fill-rgb), 0.02); }
.start-list li.done { opacity: 0.6; }
.start-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; border: 1px solid var(--line-2); color: var(--cyan-2); }
.start-list li.done .start-n { background: rgba(61, 220, 151, 0.15); border-color: rgba(61, 220, 151, 0.5); color: var(--ok); }
.start-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.start-t span { font-size: 0.8rem; color: var(--ink-3); }
@media (max-width: 560px) { .start-list li { flex-wrap: wrap; } .start-list li .btn-row { width: 100%; justify-content: flex-end; } }

/* Lynguiden */
#tourLayer { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(2, 4, 16, 0.66), 0 0 0 2px var(--cyan), 0 0 24px rgba(54, 226, 255, 0.5); transition: all 0.35s var(--ease-out); pointer-events: none; }
.tour-pop { position: fixed; pointer-events: auto; background: var(--card-g); border: 1px solid var(--line-2); border-radius: 18px; padding: 1rem 1.1rem 0.9rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); transition: top 0.35s var(--ease-out), left 0.35s var(--ease-out); }
.tour-pop h3 { margin: 0.2rem 0 0.35rem; font-family: var(--font-display); font-size: 1.05rem; }
.tour-pop p { margin: 0 0 0.8rem; font-size: 0.9rem; color: var(--ink-2); }
.tour-step { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan-2); }
.spotlight { box-shadow: 0 0 0 3px var(--cyan), 0 0 28px rgba(54, 226, 255, 0.55) !important; border-radius: 14px; transition: box-shadow 0.3s; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-pop, .pw { transition: none; animation: none; } }

/* Lønseddel */
.pay-meta { font-size: 0.85rem; color: var(--ink-2); }
.pay-tbl td { vertical-align: top; }
.pay-tbl tr.pay-main td { background: rgba(54, 226, 255, 0.06); }
.pay-in { display: inline-flex; align-items: center; gap: 0.35rem; }
.pay-in input { width: 8.5rem; text-align: right; padding: 0.35rem 0.5rem; }
.pay-in span { font-size: 0.75rem; color: var(--ink-3); }
.pay-src { font-size: 0.78rem; }
.pay-line { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-3); word-break: break-word; }
.cam-btn { display: none; }
@media (max-width: 820px), (pointer: coarse) { .cam-btn { display: inline-flex; } }
@media (max-width: 600px) { .pay-tbl thead { display: none; } .pay-tbl tr { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); } .pay-tbl td { border: 0; padding: 0; } .pay-tbl td.pay-src { grid-column: 1 / -1; } }

/* Lyst tema */
:root[data-theme="light"] .pw-bg { background: rgba(20, 40, 90, 0.35); }
:root[data-theme="light"] .tour-spot { box-shadow: 0 0 0 9999px rgba(20, 40, 90, 0.45), 0 0 0 2px var(--blue), 0 0 24px rgba(59, 123, 255, 0.35); }
:root[data-theme="light"] .prem-badge, :root[data-theme="light"] .prem-lock__ic { color: #fff; background: linear-gradient(90deg, #2457d6, #c21fb3); }

/* ============================================================ levende felter (detail.js) */
[data-live] { cursor: pointer; transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s; }
[data-live]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.kpi > [data-live], .sc[data-live], .goal-card[data-live] { position: relative; }
.kpi > [data-live]::after, .sc[data-live]::after { content: '›'; position: absolute; top: 0.4rem; right: 0.6rem; font-weight: 700; font-size: 0.95rem; line-height: 1; color: var(--ink-3); opacity: 0.55; transition: opacity 0.15s, transform 0.15s; }
.kpi > [data-live]:hover, .sc[data-live]:hover, .goal-card[data-live]:hover { border-color: var(--line-2); background-color: rgba(54, 226, 255, 0.06); box-shadow: 0 0 0 1px rgba(54, 226, 255, 0.18); }
.kpi > [data-live]:hover::after, .sc[data-live]:hover::after { opacity: 1; color: var(--cyan); transform: translateX(2px); }
tr[data-live]:hover > td { background: rgba(54, 226, 255, 0.06); }
td[data-live] { text-decoration: underline dotted var(--line-2); text-underline-offset: 3px; }
td[data-live]:hover { color: var(--cyan-2); text-decoration-color: var(--cyan); }
.mbar[data-live]:hover i { filter: brightness(1.25); }
.flow-svg g[data-live]:hover .nd, .flow-svg g[data-live]:focus .nd { stroke: var(--cyan); stroke-width: 2; }
.flow-svg g[data-live]:focus { outline: none; }
.fl-n[data-live]:hover { border-color: var(--line-2); background-color: rgba(54, 226, 255, 0.06); }

.dt-bg { position: fixed; inset: 0; z-index: 210; background: rgba(2, 4, 16, 0.62); backdrop-filter: blur(6px); }
.dt { position: fixed; z-index: 211; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card-g); border: 1px solid var(--line-2); border-radius: 22px; padding: 1.3rem 1.3rem 1.1rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(54, 226, 255, 0.12); animation: pw-in 0.3s var(--ease-out); }
.dt-title { font-family: var(--font-display); font-size: 1.25rem; margin: 0.2rem 2.2rem 0.2rem 0; }
.dt-val { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-val.gt { color: var(--ok); } .dt-val.rt { color: var(--bad); }
.dt-sub { color: var(--ink-3); font-size: 0.82rem; margin-top: 0.1rem; }
.dt-kpi { margin-top: 0.8rem; }
.dt-chart { display: flex; align-items: stretch; gap: 3px; height: 128px; margin: 1rem 0 0.2rem; }
.dt-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.dt-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 1px solid var(--line-2); }
.dt-chart.allneg .dt-col { justify-content: flex-start; border-bottom: 0; border-top: 1px solid var(--line-2); }
.dt-bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--cyan), var(--blue)); min-height: 0; transition: filter 0.15s; }
.dt-bar.neg i { background: linear-gradient(180deg, var(--magenta), var(--bad)); }
.dt-chart.allneg .dt-bar i { border-radius: 0 0 4px 4px; }
.dt-bar.fut i { opacity: 0.45; }
.dt-bar.cur i { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.dt-bar.hi i { box-shadow: 0 0 0 2px var(--wrn); }
.dt-bar:hover i, .dt-bar:focus-visible i { filter: brightness(1.3); }
.dt-bar .l { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.04em; color: var(--ink-3); text-align: center; margin-top: 0.25rem; white-space: nowrap; overflow: hidden; }
.dt-bar.cur .l { color: var(--cyan); font-weight: 700; }
.dt-legend { font-size: 0.72rem; color: var(--ink-3); }
.dt-note { margin: 0.6rem 0 0; }
.dt-rt { margin: 1rem 0 0.3rem; }
.dt-tbl td { padding: 0.45rem 0.4rem; vertical-align: top; }
.dt-tbl tr.dt-warn td:first-child { border-left: 2px solid var(--wrn); }
.dt-go { margin-top: 1rem; }
@media (max-width: 480px) { .dt { padding: 1.1rem 0.9rem; } .dt-chart { height: 104px; } }
:root[data-theme="light"] .dt-bg { background: rgba(20, 40, 90, 0.35); }
:root[data-theme="light"] .dt-bar.cur i { box-shadow: 0 0 0 2px var(--ink); }
@media (prefers-reduced-motion: reduce) { .dt { animation: none; } }

/* importguide og forslag fra historikken (recur.js) */
.imp-guide { margin: 0 0 0.9rem; border: 1px solid var(--line); border-radius: 14px; padding: 0.55rem 0.8rem; background: rgba(54, 226, 255, 0.04); }
.imp-guide > summary { cursor: pointer; font-weight: 700; color: var(--cyan-2); }
.imp-guide[open] > summary { margin-bottom: 0.3rem; }
.imp-need { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.4rem; margin-top: 0.6rem; }
.imp-need > div { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 0.4rem 0.6rem; }
.imp-need .k { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.imp-need .v { font-family: var(--font-display); font-weight: 700; }
.recur-card { border-color: rgba(54, 226, 255, 0.35); }
.recur-tbl td { vertical-align: top; padding: 0.5rem 0.4rem; }
.recur-tbl input[type="checkbox"] { width: 18px; height: 18px; margin-top: 0.15rem; }

/* menuen i grupper: det daglige, detaljerne, hjælp */
.nav-sep { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); padding: 0.9rem 0.9rem 0.3rem; }
.nav-sep--line { padding: 0; margin: 0.6rem 0.9rem; height: 1px; background: var(--line); }
.dt-kpi .v { white-space: normal; overflow-wrap: anywhere; }

/* lønsedlens egen indgang i Lønberegneren */
.pay-inbox { border-color: rgba(54, 226, 255, 0.35); }
.pay-inbox .imp-drop { margin-top: 0.2rem; }
.pay-inbox .imp-alt { margin-top: 0.6rem; }
.pay-status { margin: 0.8rem 0 0; }

/* installér som app — beskeden øverst */
.inst-top { position: fixed; z-index: 160; left: 50%; top: calc(var(--sa-t) + 10px); transform: translate(-50%, calc(-100% - 24px)); width: min(560px, calc(100vw - 20px));
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.6rem 0.6rem 0.7rem; border: 1px solid rgba(54, 226, 255, 0.4); border-radius: 16px;
  background: var(--card-g); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(54, 226, 255, 0.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.45s var(--ease-out); }
.inst-top.on { transform: translate(-50%, 0); }
.inst-ic { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.inst-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.8rem; line-height: 1.35; color: var(--ink-2); }
.inst-tx > strong { color: var(--ink); font-size: 0.9rem; }
.inst-share { width: 16px; height: 16px; vertical-align: -3px; color: var(--cyan); }
.inst-x { flex-shrink: 0; }
.native .inst-top { display: none !important; }
@media print { .inst-top { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .inst-top { transition: none; } }

/* ============================================================ det enkle foran, detaljerne ét tryk væk */
.fold { margin: 0 0 0.78rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--fill-rgb), 0.02); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: '›'; font-size: 1.05rem; line-height: 1; font-weight: 700; color: var(--cyan); transition: transform 0.15s; flex-shrink: 0; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold-t { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.fold > summary:hover .fold-t { color: var(--ink); }
.fold-sum { margin-left: auto; font-size: 0.76rem; color: var(--ink-3); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-sum:empty { display: none; }
.fold > .fold-body { padding: 0 0.9rem 0.8rem; }
.fold .fm-wrap { margin-top: 0.2rem; }
.fc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; }
.fc-to { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.fc-to input { width: 150px; }
.fc-to .hint { margin: 0; white-space: nowrap; }
@media (max-width: 560px) { .fc-to { margin-left: 0; width: 100%; } .fc-to input { flex: 1; width: auto; } }
