/* Feltsalg – feltverktøy for dørsalg. Kartet er hovedflaten; alt annet er kontroller rundt det. */
:root {
  --ink: #142126;
  --ink-2: #4a5a60;
  --line: #d9e1e3;
  --paper: #f5f8f8;
  --card: #ffffff;
  --fjord: #123c46;
  --fjord-2: #1d5867;
  --focus: #2a7fff;
  --danger: #c62f2f;

  /* Statusfarger (fast betydning) */
  --st-ikke: #9aa0a6;
  --st-hjemme: #2f7de1;
  --st-tenker: #f2c230;
  --st-nei: #d93b3b;
  --st-usalgbar: #8e44ad;
  --st-salg: #23a55a;
  --st-hytte: #f08c2e;

  --ui: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 10px;
  --top: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7eef0; --ink-2: #9db0b6; --line: #2a3a40; --paper: #0e171a; --card: #152226;
    --fjord: #0b2a31; --fjord-2: #3e93a6; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--ui); color: var(--ink); background: var(--paper); font-size: 15px; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1 { font-size: 1.5rem; font-stretch: 112%; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1rem; margin: 0 0 10px; font-stretch: 108%; }
h3 { margin: 16px 0 6px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }
.err { color: var(--danger); min-height: 1.2em; margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); padding: 9px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--fjord); color: #fff; border-color: var(--fjord); }
.btn-primary:hover { background: var(--fjord-2); border-color: var(--fjord-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.btn-ghost-danger { background: transparent; color: var(--danger); border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: .85rem; }
.btn-lg { padding: 13px 18px; font-size: 1.05rem; flex: 1; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.small-row { margin-top: 6px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-stretch: 120%; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--st-salg); box-shadow: 0 0 0 3px rgba(255,255,255,.85), 7px 0 0 -1px var(--st-tenker), 14px 0 0 -2px var(--st-nei); margin-right: 14px; }
.brand-lg { font-size: 1.6rem; }

/* Innlogging */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left)); background: radial-gradient(1200px 600px at 20% 0%, var(--fjord-2), var(--fjord)); }
.login-card { width: min(380px, 100%); background: var(--card); border-radius: 14px; padding: 28px; display: grid; gap: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card .muted { margin: 4px 0 10px; font-size: .9rem; }
.login-card label { font-weight: 600; font-size: .85rem; margin-top: 6px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); min-width: 0; }
textarea { width: 100%; resize: vertical; }
.login-card .btn { margin-top: 12px; padding: 12px; }
.login-step { display: grid; gap: 8px; }
.login-step label { font-weight: 600; font-size: .85rem; margin-top: 6px; }
.code-input { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .4em; text-align: center; }
.login-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--fjord-2); cursor: pointer; text-decoration: underline; font-size: .85rem; }
#pwLink { justify-self: center; }
.seller .em { flex-basis: 100%; font-size: .8rem; color: var(--ink-2); margin-top: -6px; overflow-wrap: anywhere; }

/* App-ramme */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar { height: calc(var(--top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 12px; background: var(--fjord); color: #fff; flex: none; z-index: 1000; }
.topbar .brand { flex: none; }
.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tab { background: transparent; border: 0; color: rgba(255,255,255,.72); padding: 8px 12px; border-radius: 6px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab.active { color: #fff; background: rgba(255,255,255,.14); }
.me { display: flex; align-items: center; gap: 8px; flex: none; }
.me-name { font-size: .85rem; opacity: .85; }
.topbar .btn-ghost { color: #fff; }
.sync { font-size: .75rem; background: var(--st-tenker); color: #3b2c00; padding: 3px 8px; border-radius: 99px; font-weight: 700; }
body:not(.is-admin) .admin-only { display: none !important; }
.view { flex: 1; min-height: 0; overflow: auto; }

/* Kart */
.view-map { position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; background: #dfe7e8; }
.map-tools { position: absolute; top: 10px; left: max(10px, env(safe-area-inset-left)); right: 64px; z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-tools select { box-shadow: 0 2px 10px rgba(0,0,0,.15); font-weight: 600; max-width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 7px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.chip .sw { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.chip .n { font-family: var(--mono); font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip.off { opacity: .45; }
.chip.off .sw { background: transparent !important; }
.map-fabs { position: absolute; right: max(10px, env(safe-area-inset-right)); top: 10px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.fab { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.15); color: var(--fjord-2); }
.fab.on { background: var(--fjord); color: #fff; }
.place-banner { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 600; background: var(--fjord); color: #fff; padding: 10px 12px 10px 16px; border-radius: 99px; display: flex; gap: 10px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); max-width: calc(100% - 32px); font-weight: 600; }

/* Pins */
.pin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); display: grid; place-items: center; font: 700 11px/1 var(--ui); color: #fff; }
.pin.sel { outline: 3px solid var(--focus); outline-offset: 1px; }
.pin.dim { opacity: .2; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--focus); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(42,127,255,.25); }
.leaflet-container { font-family: var(--ui); }

/* Adressekort (bunnark på mobil, sidepanel på PC) */
.sheet { position: fixed; z-index: 1500; background: var(--card); box-shadow: 0 -10px 40px rgba(0,0,0,.25); left: 0; right: 0; bottom: 0; max-height: 82%; border-radius: 16px 16px 0 0; overflow: auto; padding-bottom: env(safe-area-inset-bottom); }
.sheet-body { padding: 4px max(18px, env(safe-area-inset-right)) 20px max(18px, env(safe-area-inset-left)); }
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 8px auto 4px; }
.sheet-close { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper); font-size: 1.4rem; cursor: pointer; line-height: 1; }
@media (min-width: 900px) {
  .sheet { left: auto; top: calc(var(--top) + 12px); bottom: 12px; right: 12px; width: 400px; max-height: none; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
  .sheet-grip { display: none; }
}
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--fjord-2); margin: 6px 0 2px; }
.sheet h2 { font-size: 1.35rem; font-stretch: 112%; margin: 0 40px 2px 0; }
.sheet .muted { margin: 0 0 10px; font-size: .88rem; }
.current { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin-bottom: 12px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.st-btn { border: 2px solid transparent; border-radius: 10px; padding: 12px 6px 10px; background: var(--paper); cursor: pointer; display: grid; justify-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.st-btn .sw { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.st-btn.on { border-color: var(--ink); background: var(--card); }
.play-pick { background: var(--paper); border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 12px; border-left: 4px solid var(--st-salg); }
.play-pick p { margin: 0 0 8px; }
.play-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.play { border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 12px; cursor: pointer; display: grid; gap: 2px; text-align: left; }
.play b { font-size: 1.2rem; font-stretch: 115%; }
.play span { font-size: .78rem; color: var(--ink-2); }
.play.on { border-color: var(--st-salg); box-shadow: 0 0 0 2px var(--st-salg) inset; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .85rem; }
.history li { display: grid; grid-template-columns: 12px 1fr; gap: 8px; align-items: start; }
.history li.muted { display: block; }
.reason-pick { background: var(--paper); border-radius: 10px; padding: 10px 12px 12px; margin-bottom: 12px; border-left: 4px solid var(--st-nei); display: grid; gap: 8px; }
.reason-pick.usalgbar { border-left-color: var(--st-usalgbar); }
.reason-pick.usalgbar .reason.on { border-color: var(--st-usalgbar); box-shadow: 0 0 0 1px var(--st-usalgbar) inset; }
.reason-pick p { margin: 0; }
.reason-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.reason { border: 2px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: .85rem; }
.reason.on { border-color: var(--st-nei); box-shadow: 0 0 0 1px var(--st-nei) inset; }
.sub-row { display: grid; gap: 4px; }
.sub-row select { width: 100%; }
.status-grid { grid-template-columns: repeat(4, 1fr); }
.st-btn { font-size: .8rem; padding: 10px 4px 8px; }
.history .sw { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; }
.history .t { color: var(--ink-2); font-size: .78rem; }
.confirm { background: color-mix(in srgb, var(--danger) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--card)); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.confirm p { margin: 0; }

/* Liste */
.view-list, .view-stats, .view-admin { padding: 16px max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.list-head { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: -16px; background: var(--paper); padding: 4px 0 8px; z-index: 2; }
.list-head input { flex: 1 1 220px; }
.addr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 900px; }
.addr { display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 14px; cursor: pointer; }
.addr:hover { border-color: var(--ink-2); }
.addr .sw { width: 16px; height: 16px; border-radius: 50%; }
.addr .a { font-weight: 700; }
.addr .p { font-size: .8rem; color: var(--ink-2); }
.addr .r { text-align: right; font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.addr .tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; color: #fff; }
.compact .addr { padding: 8px 12px; }

/* Statistikk */
.stats-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.stats-head h1 { margin-right: auto; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: .85rem; }
.seg button.on { background: var(--fjord); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.kpi .l { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; }
.kpi .v { font-size: 1.9rem; font-weight: 800; font-stretch: 115%; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .s { font-size: .8rem; color: var(--ink-2); }
.kpi.green .v { color: var(--st-salg); }
.stats-grid, .admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px; margin-bottom: 12px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; margin-bottom: 12px; }
.stats-grid .panel, .admin-grid .panel { margin-bottom: 0; }
.admin-grid { align-items: start; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 48px; gap: 10px; align-items: center; margin: 7px 0; font-size: .85rem; }
.bar-row.wide { grid-template-columns: minmax(120px, 42%) 1fr 40px; }
.bar-track { height: 14px; background: var(--paper); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-row .n { text-align: right; font-family: var(--mono); font-size: .8rem; font-variant-numeric: tabular-nums; }
.day-chart svg { width: 100%; height: 180px; display: block; }
.day-chart text { fill: var(--ink-2); font: 10px var(--ui); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
tfoot td { font-weight: 800; border-bottom: 0; }

/* Admin */
.row-form { display: flex; gap: 8px; flex-wrap: wrap; }
.row-form input { flex: 1 1 140px; }
.seller-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.seller { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.seller .nm { font-weight: 700; flex: 1 1 120px; }
.seller.inactive .nm { text-decoration: line-through; color: var(--ink-2); }
.seller .pin-edit { display: flex; gap: 6px; flex-basis: 100%; }
.seller .pin-edit input { flex: 1; padding: 6px 10px; }
.radio-row { display: grid; gap: 6px; margin: 8px 0; font-size: .9rem; }
.progress { margin-top: 12px; display: grid; gap: 6px; font-size: .85rem; }
.progress .bar { height: 8px; border-radius: 9px; background: linear-gradient(90deg, var(--st-salg) var(--p, 0%), var(--paper) var(--p, 0%)); border: 1px solid var(--line); }

.install-bar { display: flex; align-items: center; gap: 10px; padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--st-salg) 14%, var(--card)); border-bottom: 1px solid var(--line); flex: none; }
.install-bar img { border-radius: 8px; flex: none; }
.install-txt { flex: 1; min-width: 0; display: grid; font-size: .85rem; line-height: 1.3; }
.install-txt span { color: var(--ink-2); }
.install-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px 6px; }
.share-ico { display: inline-block; width: 14px; height: 16px; vertical-align: -2px; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--st-nei); color: #fff; font-size: .7rem; font-weight: 800; margin-left: 2px; vertical-align: 1px; }
#scopeFilter { box-shadow: 0 2px 10px rgba(0,0,0,.15); font-weight: 600; max-width: 100%; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.filter-row select { box-shadow: 0 2px 10px rgba(0,0,0,.15); font-weight: 600; max-width: 100%; min-width: 0; flex: 1 1 150px; }
.goal-chip { border: 0; border-radius: 99px; padding: 7px 12px; font-weight: 700; font-size: .85rem; background: var(--fjord); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.2); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.goal-chip .meter { width: 70px; height: 8px; border-radius: 9px; background: rgba(255,255,255,.25); overflow: hidden; }
.goal-chip .meter i { display: block; height: 100%; background: var(--st-salg); border-radius: 9px; }
.goal-chip.done { background: var(--st-salg); }
.goal-chip.done .meter i { background: #fff; }
.draw-banner { gap: 6px; flex-wrap: wrap; justify-content: center; border-radius: 14px; }
.lock-note { background: var(--paper); border-left: 4px solid var(--st-salg); border-radius: 8px; padding: 8px 12px; font-size: .85rem; margin-bottom: 12px; }
.reason-pick.tenker { border-left-color: var(--st-tenker); }
.reason-pick.tenker .reason.on { border-color: #c99a00; box-shadow: 0 0 0 1px #c99a00 inset; }
.status-grid.locked { opacity: .45; pointer-events: none; }
.sheet.locked .play-pick, .sheet.locked .reason-pick { opacity: .6; pointer-events: none; }
.leader-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.leader-head h2 { margin: 0; }
.leader-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.leader { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.leader.me { outline: 2px solid var(--fjord-2); }
.leader .rank { font-weight: 800; font-size: 1.05rem; text-align: center; font-variant-numeric: tabular-nums; }
.leader .rank.r1 { color: #b8860b; } .leader .rank.r2 { color: #7d8a90; } .leader .rank.r3 { color: #a0522d; }
.leader .nm { font-weight: 700; }
.leader .sub { font-size: .78rem; color: var(--ink-2); }
.leader .goalbar { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 4px; max-width: 220px; }
.leader .goalbar i { display: block; height: 100%; background: var(--st-salg); }
.leader .num { font-size: 1.5rem; font-weight: 800; font-stretch: 115%; color: var(--st-salg); font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.leader .num small { display: block; font-size: .7rem; color: var(--ink-2); font-weight: 600; }
.check-list { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.check-list label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-row button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-row button.on { box-shadow: 0 0 0 3px var(--ink); }
.area-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.area-row .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.area-row .nm { font-weight: 700; flex: 1 1 120px; }
.area-row .em { flex-basis: 100%; font-size: .8rem; color: var(--ink-2); }
.goal-inline { width: 64px; padding: 5px 8px; }
.cheer { position: fixed; z-index: 3100; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 14px + env(safe-area-inset-top)); background: var(--st-salg); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: calc(100% - 32px); text-align: center; animation: cheer-in .35s ease-out; }
.cheer b { font-size: 1.1rem; display: block; }
@keyframes cheer-in { from { transform: translate(-50%, -16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.bell { position: relative; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.bell:hover { background: rgba(255,255,255,.12); }
.bell .badge { position: absolute; top: 0; right: -2px; margin: 0; box-shadow: 0 0 0 2px var(--fjord); }
@media (min-width: 900px) { .notif-sheet { left: auto; width: 400px; } }
.push-card { background: var(--paper); border-radius: 12px; padding: 12px 14px; margin: 6px 0 14px; display: grid; gap: 8px; font-size: .9rem; }
.push-card p { margin: 0; }
.push-card .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.push-card label { display: flex; gap: 8px; align-items: center; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.notif { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; }
.notif:hover { background: var(--paper); }
.notif.unread { background: color-mix(in srgb, var(--st-salg) 10%, var(--card)); }
.notif .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; background: var(--paper); }
.notif .tx { font-size: .9rem; line-height: 1.35; min-width: 0; }
.notif .tx span { color: var(--ink-2); font-size: .8rem; }
.notif .tm { font-size: .75rem; color: var(--ink-2); white-space: nowrap; }
.notif-account { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
@media (max-width: 640px) { #logoutBtn { display: none; } }
.notif-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; margin: 12px 0 2px; }
.toast { position: fixed; z-index: 3000; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: calc(100% - 32px); }
.toast.bad { background: var(--danger); color: #fff; }

@media (max-width: 640px) {
  .topbar { gap: 6px; }
  .topbar .brand { font-size: 0; gap: 0; }
  .topbar .brand-dot { margin-right: 14px; }
  .me-name { display: none; }
  .tab { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
