@font-face{font-family:'Saira';font-style:normal;font-weight:600;font-display:swap;src:url(assets/Saira-SemiBold.woff2) format('woff2')}
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(assets/Roboto-Regular.woff2) format('woff2')}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url(assets/Roboto-Medium.woff2) format('woff2')}
@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url(assets/Roboto-Bold.woff2) format('woff2')}
:root{--img-c1iso:url("assets/c1-iso.png");--img-e1iso:url("assets/e1-iso.png");--img-c1top:url("assets/c1-top.png");--img-e1top:url("assets/e1-top.png");}
/* Cortex – kartan är systemet. Fristående sida. Färger och typsnitt enligt Entryfys stilguide. */
:root {
  --navy: #000B3A; --orange: #FE5000;
  --font-head: "Saira", "Segoe UI", Arial, sans-serif;
  --font-body: "Roboto", "Segoe UI", Arial, sans-serif;
  color-scheme: dark;
  --bg: #000B3A; --bg-deep: #00072A; --surface: #0A1650; --surface-2: #121F5E; --surface-3: #1A2970;
  --line: rgba(255, 255, 255, 0.16); --line-strong: rgba(255, 255, 255, 0.34);
  --text: #F5F7FC; --muted: #AEB5CC; --faint: #8D95B2;
  --accent: #FE5000; --accent-text: #FF7A3D; --on-accent: #000B3A;
  --up: #6CB0FF; --ok: #4ADE80; --warn: #FBBF24; --bad: #FF6B6B;
  --scrim: rgba(0, 7, 42, 0.88); --panel: #08144E;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.45); --art-opacity: 0.5;
  --hud: 64px; --pw: 356px; --ease: cubic-bezier(0.65, 0, 0.2, 1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F4F8; --bg-deep: #E7E9F0; --surface: #FFFFFF; --surface-2: #F0F2F8; --surface-3: #E4E8F2;
  --line: rgba(0, 11, 58, 0.14); --line-strong: rgba(0, 11, 58, 0.36);
  --text: #000B3A; --muted: #3D4569; --faint: #646C8A;
  --accent: #FE5000; --accent-text: #C73E00; --on-accent: #000B3A;
  --up: #1D4ED8; --ok: #15803D; --warn: #A15C00; --bad: #C81E1E;
  --scrim: rgba(243, 244, 248, 0.9); --panel: #FFFFFF;
  --shadow: 0 18px 54px rgba(0, 11, 58, 0.16); --art-opacity: 0.4;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font: 400 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ KARTAN ============ */
#app { position: fixed; inset: 0; overflow: hidden; }
#viewport { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(var(--line) 1.4px, transparent 1.8px) 0 0 / 38px 38px,
    radial-gradient(110% 85% at 28% 18%, color-mix(in srgb, var(--surface-2) 55%, var(--bg)) 0%, var(--bg) 62%); }
#world { position: absolute; left: 0; top: 0; width: 3850px; height: 2780px; transform-origin: 0 0; transition: transform 0.95s var(--ease); will-change: transform; }
.no-anim #world, .no-anim * { transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important; }
#bgart { position: absolute; left: 0; top: 0; opacity: var(--art-opacity); pointer-events: none; }
#bgart path { fill: none; stroke: var(--accent); stroke-width: 3; }

.zone { position: absolute; border: 5px dashed var(--line-strong); border-radius: 90px; pointer-events: none; transition: opacity 0.6s; }
.zone span { transition: opacity 0.5s; position: absolute; left: 90px; top: -44px; padding: 0 34px; background: var(--bg); font: 600 56px/1.4 var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

#world[data-focus] .zone { opacity: 0.4; } #world[data-focus] .zone span { opacity: 0; }
#links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.wire { fill: none; stroke: var(--line-strong); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.5s, stroke-width 0.5s; }
.link.dash .wire { stroke-dasharray: 26 22; }
.flow { fill: none; stroke: var(--accent); stroke-width: 20; stroke-linecap: round; stroke-dasharray: 0 84; opacity: 0; transition: opacity 0.6s; animation: flow 1.5s linear infinite paused; }
@keyframes flow { to { stroke-dashoffset: -84; } }
.ports circle { fill: var(--bg); stroke: var(--line-strong); stroke-width: 6; }
.link, .ports, .linklabel { transition: opacity 0.6s; }
.link.is-on .wire { stroke: var(--accent); stroke-width: 14; }
.link.is-on .flow { opacity: 0.9; animation-play-state: running; }
#world[data-focus] .link:not(.is-on), #world[data-focus] .ports { opacity: 0.25; }
.linklabel { position: absolute; font: 600 50px/1.2 var(--font-head); color: var(--muted); white-space: nowrap; pointer-events: none; }
.linklabel small { display: block; font: 400 38px/1.3 var(--font-body); }
#world[data-focus] .linklabel { opacity: 0.3; }

.node { position: absolute; border-radius: 64px; display: block; cursor: zoom-in; transition: opacity 0.6s, transform 0.35s; }
body[data-level="1"] #viewport, body[data-level="2"] #scrim { cursor: zoom-out; }
.node .cover { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: var(--surface); border: 5px solid var(--line-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px 40px; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; }
.node .cover h2 { font-size: 100px; }
.node .cover .sub { font: 400 46px/1.2 var(--font-body); color: var(--muted); margin-top: 4px; }
.node .stat { display: inline-flex; align-items: center; gap: 18px; margin-top: 22px; padding: 8px 34px 12px; border-radius: 60px; border: 3px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent);
  font: 500 46px/1.25 var(--font-body); color: var(--text); white-space: nowrap; }
.node .stat i { width: 24px; height: 24px; border-radius: 50%; background: var(--ok); flex: none; }
.node .stat[data-tone="warn"] i { background: var(--warn); } .node .stat[data-tone="bad"] i { background: var(--bad); } .node .stat[data-tone="acc"] i { background: var(--accent); } .node .stat[data-tone="up"] i { background: var(--up); }
.node .stat[data-tone="acc"] { border-color: var(--accent); }
.node:hover .cover { border-color: var(--accent); box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 16%, transparent); }
.node:hover { transform: scale(1.015); }
.node:focus-visible { outline: none; } .node:focus-visible .cover { border-color: var(--accent-text); box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent) 30%, transparent); }
#world[data-focus] .node { opacity: 0.3; }
#world[data-focus] .node.is-near { opacity: 0.75; }
#world[data-focus] .node.is-focus { opacity: 1; transform: none; cursor: zoom-in; }
.node .interior { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: var(--surface); border: 5px solid var(--accent); box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent) 14%, transparent); opacity: 0; pointer-events: none; transition: opacity 0.45s; display: block; }
.node.is-focus .interior { opacity: 1; transition-delay: 0.25s; } .node.is-focus .cover { opacity: 0; }
.interior .fit { --k: 2.4; position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--k)); width: calc(100% / var(--k)); height: calc(100% / var(--k)); padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; text-align: left; font-size: 13.5px; }
.interior .igo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% + 8px)); padding: 7px 16px 8px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 700 12.5px/1.2 var(--font-body); white-space: nowrap; opacity: 0; transition: opacity 0.25s, transform 0.25s; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.node.is-focus:hover .igo, .node.is-focus:focus-visible .igo { opacity: 1; transform: translate(-50%, -50%); }
.node.is-focus:hover .fit > :not(.igo) { opacity: 0.45; } .interior .fit > * { transition: opacity 0.25s; }
.interior .ih { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .interior .ih b { font: 600 17px/1.2 var(--font-head); margin-right: auto; }
.interior .mid { flex: 1; min-height: 0; display: grid; place-items: center; }
.interior .doorfig { width: auto; height: 100%; } .interior .doorfig svg { height: 100%; width: auto; }
.interior .plan { border: 0; background: none; border-radius: 0; height: 100%; width: 100%; max-height: none; } .interior .plan text { display: none; }
[data-node="app"] .fit { --k: 2; } [data-node="sensors"] .fit { padding: 10px 12px; }
.interior .quad { width: 100%; gap: 8px; } .interior .art { opacity: 0.95; }
.interior .urow { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); } .interior .urow b { font-weight: 500; margin-right: auto; }
.glyph { width: 220px; height: 165px; fill: none; stroke: var(--text); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; flex: none; }
.glyph .thin { stroke-width: 2.2; } .glyph .acc { stroke: var(--accent); } .glyph .fillacc { fill: var(--accent); stroke: none; }
.node-logo { width: 760px; height: auto; color: var(--text); margin: 0 0 6px; }
[data-node="entryfy"] .cover .sub { font-size: 54px; }
[data-node="c1"] .cover h2 { font-size: 150px; } [data-node="c1"] .cover .sub { font-size: 58px; } [data-node="c1"] .stat { font-size: 52px; margin-top: 26px; }
[data-node="doors"] .cover h2 { font-size: 92px; }
[data-node="e1"] .cover { padding: 20px 40px; } [data-node="e1"] .cover h2 { font-size: 96px; } [data-node="e1"] .stat { margin-top: 12px; }
[data-node="sensors"] .glyph, [data-node="e1"] .art { margin-bottom: 4px; }
[data-node="sensors"] .glyph { width: 170px; height: 150px; }
.art { display: block; background: var(--text); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; opacity: 0.92; }
.art-c1iso { --m: var(--img-c1iso); aspect-ratio: 1400 / 780; } .art-e1iso { --m: var(--img-e1iso); aspect-ratio: 1200 / 448; }
.art-c1top { --m: var(--img-c1top); aspect-ratio: 1072 / 1121; } .art-e1top { --m: var(--img-e1top); aspect-ratio: 1400 / 598; }
[data-node="c1"] .art { height: 250px; margin-bottom: 12px; } [data-node="e1"] .art { height: 150px; }

/* ============ SKÄRMYTAN ============ */
#scrim { position: absolute; inset: 0; background: radial-gradient(var(--line) 1.4px, transparent 1.8px) 0 0 / 38px 38px, var(--bg); opacity: 0; pointer-events: none; transition: opacity 0.5s; }
body[data-level="2"] #scrim { opacity: 1; pointer-events: auto; transition-delay: 0.12s; }

#hud { position: absolute; left: 0; right: 0; top: 0; height: var(--hud); display: flex; align-items: center; gap: 12px; padding: 0 16px 0 18px; background: linear-gradient(var(--bg) 58%, transparent); z-index: 5; }
.hud-logo { display: flex; align-items: center; height: 44px; border-radius: 10px; padding: 0 4px; }
.hud-logo svg { height: 30px; width: auto; color: var(--text); display: block; flex: none; }
#crumbs { display: flex; align-items: center; gap: 4px; margin-left: 8px; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.crumb { height: 34px; padding: 0 14px; border-radius: 20px; font: 600 13px/34px var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color 0.2s, background 0.2s; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumb.is-cur { flex: none; }
.crumb:hover { color: var(--text); background: var(--surface-2); }
.crumb.is-cur { background: var(--accent); color: var(--on-accent); }
#crumbs .sep { color: var(--faint); font-size: 13px; }
#hud-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.hbtn { height: 40px; display: inline-flex; align-items: center; gap: 9px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: border-color 0.2s, color 0.2s; }
.hbtn:hover { border-color: var(--line-strong); color: var(--text); }
.hbtn kbd { font: 500 11.5px/1 var(--font-body); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--faint); }
.hbtn.icon { width: 40px; padding: 0; justify-content: center; }
.hbtn.me { width: 40px; padding: 0; justify-content: center; font: 600 13px var(--font-head); color: var(--text); border-color: var(--line-strong); }
#hud-search { min-width: 250px; justify-content: flex-start; }
#hud-search span { flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; display: inline-block; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.acc { background: var(--accent); } .dot.up { background: var(--up); } .dot.off { background: var(--faint); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Panelen (nivå 0 och 1) ---------- */
#panel { position: absolute; top: calc(var(--hud) + 8px); right: 16px; bottom: 16px; width: var(--pw); border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden auto; transition: width 0.8s var(--ease), opacity 0.35s, transform 0.5s var(--ease); z-index: 3; scrollbar-width: thin; container-type: inline-size; }
body[data-level="1"] #panel { --pw: clamp(470px, 44vw, 700px); }
body[data-level="2"] #panel { opacity: 0; pointer-events: none; transform: translateX(30px); }
.pbody { padding: 24px 26px 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.enter > * { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.enter > *:nth-child(2) { animation-delay: 0.06s; } .enter > *:nth-child(3) { animation-delay: 0.12s; } .enter > *:nth-child(4) { animation-delay: 0.18s; } .enter > *:nth-child(n+5) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.eyebrow { font: 600 12.5px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-text); }
.phead h1 { font-size: 32px; margin: 6px 0 8px; }
.lead { color: var(--muted); font-size: 15.5px; }
.label { font: 600 12px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 10px; display: block; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 4px; border-radius: 99px; border: 1px solid var(--line); font: 500 12.5px/1.4 var(--font-body); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); } .pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); } .pill.acc { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.pill.up { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, transparent); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.btn { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); font: 500 14px/1 var(--font-body); white-space: nowrap; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.btn:hover { border-color: var(--text); } .btn:active { transform: scale(0.97); }
.btn.pri { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; }
.btn.pri:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.big { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn.dng { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.btn.on { background: var(--ok); color: #00210E; border-color: transparent; font-weight: 700; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

.hero { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; display: flex; gap: 18px; align-items: center; }
.hero h3 { font-size: 20px; } .hero .grow { flex: 1 1 200px; min-width: 0; display: grid; gap: 8px; }
.hero { flex-wrap: wrap; }
.hero .meta { color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tiles.t3 { grid-template-columns: 1fr 1fr 1fr; }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); min-height: 72px; transition: border-color 0.2s, transform 0.2s, background 0.2s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface-2); }
.tile .ti { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--accent-text); }
.tile:hover .ti { background: var(--surface-3); }
.tile .tx { min-width: 0; flex: 1; } .tile b { display: block; font: 600 16px/1.2 var(--font-head); overflow-wrap: anywhere; } .tile small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; margin-top: 2px; }
.tile .n { font: 600 15px var(--font-head); color: var(--muted); white-space: nowrap; }
.t3 .tile { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; position: relative; } .t3 .tile .n { position: absolute; right: 14px; top: 14px; }
.feed { display: grid; }
.ev { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13.5px; border-radius: 0; width: 100%; }
.ev:first-child { border-top: 0; } button.ev:hover { color: var(--accent-text); }
.ev time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12.5px; } .ev span { min-width: 0; }
.ev small { color: var(--muted); }
.srow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); width: 100%; transition: border-color 0.2s, background 0.2s; }
button.srow:hover { border-color: var(--accent); background: var(--surface-2); }
.srow .gl { width: 34px; height: 34px; flex: none; color: var(--text); } .srow .gl svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.srow .gl .acc { stroke: var(--accent); } .srow .gl .fillacc { fill: var(--accent); stroke: none; } .srow .gl .thin { stroke-width: 2.6; }
.srow b { font: 600 15px var(--font-head); display: block; } .srow small { color: var(--muted); font-size: 12.5px; display: block; }
.srow .dot { margin-left: auto; }
.gl svg.logo { stroke: none !important; width: 100%; height: 100%; display: block; }
.gl .art { width: 100%; height: 100%; }
.stack { display: grid; gap: 8px; }
.hint { color: var(--faint); font-size: 12.5px; }
.hint kbd, .kbd { font: 500 11.5px/1 var(--font-body); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }

/* ---------- Arbetsytan (nivå 2) ---------- */
#sheet { position: absolute; inset: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; padding: calc(var(--hud) + 8px) 16px 16px 18px; opacity: 0; pointer-events: none; transform: translateY(18px) scale(0.985); transition: opacity 0.35s, transform 0.55s var(--ease); z-index: 4; }
body[data-level="2"] #sheet { opacity: 1; pointer-events: auto; transform: none; transition-delay: 0.18s; }
.rail { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding-bottom: 158px; overflow: hidden auto; scrollbar-width: none; }
.rail .back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 8px; border-radius: 12px; color: var(--muted); font-size: 13.5px; align-self: flex-start; }
.rail .back:hover { color: var(--text); background: var(--surface-2); }
.rail .who { display: flex; align-items: center; gap: 12px; padding: 10px 8px 14px; }
.rail .who .gl { width: 52px; height: 52px; flex: none; } .rail .who .gl svg { width: 100%; height: 100%; fill: none; stroke: var(--text); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.rail .who .gl .acc { stroke: var(--accent); } .rail .who .gl .fillacc { fill: var(--accent); stroke: none; } .rail .who .gl .thin { stroke-width: 2.4; }
.rail .who .gl .art { height: 52px; width: 52px; }
.rail .who b { font: 600 19px/1.1 var(--font-head); display: block; } .rail .who small { color: var(--muted); font-size: 12.5px; }
.rv { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 12px; border-radius: 12px; color: var(--muted); font-size: 14.5px; border: 1px solid transparent; }
.rv:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.rv.is-cur { color: var(--text); background: var(--surface-2); border-color: var(--line-strong); font-weight: 500; }
.rv.is-cur .ic { color: var(--accent-text); } .rv .n { margin-left: auto; font: 600 12.5px var(--font-head); color: var(--faint); white-space: nowrap; }
.rv > span:not(.n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.wh { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 22px 26px 16px; }
.wh h1 { font-size: 30px; margin-top: 5px; } .wh .lead { font-size: 14.5px; margin-top: 4px; } .wh .grow { flex: 1 1 320px; min-width: 0; }
.wt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 26px 14px; }
.chip { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.is-on { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.chip.is-on.acc { border-color: var(--accent); }
.chip b { font: 600 12.5px var(--font-head); color: var(--faint); }
.field { height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 40%, transparent); color: var(--faint); font-size: 13.5px; flex: 1 1 220px; max-width: 340px; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; } .field input::placeholder { color: var(--faint); }
.wb { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.wb.split { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.wb.split3 { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
.col { min-height: 0; overflow: hidden auto; padding: 16px 18px 22px; scrollbar-width: thin; }
.col + .col { border-left: 1px solid var(--line); }
.col.pad { padding: 22px 26px 26px; }
.vs { display: flex; flex-direction: column; gap: 16px; } .vs > * { flex: none; } .vs.ctr { align-items: center; } .vs.ctr > .full { align-self: stretch; }
.list { display: grid; gap: 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; width: 100%; min-height: 58px; transition: background 0.15s, border-color 0.15s; }
.row:hover { background: var(--surface); }
.row.is-sel { background: var(--surface-2); border-color: var(--line-strong); }
.row .tx { min-width: 0; flex: 1; } .row b { font-weight: 500; font-size: 15px; display: block; overflow-wrap: anywhere; } .row small { color: var(--muted); font-size: 12.5px; display: block; }
.row .meta { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; }
.row.sub { margin-left: 26px; width: calc(100% - 26px); } .row.is-hidden { display: none; } .list[data-list] .row small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font: 600 13px var(--font-head); flex: none; color: var(--text); }
.av.sq { border-radius: 11px; color: var(--accent-text); }
.av.a { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); color: var(--accent-text); font-size: 15px; }
.listfoot { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12.5px; padding: 12px 12px 0; }
.insp { display: grid; gap: 16px; align-content: start; }
.insp h2 { font-size: 22px; } .insp .sec { border-top: 1px solid var(--line); padding-top: 14px; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 7px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); padding: 16px; display: grid; gap: 10px; align-content: start; }
.card h3 { font-size: 17px; } .card .meta { color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat-c { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; }
.stat-c b { font: 600 26px/1.1 var(--font-head); display: block; } .stat-c small { color: var(--muted); font-size: 12.5px; }
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent-text); }
.empty .big .ic { width: 30px; height: 30px; } .empty h3 { color: var(--text); font-size: 19px; }
.note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); font-size: 13.5px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.th { display: flex; gap: 12px; padding: 0 12px 8px; font: 600 11px/1.2 var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ---------- Bilder och illustrationer ---------- */
.cam { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid rgba(255, 255, 255, 0.16); background: linear-gradient(160deg, #101c5c, #050c33 70%); color: #dfe5ff; display: block; width: 100%; }
.cam svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; }
.cam::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(transparent, rgba(0, 5, 30, 0.82)); }
.cam .nm { position: absolute; left: 9px; bottom: 7px; right: 9px; font: 500 12px/1.2 var(--font-body); text-shadow: 0 1px 4px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.cam .live { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 6px; border-radius: 6px; background: rgba(0, 5, 30, 0.65); font: 600 10px/1.5 var(--font-head); letter-spacing: 0.08em; }
.cam .live i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.cam.thermal { background: linear-gradient(135deg, #1b0a4a, #7a1f5c 55%, #f08a2c); }
.cam.radar::after { content: ""; position: absolute; left: 50%; top: 62%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: conic-gradient(from 0deg, rgba(108, 176, 255, 0.34), transparent 22%); animation: sweep 4s linear infinite; }
@keyframes sweep { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cam.wait svg.scene { opacity: 0.18; } .cam.wait .live i { background: var(--warn); animation: none; }
button.cam:hover { border-color: var(--accent); }
.cam.is-main { border-color: var(--accent); }
.wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wall .cam.is-main { grid-column: span 3; grid-row: span 3; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 250px; flex: none; }
.doorfig { width: 150px; flex: none; color: var(--text); }
.doorfig svg { width: 100%; height: auto; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.doorfig .leaf { transform-box: fill-box; transform-origin: left center; transition: transform 0.7s var(--ease); fill: var(--surface-2); }
.doorfig.is-open .leaf { transform: scaleX(0.34) skewY(-9deg); }
.doorfig .led { fill: var(--accent); stroke: none; transition: fill 0.3s; } .doorfig.is-open .led, .doorfig.is-unlocked .led { fill: var(--ok); }
.doorfig .thin { stroke-width: 1.2; } .doorfig .lbl { font: 500 9px var(--font-body); fill: var(--muted); stroke: none; } .doorfig .ldr { stroke: var(--accent-text); stroke-width: 1; stroke-dasharray: 2 2; }
.doorfig.big { width: min(100%, 420px); }
.doorfig .ring { display: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 3; }
.doorfig text.lbl { stroke: none !important; } .doorfig[data-hl="reader"] text.p-reader, .doorfig[data-hl="lock"] text.p-lock { fill: var(--accent-text); }
.doorfig[data-hl] svg > * { opacity: 0.25; } .doorfig[data-hl="reader"] .p-reader, .doorfig[data-hl="lock"] .p-lock { opacity: 1; stroke: var(--accent-text); } .doorfig[data-hl="lock"] .ring { display: block; opacity: 1; }
.chg { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13.5px; } .chg > span:last-child { white-space: nowrap; flex: none; }
.alarmcard { border-radius: 18px; border: 1.5px solid var(--bad); background: color-mix(in srgb, var(--bad) 13%, var(--surface)); padding: 14px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.alarmcard.ack { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.alarmcard b { font: 600 17px/1.2 var(--font-head); display: block; } .alarmcard small { color: var(--muted); display: block; margin-top: 2px; } .alarmcard .grow { flex: 1 1 200px; min-width: 0; }
.node.is-alarm .cover, .node.is-alarm .interior { border-color: var(--bad); animation: alarm 1.2s ease-in-out infinite; }
@keyframes alarm { 50% { box-shadow: 0 0 0 34px color-mix(in srgb, var(--bad) 30%, transparent); } }
.plan .alarm-dot { fill: var(--bad); stroke: none; animation: blink 0.9s ease-in-out infinite; } .plan .alarm-ring { fill: none; stroke: var(--bad); stroke-width: 2.5; }
.plan .wall-l { transition: stroke 0.4s; } .plan .wall-l.armed { stroke: var(--accent); stroke-width: 5; }
#hud-state.is-bad, .hbtn.is-bad { border-color: var(--bad); color: var(--text); } #hud-live { display: contents; } .av.bad { background: color-mix(in srgb, var(--bad) 30%, var(--surface-2)); color: var(--bad); font-size: 15px; }
.phone { width: 138px; flex: none; border-radius: 22px; border: 2px solid var(--line-strong); background: var(--bg-deep); padding: 10px 9px 12px; display: grid; gap: 8px; font-size: 10.5px; }
.phone .bar { height: 5px; width: 34px; border-radius: 4px; background: var(--line-strong); justify-self: center; }
.phone .pc { border-radius: 10px; background: var(--surface-2); padding: 8px; display: grid; gap: 6px; justify-items: center; text-align: center; }
.phone .pb { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 10.5px var(--font-body); }
.phone .pr { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--surface); width: 100%; color: var(--muted); }
.minimap { width: 190px; flex: none; color: var(--text); } .minimap svg { width: 100%; height: auto; display: block; }
.board { position: relative; width: 100%; max-width: 430px; margin: 0 auto; }
.board.wide { max-width: 860px; }
.board .art { width: 100%; opacity: 0.85; }
.hs { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); color: var(--text); font: 600 13px/1 var(--font-head); display: grid; place-items: center; transition: transform 0.2s, background 0.2s, color 0.2s, opacity 0.3s; }
.hs.free { border-color: var(--line-strong); color: var(--muted); }
.hs:hover, .hs.is-on { background: var(--accent); color: var(--on-accent); transform: scale(1.25); z-index: 2; }
.board.has-on .hs:not(.is-on) { opacity: 0.4; }
.conn { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; width: 100%; }
.conn:hover, .conn.is-on { background: var(--surface-2); border-color: var(--line-strong); }
.conn .pn { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font: 600 13px var(--font-head); }
.conn.free .pn { border-color: var(--line-strong); color: var(--muted); }
.conn b { font-weight: 500; display: block; font-size: 14.5px; } .conn small { color: var(--muted); display: block; font-size: 12.5px; } .conn .pill { margin-left: auto; }
.chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.chain .bx { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.chain .bx .label { margin: 0; } .chain .bx b { font: 600 16px/1.2 var(--font-head); } .chain .bx small { color: var(--muted); font-size: 12.5px; }
.chain .ar { align-self: center; color: var(--accent-text); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.week div { position: relative; height: 74px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.week div i { position: absolute; left: 0; right: 0; background: var(--accent); opacity: 0.85; border-radius: 4px; }
.week span { display: block; text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.lane { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.lane > span { flex: 0 0 90px; font: 600 11px var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.lane > div { flex: 1; display: flex; min-width: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.lane i { display: block; min-height: 28px; font-style: normal; font-size: 12px; line-height: 28px; padding: 0 9px; white-space: nowrap; overflow: hidden; color: var(--muted); background: var(--surface); }
.lane i.hi { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); color: var(--text); }
.planbox { position: relative; } .planctl { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; align-items: center; } .planctl .btn, .planctl .pill { background: var(--panel); }
.plan { width: 100%; max-height: max(260px, calc(100vh - 470px)); border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-deep) 70%, transparent); display: block; }
.plan .wall-l { fill: none; stroke: var(--text); stroke-width: 3; stroke-linejoin: round; } .plan .inner { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.plan text { font: 500 12px var(--font-body); fill: var(--muted); } .plan .cap { font: 600 10.5px var(--font-head); letter-spacing: 0.1em; text-transform: uppercase; }
.plan [data-layer] { transition: opacity 0.3s; } .plan [data-layer].off { opacity: 0; pointer-events: none; }
.plan .zone-a { stroke-width: 1.5; fill-opacity: 0.16; transition: fill-opacity 0.4s, fill 0.4s, stroke 0.4s; } .plan .zone-a.armed { fill: var(--accent) !important; stroke: var(--accent) !important; fill-opacity: 0.34; }
.plan .dev { fill: var(--bg); stroke: var(--text); stroke-width: 1.5; } .plan .cone { fill: var(--up); fill-opacity: 0.18; stroke: none; }
.ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) var(--p, 0%), var(--surface-2) 0); }
.ring > div { width: 122px; height: 122px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; text-align: center; font: 600 30px var(--font-head); }
.qr { width: 180px; height: 180px; border-radius: 14px; background: #fff; padding: 12px; } .qr svg { width: 100%; height: 100%; display: block; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps3 div { border-radius: 10px; padding: 8px 10px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); }
.steps3 div b { display: block; color: var(--text); font-weight: 500; font-size: 13.5px; } .steps3 .done { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.tl { display: grid; gap: 0; } .tl .t { display: grid; grid-template-columns: 110px 14px 1fr; gap: 12px; padding: 0 0 14px; font-size: 13.5px; position: relative; }
.tl .t time { color: var(--faint); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; } .tl .t i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 5px; }
.tl .t:not(:last-child)::after { content: ""; position: absolute; left: 126px; top: 18px; bottom: 0; border-left: 1px solid var(--line-strong); }
.player { position: relative; } .player .cam { border-radius: 16px; }
.scrub { position: relative; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); margin-top: 8px; overflow: hidden; }
.scrub .now { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid var(--bad); }
.scrub .ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; padding: 6px 12px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.scrub .lab { position: absolute; left: 12px; bottom: 6px; font: 600 10.5px var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ---------- Minikarta, sök, meddelanden ---------- */
#mini { position: absolute; left: 18px; bottom: 16px; width: 176px; padding: 8px 9px 9px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.4s, transform 0.4s; z-index: 6; }
body[data-level="1"] #mini, body[data-level="2"] #mini { opacity: 1; pointer-events: auto; transform: none; }
#mini .cap { display: flex; justify-content: space-between; font: 600 10.5px var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
#mini .mm { position: relative; width: 158px; height: 114px; }
#mini .mn { position: absolute; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background 0.2s, border-color 0.2s; }
#mini .mn:hover { border-color: var(--accent); } #mini .mn.is-cur { background: var(--accent); border-color: var(--accent); }
#mini .mz { position: absolute; border: 1px dashed var(--line-strong); border-radius: 7px; pointer-events: none; }
#hint { position: absolute; left: 22px; bottom: 14px; display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; transition: opacity 0.4s; z-index: 2; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); }
#hint > span:first-child { color: var(--text); font-weight: 500; }
body:not([data-level="0"]) #hint { opacity: 0; pointer-events: none; }
#palette { position: absolute; inset: 0; z-index: 20; display: grid; justify-items: center; align-content: start; padding-top: 12vh; background: color-mix(in srgb, var(--bg-deep) 62%, transparent); }
#palette[hidden] { display: none; }
#about { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg-deep) 62%, transparent); } #about[hidden] { display: none; }
.about { width: min(640px, 100%); max-height: 100%; overflow: auto; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: var(--shadow); padding: 26px 28px; display: grid; gap: 16px; }
.about h2 { font-size: 26px; } .about p { color: var(--muted); } .about .label { margin-bottom: 6px; } .about .keys { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13.5px; }
.pal { width: min(620px, 92vw); border-radius: 20px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.pal .in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--faint); }
.pal input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: 400 17px var(--font-body); } .pal input::placeholder { color: var(--faint); }
.pal .res { max-height: 52vh; overflow: auto; padding: 8px; display: grid; gap: 2px; }
.pal .pr { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; width: 100%; font-size: 14.5px; }
.pal .pr small { margin-left: auto; color: var(--faint); font-size: 12.5px; } .pal .pr.is-sel, .pal .pr:hover { background: var(--surface-2); } .pal .pr .ic { color: var(--accent-text); }
#toasts { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; z-index: 30; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: rise 0.4s both; max-width: 86vw; }
.toast.out { opacity: 0; transition: opacity 0.4s; }

@media (max-width: 1180px) { #hud-search span, #hud-search kbd { display: none; } #hud-search { min-width: 0; width: 40px; padding: 0; justify-content: center; } }
@media (max-width: 900px) {
  #hud .hbtn.state span { display: none; } #hud .hbtn.state { width: 40px; padding: 0; justify-content: center; } .hud-logo { width: 38px; overflow: hidden; flex: none; justify-content: flex-start; } #hud { gap: 6px; padding: 0 10px; } .crumb.is-cur { flex: 0 1 auto; }
  .crumb:not(.is-cur) { display: none; } #crumbs .sep { display: none; }
  #panel, body[data-level="1"] #panel { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; height: 46vh; border-radius: 20px; } body[data-level="1"] #panel { height: 58vh; }
  #sheet { grid-template-columns: minmax(0, 1fr); padding: calc(var(--hud) + 4px) 8px 8px; } .rail { flex-direction: row; flex-wrap: nowrap; overflow: auto hidden; padding-bottom: 0; align-items: center; } .rail .who { display: none; } .rv { white-space: nowrap; }
  .wb, .wb.split, .wb.split3 { display: block; overflow: hidden auto; } .wb .col { overflow: visible; } .col + .col { border-left: 0; border-top: 1px solid var(--line); } .wh { padding: 16px 16px 12px; } .wt { padding: 0 16px 12px; } .col.pad { padding: 16px; }
  #mini, #hint { display: none; } .tiles, .tiles.t3 { grid-template-columns: 1fr; } .hero { flex-wrap: wrap; } .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wall .cam.is-main { grid-column: span 2; grid-row: auto; }
  .chain { grid-template-columns: 1fr; } .chain .ar { transform: rotate(90deg); justify-self: center; }
}
@media (prefers-reduced-motion: reduce) { #world, #panel, #sheet, .enter > * { transition: none !important; animation: none !important; } }

/* ===== Den fristående sidan: inloggning, Cortex-rutor, riktiga kartor och video ===== */
#login { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg-deep) 82%, transparent); backdrop-filter: blur(10px); overflow: auto; } #login[hidden] { display: none; }
.login-card { width: min(420px, 100%); display: grid; gap: 16px; padding: 30px 30px 26px; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: var(--shadow); }
.login-card .logo { height: 26px; width: auto; color: var(--text); justify-self: start; } .login-card h1 { font-size: 30px; } .login-card .lead { color: var(--muted); margin-top: 6px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.login-card input { font: 400 16px var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; width: 100%; }
.login-card input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.login-card .btn { justify-content: center; } .login-card .btn[disabled] { opacity: 0.6; cursor: progress; }
#login-err { color: var(--bad); font-size: 14px; font-weight: 500; } #login-err[hidden] { display: none; }
body.is-login #hud-search, body.is-login #mini, body.is-login #hint { visibility: hidden; }
body.is-busy, body.is-busy .btn { cursor: progress; }
button.hbtn.me { cursor: pointer; font: inherit; font-weight: 700; }

#cxpanel { position: absolute; inset: calc(var(--hud) + 10px) 22px 22px; z-index: 15; display: grid; grid-template-rows: auto 1fr; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: var(--shadow); visibility: hidden; pointer-events: none; opacity: 0; }
#cxpanel.is-open { visibility: visible; pointer-events: auto; opacity: 1; transition: opacity 0.18s; }
.cxp-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--line); } .cxp-head b { font: 600 16px var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cxp-head .hint { margin-right: auto; }
#cxframe { width: 100%; height: 100%; border: 0; background: var(--surface); }
#cxread { position: absolute; left: 0; top: 0; width: 1280px; height: 860px; border: 0; visibility: hidden; pointer-events: none; z-index: -1; }
body.is-cx #sheet, body.is-cx #panel { pointer-events: none; }
.wb.full { display: block; } iframe.cxembed { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; background: var(--surface); }

/* Planritning och karta */
.wb.maps { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
img.thumb { width: 54px; height: 38px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); flex: none; }
.planbox.real { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.rplan { display: block; width: 100%; height: auto; max-height: 62vh; } .rplan.small { max-height: none; height: 100%; width: auto; max-width: 100%; }
.rplan .rpaper { fill: #fff; } .rplan .rimg { opacity: 0.96; }
.rsec path { fill: color-mix(in srgb, var(--up) 16%, transparent); stroke: var(--up); stroke-linejoin: round; transition: fill 0.3s, stroke 0.3s; } .rsec.armed path { fill: color-mix(in srgb, var(--orange) 26%, transparent); stroke: var(--orange); }
.rsec text { fill: #000B3A; font-family: var(--font-head); font-weight: 600; text-anchor: middle; dominant-baseline: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 0.25em; }
.rsec[data-act], .rdev[data-act] { cursor: pointer; } .rsec[data-act]:hover path, .rsec.sel path { fill: color-mix(in srgb, var(--up) 34%, transparent); } .rsec.armed[data-act]:hover path, .rsec.armed.sel path { fill: color-mix(in srgb, var(--orange) 44%, transparent); }
.rsec:focus-visible, .rdev:focus-visible { outline: none; } .rsec:focus-visible path { stroke-dasharray: 14 8; }
.rdev line { stroke: #15803D; stroke-linecap: round; } .rdev circle { fill: #15803D; stroke: #fff; stroke-width: 3; } .rdev.open line, .rdev.unlocked line { stroke: #C97A00; } .rdev.open circle, .rdev.unlocked circle { fill: #C97A00; }
.rdev.camera circle { fill: #1D4ED8; } .rdev.sel circle, .rdev:focus-visible circle { stroke: var(--orange); stroke-width: 7; }
.rstreet { position: relative; display: block; height: min(58vh, 560px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #dfe3ea; } .rstreet.small { height: 100%; width: 100%; border-radius: 10px; }
.rtiles { position: absolute; left: 50%; top: 50%; width: 0; height: 0; display: block; } .rtiles img { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.mk { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; display: grid; place-items: center; padding: 6px; background: #000B3A; color: #fff; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); cursor: pointer; }
.mk .glyph { width: 100%; height: 100%; } .mk.alarm { background: #C81E1E; } .mk.sel, .mk:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; } .rstreet.small .mk { width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 3px; cursor: inherit; }
.rzoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; } .rzoom .btn { background: var(--panel); min-width: 34px; justify-content: center; font-size: 17px; }
.rattr { position: absolute; right: 6px; bottom: 4px; font-size: 10.5px; color: #1b2440; background: rgba(255, 255, 255, 0.78); padding: 1px 6px; border-radius: 6px; }

/* Riktig video */
.cam.rcam { cursor: pointer; padding: 0; } .rcam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #02061f; opacity: 0; transition: opacity 0.4s; } .rcam.playing video { opacity: 1; }
.rcam::before { content: "Ansluter …"; position: absolute; inset: 0; display: grid; place-items: center; color: #aeb5cc; font-size: 12.5px; } .rcam.playing::before { content: none; } .rcam.nostream::before { content: "Ingen bild just nu"; } .rcam.wait::before { content: "Kameran är offline"; }
.wall.real .cam.is-main { grid-column: span 3; grid-row: span 3; }
.qrcard { background: #fff; padding: 18px; border-radius: 18px; width: min(300px, 80%); justify-self: center; margin: 0 auto; } .qrcard img { display: block; width: 100%; height: auto; }
.dlist { display: grid; gap: 8px; } .ditem { display: grid; gap: 2px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); } .ditem b { font-weight: 600; overflow-wrap: anywhere; } .ditem small { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 820px) { #cxpanel { inset: var(--hud) 0 0 0; border-radius: 0; } .wb.maps { display: block; } .wall.real .cam.is-main { grid-column: span 2; grid-row: auto; } }
.mk .glyph { stroke: #fff; margin: 0; stroke-width: 7; }
.rdev .rmark { fill: #15803D; stroke: #fff; stroke-width: 3; } .rdev.open .rmark, .rdev.unlocked .rmark { fill: #C97A00; } .rdev.camera .rmark { fill: #1D4ED8; } .rdev.sensor .rmark { fill: #7C3AED; } .rdev.controller .rmark, .rdev.satellite .rmark { fill: #0E7490; }
.rdev.bad .rmark { fill: #C81E1E; } .rdev.sel .rmark, .rdev:focus-visible .rmark { stroke: var(--orange); stroke-width: 7; } .rdev .rcov { fill: rgba(124, 58, 237, 0.13); stroke: rgba(124, 58, 237, 0.55); stroke-width: 3; stroke-dasharray: 10 8; pointer-events: none; } .rdev.bad circle.rcov { fill: rgba(200, 30, 30, 0.18); stroke: rgba(200, 30, 30, 0.7); }
.rlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); } .rlegend span { display: inline-flex; align-items: center; gap: 7px; } .rlegend i { width: 11px; height: 11px; border-radius: 50%; background: #15803D; } .rlegend i.sensor { background: #7C3AED; border-radius: 2px; transform: rotate(45deg); } .rlegend i.camera { background: #1D4ED8; } .rlegend i.controller, .rlegend i.satellite { background: #0E7490; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .chips .chip { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
/* Dra och släpp */
.chip.drag { cursor: grab; height: auto; min-height: 28px; white-space: normal; } .chip.drag:active { cursor: grabbing; } .chip.drag:hover { border-color: var(--accent); color: var(--text); }
.wall.real .rcam[draggable] { cursor: grab; } .rcam.drop-on { outline: 3px solid var(--accent); outline-offset: 2px; }
body.drag-dev #sheet svg.rplan[data-map] { outline: 2px dashed var(--accent); outline-offset: -2px; } svg.rplan.drop-on { outline-style: solid !important; outline-width: 4px !important; }
body.drag-perm #sheet [data-list] .row { outline: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -2px; } #sheet [data-list] .row.drop-on { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
#sheet svg.rplan[data-map], #sheet .rstreet[data-map] { cursor: grab; touch-action: none; } body.is-pan, body.is-pan * { cursor: grabbing !important; user-select: none; } .planbox.real { position: relative; } .rstreet .mk { touch-action: none; }
/* Egna vyer */
.verdict { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.verdict.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.verdict h3 { font: 600 24px var(--font-head); } .verdict .chips { margin: 10px 0 0; } .verdict .chip { cursor: pointer; background: var(--panel); color: var(--text); }
.verdict .vd { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--ok) 22%, transparent); } .verdict .vd i { width: 18px; height: 18px; border-radius: 50%; background: var(--ok); } .verdict.warn .vd { background: color-mix(in srgb, var(--warn) 24%, transparent); } .verdict.warn .vd i { background: var(--warn); }
.wb.hw, .wb.doorsv { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.hwc { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 12px 14px 14px; } .hwc.care { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.hwroot, .hwb { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 14px; padding: 8px 10px; cursor: pointer; text-decoration: none; }
.hwroot:hover, .hwb:hover { background: var(--surface-2); } .hwroot.is-sel, .hwb.is-sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.hwroot .c1pic { width: 92px; flex: none; } .hwroot b { font: 600 19px var(--font-head); } .hwroot .hwr { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hwroot .tx, .hwb .tx { display: grid; gap: 1px; min-width: 0; } .hwb .tx b, .hwroot .tx b { overflow-wrap: anywhere; } .hwb small, .hwroot small { color: var(--muted); font-size: 12.5px; } .hwb .pill { margin-left: auto; flex: none; } .hwb .av { flex: none; }
.hwb.care { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.hwk { margin: 2px 0 0 26px; padding-left: 18px; border-left: 2px solid var(--line-strong); display: grid; gap: 2px; } .hwk .hwn { position: relative; } .hwk > .hwn::before { content: ""; position: absolute; left: -18px; top: 27px; width: 14px; border-top: 2px solid var(--line-strong); }
.dgroup { display: grid; gap: 10px; } .dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.dcard { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 16px 14px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; } .dcard:hover { border-color: var(--line-strong); } .dcard.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .dcard.care { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.dcard .doorfig { width: 96px; } .dcard .dtx { display: grid; gap: 6px; justify-items: center; } .dcard .dtx b { font: 600 18px var(--font-head); overflow-wrap: anywhere; } .dcard small { color: var(--muted); font-size: 12.5px; } .dcard .btns { justify-content: center; }
.chain { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; } .chain .arr { align-self: center; color: var(--faint); font-size: 18px; }
.chb { display: grid; gap: 4px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; min-width: 110px; } .chb:hover { border-color: var(--line-strong); } .chb.care { border-color: color-mix(in srgb, var(--warn) 60%, transparent); } .chb small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; } .chb b { font-weight: 600; overflow-wrap: anywhere; } .chb .pill { justify-self: start; }
@media (max-width: 820px) { .wb.hw, .wb.doorsv { display: block; } }
/* Hopfällda grenar och grupper */
.chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; flex: none; } .chev.open { transform: rotate(90deg); }
.hwrow { display: flex; align-items: center; gap: 2px; } .hwrow > .hwb, .hwrow > .hwroot { flex: 1; min-width: 0; }
.hwx { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; } .hwx:hover { background: var(--surface-2); color: var(--text); } .hwx.none { cursor: default; } .hwx.none:hover { background: transparent; }
.hwroot .roll { color: var(--faint); } .hwc.flat { padding: 8px; } .hwmore { margin: 6px 0 2px 30px; }
.hwk { margin-left: 13px; } .hwk > .hwn::before { top: 24px; }
.ghead { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; } .ghead:hover { border-color: var(--line-strong); } .ghead.care { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.ghead b { font: 600 17px var(--font-head); } .ghead .gsum { color: var(--muted); font-size: 13.5px; margin-left: auto; text-align: right; } .ghead .dot { margin-left: 4px; }
/* Startkartan: läget i mitten, hårdvaran under */
[data-node="sensors"] .cover h2 { font-size: 150px; } [data-node="sensors"] .cover .sub { font-size: 56px; } [data-node="sensors"] .stat { font-size: 52px; margin-top: 26px; } [data-node="sensors"] .glyph { width: 250px; height: 210px; margin-bottom: 8px; }
[data-node="c1"] .cover, [data-node="e1"] .cover { padding: 16px 40px; } [data-node="c1"] .cover h2, [data-node="e1"] .cover h2 { font-size: 92px; } [data-node="c1"] .cover .sub, [data-node="e1"] .cover .sub { font-size: 38px; }
[data-node="c1"] .stat, [data-node="e1"] .stat { font-size: 38px; margin-top: 12px; padding: 6px 26px 9px; } [data-node="c1"] .art { height: 130px; margin-bottom: 4px; } [data-node="e1"] .art { height: 110px; }
.zone.sub { border-width: 4px; border-radius: 76px; border-color: var(--line); } .zone.sub span { font-size: 40px; top: -32px; left: 70px; padding: 0 26px; color: var(--faint); }
/* Slingan och adressvredet */
.loop { display: grid; gap: 0; } .lpc, .lpu { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.lpc .c1pic { width: 74px; flex: none; } .lpc b { font: 600 17px var(--font-head); } .loop .tx { display: grid; gap: 1px; min-width: 0; flex: 1; } .loop .tx b { overflow-wrap: anywhere; } .loop small { color: var(--muted); font-size: 12.5px; } .loop small.warn { color: var(--warn); font-weight: 500; }
.lpu { margin: 18px 0 0 34px; cursor: pointer; } .lpu:hover { border-color: var(--line-strong); } .lpu.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .lpu.care { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.lpu::before { content: ""; position: absolute; left: -22px; top: -19px; bottom: 50%; width: 20px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); border-bottom-left-radius: 12px; } .lpu + .lpu::before { top: -130%; }
.lpend { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 6px; } .lpend i { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--accent); } .loop { position: relative; }
.dial { width: 74px; height: 74px; flex: none; } .dial .dr { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; } .dial .tk { stroke: var(--faint); stroke-width: 1.2; } .dial .tk.on { stroke: var(--accent); stroke-width: 2.4; }
.dial .tl { font: 500 6.4px var(--font-body); fill: var(--faint); text-anchor: middle; dominant-baseline: central; } .dial .tl.on { fill: var(--accent-text); font-weight: 700; font-size: 8px; } .dial .dp { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; } .dial .dc { fill: var(--text); }
.mtab { display: grid; gap: 2px; font-size: 12.5px; overflow-x: auto; } .mtr { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(70px, 1fr); gap: 8px; padding: 5px 8px; border-radius: 8px; } .mtr:nth-child(even) { background: var(--surface); } .mtr span { overflow-wrap: anywhere; } .mth { color: var(--muted); font-weight: 500; }
/* Plintarna */
.plist .conn { text-align: left; font: inherit; color: var(--text); background: transparent; cursor: pointer; } .plist .grow { flex: 1; min-width: 0; display: grid; gap: 3px; }
.plist small.pl { display: flex; gap: 8px; align-items: baseline; } .plist small.pl i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; transform: translateY(-1px); } .plist small.pl.bad i { background: var(--bad); } .plist small.pl.free i { background: transparent; border: 1.5px solid var(--faint); } .plist small.pl.free { opacity: 0.7; }
.plist small.pl em { font-style: normal; color: var(--text); font-weight: 500; } .plist small.pl span { overflow-wrap: anywhere; } .insp .board { margin-top: 4px; }
.rail .rg { font: 600 10.5px var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); padding: 12px 12px 2px; }
/* Egna formulär */
#fpanel { position: absolute; top: calc(var(--hud) + 10px); right: 22px; bottom: 22px; width: min(560px, calc(100% - 44px)); z-index: 16; display: grid; grid-template-rows: auto 1fr auto; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: var(--shadow), 0 0 0 100vmax color-mix(in srgb, var(--bg-deep) 55%, transparent); opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity 0.22s, transform 0.22s var(--ease); }
#fpanel.is-open { opacity: 1; visibility: visible; transform: none; } body.is-form #sheet, body.is-form #panel, body.is-form #mini { pointer-events: none; }
.fp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 14px; } .fp-head h2 { font-size: 26px; margin-top: 6px; overflow-wrap: anywhere; }
.fp-body { overflow: hidden auto; padding: 4px 24px 18px; display: grid; gap: 18px; align-content: start; } .fp-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); } .fp-foot .grow { flex: 1; } .fp-foot .btn[disabled] { opacity: 0.6; cursor: progress; }
.fsec { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; } .fsec legend { font: 600 12px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); padding: 6px 0 2px; }
.ff { display: grid; gap: 7px; min-width: 0; } .ff .fl { font-size: 13.5px; font-weight: 500; color: var(--muted); } .ff .fl i { color: var(--accent-text); font-style: normal; }
.ff input:not([type=checkbox]):not([type=radio]), .ff select, .ff textarea { font: 400 15.5px/1.35 var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; width: 100%; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.ff select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 21px) 53%, calc(100% - 15px) 53%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.ff textarea { resize: vertical; min-height: 84px; } .ff input:focus-visible, .ff select:focus-visible, .ff textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.ff input[readonly], .ff textarea[readonly] { opacity: 0.7; } .ff.bad input, .ff.bad select, .ff.bad textarea { border-color: var(--bad); } .ff .fe { color: var(--bad); font-size: 13px; font-weight: 500; }
.ff.tog { grid-template-columns: auto 1fr; align-items: center; gap: 12px; cursor: pointer; padding: 4px 0; } .ff.tog input { position: absolute; opacity: 0; width: 1px; height: 1px; } .ff.tog .fl { color: var(--text); font-size: 15px; } .ff.tog .fe { grid-column: 2; }
.sw { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background 0.18s, border-color 0.18s; flex: none; } .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.18s var(--ease), background 0.18s; }
.ff.tog input:checked + .sw { background: var(--accent); border-color: var(--accent); } .ff.tog input:checked + .sw::after { transform: translateX(18px); background: #fff; } .ff.tog input:focus-visible + .sw { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 26%, transparent); }
.fopts { display: flex; flex-wrap: wrap; gap: 8px; } .fo { cursor: pointer; } .fo input { position: absolute; opacity: 0; width: 1px; height: 1px; } .fo span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.fo input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; } .fo input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 26%, transparent); }
.fmsg { padding: 11px 14px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); font-size: 14px; }
.chg s { color: var(--muted); } @media (max-width: 820px) { #fpanel { inset: var(--hud) 0 0 0; width: auto; border-radius: 0; } }
/* Lugnare och rundare: knappar som piller, uppgifter i kort, mer luft */
.btn, .btn.sm, .btn.big { border-radius: 999px; } .btn { padding: 0 18px; } .btn.sm { padding: 0 14px; } .field { border-radius: 999px; padding: 0 16px; }
.wh h1 { font-size: 34px; letter-spacing: -0.01em; } .wh .lead { font-size: 15px; }
.insp { gap: 14px; } .insp > .sec { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; } .insp > .sec > .label { margin-bottom: 12px; }
.insp .kv { gap: 10px 16px; font-size: 14px; } .insp > .sec .hero, .insp > .sec .lpc, .insp > .sec .lpu, .insp > .sec .chb, .insp > .sec .ditem { background: var(--surface-2); }
.row { border-radius: 16px; padding: 11px 14px; } .row.is-sel { box-shadow: inset 3px 0 0 var(--accent); }
.verdict { border-radius: 24px; } .hwc, .dcard, .ghead { border-radius: 22px; } .ghead { border-radius: 18px; }
.about { border-radius: 26px; } .pill { border-radius: 999px; }
.dial .tl.rst { fill: var(--warn); font-weight: 700; } .rdr { width: 74px; height: 74px; flex: none; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--line-strong); } .rdr .ic { width: 24px; height: 24px; } .rdr b { font: 600 15px var(--font-head); }
/* Driftsättningskoll */
.kollsum { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); } .kollsum.warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 11%, transparent); } .kollsum b { font: 600 17px var(--font-head); } .kollsum span { color: var(--muted); font-size: 13px; }
.koll { display: grid; gap: 8px; } .ku { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 10px 12px; } .ku.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); } .ku.wait { border-color: var(--line-strong); }
.kh { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; cursor: pointer; } .kh b { font-weight: 600; overflow-wrap: anywhere; } .kh small { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.km { width: 11px; height: 11px; border-radius: 50%; background: var(--ok); flex: none; } .km.bad { background: var(--bad); } .km.wait { background: transparent; border: 2px solid var(--faint); }
.ku ul { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 6px; } .ku li { display: flex; gap: 9px; align-items: baseline; font-size: 13px; color: var(--muted); } .ku li i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; transform: translateY(-1px); } .ku li.bad i { background: var(--bad); } .ku li.wait i { background: transparent; border: 1.5px solid var(--faint); } .ku li.bad { color: var(--text); } .ku li em { font-style: normal; font-weight: 600; color: var(--text); } .ku li span { overflow-wrap: anywhere; }
/* Tidslinje, larmkort, områdeskort, behörighetskort, loggremsa */
.wb.tlv { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } .verdict.bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); } .verdict.bad .vd { background: color-mix(in srgb, var(--bad) 26%, transparent); } .verdict.bad .vd i { background: var(--bad); }
.verdict.acc { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); } .verdict.acc .vd { background: color-mix(in srgb, var(--accent) 24%, transparent); } .verdict.acc .vd i { background: var(--accent); }
.tline { display: grid; gap: 2px; } .tday { display: flex; align-items: center; gap: 10px; font: 600 13px var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 14px 4px 6px; } .tday span { font: 500 12px var(--font-body); letter-spacing: 0; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.tl { display: grid; grid-template-columns: 50px 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 14px; padding: 9px 12px; cursor: pointer; position: relative; }
.tl:hover { background: var(--surface); } .tl.is-sel { background: var(--surface); border-color: var(--accent); } .tl time { font: 500 14px var(--font-head); color: var(--muted); font-variant-numeric: tabular-nums; } .tl .tx { display: grid; gap: 1px; min-width: 0; } .tl .tx b { font-weight: 500; overflow-wrap: anywhere; } .tl small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl + .tl::before { content: ""; position: absolute; left: 79px; top: -12px; height: 22px; border-left: 2px solid var(--line); }
.agrid { display: grid; gap: 10px; } .acard { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--bad) 60%, transparent); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); cursor: pointer; } .acard.is-sel { box-shadow: 0 0 0 2px var(--bad); }
.acard .abell { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--bad) 24%, transparent); color: var(--bad); flex: none; } .acard .tx { display: grid; gap: 2px; flex: 1 1 200px; min-width: 0; } .acard b { font: 600 18px var(--font-head); overflow-wrap: anywhere; } .acard small { color: var(--muted); font-size: 13px; }
.argrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; } .arcard { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--text); padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; } .arcard:hover { border-color: var(--line-strong); } .arcard.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .arcard.armed { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.arcard .tx { display: grid; gap: 1px; flex: 1; min-width: 0; } .arcard b { font-weight: 600; overflow-wrap: break-word; } .arcard small { color: var(--muted); font-size: 12.5px; } .arcard .pill { flex: none; } .planbox.mini { max-width: 100%; } .planbox.mini .rplan.small { width: 100%; height: auto; }
.wgrid { display: grid; gap: 12px; } .wcard { display: grid; gap: 12px; padding: 16px 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; } .wcard:hover { border-color: var(--line-strong); } .wcard.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wh2 b { font: 600 20px var(--font-head); display: block; } .wh2 small, .wv { color: var(--muted); font-size: 13px; } .wrow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; } .wrow .arr { color: var(--faint); font-size: 18px; padding-top: 26px; }
.wcol { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); min-width: 0; } .wcol .wl { display: flex; align-items: center; gap: 6px; font: 600 11px var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; } .wcol .wl .ic { width: 14px; height: 14px; } .wcol b { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; } .wcol small { color: var(--muted); font-size: 12.5px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 40%, transparent); } .tab { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; color: var(--muted); white-space: nowrap; } .tab:hover { color: var(--text); } .tab.is-cur { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.strip { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 14px 16px 10px; display: grid; gap: 12px; } .sh { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .sh b { font: 600 20px var(--font-head); } .sh > span:not(.pill) { color: var(--muted); font-size: 13.5px; margin-right: auto; }
.bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 92px; align-items: end; } .bar { display: grid; grid-template-rows: 1fr 16px; height: 100%; align-items: end; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--faint); font: 400 10.5px var(--font-body); }
.bar i { display: block; width: 100%; min-height: 3px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); transition: background 0.15s; } .bar.zero i { background: var(--line); } .bar:hover i, .bar.is-sel i { background: var(--accent); } .bar span { align-self: end; }
@media (max-width: 820px) { .wb.tlv { display: block; } .wrow { grid-template-columns: 1fr; } .wrow .arr { display: none; } }
/* Mitt konto och rutor */
.mecard { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); } .meav { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 600 26px var(--font-head); flex: none; } .mecard h2 { font-size: 26px; margin-top: 4px; } .mecard .tx { min-width: 0; }
.tiles2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } .tile2 { display: grid; gap: 6px; justify-items: start; text-align: left; font: inherit; color: var(--text); padding: 18px 20px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.tile2:hover { border-color: var(--accent); transform: translateY(-1px); } .tile2 .ic { width: 22px; height: 22px; color: var(--accent-text); } .tile2 b { font: 600 18px var(--font-head); } .tile2 small { color: var(--muted); font-size: 13px; } .tile2.dng .ic { color: var(--bad); }

.verdict.calm { background: var(--surface-2, var(--surface)); border-color: var(--line); } .verdict.calm .vd { background: color-mix(in srgb, var(--muted) 18%, transparent); } .verdict.calm .vd i { background: var(--muted); }

/* Behörighet: dra och släpp */
.acct { font: 600 30px/1.15 var(--font-head); margin: 2px 0 6px; } .accboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; margin-top: 10px; }
.acczone { display: grid; gap: 10px; align-content: start; min-height: 220px; padding: 14px; border-radius: 22px; border: 1.5px dashed var(--line-strong); background: var(--surface); transition: border-color .15s, background .15s; } .acczone header { display: grid; gap: 2px; } .acczone header small { color: var(--muted); font-size: 12.5px; }
.acczone .wl { display: inline-flex; align-items: center; gap: 7px; font: 600 12px var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); } .acczone .wl .ic { width: 16px; height: 16px; } .azb { display: grid; gap: 8px; align-content: start; } .azb .eyebrow { margin-top: 2px; }
.acczone.drop-on, .accdoor.drop-on, .accpal.drop-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); } body.drag-acc .acczone, body.drag-accm .accdoor { border-style: solid; }
.achips { display: flex; flex-wrap: wrap; gap: 6px; } .achip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; max-width: 100%; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: 500 13.5px var(--font-body); cursor: grab; }
.achip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .achip button, .adh button { width: 24px; height: 24px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; } .achip button:hover, .adh button:hover { background: var(--surface-2); color: var(--text); }
.achip.new, .accdoor.new { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } .achip.more { cursor: pointer; padding-right: 12px; color: var(--muted); } .achip.pal { padding-right: 12px; } button.achip.pal { cursor: grab; text-align: left; } .achip.pal.del { border-style: dashed; } .achip.pal small { color: var(--warn); font-size: 11.5px; flex: none; }
.apl { display: grid; gap: 6px; margin-top: 4px; } .apl .achip { border-radius: 14px; justify-content: space-between; width: 100%; min-height: 40px; }
.accdoor { display: grid; gap: 8px; padding: 12px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--panel); cursor: grab; } .adh { display: flex; align-items: center; gap: 8px; } .adh .ic { width: 18px; height: 18px; flex: none; color: var(--muted); } .adh b { flex: 1; min-width: 0; font: 600 15px var(--font-body); overflow-wrap: anywhere; }
.amr { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; } .aml { width: 22px; font: 600 11px var(--font-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); } .amc { min-height: 28px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); font: 500 12.5px var(--font-body); cursor: pointer; }
.amc.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--text); } .amc.std { border-style: dashed; opacity: .75; } .amc.new { box-shadow: 0 0 0 1.5px var(--accent); }
.acchg { margin-top: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); } .acchg ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; } .acchg li.add::before { content: "+ "; color: var(--ok); font-weight: 700; } .acchg li.del::before { content: "− "; color: var(--bad); font-weight: 700; }
.accpal { border-left: 1px solid var(--line); transition: background .15s; } .accpal .pad { display: grid; gap: 10px; align-content: start; } .acctabs { flex-wrap: wrap; } .acctabs small { color: var(--muted); font-weight: 400; }
@media (max-width: 1100px) { .accboard { grid-template-columns: 1fr; } .acczone { min-height: 0; } }
button.tab { font: inherit; cursor: pointer; background: none; }
.amc.new:not(.on) { text-decoration: line-through; }

/* ===== Mobilen ===== */
html[data-mode="mobil"], html[data-mode="mobil"] body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html[data-mode="mobil"] #viewport, html[data-mode="mobil"] #hud, html[data-mode="mobil"] #mini, html[data-mode="mobil"] #hint, html[data-mode="mobil"] #scrim, html[data-mode="mobil"] #panel, html[data-mode="mobil"] #sheet, html[data-mode="mobil"] #palette { display: none !important; } html[data-mode="mobil"] #app { background: none; z-index: 2; pointer-events: none; } html[data-mode="mobil"] #app > * { pointer-events: auto; }
#mob { display: none; } html[data-mode="mobil"] #mob { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; max-width: 560px; margin: 0 auto; background: var(--bg); color: var(--text); }
.mh { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 18px 10px; } .mlogo { display: flex; align-items: center; flex: 1; min-width: 0; } .mlogo svg { height: 22px; width: auto; }
.mlive { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px var(--font-body); color: var(--muted); } .mlive .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); } .mlive .dot.bad { background: var(--bad); }
.mav { flex: none; padding: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 13px var(--font-head); cursor: pointer; }
#mob-main { overflow-y: auto; -webkit-overflow-scrolling: touch; } .mwrap { display: grid; gap: 12px; padding: 6px 16px 28px; align-content: start; }
.mnav { display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.mnav button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border: 0; background: none; color: var(--muted); font: 500 11.5px var(--font-body); border-radius: 16px; cursor: pointer; min-height: 52px; }
.mnav button .ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } .mnav button.on { color: var(--accent-text); } .mnav button.on span { font-weight: 700; }
.mnav button[data-tab="skanna"] .ic { width: 46px; height: 46px; padding: 11px; margin-top: -18px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.mnav button i { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font: 700 11px/18px var(--font-body); font-style: normal; text-align: center; }
.mstate { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 26px 18px 22px; border-radius: 28px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: center; font: inherit; cursor: pointer; --tone: var(--muted); }
.mstate.ok { --tone: var(--ok); } .mstate.bad { --tone: var(--bad); } .mstate.acc { --tone: var(--accent); } .mstate.ok, .mstate.bad, .mstate.acc { border-color: color-mix(in srgb, var(--tone) 55%, transparent); background: color-mix(in srgb, var(--tone) 10%, var(--surface)); }
.mstate .ring, .malert .ring { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 16%, transparent); } .mstate .ring span, .malert .ring span { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: var(--bg); }
.mstate .ring .ic, .malert .ring .ic { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } .mstate.bad .ring { animation: mpulse 1.6s ease-in-out infinite; }
.mstate h1 { font: 600 28px/1.15 var(--font-head); } .mstate p { color: var(--muted); font-size: 14.5px; } .mstate.small { padding: 16px; grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; cursor: default; } .mstate.small .ring { width: 56px; height: 56px; } .mstate.small .ring span { width: 38px; height: 38px; } .mstate.small .ring .ic { width: 20px; height: 20px; } .mstate.small h1 { font-size: 20px; }
@keyframes mpulse { 50% { transform: scale(1.06); } }
.msec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; } .msec h2 { font: 600 12.5px var(--font-head); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); } .mlink { border: 0; background: none; color: var(--accent-text); font: 500 14px var(--font-body); padding: 6px 0; cursor: pointer; }
.mlist { display: grid; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; } .mrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; } .mrow + .mrow { border-top: 1px solid var(--line); }
.mico { width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); } .mico .ic, .mstar .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } .mrow.armed .mico { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); } .mcard.bad .mico { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.mtx { flex: 1; min-width: 0; display: grid; gap: 2px; } .mtx b { font: 600 15.5px/1.25 var(--font-body); overflow-wrap: anywhere; } .mtx small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; } .mtime { flex: none; width: 58px; font: 500 12.5px var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; } .mnote { color: var(--muted); font-size: 13px; }
.mcard { display: grid; gap: 12px; padding: 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); } .mcard.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); } .mtop { display: flex; align-items: center; gap: 12px; }
.mcard.mnotice { grid-template-columns: 1fr auto; align-items: center; } .mbtns { display: flex; gap: 8px; } .mbtns .btn { flex: 1; } #mob .btn { height: 48px; font-size: 15px; } .mwide { width: 100%; }
.mstar { width: 40px; height: 40px; flex: none; border-radius: 14px; border: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); cursor: pointer; } .mstar.on { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 18%, transparent); } .mstar.on .ic { fill: currentColor; }
.msearch input { width: 100%; height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 400 16px var(--font-body); } .mhint { color: var(--muted); font-size: 13px; text-align: center; } .mlead { font-size: 15.5px; text-align: center; } .mwarn { color: var(--warn); font-size: 14px; text-align: center; }
.mempty { padding: 28px 16px; text-align: center; color: var(--muted); border-radius: 22px; border: 1px dashed var(--line-strong); } .mempty h3 { font: 600 18px var(--font-head); color: var(--text); margin-bottom: 4px; }
.mseg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--surface-2); } .mseg button { height: 40px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 13.5px var(--font-body); cursor: pointer; } .mseg button.on { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.mchips { display: flex; gap: 8px; } #mob .chip { height: 38px; cursor: pointer; background: none; font-family: inherit; } #mob .chip.on { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.mscan { display: grid; gap: 14px; } .mcam { position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: var(--bg-deep); border: 1px solid var(--line); } .mcam video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; } .mcam.live video { opacity: 1; }
.mframe { position: absolute; inset: 16%; border-radius: 24px; border: 3px solid color-mix(in srgb, var(--accent) 85%, transparent); box-shadow: 0 0 0 999px color-mix(in srgb, var(--bg-deep) 45%, transparent); } #mob-scan-res { display: grid; gap: 12px; }
#mob-sheet { position: absolute; inset: 0; z-index: 15; display: grid; align-items: end; background: color-mix(in srgb, var(--bg-deep) 62%, transparent); } #mob-sheet[hidden], #mob-alert[hidden] { display: none; }
.msheet { display: grid; gap: 12px; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--panel); border-top: 1px solid var(--line-strong); max-height: 92%; overflow: auto; } .msheet h2 { font: 600 24px/1.2 var(--font-head); }
.mqr { justify-self: center; padding: 16px; border-radius: 24px; background: #fff; } .mqr img { display: block; width: min(64vw, 280px); height: auto; }
#mob-alert { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 24px; background: var(--bad); } .malert { display: grid; justify-items: center; gap: 12px; width: 100%; text-align: center; color: #fff; --tone: #fff; } .malert .ring span { color: var(--bad); } .malert .ring { animation: mpulse 1.2s ease-in-out infinite; }
.malert .eyebrow { color: #fff; } .malert h1 { font: 600 30px/1.15 var(--font-head); overflow-wrap: anywhere; } .malert .btn { border-color: #fff; color: #fff; } .malert .btn.pri { background: #fff; color: var(--bad); }
html[data-mode="mobil"] #about { position: fixed; align-items: end; padding: 0; z-index: 30; } html[data-mode="mobil"] .about { width: 100%; max-width: 560px; border-radius: 28px 28px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); } html[data-mode="mobil"] .about .btns { display: grid; gap: 8px; } html[data-mode="mobil"] .about .btn { height: 50px; font-size: 16px; width: 100%; }
html[data-mode="mobil"] #toasts { position: fixed; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 35; width: calc(100% - 32px); } html[data-mode="mobil"] #login { position: fixed; } html[data-mode="mobil"] .login-card { padding: 24px 20px; }
html[data-mode="mobil"] #cxpanel { width: 100vw; max-width: 100vw; }
@media (prefers-reduced-motion: reduce) { .mstate.bad .ring, .malert .ring { animation: none; } }
.mhb { display: grid; place-items: center; } .mhb .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } .mhb.on { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.mplayer .cam { width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; cursor: pointer; } .mplayer .cam video { width: 100%; height: 100%; object-fit: cover; } button.mpick { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; } button.mpick + button.mpick { border-top: 1px solid var(--line); } .mpick.on { background: color-mix(in srgb, var(--accent) 10%, transparent); } .mpick.on .mico { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
#mob-me { display: grid; place-items: center; letter-spacing: 0; text-indent: 0; line-height: 1; overflow: hidden; }
