:root {
  --brand: #0E7C66; --brand-dark: #0A5A4B; --brand-ink: #0B3B33; --brand-tint: #E6F6F0; --brand-glow: #7FF0C9;
  --bg: #F4F8F6; --card: #fff; --text: #0F2A25; --muted: #5B746E; --line: #DCE6E2;
  --accent: #0E7C66; --ok: #12A383; --off: #8A9A96; --warn: #E08A2E; --danger: #C8452E;
  --c1: #2F6FE0; --c2: #E08A2E; --c3: #12A383; --c4: #8E5BD6; --c5: #D2453B; --c6: #0FA3A3; --c7: #8A9A96;
  --radius: 14px; --shadow: 0 1px 2px rgba(11,59,51,.05), 0 8px 24px -16px rgba(11,59,51,.18);
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
/* Tema vælges af brugeren (Konto): lys er standard, mørk, eller auto = følger enheden */
:root[data-theme="dark"] { --bg: #0C1715; --card: #13211E; --text: #E5F1ED; --muted: #94ADA6; --line: #233833;
  --accent: #3CC9A2; --brand-tint: #16302A; --shadow: none; color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --bg: #0C1715; --card: #13211E; --text: #E5F1ED; --muted: #94ADA6; --line: #233833;
  --accent: #3CC9A2; --brand-tint: #16302A; --shadow: none; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: .55rem 1.5rem;
  background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 650; text-decoration: none; color: var(--text); font-size: 1.15rem; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; display: block; }
.brand span { color: var(--accent); }
.brand .tag { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--brand-glow); color: var(--brand-ink); padding: .15rem .5rem; border-radius: 6px; }
.topbar nav { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; color: var(--text); padding: .4rem .7rem; border-radius: 8px; font-weight: 500; }
.topbar nav a:hover { background: var(--brand-tint); }
.topbar nav a.active { background: var(--brand-tint); color: var(--accent); }
.topbar nav .sep { width: 1px; height: 22px; background: var(--line); margin: 0 .4rem; }
body.is-admin .topbar { background: var(--brand-ink); border-bottom-color: #0A2E28; }
body.is-admin .topbar nav a, body.is-admin .topbar nav button.link, body.is-admin .brand { color: #E5F1ED; }
body.is-admin .topbar nav a:hover { background: rgba(255,255,255,.08); }
.container { max-width: 1150px; margin: 0 auto; padding: 1.5rem; }
h1 { margin: .2rem 0 1rem; font-size: 1.75rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 1.2rem 0 .6rem; letter-spacing: -.01em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.card h2:first-child { margin-top: 0; }
.card.narrow { max-width: 440px; margin: 2rem auto; }
.card.highlight { border-color: var(--accent); }
.card.tile { display: block; text-decoration: none; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: .9rem; }
label { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .8rem; font-size: .9rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: .5rem; margin-top: 1.6rem; color: var(--text); }
input, select, textarea { font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; align-items: end; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 1rem; padding: .8rem 1rem; }
legend { font-weight: 600; padding: 0 .3rem; }
button, .button { font: inherit; font-weight: 600; border-radius: 9px; padding: .5rem 1rem; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; display: inline-block; transition: background .15s, border-color .15s; }
button:hover, .button:hover { border-color: var(--accent); }
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
button.secondary { background: transparent; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.link { border: none; background: none; color: var(--accent); padding: 0; }
button.link.danger { color: var(--danger); }
button.big { padding: .7rem 1.6rem; font-size: 1rem; margin-bottom: 1.5rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }
form.inline label { margin: 0; }
.actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid var(--line); background: var(--card); }
.flash-info { border-color: var(--accent); background: var(--brand-tint); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.flash-success { border-color: var(--ok); color: var(--ok); }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #fff; }
.badge.ok { background: var(--ok); }
.badge.off { background: var(--off); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.05rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 1.5rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: .8rem; }
.table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.table th, .table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table.compact td, .table.compact th { padding: .3rem .5rem; font-size: .9rem; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.small { font-size: .8rem; }
input.mono { width: 100%; }
.chart { width: 100%; display: block; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: .3rem 0 1rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.address-search { position: relative; display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; }
.address-search button { margin-bottom: .8rem; }
.suggestions { grid-column: 1 / -1; list-style: none; margin: -.5rem 0 .8rem; padding: 0; border-radius: 6px; }
.suggestions li { padding: .4rem .6rem; border: 1px solid var(--line); border-top: none; cursor: pointer; background: var(--card); }
.suggestions li:first-child { border-top: 1px solid var(--line); }
.suggestions li:hover { background: var(--bg); }
.danger-zone { border-color: var(--danger); }
.chart-tip { position: fixed; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; font-size: .8rem; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 10; display: none; white-space: pre; }
.grid-hint { grid-column: 1 / -1; margin: 0 0 .8rem; }
.badge.warn { background: var(--warn); }
.grid-hint { font-size: .9rem; }
#eloverblik form.inline { display: flex; flex-wrap: wrap; }
#eloverblik input[type="password"] { flex: 1; min-width: 18rem; }
.stat.clickable { cursor: pointer; text-align: left; font: inherit; color: inherit; }
.stat.clickable:hover { border-color: var(--accent); }
h3 { font-size: 1rem; margin: 1.2rem 0 .2rem; }
.savings-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
a.stat.clickable { text-decoration: none; }
.alarm { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 2px solid var(--danger); background: var(--card); }
.alarm p { margin: .2rem 0 0; }
.alarm-critical strong { color: var(--danger); }
.alarm-warning { border-color: var(--warn); }
.alarm-warning strong { color: var(--warn); }
.alarm.acked { border-style: dashed; opacity: .85; }
.now-line { font-size: .9rem; margin: .2rem 0 .4rem; }
.live-status { margin: -.6rem 0 1rem; font-size: .8rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--off); vertical-align: 1px; }
.live-dot.ok { background: var(--ok); animation: pulse 2s ease-in-out infinite; }
.live-dot.err { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
.flash-update { animation: flashup 1.2s ease-out; }
@keyframes flashup { from { color: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .live-dot.ok, .flash-update { animation: none; } }
.pressure-row { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
details summary { cursor: pointer; color: var(--accent); margin: .2rem 0 .6rem; }
.stat.pressure-low, .stat.pressure-high { border-color: var(--danger); }
.stat.pressure-low .value, .stat.pressure-high .value { color: var(--danger); }
.stat.pressure-missing { border-color: var(--warn); }

/* SaaS: konto, abonnement og administration */
.upsell { max-width: 22rem; text-align: right; }
.upsell p { margin: .3rem 0 0; }
.features { list-style: none; padding: 0; }
.features li { padding: .25rem 0; }
.features li.off { color: var(--muted); }
.account-head { margin-top: 1.2rem; }
.account-head h2 { margin: 0; }
.admin-link { font-weight: 600; }
.support-banner { border-left: 4px solid var(--warn); }
.admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-nav a.active { font-weight: 700; text-decoration: underline; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; display: block; }

/* Login og oprettelse */
.auth { display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; margin: 2rem auto; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.auth-side { background: radial-gradient(600px 300px at 90% 0%, #12A383 0%, transparent 60%), var(--brand-ink); color: #CFE7DF; padding: 2.5rem; display: flex; flex-direction: column; gap: .8rem; }
.auth-side img { width: 56px; height: 56px; }
.auth-side h2 { color: #fff; font-size: 1.6rem; margin: .5rem 0 0; }
.auth-side ul { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .6rem; }
.auth-side li::before { content: "\2713"; color: var(--brand-glow); font-weight: 700; margin-right: .6rem; }
.auth-side .small { margin-top: auto; color: #8FB5A9; }
.auth-side a { color: var(--brand-glow); }
.auth-form { padding: 2.5rem; }
.auth-form h1 { margin-top: 0; }
.auth-form button.primary { width: 100%; padding: .75rem; font-size: 1rem; margin-top: .4rem; }
body.is-admin .auth-side { background: radial-gradient(600px 300px at 90% 0%, #2F6FE0 0%, transparent 55%), #0A1F1B; }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; margin: 0; border-radius: 0; } .auth-side { padding: 1.6rem; } .auth-side ul { display: none; } }
.wordmark { font-weight: 650; }
body.is-admin .brand .wordmark span { color: var(--brand-glow); }
.brand .wordmark { color: var(--text); }
.brand .wordmark span { color: var(--accent); }
body.is-admin .brand .wordmark { color: #fff; }
.admin-nav { gap: .35rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .35rem; width: fit-content; max-width: 100%; }
.admin-nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: .45rem .9rem; border-radius: 9px; }
.admin-nav a:hover { color: var(--text); background: var(--brand-tint); }
.admin-nav a.active { text-decoration: none; color: #fff; background: var(--brand-ink); }

/* Valg af tema under Konto */
.theme-picker { display: flex; gap: .6rem; flex-wrap: wrap; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .6rem; min-width: 7rem; font-weight: 600; }
.theme-opt .swatch { width: 5.5rem; height: 3.2rem; border-radius: 8px; border: 1px solid var(--line); display: block; }
.theme-light .swatch { background: linear-gradient(180deg, #fff 0 30%, #F4F8F6 30%); }
.theme-dark .swatch { background: linear-gradient(180deg, #13211E 0 30%, #0C1715 30%); }
.theme-auto .swatch { background: linear-gradient(135deg, #F4F8F6 0 50%, #0C1715 50%); }
.theme-opt.selected { border: 2px solid var(--accent); background: var(--brand-tint); }

/* Grafisk varmekurve */
.curve-editor { margin: .4rem 0 1rem; }
.curve-editor canvas { width: 100%; display: block; touch-action: none; user-select: none; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.curve-readout { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .6rem 0 .2rem; font-size: .9rem; color: var(--muted); }
.curve-editor.dirty .curve-readout [data-curve-now]::after { content: " · husk at gemme"; color: var(--warn); font-weight: 600; }

/* Menu med moduler */
.nav-mod { display: inline-flex; align-items: center; gap: .4rem; }
.nav-mod .ico { color: var(--accent); }
/* Topmenu: på computer alt i toppen; på telefon moduler i en fast bundlinje og resten under "Menu" */
.nav-rest { display: contents; }
.mobile-only { display: none !important; }
.nav-menu { position: relative; }
.nav-menu summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .45rem .75rem;
  border: 1px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--text); user-select: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { background: var(--brand-tint); border-color: var(--accent); }
.nav-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: .4rem; display: flex; flex-direction: column; z-index: 50; }
.nav-menu-panel a, .nav-menu-panel button.link { display: block; text-align: left; width: 100%; padding: .7rem .9rem; border-radius: 9px;
  text-decoration: none; color: var(--text); font-weight: 500; font-size: 1rem; }
.nav-menu-panel a:hover, .nav-menu-panel a.active { background: var(--brand-tint); color: var(--accent); }
.nav-menu-panel form { margin: .2rem 0 0; padding-top: .2rem; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .desk-only { display: none !important; }
  .mobile-only { display: block !important; }
  .nav-menu.mobile-only { display: block !important; }
  .topbar { flex-wrap: nowrap; padding: .5rem 1rem; }
  .nav-main:empty { display: none; }
  body.has-bottom-nav .nav-main { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
    gap: 0; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06);
    padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .nav-main a.nav-mod { flex: 1; flex-direction: column; justify-content: center; gap: .15rem; padding: .35rem .2rem;
    font-size: .74rem; font-weight: 600; text-align: center; border-radius: 10px; }
  body.has-bottom-nav main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .app-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:not(.has-bottom-nav) .nav-main { display: none; }
}

/* Anlæggets forside */
.home-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1.4rem; }
.home-hero h1 { margin: 0; font-size: 2.1rem; }
.home-date { margin: 0; color: var(--accent); font-weight: 650; font-size: .9rem; text-transform: none; }
.home-hero .muted { margin: .2rem 0 0; }
.home-status { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-radius: 12px; text-decoration: none; font-size: .9rem; line-height: 1.35; }
.home-status.is-ok { background: var(--brand-tint); color: var(--text); }
.home-status.is-ok .ico { color: var(--ok); }
.home-status.is-alarm { background: #FDECE8; color: #8A2A18; border: 1px solid #F3B8A8; }
.home-h { font-size: 1.05rem; color: var(--muted); font-weight: 650; margin: 1.6rem 0 .7rem; }
.today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.today-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.today-top { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.today-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-tint); color: var(--accent); display: grid; place-items: center; }
.today-value { font-size: 1.7rem; font-weight: 700; margin: .5rem 0 .1rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.today-value-sm { font-size: 1.15rem; }
.today-sub { margin: 0; color: var(--muted); font-size: .85rem; }
.level { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.level-lav { background: var(--brand-tint); color: var(--ok); }
.level-middel { background: #F1F4F3; color: var(--muted); }
.level-høj { background: #FDECE8; color: var(--danger); }
.home-price { margin-top: 1.2rem; }
.home-price h2 { margin: 0; }
.module-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .9rem; }
.module-tile { display: flex; flex-direction: column; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem 1.3rem; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.module-tile h3 { margin: 0; font-size: 1.15rem; }
.module-tile .muted { margin: .15rem 0 0; }
.module-tile.is-active { border: 2px solid var(--accent); transition: transform .15s, box-shadow .15s; }
.module-tile.is-active:hover { transform: translateY(-2px); }
.module-tile.is-coming { background: transparent; box-shadow: none; border-style: dashed; }
.module-tile.is-coming .mt-ico { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.mt-head { display: flex; gap: .8rem; align-items: flex-start; }
.mt-head .badge { margin-left: auto; flex: none; }
.mt-ico { width: 48px; height: 48px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--brand-tint); color: var(--accent); }
.mt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.mt-stats div { display: flex; flex-direction: column; background: var(--bg); border-radius: 10px; padding: .55rem .7rem; }
.mt-stats span { color: var(--muted); font-size: .78rem; }
.mt-stats b { font-size: .95rem; }
.mt-open { margin-top: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--accent); font-weight: 650; }
.mt-feats { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: .3rem; color: var(--muted); font-size: .88rem; }
.mt-feats li { display: flex; align-items: center; gap: .4rem; }
@media (max-width: 980px) {
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: 1fr; }
  .mt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mt-head h3 { align-self: center; }
.mt-desc { margin: 0 !important; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.profile-nudge { display: block; text-decoration: none; color: var(--text); font-weight: 600; }

/* Energi */
.energy-live { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: .9rem; margin-bottom: .3rem; }
.energy-live .card { margin: 0; }
.el-big { font-size: 2.6rem; font-weight: 750; margin: .4rem 0 .6rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.today-top .live-dot { margin-left: auto; }
.fuse { display: grid; gap: .35rem; }
.fuse-bar { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.fuse-bar.small { height: 7px; margin: .3rem 0 .4rem; }
.fuse-bar i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .6s ease; }
.fuse-bar i.warm { background: var(--warn); }
.fuse-bar i.hot { background: var(--danger); }
.el-ph-name { font-weight: 700; color: var(--accent); }
.el-ph-a { font-size: 1.9rem; font-weight: 700; margin: .2rem 0 0; font-variant-numeric: tabular-nums; }
.el-ph-a small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.el-ph-w { margin: 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; align-items: center; gap: .25rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .2rem; }
.seg-btn { border: 0; background: transparent; padding: .3rem .7rem; font-size: .85rem; border-radius: 8px; color: var(--muted); }
.seg-btn.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.seg-sep { width: 1px; height: 18px; background: var(--line); margin: 0 .2rem; }
.bill { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.bill div { background: var(--bg); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; }
.bill span { color: var(--muted); font-size: .82rem; }
.bill b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bill .bill-total { background: var(--brand-tint); }
.warn-text { color: var(--warn); font-weight: 700; }
form.inline.wrap { flex-wrap: wrap; }
form.inline.wrap input[type=password] { min-width: 18rem; flex: 1; }
@media (max-width: 980px) { .energy-live { grid-template-columns: repeat(3, minmax(0, 1fr)); } .el-total { grid-column: 1 / -1; } }
@media (max-width: 560px) { .energy-live { grid-template-columns: 1fr; } }

/* Ladeboks */
.ev-box { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0 1rem; margin-bottom: 1.5rem; }
.ev-box .ev-sessions, .ev-box .ev-car { grid-column: 1 / -1; }
.ev-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0 .4rem; }
.ev-nums div { background: var(--bg); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; }
.ev-nums span { color: var(--muted); font-size: .8rem; }
.ev-nums b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.ev-modes { margin-top: .4rem; }
.ev-modes .seg-btn { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.ev-plan h2 { margin-top: 0; }
@media (max-width: 900px) { .ev-box { grid-template-columns: 1fr; } }
.car-type { margin: 0 0 .9rem; }
.car-type .seg-btn { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; font-weight: 600; }
.car-type input { position: absolute; opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }
.car-type .seg-btn { flex-direction: row; margin: 0; color: var(--muted); }
.car-type .seg-btn.on { color: var(--text); }

.app-footer { max-width: 1150px; margin: 1rem auto 2rem; padding: 0 1.5rem; display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.app-footer a { color: var(--muted); }
pre.changelog { white-space: pre-wrap; font: .9rem/1.55 var(--font); margin: 0; }
.connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0 .5rem; }
.connect-opt { background: var(--bg); border-radius: 12px; padding: 1rem 1.2rem; }
.connect-opt h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: 1.05rem; }
.connect-opt ol { padding-left: 1.2rem; margin: 0 0 .8rem; }
.add-charger > summary { cursor: pointer; font-weight: 650; color: var(--accent); margin: 0 0 1rem; }
.install-card { max-width: 820px; margin: 1.5rem auto; text-align: center; }
.install-card .install-icon { display: block; margin: .5rem auto 1rem; border-radius: 18px; }
.install-card > p { max-width: 560px; margin-left: auto; margin-right: auto; }
.install-card button.big { font-size: 1.05rem; padding: .8rem 1.4rem; margin: .5rem 0 1rem; }
.install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.2rem 0; text-align: left; }
.install-opt { background: var(--bg); border: 2px solid transparent; border-radius: 12px; padding: 1rem 1.2rem; }
.install-opt.current { border-color: var(--brand, #0E7C66); }
.install-opt h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.install-opt ol { padding-left: 1.2rem; margin: 0; }
body.is-admin .nav-menu summary { color: #E5F1ED; border-color: rgba(255,255,255,.25); }
body.is-admin .nav-menu[open] summary { background: rgba(255,255,255,.1); }
