/* ─────────────────────────────────────────────────────────────
   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; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); border-radius: 8px; }

@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; }
.rail-logo .tile { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; background: #20204E; 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 .tile .dot { position: absolute; right: 4.5px; bottom: 4.5px; width: 4.8px; height: 4.8px; border-radius: 999px; background: #ED1E79; }
.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; }
.f-hint { display: block; font-family: var(--ui); font-size: 12.5px; color: var(--text-mut); margin-top: 6px; }

/* ── 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. */
#blazor-error-ui { display: none; position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 420px; background: var(--surface); border: 1.5px solid var(--err); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px 18px; font-family: var(--ui); font-size: 14px; color: var(--text); line-height: 1.5; }
#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 .reload { display: inline-flex; margin-top: 10px; padding: 8px 14px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 600; cursor: pointer; }
#blazor-error-ui .dismiss { position: absolute; top: 10px; right: 12px; cursor: pointer; color: var(--text-mut); font-size: 16px; }

/* 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."; }
