/* ─────────────────────────────────────────────────────────────
   Lyker Key Kundportal — design 1:1 från portal-kit.jsx (LIGHT).
   ENDAST ljust läge. Montserrat (display) + Inter (UI).
   Riktning A: navy sidopanel 250px + ljus innehållsyta (max 1000).
   ───────────────────────────────────────────────────────────── */

:root {
    /* Tokens — exakta värden från designens LIGHT */
    --canvas: #F7F8FB; --surface: #FFFFFF; --surface-alt: #F2F3F8; --sunken: #EEF0F6;
    --line: #E7E8F0; --line-strong: #D6D8E6;
    --ink: #18174C; --text: #2B2B4E; --text-sec: #545A78; --text-mut: #8A8FA8;
    --navy: #18174C; --navy-hover: #25235F; --navy-soft: #ECECF4;
    --magenta: #ED1E79; --magenta-hover: #D01769; --magenta-ink: #C0155F; --magenta-soft: #FDE8F1;
    --ok: #12855A; --ok-soft: #E3F4EC; --warn: #9A6410; --warn-soft: #FBF0D8;
    --err: #CF3441; --err-soft: #FBE7E9; --info: #2B6CB0; --info-soft: #E7F0FA;
    --focus: rgba(237,30,121,0.40);
    --shadow-sm: 0 1px 2px rgba(24,23,76,0.06), 0 1px 3px rgba(24,23,76,0.04);
    --shadow-md: 0 2px 6px rgba(24,23,76,0.06), 0 8px 24px rgba(24,23,76,0.07);
    --shadow-lg: 0 12px 48px rgba(24,23,76,0.16);
    --display: "Montserrat", system-ui, sans-serif;
    --ui: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { background: var(--canvas); color: var(--text); font-family: var(--ui); font-size: 14px; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; }
button { font-family: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; text-align: left; }
a { text-decoration: none; color: inherit; }
/* Fokusring för TANGENTBORDSNAVIGERING på knappar/länkar — men ALDRIG på
   formulärfält: i Chrome räknas klick i input/select alltid som :focus-visible,
   vilket ritade en ring runt texten inne i fältet. Fälten markeras i stället
   med hela rutans ram (.f-input:focus-within nedan). */
:focus-visible:not(input):not(select):not(textarea):not(h1) { outline: none; box-shadow: 0 0 0 3px var(--focus); border-radius: 8px; }
/* FocusOnNavigate flyttar fokus till sidrubriken efter varje navigering
   (skärmläsarstöd) — rubriken är inte interaktiv och ska aldrig ha ring. */
h1:focus, h1:focus-visible { outline: none; box-shadow: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: none; }

@keyframes lk-shimmer { 0% { background-position: -400px 0 } 100% { background-position: 400px 0 } }
@keyframes lk-spin { to { transform: rotate(360deg) } }
.lk-scroll::-webkit-scrollbar { width: 8px; height: 8px }
.lk-scroll::-webkit-scrollbar-thumb { background: rgba(24,23,76,.16); border-radius: 8px }

/* ── Skal: ShellA ── */
.shell { display: flex; height: 100vh; overflow: hidden; }
.rail { width: 250px; flex: 0 0 auto; background: #18174C; display: flex; flex-direction: column; padding: 22px 16px; overflow-y: auto; }
.rail-logo { padding: 2px 8px 22px; display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; cursor: pointer; }
/* color: märket ärver textfärgen (currentColor) — vitt L mot den mörka plattan.
   Den magenta pricken i hörnet är borttagen med 2026 års profil: märket bär
   sin egen magenta triangel, och två accenter konkurrerade på 32 pixlar. */
.rail-logo .tile { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; background: #20204E; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; position: relative; }
.rail-logo .word { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -0.4px; color: #F1F1F8; white-space: nowrap; }

.rail-org-label { font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: rgba(255,255,255,0.4); margin: 0 8px 8px; }
.rail-org { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.06); cursor: pointer; width: 100%; margin-bottom: 16px; }
.rail-org .tile { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #fff; }
.rail-org .name { flex: 1; min-width: 0; font-family: var(--ui); font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rail-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.rail-item { position: relative; display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: 12px; cursor: pointer; color: rgba(255,255,255,0.72); font-family: var(--ui); font-weight: 500; font-size: 14.5px; }
.rail-item svg { color: rgba(255,255,255,0.62); }
.rail-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.rail-item.active { background: rgba(255,255,255,0.10); color: #fff; font-weight: 600; }
.rail-item.active svg { color: #fff; }
.rail-item.active::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--magenta); }

.rail-foot { border-top: 1px solid rgba(255,255,255,0.10); padding-top: 12px; display: flex; align-items: center; gap: 8px; }
.rail-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 6px 8px; margin-left: -8px; border-radius: 10px; cursor: pointer; }
.rail-user:hover { background: rgba(255,255,255,0.06); }
.rail-foot .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rail-foot .who .n { font-family: var(--ui); font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-foot .who .r { font-family: var(--ui); font-size: 11.5px; color: rgba(255,255,255,0.5); }
.rail-logout {
    width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85); display: inline-flex; align-items: center; justify-content: center;
}
.rail-logout:hover { background: var(--err); border-color: var(--err); color: #fff; }

.main { flex: 1; min-width: 0; overflow: auto; padding: 34px 40px 40px; }
/* Använd skärmens bredd — mjukt tak först på riktigt breda skärmar. */
.main-inner { max-width: 1720px; margin: 0 auto; }
@media (min-width: 1800px) { .main { padding: 40px 56px 48px; } }

/* ── EyebrowTitle ── */
.page-title { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-title .lead { flex: 1; min-width: 0; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--magenta-ink); margin-bottom: 8px; }
.page-title h1 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.5px; color: var(--ink); }
.page-title .sub { font-family: var(--ui); font-size: 14.5px; color: var(--text-sec); margin-top: 6px; }
.page-title .actions { display: flex; gap: 10px; }

/* ── Knappar (Btn) ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 12px; font-family: var(--ui); font-weight: 600; font-size: 14.5px; letter-spacing: 0.1px; white-space: nowrap; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, box-shadow .15s; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-hover); }
.btn.accent { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.btn.accent:hover { background: var(--magenta-hover); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-alt); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--navy-soft); }
.btn.danger { background: var(--err-soft); color: var(--err); border-color: var(--err-soft); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Card ── */
.card { background: var(--surface); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.card.pad { padding: 20px; }
.card.hover { box-shadow: var(--shadow-md); }
.card-head { display: flex; align-items: center; padding: 16px 20px 14px; }
.card-head .t { flex: 1; font-family: var(--display); font-weight: 700; font-size: 15.5px; color: var(--ink); }
.card-head .link { font-family: var(--ui); font-weight: 600; font-size: 13px; color: var(--magenta-ink); cursor: pointer; }

/* ── KPI ── */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi .tile { width: 40px; height: 40px; border-radius: 11px; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--ink); }
.kpi .tile.accent { background: var(--magenta-soft); color: var(--magenta-ink); }
.kpi .v { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -1px; color: var(--ink); line-height: 1; }
.kpi .l { font-family: var(--ui); font-size: 13.5px; color: var(--text-sec); margin-top: 8px; }
.kpi .note { font-family: var(--ui); font-size: 12px; color: var(--text-mut); margin-top: 4px; }

/* ── Badge / StatusDot / Avatar ── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-family: var(--ui); font-weight: 600; font-size: 12px; white-space: nowrap; background: var(--navy-soft); color: var(--text-sec); }
.badge .d { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--magenta-soft); color: var(--magenta-ink); }

.sdot { display: inline-flex; align-items: center; gap: 7px; font-family: var(--ui); font-size: 13px; color: var(--text-sec); }
.sdot .d { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; }
.sdot.ok .d { background: var(--ok); } .sdot.warn .d { background: var(--warn); } .sdot.err .d { background: var(--err); } .sdot.idle .d { background: var(--text-mut); }

.avatar { border-radius: 999px; flex: 0 0 auto; background: var(--navy-soft); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; letter-spacing: 0.2px; }
.avatar.accent { background: var(--magenta-soft); color: var(--magenta-ink); }
.avatar.on-rail { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Toolbar: sök + filterchips ── */
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.search-field { flex: 1; min-width: 240px; max-width: 380px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: var(--surface); border-radius: 12px; border: 1.5px solid var(--line-strong); color: var(--text-mut); }
.search-field input { border: 0; outline: none; flex: 1; min-width: 0; font-family: var(--ui); font-size: 15px; color: var(--text); background: transparent; }
.search-field input::placeholder { color: var(--text-mut); }
.fchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; border-radius: 11px; cursor: pointer; white-space: nowrap; border: 1.5px solid var(--line-strong); background: var(--surface); font-family: var(--ui); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.fchip.active { border-color: var(--magenta); background: var(--magenta-soft); color: var(--magenta-ink); }
.fchip .count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--magenta); color: #fff; font-size: 11px; font-weight: 700; }
.toolbar .spring { flex: 1 1 0; }

/* ── Listtabell (Card pad 0 + ColHead + rader) ── */
.lrow-head { display: flex; padding: 12px 20px; border-bottom: 1px solid var(--line); font-family: var(--ui); font-weight: 600; font-size: 12px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--text-mut); background: var(--surface-alt); border-radius: 16px 16px 0 0; }
.sort-h { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; text-align: left; }
.sort-h:hover { color: var(--ink); }
.lrow { display: flex; align-items: center; padding: 13px 20px; border-top: 1px solid var(--line); }
.lrow:first-of-type { border-top: none; }
.lrow.click { cursor: pointer; }
.lrow.click:hover { background: var(--surface-alt); }
.lrow .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.lrow .name { font-family: var(--ui); font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .dim { font-family: var(--ui); font-size: 13px; color: var(--text-sec); }
.lrow .mut { font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); }
.itile { border-radius: 9px; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--ink); }

/* ── Paginering ── */
.pager { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); font-family: var(--ui); font-size: 13px; color: var(--text-sec); }
.pager b { color: var(--text); font-variant-numeric: tabular-nums; }
.pager .spring { flex: 1; }
.pager .pp { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); }
.pager .arrow { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink); }
.pager .arrow.off { opacity: 0.4; cursor: default; }

/* ── Flikar (TabRow) & Segmented ── */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); }
.tabs .tab { font-family: var(--ui); font-weight: 600; font-size: 14.5px; padding: 0 2px 14px; color: var(--text-sec); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; background: none; }
.tabs .tab.on { color: var(--ink); border-bottom-color: var(--magenta); }

.seg { display: inline-flex; background: var(--sunken); border-radius: 12px; padding: 4px; gap: 4px; }
.seg .it { padding: 8px 18px; border-radius: 9px; font-family: var(--ui); font-weight: 600; font-size: 13.5px; color: var(--text-sec); cursor: pointer; }
.seg .it.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ── Formulärfält ── */
.f-label { display: block; font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--text-sec); margin-bottom: 7px; }
.f-input { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: var(--surface); border-radius: 12px; border: 1.5px solid var(--line-strong); }
.f-input input { border: 0; outline: none; flex: 1; min-width: 0; font-family: var(--ui); font-size: 15px; color: var(--text); background: transparent; }
.f-input.disabled { background: var(--surface-alt); opacity: 0.6; }
.f-input select { border: 0; outline: none; flex: 1; min-width: 0; font-family: var(--ui); font-size: 15px; color: var(--text); background: transparent; appearance: none; cursor: pointer; }
/* Dropdowns: selecten täcker hela fältet (även pilen) så klick var som helst öppnar den;
   pilen ritas ovanpå men släpper igenom klicket. */
.f-input:has(> select) { position: relative; }
.f-input:has(> select) > select { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0 40px 0 14px; }
.f-input:has(> select) > svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
/* Fokus: hela fältets ram färgas i stället för webbläsarens inre fokusring —
   gäller alla fält och dropdowns i systemet (inkl. :focus-visible-ringen). */
input:focus, input:focus-visible, select:focus, select:focus-visible, textarea:focus, textarea:focus-visible { outline: none; }
.f-input:focus-within, .search-field:focus-within { border-color: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-soft); }
.f-hint { display: block; font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); margin-top: 6px; }
/* Större textruta (villkor m.m.) — samma formspråk som f-input. */
.f-area { width: 100%; min-height: 110px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); padding: 12px 14px; font-family: var(--ui); font-size: 14px; color: var(--text); outline: none; resize: vertical; }
.f-area:focus { border-color: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-soft); }
.f-area:disabled { background: var(--surface-alt); opacity: 0.6; }

/* ── Tom-lägen (Översikten m.fl.) ── */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 34px 20px; border-top: 1px solid var(--line); }
.empty-state .es-tile { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-alt); border: 1px dashed var(--line-strong); display: flex; align-items: center; justify-content: center; color: var(--text-mut); }
.empty-state .es-title { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--text); }
.empty-state .es-sub { font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); max-width: 240px; line-height: 1.5; }

/* ── Checkbox ── */
.checkbox { width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto; background: var(--surface); border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.checkbox.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── Expandera/minimera-knapp (paneler) ── */
.expander { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-sec); }
.expander:hover { background: var(--surface-alt); color: var(--ink); }
.expander svg { transition: transform .15s; }
.expander.open svg { transform: rotate(180deg); }

/* ── Toggle ── */
.toggle { width: 44px; height: 26px; border-radius: 999px; flex: 0 0 auto; background: #D2D4E2; position: relative; transition: background .18s; cursor: pointer; }
.toggle.on { background: var(--magenta); }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: left .18s; }
.toggle.on .knob { left: 21px; }

/* ── Tomt läge / laddning ── */
.empty-state { text-align: center; padding: 48px 28px; max-width: 380px; margin: 0 auto; }
.empty-state .tile { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; color: var(--text-sec); }
.empty-state .t { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.empty-state .b { font-family: var(--ui); font-size: 14px; color: var(--text-sec); line-height: 1.6; }
.empty-state .a { margin-top: 22px; display: flex; justify-content: center; }

.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; display: inline-block; animation: lk-spin .7s linear infinite; flex: 0 0 auto; }
.skel { display: block; border-radius: 8px; background: linear-gradient(90deg, #ECEEF5 0%, #F6F7FB 40%, #ECEEF5 80%); background-size: 800px 100%; animation: lk-shimmer 1.4s infinite linear; }

/* ── Detaljrader (expanderat lån) ── */
.drow { display: flex; gap: 12px; padding: 5px 0; }
.drow .k { width: 170px; font-family: var(--ui); font-size: 13px; color: var(--text-mut); flex: 0 0 auto; }
.drow .v { font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--text); }
.sect-label { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--magenta-ink); }

/* ── Skåpkortens progress ── */
.meter { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 999px; background: var(--magenta); }
.meter .fill.idle { background: var(--text-mut); }

/* ── Modal (InviteDialog/PartnerManageDialog i designen) ── */
.veil { position: fixed; inset: 0; z-index: 60; background: rgba(24,23,76,0.34); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 460px; max-width: 100%; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; }
.modal .head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.modal .head .lead { flex: 1; min-width: 0; }
.modal .head .t { font-family: var(--display); font-weight: 800; font-size: 21px; color: var(--ink); }
.modal .head .s { font-family: var(--ui); font-size: 13.5px; color: var(--text-sec); margin-top: 6px; line-height: 1.5; }
.modal .head .x { flex: 0 0 auto; cursor: pointer; color: var(--text-mut); padding: 2px; background: none; border: 0; }
.modal .head .x:hover { color: var(--ink); }
.modal .body { display: grid; gap: 16px; margin-top: 20px; }
.modal .foot { display: flex; gap: 10px; margin-top: 24px; justify-content: flex-end; }

/* ── Valbara kategori-chips (PartnerManageDialog) ── */
.pick-chips { display: flex; gap: 9px; flex-wrap: wrap; }
.pick-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--surface); font-family: var(--ui); font-weight: 600; font-size: 13px; color: var(--text-sec); }
.pick-chip.on { border-color: var(--magenta); background: var(--magenta-soft); color: var(--magenta-ink); }

/* ── Auth (AuthFrame i designen): navy vänsterpanel + formulär till höger ── */
.auth { display: flex; min-height: 100vh; background: var(--canvas); }
.auth-left { width: 46%; flex: 0 0 auto; background: #18174C; position: relative; overflow: hidden; padding: 48px 52px; display: flex; flex-direction: column; }
.auth-left::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(237,30,121,0.35), transparent 70%); top: -120px; right: -120px; }
.auth-left::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(41,171,226,0.18), transparent 70%); bottom: -80px; left: -60px; }
.auth-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 420px; position: relative; z-index: 1; }
.auth-hero .h { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1; letter-spacing: -1px; color: #fff; }
.auth-hero .s { font-family: var(--ui); font-size: 16px; color: rgba(255,255,255,0.7); margin-top: 18px; line-height: 1.6; text-wrap: pretty; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.auth-point { display: flex; align-items: center; gap: 12px; }
.auth-point .tile { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.10); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #fff; }
.auth-point .tx { font-family: var(--ui); font-size: 14.5px; color: rgba(255,255,255,0.9); }
.auth-left .foot { font-family: var(--ui); font-size: 12.5px; color: rgba(255,255,255,0.45); position: relative; z-index: 1; }
.auth-right { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px; overflow: auto; }
.auth-form { width: 380px; max-width: 100%; }
.auth-form.wide { width: 440px; }
.auth-form.wider { width: 480px; }
.auth-form h1 { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--ink); letter-spacing: -0.6px; }
.auth-form .sub { font-family: var(--ui); font-size: 14.5px; color: var(--text-sec); margin-top: 10px; line-height: 1.6; text-wrap: pretty; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; font-family: var(--ui); font-size: 13.5px; color: var(--text-sec); }
.auth-alt .link, .auth-link { color: var(--magenta-ink); font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; font-family: var(--ui); font-size: inherit; }
.auth-company { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 13px; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-alt); cursor: pointer; font-family: var(--ui); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.auth-company:hover { background: var(--navy-soft); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--text-sec); cursor: pointer; background: none; border: 0; padding: 0; }
.auth-back:hover { color: var(--ink); }
.auth-ok-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ui); font-size: 13px; color: var(--ok); font-weight: 600; }
.auth-ok-chip .d { width: 20px; height: 20px; border-radius: 999px; background: var(--ok-soft); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* Inloggningsmetods-märken (enkla egna märken, ej exakta logotyper — designens MicrosoftMark/GoogleMark) */
.ms-mark { width: 17px; height: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; flex: 0 0 auto; }
.ms-mark span { border-radius: 1px; }
.ms-mark span:nth-child(1) { background: #F25022; }
.ms-mark span:nth-child(2) { background: #7FBA00; }
.ms-mark span:nth-child(3) { background: #00A4EF; }
.ms-mark span:nth-child(4) { background: #FFB900; }
.g-mark { width: 17px; height: 17px; border-radius: 999px; border: 2px solid #4285F4; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-family: var(--display); font-weight: 800; font-size: 10.5px; color: #4285F4; line-height: 1; }

/* BankID-vänteläge */
.bankid-wait { text-align: center; }
.bankid-wait .glyph { width: 84px; height: 84px; border-radius: 24px; background: var(--navy); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; position: relative; }
.bankid-wait .glyph::after { content: ""; position: absolute; inset: -6px; border-radius: 28px; border: 2px solid var(--magenta); opacity: 0.5; }
.bankid-wait .t { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); letter-spacing: -0.4px; }
.bankid-wait .s { font-family: var(--ui); font-size: 14.5px; color: var(--text-sec); margin-top: 10px; line-height: 1.6; }
.bankid-wait .w { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 26px; color: var(--text-mut); font-family: var(--ui); font-size: 13.5px; }
.bankid-wait .w .spin { color: var(--magenta); }
.bankid-qr { width: 196px; margin: 20px auto 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.bankid-qr svg { display: block; width: 100%; height: auto; }

/* Org-/företagsval (kort med radio/markering) */
.org-choices { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.org-choice { display: flex; align-items: center; gap: 15px; padding: 16px; border-radius: 16px; cursor: pointer; background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); text-align: left; width: 100%; }
.org-choice:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.org-choice.on { border-color: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-soft); }
.org-choice .tile { width: 46px; height: 46px; border-radius: 13px; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--ink); }
.org-choice .n { font-family: var(--ui); font-weight: 600; font-size: 15.5px; color: var(--ink); }
.org-choice .m { font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); margin-top: 3px; }
.org-choice .radio { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.org-choice.on .radio { border-color: var(--magenta); }
.org-choice.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--magenta); }

/* Stegindikator (Skapa företagskonto) */
.stepper { display: flex; align-items: center; margin-bottom: 26px; }
.stepper .step { display: flex; align-items: center; gap: 9px; }
.stepper .dot { width: 26px; height: 26px; border-radius: 999px; flex: 0 0 auto; background: var(--sunken); color: var(--text-mut); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 12.5px; }
.stepper .step.on .dot { background: var(--magenta); color: #fff; }
.stepper .step.done .dot { background: var(--ok); color: #fff; }
.stepper .l { font-family: var(--ui); font-weight: 500; font-size: 13px; color: var(--text-mut); white-space: nowrap; }
.stepper .step.on .l { font-weight: 700; color: var(--ink); }
.stepper .bar { width: 26px; height: 2px; background: var(--line); margin: 0 12px; flex: 0 0 auto; }

/* ── Fel ── */
/* Oväntat fel (kretsen kraschade) — tydligt kort nere till höger i stället
   för Blazors gula standardrand. */
/* Kraschrutan MITT PÅ SKÄRMEN med överlägg (Niklas 2026-08-03): i nedre hörnet
   missades den helt — sidan såg bara trasig ut och användaren visste inte att
   det gick att ladda om. Överlägget mörkar dessutom den halvdöda sidan bakom. */
#blazor-error-ui {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: color-mix(in srgb, var(--ink) 45%, transparent);
    /* Blazor sätter display:block när felet inträffar — vi centrerar kortet
       med margin auto i stället för flex, eftersom display styrs av ramverket. */
    padding: 0;
    border: none;
    box-shadow: none;
    max-width: none;
    backdrop-filter: blur(2px);
}
#blazor-error-ui > * { position: relative; }
#blazor-error-ui .card-inner {
    position: relative;
    margin: 16vh auto 0;
    max-width: 460px;
    background: var(--surface);
    border: 1.5px solid var(--err);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 22px 24px;
    font-family: var(--ui);
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    text-align: center;
}
#blazor-error-ui .t { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--err); margin-bottom: 6px; }
#blazor-error-ui .t { justify-content: center; font-size: 17px; margin-bottom: 8px; }
#blazor-error-ui .reload { display: inline-flex; margin-top: 16px; padding: 11px 22px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 600; cursor: pointer; font-size: 14.5px; }
#blazor-error-ui .reload:hover { background: var(--navy-hover); }
#blazor-error-ui .dismiss { position: absolute; top: 12px; right: 14px; cursor: pointer; color: var(--text-mut); font-size: 18px; }

/* Datafel i en vy (API-anrop misslyckades) — tydlig banner i innehållet. */
.error-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--err); background: var(--err-soft); margin-bottom: 16px; font-family: var(--ui); font-size: 13.5px; color: var(--text); line-height: 1.5; }
.error-banner .ic { flex: 0 0 auto; color: var(--err); margin-top: 1px; }
.error-banner .t { font-weight: 700; color: var(--err); display: block; margin-bottom: 2px; font-size: 14px; }

.blazor-error-boundary { background: var(--err-soft); color: var(--err); padding: 1rem; border-radius: 12px; }
.blazor-error-boundary::after { content: "Ett fel har inträffat."; }

/* ── E-shop (designens portal-shop.jsx) ─────────────────────── */
.shop-cartbtn { display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 8px 0 16px; border-radius: 12px; background: var(--navy); color: #fff; cursor: pointer; border: none; font-family: var(--display); font-weight: 700; font-size: 14.5px; }
.shop-cartbtn:hover { background: var(--navy-hover); }
.shop-cartbtn .cnt { min-width: 26px; height: 26px; border-radius: 999px; background: var(--magenta); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; padding: 0 7px; }
.shop-chips { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.shop-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 999px; cursor: pointer; font-family: var(--ui); font-weight: 600; font-size: 13.5px; background: var(--surface); color: var(--text-sec); border: 1px solid var(--line-strong); }
.shop-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.shop-cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.shop-cat-head .dot { width: 8px; height: 8px; border-radius: 999px; }
.shop-cat-head .t { font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -0.3px; }
.shop-cat-head .n { font-family: var(--ui); font-size: 13px; color: var(--text-mut); }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.shop-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; padding: 0; }
.shop-card:hover { box-shadow: var(--shadow-md); }
.shop-thumb { height: 132px; display: flex; align-items: center; justify-content: center; position: relative; }
.shop-thumb .ph { position: absolute; bottom: 8px; right: 10px; font-family: ui-monospace, monospace; font-size: 10px; color: var(--text-mut); opacity: 0.8; }
.shop-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.shop-card .bd { padding: 15px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.shop-card .nm { font-family: var(--ui); font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.3; }
.shop-card .ds { font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); margin-top: 3px; }
.shop-packs { display: flex; gap: 6px; }
.shop-pack { flex: 1; text-align: center; padding: 7px 6px; border-radius: 9px; cursor: pointer; font-family: var(--ui); font-weight: 600; font-size: 12.5px; background: var(--surface-alt); color: var(--text-sec); border: 1px solid var(--line); }
.shop-pack.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.shop-opts { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
.shop-opts .cap { font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-mut); }
.shop-opt { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.shop-opt.req { cursor: default; }
.shop-opt.req .cb { opacity: 0.55; }
.shop-opt .lbl { flex: 1; min-width: 0; font-family: var(--ui); font-size: 12.5px; color: var(--text); }
.shop-opt .lbl .mut { color: var(--text-mut); }
.shop-opt .pr { font-family: var(--ui); font-weight: 600; font-size: 12.5px; color: var(--text-sec); }
.shop-cb { width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto; background: var(--surface); border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; }
.shop-cb.on { background: var(--navy); border-color: var(--navy); }
.shop-price-row { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; }
.shop-price-row .p { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.3px; }
.shop-price-row .p .u { font-size: 13px; color: var(--text-sec); font-weight: 600; }
.shop-price-row .meta { font-family: var(--ui); font-size: 11px; color: var(--text-mut); }
.shop-price-row .lead { flex: 1; min-width: 0; }

/* Produkt-popup med bildkarusell */
.shop-pop { width: 720px; max-width: 100%; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); }
.shop-pop .car { position: relative; height: 260px; display: flex; align-items: center; justify-content: center; }
.shop-pop .car .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; }
.shop-pop .car .dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.shop-pop .car .dots span { width: 7px; height: 7px; border-radius: 999px; background: rgba(24,23,76,0.25); }
.shop-pop .car .dots span.on { background: var(--ink); }
.shop-pop .car .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; }
.shop-pop .bd { padding: 26px; }
.shop-pop .ttl { font-family: var(--display); font-weight: 800; font-size: 25px; letter-spacing: -0.5px; color: var(--ink); }
.shop-pop .long { font-family: var(--ui); font-size: 14px; color: var(--text-sec); line-height: 1.7; margin-top: 16px; text-wrap: pretty; white-space: pre-line; }
.shop-pop .optbox { margin-top: 18px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-alt); }

/* Kundvagn */
.shop-cart-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.shop-cart-line:last-child { border-bottom: none; }
.shop-cart-line .th { width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.shop-cart-line .nm { font-family: var(--ui); font-weight: 600; font-size: 14.5px; color: var(--ink); }
.shop-cart-line .mt { font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); margin-top: 2px; }
.shop-cart-line .tot { width: 96px; text-align: right; font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--ink); }
.shop-cart-line .tot .u { font-family: var(--ui); font-weight: 600; font-size: 12px; color: var(--text-mut); }
.shop-qty { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 4px 6px; }
.shop-qty button { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-alt); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; color: var(--text-sec); border: none; cursor: pointer; }
.shop-qty .q { min-width: 20px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); }
.shop-sub-rows { margin-left: 26px; padding-left: 28px; border-left: 2px solid var(--line); }
.shop-sub-rows .r { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.shop-sub-rows .r .l { flex: 1; min-width: 0; font-family: var(--ui); font-weight: 600; font-size: 13.5px; color: var(--text); }
.shop-sub-rows .r .l .mut { font-weight: 400; font-size: 11.5px; color: var(--text-mut); }
.shop-sub-rows .r .p { font-family: var(--display); font-weight: 700; font-size: 13.5px; color: var(--text-sec); }
.shop-sub-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
.shop-sub-total .l { font-family: var(--ui); font-size: 13px; color: var(--text-sec); }
.shop-sub-total .v { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--ink); }
.shop-sub-total .v .u { font-family: var(--ui); font-weight: 600; font-size: 13px; color: var(--text-mut); }

/* Summeringskort */
.shop-sum { display: flex; flex-direction: column; gap: 14px; }
.shop-sum .grp { display: flex; flex-direction: column; gap: 9px; }
.shop-sum .cap { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-mut); }
.shop-sum .cap.accent { color: var(--magenta-ink); }
.shop-sum .line { display: flex; align-items: baseline; }
.shop-sum .line span { flex: 1; font-family: var(--ui); font-size: 13.5px; font-weight: 500; color: var(--text-sec); }
.shop-sum .line b { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink); }
.shop-sum .line.strong span { font-size: 15px; font-weight: 700; color: var(--ink); }
.shop-sum .line.strong b { font-weight: 800; font-size: 19px; }
.shop-sum .line.strong.accent b { color: var(--magenta-ink); }
.shop-sum .div { height: 1px; background: var(--line); }
.shop-sum .note { font-family: var(--ui); font-size: 11.5px; color: var(--text-mut); line-height: 1.5; }

/* Kassa */
.shop-radio { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.shop-radio.on { border-color: var(--magenta); background: var(--magenta-soft); }
.shop-radio .rb { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.shop-radio.on .rb { border-color: var(--magenta); }
.shop-radio.on .rb::after { content: ""; width: 9px; height: 9px; border-radius: 999px; background: var(--magenta); }
.shop-radio .t { font-family: var(--ui); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.shop-radio .s { font-weight: 400; color: var(--text-mut); font-size: 12.5px; }
.shop-mini-line { display: flex; align-items: center; gap: 10px; font-family: var(--ui); font-size: 13px; }
.shop-mini-line .q { font-family: var(--display); font-weight: 700; color: var(--text-sec); min-width: 20px; }
.shop-mini-line .n { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-mini-line .p { font-weight: 600; color: var(--ink); }
.shop-terms-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; cursor: pointer; font-family: var(--ui); font-size: 13.5px; color: var(--text); }
.shop-terms-row a { font-weight: 600; }
.shop-terms-text { font-family: var(--ui); font-size: 13.5px; color: var(--text); line-height: 1.7; white-space: pre-line; }

/* Orderbekräftelse & beställningar */
.shop-done-ic { width: 72px; height: 72px; border-radius: 22px; background: var(--ok-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.shop-info-banner { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--info-soft); font-family: var(--ui); font-size: 13.5px; color: var(--info); line-height: 1.5; }
.shop-status.received { background: var(--ok-soft); color: var(--ok); }
.shop-status.processing { background: var(--info-soft); color: var(--info); }
.shop-status.shipped { background: var(--navy-soft); color: var(--text-sec); }
.shop-status.delivered { background: var(--ok-soft); color: var(--ok); }
.shop-status.cancelled { background: var(--err-soft); color: var(--err); }

/* E-shop admin: produktmodalens pack-/tillvalsrader (grid så inget spiller) */
.shop-admin-row { display: grid; gap: 8px; align-items: center; margin-bottom: 8px; }
.shop-admin-row.packs { grid-template-columns: minmax(0, 1fr) 96px 150px 26px; }
.shop-admin-row.options { grid-template-columns: minmax(0, 1fr) 160px auto 26px; }
.shop-admin-row > label { min-width: 0; }
.shop-admin-row .f-input { padding: 0 12px; }

/* Kort med innehållspadding (designens Card pad=20) — listkorten sätter i
   stället padding via sina radklasser och förblir opåverkade. */
.card.pad { padding: 20px; }

/* Support-agent: live-video / stillbild i egen media-modal. Media renderas i sin egen
   upplösning (max-caps) → rätt format för liggande/stående utan svarta kanter, vilket också
   gör klick-mappningen 1:1 mot enhetens skärm. */
.agent-ov { position: fixed; inset: 0; z-index: 70; background: rgba(24,23,76,0.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.agent-ov-box { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; max-width: 94vw; max-height: 92vh; }
.agent-ov-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.agent-ov-x { cursor: pointer; color: var(--text-mut); background: none; border: 0; padding: 4px; border-radius: 8px; display: inline-flex; align-items: center; }
.agent-ov-x:hover { color: var(--ink); background: var(--navy-soft); }
.agent-ov-media { display: block; max-width: 92vw; max-height: 82vh; width: auto; height: auto; background: var(--navy-soft); object-fit: contain; cursor: crosshair; }

/* Organisationsväljarens meny i railen */
.org-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    font-family: var(--ui);
    font-size: 13px;
    color: var(--text);
    background: transparent;
}
.org-menu-item:hover { background: var(--bg); }
.org-menu-item.on { background: var(--navy); color: #fff; font-weight: 600; }

/* Driftöversikten på skåpsidan */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-row .stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.stat-row .stat-label {
    font-family: var(--ui); font-size: 11.5px; font-weight: 600;
    letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-mut);
}
.stat-row .stat-value {
    font-family: var(--display); font-weight: 800; font-size: 22px;
    color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat-row .stat-warn { border-color: var(--warn); background: var(--warn-soft); }
.stat-row .stat-warn .stat-value { color: var(--warn-ink, var(--ink)); }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
