/* norscode-enterprise-v1
 *
 * Delt designsystem for alle Norscode-produkter. Kilden er Helpdesk
 * (~/NorscodeHelpdeskAI/assets/app.css), som var det mest utviklede
 * grensesnittet — 2214 linjer bygget paa design-tokens.
 *
 * Gateway hentet det hit for at produktene skal se ut som ett system.
 * Endringer boer gjoeres i kilden og kopieres hit, til vi blir enige om
 * hvor "Norscode design" skal bo permanent.
 */
@import url('/assets/finished.css');

:root {
  color-scheme: dark;
  --bg: #05070b;
  --surface: #090d14;
  --surface-2: #0d131d;
  --surface-3: #111a27;
  --line: #202b3a;
  --line-bright: #34465c;
  --text: #f4f7fb;
  --muted: #8b9aaf;
  --cyan: #35d8ff;
  --blue: #3978ff;
  --mint: #4ce6a5;
  --pink: #f04add;
  --warn: #ffcd62;
  --red: #ff667f;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  --radius: 14px;
  --topbar: rgba(5,8,13,.82);
  --sidebar: rgba(5,8,13,.96);
  --dash-card: linear-gradient(145deg,#081a32,#071225); --dash-panel: linear-gradient(145deg,#07172d,#081326);
  --dash-cardline: #24517f; --dash-panelline: #2a4567;
  --shell-bg: linear-gradient(135deg,#020817,#041326 60%,#020817);
}

/* ===== Tema 2 · Rolig mørk ===== */
[data-theme='rolig'] {
  color-scheme: dark;
  --bg: #070b12; --surface: #0e1520; --surface-2: #131c2a; --surface-3: #18222f;
  --line: #1e2a3b; --line-bright: #2a3a4e; --text: #e9eff8; --muted: #8ea0ba;
  --cyan: #4fe0ff; --blue: #3ba7ff; --mint: #37d99a; --pink: #c98bff; --warn: #f5b544; --red: #ff5d73;
  --topbar: rgba(7,11,18,.82); --sidebar: #0a0f18;
  --dash-card: #0e1520; --dash-panel: #0e1520; --dash-cardline: #1e2a3b; --dash-panelline: #1e2a3b;
  --shell-bg: #070b12;
  --shadow: 0 20px 50px -24px rgba(0,0,0,.7);
}

/* ===== Tema 3 · Lyst ===== */
[data-theme='lys'] {
  color-scheme: light;
  --bg: #eef2f7; --surface: #ffffff; --surface-2: #ffffff; --surface-3: #eef2f8;
  --line: #e1e8f1; --line-bright: #d3dce8; --text: #16212e; --muted: #586a82;
  --cyan: #1e7fe6; --blue: #2f8ff0; --mint: #0f9d63; --pink: #7c5cff; --warn: #c67c07; --red: #e11d48;
  --topbar: rgba(255,255,255,.85); --sidebar: #ffffff;
  --dash-card: #ffffff; --dash-panel: #ffffff; --dash-cardline: #e1e8f1; --dash-panelline: #e1e8f1;
  --shell-bg: #eef2f7;
  --shadow: 0 14px 34px -18px rgba(20,30,50,.22);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 76% -10%, rgba(28,101,190,.12), transparent 34rem),
    radial-gradient(circle at 35% 0, rgba(53,216,255,.035), transparent 27rem),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.005em;
}

a { color: inherit; }
button, input, select { font: inherit; }
.layout, .enterpriseShell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding: 20px 14px 14px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  box-shadow: 18px 0 50px rgba(0,0,0,.18);
  z-index: 20;
}
.enterpriseSidebar { grid-column: 1; }
.enterpriseMain { grid-column: 2; min-width: 0; }
[data-shell='norscode-enterprise-v1'] .brandLogo { width: 43px; height: 43px; }

.brandBlock { padding: 0 6px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brandLogo {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(53,216,255,.36);
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(53,216,255,.12), 0 0 34px rgba(240,74,221,.08);
}
.brandLogoImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.34);
  transform-origin: center;
}
.brand span { display: grid; line-height: 1.15; }
.brand b { font-size: 18px; letter-spacing: .01em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .055em; text-transform: uppercase; }
.environment { display: inline-flex; align-items: center; gap: 7px; margin: 13px 0 0 54px; color: #a9b8ca; font-size: 11px; }
.environment i, .commandActions i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(76,230,165,.68); }

.nav { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 4px 20px; scrollbar-width: thin; scrollbar-color: #263447 transparent; }
.navGroup { display: grid; gap: 3px; margin-bottom: 14px; }
.navLabel { padding: 0 10px 6px; color: #65758a; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 37px;
  padding: 8px 10px 8px 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #a7b4c6;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.nav a:before { content: ""; position: absolute; left: 13px; width: 7px; height: 7px; border: 1.5px solid #5d6d82; border-radius: 2px; transform: rotate(45deg); }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav a.active { color: white; border-color: rgba(53,216,255,.28); background: linear-gradient(90deg, rgba(53,216,255,.13), rgba(57,120,255,.045)); box-shadow: inset 3px 0 var(--cyan); }
.nav a.active:before { border-color: var(--cyan); background: rgba(53,216,255,.32); box-shadow: 0 0 12px rgba(53,216,255,.45); }
/* Enterprise-menyen er en fast komponent på alle innloggede sider. */
.fixedNav { contain: layout paint; }
.fixedNav .navGroup { min-width: 0; }
.fixedNav .navPrimary a,
.fixedNav .navQueues a { min-height: 37px; }
.fixedNav .navBadge { flex: 0 0 auto; }
.nav a .navBadge { margin-left: auto; padding: 1px 7px; border-radius: 20px; background: var(--surface-3); color: var(--muted); font-size: 10.5px; font-weight: 800; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.nav a.active .navBadge { background: rgba(53,216,255,.16); color: var(--cyan); border-color: transparent; }

.searchPanel {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.searchPanel input {
  flex: 1 1 auto;
  min-width: 0;
}

.conversation { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.conversationMessage { margin:10px 0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.conversationMessage.internal { border-color:rgba(245,158,11,.3); background:rgba(245,158,11,.08); }
.conversationMessage.public { border-color:rgba(56,189,248,.22); background:rgba(56,189,248,.06); }
.messageMeta { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; }
.messageMeta b { color:var(--text); }
.conversationMessage.internal .messageMeta b { color:#f5b04b; }
.conversationMessage.public .messageMeta b { color:#5cc4ff; }
.messageMeta small { margin-left:auto; }
.conversationMessage p { margin:8px 0 0; color:var(--text); white-space:pre-wrap; }
.conversationComposer { margin-top:14px; padding:14px; border-radius:12px; background:var(--surface-2); }
.articleBody { max-width:900px; margin:18px 0; padding:18px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.025); color:var(--text); line-height:1.65; white-space:pre-wrap; }
.tagList { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.inlineForm { display:flex; gap:8px; align-items:center; margin-top:8px; }
.inlineForm input { max-width:220px; }
.bulkPanel { margin-top:14px; }

@media (max-width: 640px) {
  .searchPanel { align-items: stretch; flex-direction: column; }
  .searchPanel .btn { width: 100%; }
}
.navAdvanced { margin: 2px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); }
.navAdvanced summary { display: flex; justify-content: space-between; gap: 8px; padding: 11px 10px; cursor: pointer; color: #a7b4c6; font-weight: 700; list-style: none; }
.navAdvanced summary::-webkit-details-marker { display: none; }
.navAdvanced summary:after { content: "+"; margin-left: auto; color: var(--cyan); }
.navAdvanced[open] summary:after { content: "−"; }
.navAdvanced summary span { align-self: center; padding: 2px 6px; border: 1px solid #2b3a4e; border-radius: 999px; color: #6f8198; font-size: 9px; text-transform: uppercase; }
.advancedLinks { max-height: 330px; overflow-y: auto; margin: 0; padding: 3px 5px 8px; border-top: 1px solid var(--line); }
.advancedLinks a { min-height: 34px; font-size: 12px; }

.sideAccount { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 12px 7px 0; border-top: 1px solid var(--line); }
.sideAccount .avatar { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border: 1px solid rgba(53,216,255,.3); border-radius: 9px; background: var(--surface-3); color: var(--cyan); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.sideAccount > div:nth-child(2) { display: grid; min-width: 0; }
.sideAccount > div:nth-child(2) b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.sideAccount small { color: var(--muted); font-size: 10px; }
.sideAccount form { margin: 0; }
.sideAccount .btn { min-height: 31px; padding: 5px 8px; font-size: 10px; }

.main { min-width: 0; }
.commandBar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--topbar); backdrop-filter: blur(20px); }
.commandBar > div { display: flex; align-items: center; gap: 10px; }
.commandProduct { color: var(--cyan); font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.commandDivider { width: 1px; height: 17px; background: var(--line-bright); }
.commandBar b { font-size: 13px; }
.commandActions a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 11px; }
.commandActions a:hover { border-color: var(--line-bright); color: var(--text); }
.pageCanvas { width: min(100%, 1760px); padding: 27px 28px 44px; }

.top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.eyebrow { color: var(--pink); font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: 7px 0 9px; font-size: clamp(30px, 3.7vw, 48px); line-height: 1.03; letter-spacing: -.035em; }
h2 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.018em; }
h3 { margin: 14px 0 8px; font-size: 15px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.two { grid-template-columns: minmax(0,2fr) minmax(280px,1fr); }
.two.emailIntakeLayout { grid-template-columns: repeat(2, minmax(0,1fr)); }
.panel, .metric { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); box-shadow: 0 12px 36px rgba(0,0,0,.13); }
.panel:hover, .metric:hover { border-color: var(--line-bright); }
.panelHead, .ticketLine { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.metric span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.metric b { display: block; margin-top: 7px; color: var(--cyan); font-size: clamp(18px, 2vw, 30px); letter-spacing: -.03em; overflow-wrap: anywhere; }

.tableWrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.panel > .table { display: block; max-width: 100%; overflow: auto; }
.tableWrap .table { min-width: 760px; }
.compact .table { min-width: 560px; }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(53,216,255,.025); }
.table th { color: #718197; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 9px; border: 1px solid var(--line-bright); border-radius: 999px; color: var(--cyan); font-size: 11px; white-space: nowrap; }
.pill.new { border-color: rgba(53,216,255,.5); color: var(--cyan); }
.pill.open { border-color: rgba(76,230,165,.5); color: var(--mint); }
.pill.pending { border-color: rgba(255,205,98,.5); color: var(--warn); }
.pill.queued { border-color: rgba(240,74,221,.5); color: var(--pink); }
.pill.overdue { border-color: rgba(255,102,127,.55); color: var(--red); }
.pill.neutral { border-color: var(--line-bright); color: var(--muted); }
.accountMenu { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
.accountMenu form { margin: 0; }
.accountLink { display: inline-flex; flex-direction: column; line-height: 1.15; text-decoration: none; color: inherit; padding: 4px 9px; border-radius: 9px; border: 1px solid transparent; }
.accountLink:hover { background: rgba(255,255,255,.06); border-color: var(--line-bright); }
.accountName { font-size: 13px; font-weight: 600; }
.accountRole { font-size: 11px; color: var(--muted); }
.ok { color: var(--mint); }
.warn { color: var(--warn); }
.code { overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 9px 13px; border: 1px solid transparent; border-radius: 9px; background: linear-gradient(135deg, var(--cyan), #5d8cff); color: #031018; font-weight: 850; text-decoration: none; cursor: pointer; box-shadow: 0 8px 24px rgba(53,216,255,.11); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line-bright); background: rgba(255,255,255,.018); color: var(--text); box-shadow: none; }
.form { display: grid; gap: 12px; }
.formgrid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.form input, .form select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line-bright); border-radius: 9px; outline: 0; background: var(--surface-2); color: var(--text); }
.form input:focus, .form select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53,216,255,.09); }

.statusStrip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.statusStrip article { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, #101927, #0a111b); }
.statusStrip span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.statusStrip b { display: block; margin-top: 4px; color: var(--cyan); font-size: 26px; }
.workbench { display: grid; grid-template-columns: minmax(340px,1.15fr) minmax(360px,1fr) minmax(300px,.78fr); gap: 14px; align-items: start; }
.queuePanel, .detailPanel, .sidePanel { min-width: 0; }
.sidePanel { display: grid; gap: 14px; }
.registerTabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.registerTabs span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; }
.ticketCards { display: grid; gap: 10px; margin-bottom: 14px; }
.ticketCard { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.ticketCard h3 { margin: 10px 0 6px; }
.ticketMeta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.factGrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.factGrid span { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.factGrid b { overflow-wrap: anywhere; color: var(--text); }
.aiPanel { border-color: rgba(240,74,221,.45); }
.miniList { display: grid; gap: 8px; margin: 12px 0; }
.miniList span { padding: 9px 11px; border-left: 2px solid var(--cyan); border-radius: 7px; background: var(--surface); color: var(--muted); }
.customerBox { border-color: rgba(76,230,165,.34); }

@media (max-width: 1280px) {
  .workbench { grid-template-columns: minmax(0,1fr) minmax(340px,.86fr); }
  .sidePanel { grid-column: 1/-1; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .formgrid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1450px) {
  .agentWorkspace { grid-template-columns: minmax(0,1fr) minmax(340px,.9fr); }
  .contextRail { grid-column: 1/-1; grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 920px) {
  html, body { overflow-x: hidden; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .brandBlock { display: flex; align-items: center; justify-content: space-between; }
  .environment { margin: 0; }
  .nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; overflow: visible; padding-bottom: 8px; }
  .navGroup { margin: 0; }
  .navAdvanced { margin: 0; }
  .navSystem { grid-column: auto; }
  .sideAccount { display: none; }
  .commandBar { position: static; padding: 0 18px; }
  .commandActions a:first-child { display: none; }
  .pageCanvas { padding: 20px 18px 36px; }
  .grid, .two, .statusStrip, .workbench, .sidePanel, .formgrid, .factGrid { grid-template-columns: 1fr; }
  .agentWorkspace, .contextRail { grid-template-columns: 1fr; }
  .tableWrap .table { min-width: 680px; }
}

/* Fast golden-canvas for den isolerte utviklingsserveren. Nettleseren tar et
   eksplisitt 1672x941-klipp fra standard viewport, slik at capture-backenden
   ikke skalerer en tvunget stor viewport. Klassen kan aldri aktiveres i
   production-profilen; normal app-layout påvirkes ikke. */
html.visualDesktopCapture {
  width: 1672px;
  min-width: 1672px;
  height: 941px;
  min-height: 941px;
  overflow: hidden;
}
html.visualDesktopCapture body,
html.visualDesktopCapture .enterpriseShell {
  width: 1672px;
  min-width: 1672px;
  height: 941px;
  min-height: 941px;
  overflow: hidden;
}
html.visualDesktopCapture .enterpriseSidebar,
html.visualDesktopCapture .enterpriseMain {
  height: 941px;
  min-height: 941px;
}

@media (max-width: 620px) {
  body { font-size: 13px; }
  .side { padding: 14px 10px; }
  .brand small, .environment { display: none; }
  .nav { grid-template-columns: 1fr 1fr; }
  .navLabel { padding-left: 5px; }
  .nav a { padding-left: 27px; }
  .nav a:before { left: 10px; }
  .navAdvanced { grid-column: 1/-1; }
  .navSystem { grid-column: 1/-1; grid-template-columns: 1fr 1fr; }
  .navSystem .navLabel { grid-column: 1/-1; }
  .commandBar { min-height: 54px; }
  .commandActions { display: none !important; }
  .pageCanvas { padding: 16px 12px 30px; }
  .top { display: grid; }
  .panel, .metric { padding: 14px; border-radius: 11px; }
  .statusStrip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panelHead, .ticketLine { align-items: flex-start; }
  .tableWrap .table { min-width: 620px; }
  .btn { width: 100%; }
}

/* Norscode Helpdesk AI — canonical enterprise shell from the approved reference. */
@media (min-width: 921px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .side {
    padding: 18px;
    background: var(--sidebar);
    box-shadow: none;
  }
  .brandBlock { padding: 0 0 15px; border-bottom: 0; }
  .brand { gap: 10px; }
  .brandLogo {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    border-radius: 8px;
    background: #05080d;
    box-shadow: 0 0 22px rgba(53,216,255,.12), 0 0 26px rgba(240,74,221,.08);
  }
  .brand span { line-height: 1.04; }
  .brand b { font-size: 18px; }
  .brand small {
    margin-top: 2px;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
  }
  .environment {
    display: block;
    margin: 17px 0 0;
    color: #8b9aaf;
    font-size: 13px;
  }
  .nav { padding: 12px 0 18px; }
  .navGroup { gap: 7px; margin-bottom: 10px; }
  .navLabel { display: none; }
  .nav a {
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14px;
  }
  .nav a:before { display: none; }
  .nav a.active {
    border-color: rgba(53,216,255,.72);
    background: linear-gradient(135deg, rgba(53,216,255,.08), rgba(57,120,255,.035));
    box-shadow: none;
  }
  .navAdvanced { border-radius: 8px; }
  .sideAccount { display: none; }
  .commandBar { display: none; }
  .main { padding: 0; }
  .pageCanvas {
    width: 100%;
    max-width: none;
    padding: 20px;
  }
  .panel, .metric, .tableWrap, .statusStrip article, .ticketCard {
    border-radius: 8px;
  }
}

/* Dashboard reference: neon enterprise surface approved by the owner. */
.dashboardReference { max-width: 1408px; margin: 0 auto; }
.dashboardReferenceHead { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; margin-bottom:28px; }
.dashboardReferenceHead h1 { margin:0; font-size:34px; letter-spacing:-.035em; }
.dashboardReferenceHead p { margin:5px 0 0; color:var(--muted); font-size:15px; }
.dashboardDate { min-width:225px; padding:12px 15px; border:1px solid var(--line); border-radius:9px; color:var(--text); background:var(--surface-2); font-size:13px; }
.dashboardDate span { float:right; color:var(--muted); }
.dashboardMetrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:20px; margin-bottom:20px; }
.dashboardMetric { min-height:121px; padding:20px; border:1px solid var(--dash-cardline); border-radius:9px; background:var(--dash-card); box-shadow:inset 0 0 26px rgba(24,121,255,.08),0 10px 28px rgba(0,0,0,.16); }
.dashboardMetric.metricPurple { border-color:#7049bf; box-shadow:inset 0 0 26px rgba(145,71,255,.09); }
.dashboardMetric.metricPink { border-color:#b92c84; box-shadow:inset 0 0 26px rgba(240,74,221,.07); }
.dashboardMetric span { display:block; color:var(--text); font-size:14px; }
.dashboardMetric b { display:block; margin-top:5px; color:var(--text); font-size:32px; letter-spacing:-.035em; }
.dashboardMetric small { color:var(--muted); font-size:12px; }
.dashboardMainGrid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1.08fr) minmax(300px,1.05fr); gap:20px; }
.dashboardPanel { min-width:0; min-height:250px; padding:20px; border:1px solid var(--dash-panelline); border-radius:10px; background:var(--dash-panel); box-shadow:inset 0 0 30px rgba(28,107,194,.05); }
.dashboardPanel h2 { margin:0; font-size:17px; letter-spacing:-.02em; }
.dashboardPanelHead { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.dashboardPanelHead > span,.dashboardPanelHead > a { padding:7px 10px; border:1px solid var(--line); border-radius:7px; color:var(--muted); font-size:11px; text-decoration:none; }
.dashboardTrend { grid-column:span 1; min-height:311px; }
.dashboardStatus { min-height:311px; }
.dashboardActivity { min-height:311px; }
.dashboardChart { min-height:238px; position:relative; padding-top:10px; border-top:1px solid rgba(78,116,157,.18); background:repeating-linear-gradient(to bottom,transparent 0,transparent 46px,rgba(66,99,140,.14) 47px); }
.dashboardAxis { display:flex; justify-content:space-between; color:#758ba8; font-size:11px; }
.dashboardBars { height:165px; display:flex; align-items:flex-end; gap:12px; padding:0 22px 0 26px; border-bottom:1px solid #355374; }
.dashboardBars i { flex:1; min-width:8px; border-radius:5px 5px 0 0; background:linear-gradient(#40b5ff,#2464ec); box-shadow:0 0 14px rgba(49,137,255,.45); }
.dashboardEmpty { margin-top:10px; color:#8094ad; font-size:11px; }
.dashboardDonut { width:145px; height:145px; margin:11px auto 8px; display:grid; place-items:center; border-radius:50%; background:conic-gradient(#328ffb 0 34%,#8e4ee7 34% 46%,#35d88e 46% 82%,#ee43a5 82% 100%); box-shadow:0 0 22px rgba(36,132,255,.25); }
.dashboardDonut:after { content:""; position:absolute; width:93px; height:93px; border-radius:50%; background:var(--dash-panel); }
.dashboardDonut span { position:relative; z-index:1; display:grid; place-items:center; font-size:22px; font-weight:800; }
.dashboardDonut small { color:var(--muted); font-size:10px; font-weight:400; }
.dashboardLegend { display:grid; gap:7px; margin-top:10px; color:var(--muted); font-size:12px; }
.dashboardLegend span { display:flex; align-items:center; gap:7px; }
.dashboardLegend i { width:8px; height:8px; border-radius:50%; background:#328ffb; }.dashboardLegend i.purple{background:#8e4ee7}.dashboardLegend i.green{background:#35d88e}.dashboardLegend i.pink{background:#ee43a5}.dashboardLegend b{margin-left:auto;color:var(--text)}
.dashboardActivity { overflow:hidden; }
.dashboardActivityItem { display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:9px; align-items:center; margin:8px 0; padding:9px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); text-decoration:none; }
.dashboardActivityIcon { display:grid; place-items:center; width:26px; height:26px; border:1px solid #28a4ff; border-radius:6px; color:#38baff; font-size:20px; line-height:1; }.dashboardActivityIcon.pending{border-color:#ba44ea;color:#ba44ea}.dashboardActivityIcon.queued{border-color:#ef42a7;color:#ef42a7}.dashboardActivityItem b{display:block;overflow:hidden;color:var(--text);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.dashboardActivityItem small,.dashboardActivityItem time{color:var(--muted);font-size:10px}.dashboardActivityItem time{white-space:nowrap}
.dashboardAi { border-color:#5a318a; min-height:286px; }.dashboardInsight { margin-top:14px; padding:16px; border:1px solid var(--blue); border-radius:9px; background:var(--surface-3); }.dashboardInsight b{color:var(--text)}.dashboardInsight p{color:var(--muted);font-size:12px}.dashboardInsight a{color:var(--blue);font-size:11px;text-decoration:none}.pinkInsight{border-color:var(--pink);background:var(--surface-3)}
.dashboardCategories { min-height:286px; }.dashboardCategory { display:grid; grid-template-columns:1fr auto; gap:5px; margin-top:15px; color:#b9c7d9; font-size:12px; }.dashboardCategory b{color:#d9e5f5}.dashboardCategory i{grid-column:1/-1;height:5px;border-radius:5px;background:linear-gradient(90deg,#3caeff 60%,#14263e 60%)}.dashboardCategory:nth-of-type(3) i{background:linear-gradient(90deg,#ad58ef 50%,#14263e 50%)}.dashboardCategory:nth-of-type(4) i{background:linear-gradient(90deg,#55e8a5 42%,#14263e 42%)}.dashboardCategory:nth-of-type(5) i{background:linear-gradient(90deg,#ee4baa 34%,#14263e 34%)}
.dashboardActions { min-height:286px; }.dashboardActionGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:15px}.dashboardActionGrid a{display:grid;place-items:center;gap:8px;min-height:90px;padding:10px;border:1px solid #1c79c0;border-radius:9px;color:#59c2ff;text-decoration:none;font-size:27px}.dashboardActionGrid a:nth-child(2),.dashboardActionGrid a:nth-child(5){border-color:#7850d0;color:#bc86ff}.dashboardActionGrid a:nth-child(3),.dashboardActionGrid a:nth-child(6){border-color:#cf3c94;color:#ff62bd}.dashboardActionGrid span{color:#ecf2fa;font-size:11px}
.dashPriorityPanel { margin-bottom: 20px; }
.dashQueue { display: grid; gap: 2px; }
.dashQueueEmpty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
.dashQueueRow { display: grid; grid-template-columns: 3px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 11px 10px; border-radius: 10px; text-decoration: none; color: var(--text); }
.dashQueueRow + .dashQueueRow { box-shadow: 0 -1px 0 var(--line); }
.dashQueueRow:hover { background: var(--surface-3); }
.dashStripe { width: 3px; align-self: stretch; min-height: 34px; border-radius: 3px; background: var(--muted); }
.dashStripe.high { background: var(--red); } .dashStripe.med { background: var(--warn); } .dashStripe.low { background: var(--line-bright); }
.dashQueueMain { min-width: 0; }
.dashQueueTitle { display: block; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashQueueMeta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.dashQueueMeta b { color: var(--text); font-variant-numeric: tabular-nums; }
.dashQueueRight { display: flex; align-items: center; gap: 8px; flex: none; }
/* Abonnement — plan preset cards */
.planPresets { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 12px 0 14px; }
.planCard { position: relative; overflow: visible; margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 18px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: transform .15s, border-color .15s; }
.planCard:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.planCardSel { border-color: var(--accent); }
.planCard h3 { margin: 0; font-size: 15px; font-weight: 680; }
.planTag { position: absolute; top: -10px; left: 16px; background: linear-gradient(90deg,#43b0ff,#8e7bff); color: #04121f; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; }
.planPrice { margin: 10px 0 2px; font-size: 28px; font-weight: 760; letter-spacing: -1px; }
.planPrice small { font-size: 13px; font-weight: 600; color: var(--faint); letter-spacing: 0; }
.planSeats { color: var(--muted); font-size: 12.5px; }
.planFeat { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 7px; }
.planFeat li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); }
.planFeat li svg { width: 15px; height: 15px; flex: none; color: var(--mint); margin-top: 1px; }
.planContact { margin: 0 0 12px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.planCard .btn { margin-top: auto; justify-content: center; width: 100%; }
.planAdvanced { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.planAdvanced summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; list-style: none; padding: 4px 0; }
.planAdvanced summary::-webkit-details-marker { display: none; }
.planAdvanced summary::before { content: "▸ "; color: var(--faint); }
.planAdvanced[open] summary::before { content: "▾ "; }
@media (max-width:1100px){ .planPresets { grid-template-columns: 1fr; } }
/* Saker-liste (prototyp): chip-filtre + stripete rader */
.sakBar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sakChips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.sakChip { display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; background: var(--surface-2); }
.sakChip:hover { border-color: var(--line-bright); color: var(--text); }
.sakChip.on { background: var(--accent); border-color: transparent; color: #04121f; }
.sakPanel { padding: 4px 0; }
.sakHead, .sakRow { display: grid; grid-template-columns: 4px minmax(0,1.7fr) 1fr .8fr .9fr 44px; gap: 12px; align-items: center; padding: 10px 16px; }
.sakHead { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); border-bottom: 1px solid var(--line); }
.sakRow { border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.sakRow:hover { background: var(--surface-2); }
.sakRow:last-child { border-bottom: none; }
.sakStripe { width: 4px; height: 34px; border-radius: 3px; background: var(--muted); }
.sakStripe.high { background: var(--red); }
.sakStripe.med { background: var(--warn); }
.sakStripe.low { background: var(--cyan); }
.sakStripe.done { background: var(--mint); }
.sakMain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sakTitle { font-weight: 640; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sakSub { color: var(--muted); font-size: 12px; }
.sakCust { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sakOwner { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text); }
.sakEmpty { padding: 24px 16px; text-align: center; }
.pill.high { background: rgba(255,90,110,.15); color: #ff8a97; border: 1px solid rgba(255,90,110,.3); }
.pill.med { background: rgba(255,176,32,.15); color: #ffc65a; border: 1px solid rgba(255,176,32,.3); }
.pill.low { background: rgba(59,167,255,.15); color: #7cc4ff; border: 1px solid rgba(59,167,255,.3); }
@media (max-width:720px){ .sakHead { display: none; } .sakRow { grid-template-columns: 4px 1fr auto; gap: 10px; } .sakRow .sakCust, .sakRow .sakOwner { display: none; } }
/* Kjøretøy — flåtetabell */
.fleetHead, .fleetRow { display: grid; grid-template-columns: 1fr 1.3fr .9fr .9fr .9fr; gap: 12px; align-items: center; padding: 10px 16px; }
.fleetHead { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); border-bottom: 1px solid var(--line); }
.fleetRow { border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.fleetRow:hover { background: var(--surface-2); }
.fleetRow:last-child { border-bottom: none; }
.fleetReg { font-weight: 680; font-variant-numeric: tabular-nums; }
.fleetModel, .fleetCell, .fleetOwner { color: var(--muted); font-size: 13px; }
@media (max-width:720px){ .fleetHead { display: none; } .fleetRow { grid-template-columns: 1fr 1fr; gap: 8px; } .fleetRow .fleetCell, .fleetRow .fleetOwner { display: none; } }
/* Kunder — prototyp-kort */
.customerCard.custCard { display: flex; flex-direction: column; gap: 12px; }
.custHead { display: flex; align-items: center; gap: 11px; }
.custAvatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(150deg, var(--cyan), var(--blue)); color: #04121f; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: none; }
.custId { min-width: 0; }
.custId h3 { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custTier { color: var(--muted); font-size: 12px; }
.custStats { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.custStats b { color: var(--text); }
.customerCard.custCard .btn { margin-top: auto; }
/* ===== Mock-skall (Min meny), forhåndsvisning bak shell=mock ===== */
.mockShell { --side:#0a0f18; --mpanel:#0e1520; --mpanel2:#131c2a; --minset:#0b111b; --mline:#1e2a3b; --mline-soft:#16202e; --mtext:#e9eff8; --mmuted:#8ea0ba; --mfaint:#586a84; --macc:#3ba7ff; --macc-hi:#4fe0ff; --mactive:rgba(59,167,255,.13); --mok:#37d99a; --mdanger:#ff5d73; display:grid; grid-template-columns:250px minmax(0,1fr); min-height:100vh; background:#070b12; color:var(--mtext); }
.mockShell a { text-decoration:none; color:inherit; } .mockShell svg { display:block; } .mockShell .num { font-variant-numeric:tabular-nums; }
.mockShell .side { background:var(--side); border-right:1px solid var(--mline); display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto; }
.mockShell .brand { display:flex; align-items:center; gap:12px; padding:18px 16px 14px; }
.mockShell .logo { width:38px; height:38px; border-radius:10px; flex:none; overflow:hidden; box-shadow:0 0 20px rgba(24,232,255,.2),0 0 24px rgba(255,34,223,.12); }
.mockShell .brand .ey { color:var(--mfaint); font-size:10px; letter-spacing:.16em; text-transform:uppercase; font-weight:600; }
.mockShell .brand b { display:block; font-size:15px; font-weight:680; letter-spacing:-.2px; line-height:1.2; }
.mockShell nav { padding:4px 12px 12px; display:flex; flex-direction:column; gap:2px; }
.mockShell .ngroup { display:flex; align-items:center; justify-content:space-between; padding:14px 8px 6px; }
.mockShell .ngroup span { color:var(--mfaint); font-size:10px; letter-spacing:.14em; text-transform:uppercase; font-weight:700; }
.mockShell .customize { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:var(--macc); padding:2px 6px; border-radius:6px; border:1px solid transparent; }
.mockShell .customize:hover { background:var(--mactive); border-color:rgba(59,167,255,.25); } .mockShell .customize svg { width:12px; height:12px; }
.mockShell .nav { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:11px; color:var(--mmuted); font-size:13.5px; font-weight:550; position:relative; }
.mockShell .nav .ic { width:19px; height:19px; flex:none; opacity:.9; } .mockShell .nav .ic svg { width:19px; height:19px; }
.mockShell .nav .lbl { flex:1; min-width:0; white-space:nowrap; }
.mockShell .nav:hover { background:var(--mpanel2); color:var(--mtext); }
.mockShell .nav.active { background:var(--mactive); color:#dbeeff; }
.mockShell .nav.active::before { content:""; position:absolute; left:-12px; top:9px; bottom:9px; width:3px; border-radius:0 3px 3px 0; background:var(--macc); }
.mockShell .nav.active .ic { opacity:1; color:var(--macc-hi); }
.mockShell .grip { width:16px; height:16px; flex:none; color:var(--mfaint); opacity:0; margin-left:-4px; }
.mockShell .pinbtn { width:22px; height:22px; flex:none; display:grid; place-items:center; border-radius:6px; color:var(--mfaint); opacity:0; }
.mockShell .pinbtn.pinned { opacity:1; color:var(--macc-hi); }
.mockShell .pinnable:hover .grip, .mockShell .pinnable:hover .pinbtn { opacity:.9; }
.mockShell .badge { font-size:10.5px; font-weight:700; padding:1px 7px; border-radius:20px; background:var(--mpanel2); color:var(--mmuted); border:1px solid var(--mline); font-variant-numeric:tabular-nums; }
.mockShell .hint { margin:6px 12px 0; padding:9px 11px; border:1px dashed var(--mline); border-radius:10px; color:var(--mfaint); font-size:11px; line-height:1.4; }
.mockShell .sidefoot { margin-top:auto; padding:14px 16px; border-top:1px solid var(--mline); display:flex; align-items:center; gap:9px; }
.mockShell .health { width:8px; height:8px; border-radius:50%; background:var(--mok); flex:none; }
.mockShell .sidefoot small { color:var(--mfaint); font-size:11px; } .mockShell .sidefoot b { display:block; color:var(--mmuted); font-size:12px; font-weight:600; }
.mockShell .mockMain { min-width:0; display:flex; flex-direction:column; }
.mockShell .topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:14px; padding:14px 26px; background:rgba(7,11,18,.82); backdrop-filter:blur(10px); border-bottom:1px solid var(--mline-soft); }
.mockShell .crumb { color:var(--mfaint); font-size:13px; } .mockShell .crumb b { color:var(--mtext); font-weight:620; }
.mockShell .grow { flex:1; }
.mockShell .who { display:flex; align-items:center; gap:10px; }
.mockShell .avatar { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:700; color:#04121f; background:linear-gradient(150deg,#4fe0ff,#8e7bff); }
.mockShell .who small { display:block; color:var(--mfaint); font-size:11px; } .mockShell .who bb { font-size:12.5px; font-weight:620; }
.mockShell .mockContent { padding:24px 26px 48px; max-width:1160px; width:100%; }
@media (max-width:820px){ .mockShell { grid-template-columns:1fr; } .mockShell .side { display:none; } }
@media (max-width:1100px){.dashboardMetrics{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboardMainGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboardActivity{grid-column:span 2}}
@media (max-width:640px){.dashboardReferenceHead{display:block}.dashboardDate{margin-top:14px}.dashboardMetrics,.dashboardMainGrid{grid-template-columns:1fr}.dashboardActivity{grid-column:auto}.dashboardActionGrid{grid-template-columns:repeat(2,1fr)}}

/* Final reference shell proportions: narrow rail with centered Norscode mark. */
@media (min-width:921px){
  [data-shell='norscode-enterprise-v1']{grid-template-columns:232px minmax(0,1fr)}
  [data-shell='norscode-enterprise-v1'] .enterpriseSidebar{width:232px;padding:28px 15px 14px}
  [data-shell='norscode-enterprise-v1'] .brandBlock{padding:0 0 28px}
  [data-shell='norscode-enterprise-v1'] .brand{display:grid;justify-items:center;gap:7px}
  [data-shell='norscode-enterprise-v1'] .brandLogo{width:132px;height:132px;flex-basis:132px;border:0;border-radius:0;box-shadow:0 0 32px rgba(53,216,255,.12),0 0 42px rgba(240,74,221,.12)}
  [data-shell='norscode-enterprise-v1'] .brand span{justify-items:center}
  [data-shell='norscode-enterprise-v1'] .brand b{font-size:17px}
  [data-shell='norscode-enterprise-v1'] .brand small{display:none}
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a{min-height:41px;padding-left:36px;font-size:14px}
  [data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .commandBar,[data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .pageHeading{display:none}
  [data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .pageCanvas{padding:38px 28px 48px}
}

@media (min-width: 1051px) {
  .productTop { grid-template-columns: minmax(0, 1fr) 520px; }
}

@media (min-width: 1051px) {
  .agentWorkspace {
    grid-template-columns: minmax(420px,.95fr) minmax(400px,1fr) minmax(260px,.7fr);
  }
  .contextRail {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

/* Prevent wide administration and integration content from escaping the canvas. */
.main, .pageCanvas, .top > div, .grid > *, .panelHead > *, .formgrid > * { min-width: 0; }
.top h1, .panel h2, .panel h3, .metric b { overflow-wrap: anywhere; }
.panel img, .panel svg { max-width: 100%; }

@media (max-width: 920px) {
  .brandBlock { border-bottom: 0; }
  .environment { margin: 0; }
  .sideAccount { display: none; }
  .commandBar { display: none; }
  .pageCanvas { width: 100%; }
}

/* Enterprise shell v2 — shared Norscode standard for every Helpdesk surface. */
@media (min-width: 921px) {
  .layout { grid-template-columns: 232px minmax(0, 1fr); }

  .side {
    padding: 20px 16px 14px;
    border-right-color: rgba(88, 116, 148, .28);
    background:
      linear-gradient(180deg, rgba(10, 16, 24, .98), rgba(5, 9, 15, .99)),
      #060a10;
    box-shadow: 20px 0 60px rgba(0, 0, 0, .22);
  }

  .brandBlock {
    padding: 0 4px 18px;
    border-bottom: 1px solid rgba(88, 116, 148, .22);
  }

  .brandLogo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    object-fit: cover;
    border-color: rgba(53, 216, 255, .45);
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(240, 74, 221, .13), 0 0 34px rgba(53, 216, 255, .14);
  }

  .brand b { font-size: 17px; letter-spacing: -.01em; }
  .brand small { color: #9eacc0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .environment { margin-top: 14px; color: #7f8da1; font-size: 11px; }

  .nav { padding: 18px 2px 22px; }
  .navGroup { gap: 4px; margin-bottom: 18px; }
  .navLabel {
    display: block;
    padding: 0 11px 7px;
    color: #607086;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .17em;
  }

  .nav a {
    min-height: 39px;
    padding: 9px 11px 9px 35px;
    border-radius: 10px;
    color: #9aa8bb;
    font-size: 13px;
    font-weight: 650;
  }

  .nav a:before {
    display: block;
    left: 14px;
    width: 6px;
    height: 6px;
    border-color: #526176;
    border-radius: 2px;
  }

  .nav a:hover { color: #eef5ff; background: rgba(255,255,255,.035); }
  .nav a.active {
    border-color: rgba(53, 216, 255, .34);
    background: linear-gradient(90deg, rgba(53, 216, 255, .14), rgba(57, 120, 255, .045));
    box-shadow: inset 3px 0 var(--cyan), 0 8px 22px rgba(0, 0, 0, .12);
  }
  .nav a.active:before { border-color: var(--cyan); background: rgba(53,216,255,.28); }

  .navAdvanced {
    margin: 0 0 18px;
    border-color: rgba(88, 116, 148, .24);
    border-radius: 10px;
    background: rgba(255, 255, 255, .015);
  }
  .navAdvanced summary { padding: 11px; font-size: 12px; }
  .advancedLinks a { min-height: 35px; font-size: 12px; }

  .sideAccount {
    display: grid;
    padding: 13px 3px 0;
    border-top-color: rgba(88, 116, 148, .25);
  }

  .commandBar {
    display: flex;
    min-height: 56px;
    padding: 0 22px;
    border-bottom-color: rgba(88, 116, 148, .24);
    background: var(--topbar);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
  }

  .main { padding: 0; }
  .pageCanvas { width: 100%; max-width: 1720px; padding: 20px 22px 48px; }
  .panel, .metric, .tableWrap, .statusStrip article, .ticketCard { border-radius: 12px; }
}

.top {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid rgba(69, 101, 134, .3);
  border-radius: 12px;
  background:
    radial-gradient(circle at 86% 15%, rgba(57,120,255,.14), transparent 25rem),
    linear-gradient(145deg, rgba(17,26,39,.98), rgba(8,13,21,.98));
  box-shadow: 0 18px 54px rgba(0,0,0,.18);
}
.top:after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue) 45%, var(--pink), transparent 92%);
  opacity: .7;
}
.top .muted { max-width: 76ch; font-size: 15px; }
.top h1 { margin: 5px 0 7px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.03em; }

.grid { gap: 10px; }
.two { grid-template-columns: minmax(0,2.15fr) minmax(300px,.85fr); }

.panel, .metric {
  border-color: var(--line);
  background: var(--surface-2);
  box-shadow: 0 18px 48px rgba(0,0,0,.15), inset 0 1px rgba(255,255,255,.018);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.panel:hover, .metric:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 103, 138, .8);
  box-shadow: 0 22px 58px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.025);
}

.metric { position: relative; overflow: hidden; min-height: 92px; padding: 16px 17px; }
.metric:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}
.metric b { margin-top: 5px; font-size: clamp(18px,1.8vw,27px); text-shadow: 0 0 22px rgba(53,216,255,.18); }

.panelHead { padding-bottom: 12px; border-bottom: 1px solid rgba(58,78,103,.42); }
.tableWrap { border-color: rgba(58,78,103,.55); background: var(--surface-2); }
.table th { padding-top: 12px; padding-bottom: 12px; background: var(--surface-3); color: var(--muted); }
.table td { padding-top: 11px; padding-bottom: 11px; }
.table tbody tr:hover td { background: rgba(53,216,255,.035); }

.form input, .form select {
  min-height: 42px;
  border-color: rgba(63,86,116,.8);
  background: var(--surface-2);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.28);
}
.form input:hover, .form select:hover { border-color: rgba(91,119,153,.9); }
.btn { border-radius: 10px; box-shadow: 0 10px 28px rgba(53,216,255,.14); transition: transform .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost:hover { border-color: rgba(53,216,255,.42); background: rgba(53,216,255,.045); }

@media (max-width: 920px) {
  .top { padding: 18px; border-radius: 13px; }
  .top .muted { font-size: 14px; }
  .panel:hover, .metric:hover, .btn:hover { transform: none; }
}

/* Dense page heading inspired by the customer-workspace reference. */
.main .top {
  overflow: visible;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 2px 12px;
  border: 0;
  border-bottom: 1px solid rgba(58,78,103,.46);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.main .top:after { display: none; }
.main .top h1 { margin: 3px 0 4px; font-size: clamp(25px,2.5vw,34px); }
.main .top .muted { margin: 0; font-size: 13px; }

@media (max-width: 920px) {
  .main .top { padding: 2px 2px 10px; }
  .main .top h1 { font-size: 25px; }
}

/* Enterprise shell v3 — one immutable navigation system on every employee page. */
.pageHeading { display:flex;align-items:center;justify-content:space-between;min-height:54px;margin:0 0 14px; }
.pageHeading h1 { margin:1px 0 0;font-size:clamp(24px,2.35vw,34px);line-height:1.08;letter-spacing:-.03em; }
.pageHeading p { margin:3px 0 0;color:var(--muted);font-size:12px; }
.pageCanvas > .pageHeading + .top { display:none; }
.commandActions kbd { margin-left:8px;padding:1px 5px;border:1px solid rgba(99,123,153,.5);border-radius:4px;color:#7f90a7;background:rgba(255,255,255,.025);font:9px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }
.commandActions .commandPrimary { border-color:#2472ff;background:linear-gradient(135deg,#1578ff,#245be8);color:#fff;font-weight:800;box-shadow:0 7px 20px rgba(25,105,255,.2); }

@media (min-width: 921px) {
  .layout { grid-template-columns:218px minmax(0,1fr); }
  .side { padding:14px 12px 12px;background:var(--sidebar); }
  .brandBlock { padding:0 4px 13px; }
  .brandLogo { width:38px;height:38px;flex-basis:38px;border:0;border-radius:7px;object-fit:cover;box-shadow:0 0 24px rgba(53,216,255,.13),0 0 24px rgba(240,74,221,.09); }
  .brand { gap:9px; }
  .brand b { font-size:15px; }
  .brand small { margin-top:2px;color:#8fa2ba;font-size:10px;letter-spacing:.02em;text-transform:none; }
  .enterpriseNav { padding:11px 0 10px; }
  .enterpriseNav .navGroup { gap:2px;margin:0; }
  .enterpriseNav .navPrimary { padding-bottom:10px;border-bottom:1px solid rgba(88,116,148,.2); }
  .enterpriseNav .navQueues { padding-top:11px; }
  .enterpriseNav .navLabel { display:block;padding:0 9px 6px;color:#65758b;font-size:9px;letter-spacing:.14em; }
  .enterpriseNav a { min-height:33px;padding:6px 8px 6px 31px;border-radius:6px;color:#aab6c7;font-size:11px;font-weight:600; }
  .enterpriseNav a:before { left:11px;display:block;width:7px;height:7px;border:1.4px solid #617087;border-radius:2px;background:transparent;transform:rotate(45deg); }
  .enterpriseNav a > span:first-child { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .enterpriseNav a.active { border-color:rgba(37,116,255,.72);background:linear-gradient(90deg,#135fcf,#176eea 72%,#1c65d5);color:#fff;box-shadow:0 8px 20px rgba(8,75,177,.24),inset 0 1px rgba(255,255,255,.12); }
  .enterpriseNav a.active:before { border-color:#fff;background:rgba(255,255,255,.18);box-shadow:none; }
  .navBadge { display:grid;place-items:center;min-width:20px;height:18px;margin-left:auto;padding:0 5px;border:1px solid rgba(90,117,153,.45);border-radius:999px;background:rgba(255,255,255,.035);color:#cbd6e5;font-size:9px;font-weight:850; }
  .enterpriseNav a.active .navBadge { border-color:rgba(255,255,255,.28);background:rgba(3,28,68,.32);color:#fff; }
  .navQueues a:nth-of-type(3) .navBadge { color:var(--warn); }
  .navQueues a:nth-of-type(4) .navBadge,.navQueues a:nth-of-type(5) .navBadge { color:var(--red); }
  .sideAccount { grid-template-columns:32px minmax(0,1fr) auto;gap:8px;padding:10px 2px 0; }
  .sideAccount .avatar { width:32px;height:32px;border-radius:999px;text-decoration:none; }
  .sideAccount > div:nth-child(2) b { font-size:10px; }
  .sideAccount small { display:flex;align-items:center;gap:4px;font-size:8px; }
  .sideAccount small i { display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--mint);box-shadow:0 0 8px rgba(76,230,165,.6); }
  .sideAccount .btn { min-height:27px;padding:4px 6px;border-radius:6px;font-size:8px; }
  .commandBar { min-height:52px;padding:0 18px; }
  .pageCanvas { max-width:none;padding:14px 18px 42px; }
}

@media (max-width: 920px) {
  .enterpriseNav .navBadge { margin-left:auto; }
}

/* Keep the workspace inside the viewport after the fixed enterprise sidebar. */
@media (min-width: 921px) and (max-width: 1499px) {
  .agentWorkspace { grid-template-columns:minmax(0,1fr) minmax(300px,.82fr); }
  .contextRail { grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (min-width: 1500px) {
  .agentWorkspace { grid-template-columns:minmax(420px,.95fr) minmax(400px,1fr) minmax(260px,.7fr); }
  .contextRail { grid-column:auto;grid-template-columns:1fr; }
}
.miniList span { min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word; }
.form textarea { width:100%;min-height:110px;resize:vertical; }
.form input,.form select,.form textarea { font:inherit; }
.form input:focus-visible,.form select:focus-visible,.form textarea:focus-visible,.btn:focus-visible,.nav a:focus-visible,.commandActions a:focus-visible { outline:2px solid var(--cyan);outline-offset:2px; }
.serviceForm fieldset { min-width:0;margin:0;padding:14px;border:1px solid var(--line-bright);border-radius:12px;background:var(--surface-2); }
.serviceForm legend { padding:0 8px;color:var(--text);font-size:12px;font-weight:800;letter-spacing:.02em; }
.serviceForm fieldset > label { margin-top:12px; }
.publicNav .navPrimary { border-bottom:0; }
.srOnly { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.languageSwitcher { display:flex;align-items:center;gap:5px;margin:0; }
.languageSwitcher select { min-height:32px;max-width:116px;padding:5px 24px 5px 8px;border:1px solid rgba(91,119,157,.35);border-radius:7px;background:var(--surface-2);color:var(--muted);font:inherit; }
.languageSwitcher .btn { min-height:32px;padding:5px 8px; }
.sideLanguage { display:none; }
.publicIntakeGrid { grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr); }
.publicEmailPanel .formgrid { grid-template-columns:1fr; }
.publicStatusHero .pill i { display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 12px rgba(76,230,165,.68); }
.serviceStatusList { display:grid;gap:0;margin-bottom:16px;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface-2); }
.serviceStatusList article { display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:12px;align-items:center;min-height:70px;padding:13px 15px;border-bottom:1px solid var(--line); }
.serviceStatusList article:last-child { border-bottom:0; }
.serviceStatusList article > div { display:grid;gap:4px; }

/* Canonical Norscode enterprise shell: the dashboard reference is the
   source of truth for every authenticated and public page.  Keep this
   final desktop contract after legacy page-specific rules so no route can
   silently move the logo, sidebar or command bar. */
@media (min-width: 921px) {
  [data-shell='norscode-enterprise-v1'] .enterpriseShell {
    grid-template-columns: 232px minmax(0, 1fr);
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseSidebar {
    width: 232px;
    padding: 28px 15px 14px;
  }
  [data-shell='norscode-enterprise-v1'] .brandBlock {
    padding: 0 0 28px;
    border-bottom: 0;
  }
  [data-shell='norscode-enterprise-v1'] .brand {
    display: grid;
    justify-items: center;
    gap: 7px;
  }
  [data-shell='norscode-enterprise-v1'] .brandLogo {
    width: 135px;
    height: 135px;
    flex-basis: 135px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    box-shadow: 0 0 32px rgba(53,216,255,.12), 0 0 42px rgba(240,74,221,.12);
  }
  [data-shell='norscode-enterprise-v1'] .brandLogoImage { transform:none; }
  [data-shell='norscode-enterprise-v1'] .brand b {
    font-size: 17px;
    transform: none;
  }
  [data-shell='norscode-enterprise-v1'] .publicShell:has(.loginEnterprise) .pageHeading { display:none; }
  [data-shell='norscode-enterprise-v1'] .publicShell:has(.loginEnterprise) .pageCanvas { min-height:877px;display:grid;place-items:center;padding:34px; }
  [data-shell='norscode-enterprise-v1'] .brand small {
    display: none;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav {
    padding: 17px 0 20px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navGroup {
    gap: 7px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navPrimary {
    padding-bottom: 13px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navSecondary {
    padding-top: 15px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a {
    min-height: 47px;
    padding: 10px 10px 10px 52px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 400;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a:before {
    display: none;
  }
  [data-shell='norscode-enterprise-v1'] .navIcon {
    position: absolute;
    left: 14px;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    color: #8190a5;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a.active .navIcon {
    color: #f5f8ff;
    filter: drop-shadow(0 0 5px rgba(91,145,255,.5));
  }
  [data-shell='norscode-enterprise-v1'] .commandBar {
    min-height: 64px;
    padding: 0 28px;
  }
  [data-shell='norscode-enterprise-v1'] .pageCanvas {
    padding: 27px 35px 44px 28px;
  }
  [data-shell='norscode-enterprise-v1'] .sideAccount {
    display: none;
  }
}
.loginEnterprise{width:min(455px,100%);padding:34px;text-align:center;border-color:#344b66;background:linear-gradient(145deg,#06152aee,#071326ee);box-shadow:inset 0 0 28px #061b35,0 24px 70px rgba(0,0,0,.32)}
.loginEnterpriseLogo{width:120px;height:120px;object-fit:contain;filter:drop-shadow(0 0 13px #0bf) drop-shadow(0 0 10px #f0c)}
.loginEnterprise h1{margin:10px 0 4px;font-size:30px}.loginEnterpriseForm{margin-top:24px;text-align:left}.loginEnterpriseForm>.pill{float:right}.loginEnterpriseForm>.muted{padding-top:32px}
.loginEnterprise .formgrid{grid-template-columns:1fr}.loginEnterprise .formgrid label{display:grid;gap:6px}.loginEnterprise .formgrid button{grid-column:1}

/* Pixel-near dashboard geometry measured from the approved 1672x941 master.
   Data values remain live; only the visual geometry is fixed. */
@media (min-width: 1101px) {
  [data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .pageCanvas {
    padding: 38px 35px 48px 28px;
  }
  .dashboardReference {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .dashboardReferenceHead {
    margin-bottom: 18px;
  }
  .dashboardReferenceHead h1 {
    line-height: 1.12;
  }
  .dashboardDate {
    width: 229px;
    min-width: 229px;
    min-height: 50px;
    margin-top: 4px;
    padding: 14px 15px;
  }
  .dashboardMetrics {
    gap: 20px;
    margin-bottom: 18px;
  }
  .dashboardMetric {
    position: relative;
    height: 120px;
    min-height: 120px;
    padding: 18px 20px;
    overflow: hidden;
  }
  .dashboardMetric b {
    margin-top: 4px;
    font-size: 32px;
    line-height: 1.12;
  }
  .dashboardMetric small {
    display: block;
    margin-top: 6px;
    max-width: 68%;
    line-height: 1.25;
  }
  .dashboardMetricIcon {
    position: absolute;
    top: 30px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 49px;
    height: 49px;
    color: #50c6ff;
    filter: drop-shadow(0 0 7px rgba(45,175,255,.7));
  }
  .dashboardMetricIcon svg {
    width: 100%;
    height: 100%;
  }
  .metricPurple .dashboardMetricIcon {
    color: #bc79ff;
    filter: drop-shadow(0 0 7px rgba(181,94,255,.72));
  }
  .metricPink .dashboardMetricIcon {
    color: #ff5db8;
    filter: drop-shadow(0 0 7px rgba(255,72,177,.72));
  }
  .dashboardMainGrid {
    grid-template-columns: minmax(0,1.36fr) minmax(0,1fr) minmax(0,1.37fr);
    gap: 18px 20px;
  }
  .dashboardPanel {
    padding: 20px;
  }
  .dashboardTrend,
  .dashboardStatus,
  .dashboardActivity {
    height: 312px;
    min-height: 312px;
    overflow: hidden;
  }
  .dashboardAi,
  .dashboardCategories,
  .dashboardActions {
    height: 286px;
    min-height: 286px;
    overflow: hidden;
  }
  .dashboardChart {
    min-height: 236px;
    padding-top: 0;
    overflow: hidden;
  }
  .dashboardTrendSvg {
    display: block;
    width: 100%;
    height: 226px;
    overflow: visible;
  }
  .dashboardTrendSvg .gridLines {
    fill: none;
    stroke: rgba(80,112,153,.2);
    stroke-width: 1;
  }
  .dashboardTrendSvg .trendArea {
    fill: rgba(42,140,255,.08);
    stroke: none;
  }
  .dashboardTrendSvg > polyline {
    fill: none;
    stroke: #55b9ff;
    stroke-width: 2.2;
    filter: drop-shadow(0 0 6px rgba(53,174,255,.85));
  }
  .dashboardTrendSvg .trendPoints {
    fill: #eef8ff;
    stroke: #39a9ff;
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(53,174,255,.9));
  }
  .dashboardTrendSvg .trendLabels {
    fill: #7f91aa;
    font-size: 10px;
  }
  .dashboardTrendSvg .trendLabels .end {
    text-anchor: end;
  }
  .dashboardTrendEmpty {
    display: grid;
    place-items: center;
    height: 220px;
    color: #8094ad;
    font-size: 12px;
  }
  .dashboardStatusBody {
    display: grid;
    grid-template-columns: minmax(154px,1fr) minmax(105px,.72fr);
    gap: 10px;
    align-items: center;
    min-height: 230px;
  }
  .dashboardDonut {
    width: 184px;
    height: 184px;
    margin: 0 auto;
  }
  .dashboardDonut:after {
    width: 112px;
    height: 112px;
  }
  .dashboardLegend {
    margin-top: 0;
  }
  .dashboardActivityItem {
    min-height: 42px;
    margin: 2px 0;
    padding: 3px 9px;
  }
  .dashboardActivityItem b,
  .dashboardActivityItem small {
    line-height: 1.2;
  }
  .dashboardInsight {
    margin-top: 12px;
    padding: 13px 16px;
  }
  .dashboardInsight p {
    margin: 6px 0;
  }
  .dashboardCategory {
    margin-top: 9px;
  }
  .dashboardCategory i {
    background: linear-gradient(90deg,#43b5ff var(--fill),#14263e var(--fill));
  }
  .dashboardCategory.categoryPurple i {
    background: linear-gradient(90deg,#ad58ef var(--fill),#14263e var(--fill));
  }
  .dashboardCategory.categoryGreen i {
    background: linear-gradient(90deg,#55e8a5 var(--fill),#14263e var(--fill));
  }
  .dashboardCategory.categoryPink i {
    background: linear-gradient(90deg,#ee4baa var(--fill),#14263e var(--fill));
  }
  .dashboardCategory.categoryCyan i {
    background: linear-gradient(90deg,#58c8ff var(--fill),#14263e var(--fill));
  }
  .dashboardActionGrid {
    gap: 15px;
    margin-top: 15px;
  }
  .dashboardActionGrid a {
    min-height: 90px;
  }
  .dashboardActionGrid svg {
    width: 39px;
    height: 39px;
    filter: drop-shadow(0 0 7px currentColor);
  }
}

/* Canonical mobile shell. Both columns must collapse together; otherwise
   enterpriseMain keeps desktop column 2 and pushes every page off-screen. */
[data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .pageHeading {
  display: none;
}
[data-shell='norscode-enterprise-v1'] .enterpriseNav a.active {
  border-color: transparent;
  background:
    linear-gradient(90deg,rgba(36,89,198,.78),rgba(37,59,133,.78)) padding-box,
    linear-gradient(90deg,#54a7ff,#4f78ff 52%,#e14ae8) border-box;
  box-shadow: 0 0 14px rgba(57,120,255,.34), inset 0 0 16px rgba(70,117,255,.18);
}
[data-shell='norscode-enterprise-v1'] .enterpriseNav a.active .navIcon {
  color: #b995ff;
  filter: drop-shadow(0 0 5px rgba(163,113,255,.65));
}
@media (max-width: 920px) {
  .loginEnterprise{padding:22px}.loginEnterpriseLogo{width:92px;height:92px}
  [data-shell='norscode-enterprise-v1'] .enterpriseShell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseSidebar,
  [data-shell='norscode-enterprise-v1'] .enterpriseMain {
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseSidebar {
    position: static;
    height: auto;
    padding: 14px 12px 10px;
    overflow: visible;
  }
  [data-shell='norscode-enterprise-v1'] .brandBlock {
    display: flex;
    padding: 0 2px 12px;
    border-bottom: 1px solid rgba(88,116,148,.2);
  }
  [data-shell='norscode-enterprise-v1'] .brand {
    display: flex;
    gap: 10px;
  }
  [data-shell='norscode-enterprise-v1'] .brandLogo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
  }
  [data-shell='norscode-enterprise-v1'] .brand b {
    font-size: 16px;
  }
  [data-shell='norscode-enterprise-v1'] .brand small {
    display: none;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav {
    display: block;
    padding: 10px 0 4px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navGroup {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navPrimary {
    padding-bottom: 8px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navSecondary {
    padding-top: 8px;
    border-top: 1px solid rgba(88,116,148,.2);
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a {
    min-width: 0;
    min-height: 38px;
    padding: 8px 8px 8px 34px;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a:before {
    display: none;
  }
  [data-shell='norscode-enterprise-v1'] .navIcon {
    position: absolute;
    left: 10px;
    width: 18px;
    height: 18px;
    color: #8190a5;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a.active .navIcon {
    color: #f5f8ff;
  }
  [data-shell='norscode-enterprise-v1'] .pageCanvas {
    width: 100%;
    min-width: 0;
    padding: 16px 12px 30px;
  }
  [data-shell='norscode-enterprise-v1'] .sectionTitle {
    flex-wrap: wrap;
  }
  [data-shell='norscode-enterprise-v1'] .sectionTitle > * {
    min-width: 0;
  }
  [data-shell='norscode-enterprise-v1'] .sectionTitle > .btn {
    max-width: 100%;
  }
}
@media (max-width: 1100px) {
  .dashboardMetric {
    position: relative;
    min-height: 121px;
    overflow: hidden;
  }
  .dashboardMetric small {
    display: block;
    max-width: 72%;
  }
  .dashboardMetricIcon {
    position: absolute;
    top: 28px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #50c6ff;
    filter: drop-shadow(0 0 7px rgba(45,175,255,.7));
  }
  .dashboardMetricIcon svg,
  .dashboardActionGrid svg {
    width: 100%;
    height: 100%;
  }
  .metricPurple .dashboardMetricIcon {
    color: #bc79ff;
  }
  .metricPink .dashboardMetricIcon {
    color: #ff5db8;
  }
  .dashboardActionGrid svg {
    width: 34px;
    height: 34px;
  }
}
.serviceStatusList b { font-size:14px; }
.serviceStatusList small { color:var(--muted);font-size:11px; }
.serviceDot { width:9px;height:9px;border-radius:50%;background:var(--mint);box-shadow:0 0 14px rgba(76,230,165,.55); }
@media (max-width: 1100px) {
  .publicIntakeGrid { grid-template-columns:1fr; }
  .publicEmailPanel .formgrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .publicEmailPanel .formgrid { grid-template-columns:1fr; }
  .serviceStatusList article { grid-template-columns:10px minmax(0,1fr); }
  .serviceStatusList article > .pill { grid-column:2;justify-self:start; }
}
@media (max-width: 920px) {
  .sideLanguage { display:block;margin-top:12px;padding:12px 6px 0;border-top:1px solid rgba(88,116,148,.2); }
  .sideLanguage .languageSwitcher { width:100%; }
  .sideLanguage .languageSwitcher label { flex:1;min-width:0; }
  .sideLanguage .languageSwitcher select { width:100%;max-width:none; }
  .sideLanguage .languageSwitcher .btn { flex:0 0 auto;width:auto;min-width:48px; }
}

/* Approved 1672x941 enterprise shell. These final rules mirror the locked
   design catalog and deliberately win over the retired shell iterations
   above. Route content remains live and access controlled. */
@media (min-width: 921px) {
  [data-shell='norscode-enterprise-v1'] body {
    background:radial-gradient(circle at 62% 48%,#071b36 0,#031226 42%,#010815 100%);
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseShell {
    width:100%;
    min-height:100vh;
    display:grid;
    grid-template-columns:232px minmax(0,1fr);
    border:1px solid var(--line);
    background:var(--shell-bg);
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseShell.publicShell {
    grid-template-columns:minmax(0,1fr);
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseSidebar {
    position:relative;
    width:232px;
    min-height:100vh;
    padding:28px 15px 20px;
    border-right:1px solid #42526a;
    background:linear-gradient(180deg,#020716,#041126);
    box-shadow:none;
  }
  [data-shell='norscode-enterprise-v1'] .brandBlock {
    margin:0 0 25px;
    padding:0;
    border:0;
    text-align:center;
  }
  [data-shell='norscode-enterprise-v1'] .brand {
    display:block;
    color:#f4f7ff;
    text-decoration:none;
  }
  [data-shell='norscode-enterprise-v1'] .brandLogo {
    display:block;
    width:135px;
    height:135px;
    margin:0 auto;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
  [data-shell='norscode-enterprise-v1'] .brandLogoImage {
    width:135px;
    height:135px;
    object-fit:contain;
    transform:none;
    filter:drop-shadow(0 0 12px #0bf) drop-shadow(0 0 13px #f0c);
  }
  [data-shell='norscode-enterprise-v1'] .brand span:last-child {
    display:block;
  }
  [data-shell='norscode-enterprise-v1'] .brand b {
    display:block;
    margin-top:8px;
    font-size:19px;
    line-height:1.2;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav {
    display:flex;
    flex-direction:column;
    gap:0;
    padding:0;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navGroup {
    display:flex;
    flex-direction:column;
    gap:7px;
    padding:0;
    border:0;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav .navSecondary {
    margin-top:17px;
    padding-top:17px;
    border-top:1px solid #526076;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a {
    position:relative;
    display:flex;
    align-items:center;
    gap:14px;
    width:100%;
    min-height:49px;
    padding:0 16px 0 52px;
    border:1px solid transparent;
    border-radius:9px;
    color:#c9d1df;
    font-size:15px;
    font-weight:400;
    text-decoration:none;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseNav a.active {
    color:#fff;
    border-color:#a73fff;
    background:linear-gradient(90deg,#113c86aa,#64126188);
    box-shadow:0 0 14px #087cff88,0 0 16px #f21cff66;
  }
  [data-shell='norscode-enterprise-v1'] .navIcon {
    position:absolute;
    left:16px;
    width:22px;
    height:22px;
    color:currentColor;
  }
  [data-shell='norscode-enterprise-v1'] .shellFooter {
    position:absolute;
    right:15px;
    bottom:24px;
    left:15px;
    color:#8290a4;
    font-size:12px;
    text-align:center;
  }
  [data-shell='norscode-enterprise-v1'] .shellFooter i {
    display:inline-block;
    width:6px;
    height:6px;
    border-radius:50%;
    background:#57e7ad;
  }
  [data-shell='norscode-enterprise-v1'] .enterpriseMain,
  [data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) {
    min-width:0;
    padding:34px 34px 28px 28px;
    overflow:hidden;
  }
  [data-shell='norscode-enterprise-v1'] .commandBar,
  [data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .commandBar {
    position:static;
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    width:100%;
    height:auto;
    min-height:52px;
    margin:0;
    padding:9px 0;
    border:0;
    background:transparent;
    backdrop-filter:none;
  }
  [data-shell='norscode-enterprise-v1'] .commandBar .title {
    display:block;
  }
  [data-shell='norscode-enterprise-v1'] .commandBar .title h1 {
    margin:0;
    color:var(--text);
    font-size:16px;
    line-height:1.2;
    letter-spacing:-.01em;
  }
  [data-shell='norscode-enterprise-v1'] .commandBar .title p {
    display:none;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions {
    display:flex;
    align-items:center;
    gap:10px;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions a,
  [data-shell='norscode-enterprise-v1'] .commandActions .btn,
  [data-shell='norscode-enterprise-v1'] .commandActions .input {
    display:flex;
    align-items:center;
    gap:9px;
    min-height:34px;
    height:34px;
    padding:0 12px;
    border:1px solid #344861;
    border-radius:8px;
    background:var(--surface-2);
    color:#e9effa;
    font-size:12.5px;
    text-decoration:none;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions .input {
    width:250px;
    color:#8997aa;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions .notificationButton {
    width:34px;
    justify-content:center;
    padding:0;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions .commandPrimary {
    border-color:transparent;
    background:linear-gradient(135deg,var(--cyan),var(--blue));
    color:#04121a;
    font-weight:700;
    box-shadow:none;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions .languageSwitcher {
    min-height:34px;
  }
  [data-shell='norscode-enterprise-v1'] .commandActions .languageSwitcher select,
  [data-shell='norscode-enterprise-v1'] .commandActions .languageSwitcher .btn {
    min-height:34px;
  }
  [data-shell='norscode-enterprise-v1'] .languageMenu {
    position:relative;
  }
  [data-shell='norscode-enterprise-v1'] .languageMenu summary {
    min-width:80px;
    list-style:none;
    cursor:pointer;
  }
  [data-shell='norscode-enterprise-v1'] .languageMenu summary::-webkit-details-marker {
    display:none;
  }
  [data-shell='norscode-enterprise-v1'] .languageMenu > div {
    position:absolute;
    z-index:30;
    top:50px;
    right:0;
    display:grid;
    width:150px;
    padding:6px;
    border:1px solid #344861;
    border-radius:8px;
    background:var(--surface-2);
    box-shadow:0 18px 45px rgba(0,0,0,.45);
  }
  [data-shell='norscode-enterprise-v1'] .languageMenu > div a {
    min-height:34px;
    padding:8px 10px;
    border:0;
    background:transparent;
  }
  [data-shell='norscode-enterprise-v1'] .pageCanvas,
  [data-shell='norscode-enterprise-v1'] .enterpriseMain:has(.dashboardReference) .pageCanvas,
  [data-shell='norscode-enterprise-v1'] .publicShell:has(.loginEnterprise) .pageCanvas {
    width:100%;
    max-width:none;
    min-height:0;
    padding:0;
  }
  [data-shell='norscode-enterprise-v1'] .dashboardReference {
    width:100%;
    max-width:none;
    margin:0;
  }
  [data-shell='norscode-enterprise-v1'] .dashboardMetrics {
    margin:23px 0 18px;
  }
  [data-shell='norscode-enterprise-v1'] .publicShell .enterpriseMain {
    grid-column:1;
  }
  [data-shell='norscode-enterprise-v1'] .publicShell .pageCanvas {
    height:100%;
  }
  [data-shell='norscode-enterprise-v1'] .loginHero {
    width:100%;
    height:100%;
    display:grid;
    place-items:center;
    text-align:center;
  }
  [data-shell='norscode-enterprise-v1'] .loginEnterprise {
    width:455px;
    height:575px;
    min-height:575px;
    padding:34px;
  }
  [data-shell='norscode-enterprise-v1'] .loginEnterprise h1 {
    margin:22px 0 20px;
    font-size:30px;
  }
  [data-shell='norscode-enterprise-v1'] .loginEnterpriseForm {
    margin-top:25px;
  }
  [data-shell='norscode-enterprise-v1'] .loginPrimaryForm .formgrid {
    grid-template-columns:1fr;
    gap:10px;
  }
  [data-shell='norscode-enterprise-v1'] .loginPrimaryForm label {
    display:grid;
    gap:7px;
    color:#afbbcb;
    font-size:13px;
    text-align:left;
  }
  [data-shell='norscode-enterprise-v1'] .loginPrimaryForm input {
    height:45px;
  }
  [data-shell='norscode-enterprise-v1'] .loginPrimaryForm button {
    width:100%;
    min-height:45px;
    margin-top:10px;
    justify-content:center;
  }
  [data-shell='norscode-enterprise-v1'] .loginRecovery {
    display:block;
    margin-top:15px;
    color:#54caff;
    text-align:center;
    text-decoration:none;
  }
  [data-shell='norscode-enterprise-v1'] .accountReference {
    display:grid;
    grid-template-columns:340px minmax(0,1fr);
    gap:18px;
    margin-top:25px;
  }
  [data-shell='norscode-enterprise-v1'] .accountReference > .panel {
    min-height:470px;
    padding:16px;
    overflow:visible;
  }
  [data-shell='norscode-enterprise-v1'] .accountProfilePanel .profile {
    display:flex;
    align-items:center;
    gap:15px;
  }
  [data-shell='norscode-enterprise-v1'] .accountProfilePanel .profile h2 {
    margin:0 0 8px;
  }
  [data-shell='norscode-enterprise-v1'] .accountProfilePanel .avatar {
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border:1px solid #5c7cff;
    border-radius:50%;
    background:#18345f;
  }
  [data-shell='norscode-enterprise-v1'] .accountSectionNav {
    display:grid;
    gap:8px;
    margin-top:18px;
  }
  [data-shell='norscode-enterprise-v1'] .accountSectionNav a {
    min-height:61px;
    display:flex;
    align-items:center;
    padding:10px 12px;
    border:1px solid #263d57;
    border-radius:8px;
    background:var(--surface-2);
    color:#e9effa;
    text-decoration:none;
  }
  [data-shell='norscode-enterprise-v1'] .accountSectionNav a.active {
    width:max-content;
    min-width:150px;
    color:#54caff;
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguagePanel h2 {
    margin:0 0 14px;
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguagePanel > p {
    margin:0 0 15px;
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguageGrid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguageItem {
    min-height:61px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 12px;
    border:1px solid #263d57;
    border-radius:8px;
    background:var(--surface-2);
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguageItem strong,
  [data-shell='norscode-enterprise-v1'] .accountLanguageItem small {
    display:block;
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguageItem small {
    color:#95a3b7;
  }
  [data-shell='norscode-enterprise-v1'] .accountLanguageItem button {
    cursor:pointer;
  }
}

/* ===== Tilgangseditor (per bruker, avkrysninger) ===== */
.accessPicker { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.accessPicker label { flex:1; min-width:220px; }
.accessPicker .btn { flex:0 0 auto; }
.accessEditor .panelHead h2 { margin-top:2px; }
.accessSection { margin:16px 0; }
.accessSection > .eyebrow { display:block; margin-bottom:9px; }
.accessGrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.accessGrid label.accessOption {
  display:flex; align-items:center; gap:11px;
  margin:0; padding:13px 14px;
  border:1px solid var(--line-bright); border-radius:11px;
  background:var(--surface); color:var(--text);
  font-size:13px; font-weight:650; cursor:pointer;
  transition:border-color .14s ease, background .14s ease;
}
.accessGrid label.accessOption:hover { border-color:var(--cyan); background:rgba(53,216,255,.04); }
.accessGrid label.accessOption input { flex:0 0 auto; width:18px; height:18px; margin:0; accent-color:var(--cyan); cursor:pointer; }
.accessGrid label.accessOption input:checked ~ span { color:var(--text); }
.accessEditor .heroActions { margin-top:18px; display:flex; gap:10px; }
@media (max-width:640px){ .accessGrid { grid-template-columns:1fr; } }

/* Tilgangseditor: seksjonshode med status-pille */
.accessSectionHead { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.accessSectionHead > .eyebrow { display:inline; margin:0; }
.accessEditor .accessSection { margin:18px 0; }

/* ===== B-skall: modul-skinne + kontekstmeny (standard desktop-layout) ===== */
.navSplit { display: none; }
.railLogo { width:38px; height:38px; border-radius:10px; overflow:hidden; border:1px solid rgba(53,216,255,.36); margin-bottom:8px; display:block; box-shadow:0 0 22px rgba(53,216,255,.12); }
.railLogo img { display:block; width:100%; height:100%; object-fit:contain; transform:scale(1.3); }
.railItem { width:56px; display:flex; flex-direction:column; align-items:center; gap:5px; padding:9px 0; border-radius:12px; color:#8b9aaf; font-size:9.5px; font-weight:600; border:1px solid transparent; text-align:center; text-decoration:none; }
.shellB .navRail .navIcon { position:static; left:auto; top:auto; width:22px; height:22px; flex:0 0 auto; margin:0; }
.railItem span { line-height:1.1; }
.railItem:hover { color:#e8eef6; background:rgba(255,255,255,.03); }
.railItem.on { color:var(--cyan); background:rgba(53,216,255,.12); border-color:rgba(53,216,255,.3); }
.railItem.on .navIcon { color:var(--cyan); }
.railSpacer { flex:1; }
.railAccount { width:34px; height:34px; border-radius:50%; background:#111a27; border:1px solid var(--line); padding:0; }
.navSub .subTitle { font-size:16px; font-weight:800; padding:2px 8px 12px; border-bottom:1px solid var(--line); margin-bottom:8px; letter-spacing:-.01em; }
.navSub .subItem { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 11px; border-radius:9px; color:#a7b4c6; font-size:13.5px; text-decoration:none; }
.navSub .subItem + .subItem { margin-top:2px; }
.navSub .subItem.on { color:#fff; background:linear-gradient(90deg,rgba(53,216,255,.14),rgba(57,120,255,.045)); box-shadow:inset 3px 0 var(--cyan); }
.navSub .subItem:hover { color:#fff; background:rgba(255,255,255,.04); }
.navSub .navBadge { flex:0 0 auto; padding:1px 7px; border-radius:20px; background:var(--surface-3); color:var(--muted); font-size:10.5px; font-weight:800; border:1px solid var(--line); font-variant-numeric:tabular-nums; }
.navSub .subFoot { margin-top:auto; color:var(--muted); font-size:11px; display:flex; align-items:center; gap:7px; padding:12px 8px 2px; border-top:1px solid var(--line); }
.navSub .subFoot i { width:8px; height:8px; border-radius:50%; background:var(--mint); box-shadow:0 0 10px rgba(76,230,165,.6); }

@media (min-width: 921px) {
  .shellB.layout { grid-template-columns: 288px minmax(0, 1fr); }
  .shellB .brandBlock, .shellB .navFlat, .shellB .shellFooter { display: none; }
  .shellB .side.enterpriseSidebar { padding: 0; overflow: hidden; }
  .shellB .navSplit { display: flex; height: 100vh; }
  .shellB .navRail { flex:0 0 64px; width:64px; height:100vh; overflow-y:auto; border-right:1px solid var(--line); background:#070b12; display:flex; flex-direction:column; align-items:center; padding:14px 0; gap:6px; scrollbar-width:none; }
  .shellB .navRail::-webkit-scrollbar { display:none; }
  .shellB .navSub { flex:1; min-width:0; height:100vh; overflow-y:auto; padding:16px 12px; display:flex; flex-direction:column; background:var(--sidebar); }
}

/* ===== Admin-side: snarvei-kort + gruppe-chips ===== */
.chips { display:flex; flex-wrap:wrap; gap:5px; }
.chip { padding:2px 8px; border:1px solid var(--line-bright); border-radius:6px; color:var(--muted); font-size:11px; white-space:nowrap; }
.chip.muted { opacity:.7; }
.shortcutGrid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.shortcutCard { display:flex; flex-direction:column; gap:6px; padding:15px; border:1px solid var(--line); border-radius:12px; background:var(--surface); text-decoration:none; color:var(--text); transition:border-color .14s ease, background .14s ease; }
.shortcutCard:hover { border-color:var(--cyan); background:rgba(53,216,255,.04); }
.shortcutCard .ic { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; background:rgba(53,216,255,.1); color:var(--cyan); margin-bottom:2px; }
.shortcutCard .ic svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.8; }
.shortcutCard b { font-size:13px; }
.shortcutCard small { color:var(--muted); font-size:11px; }
@media (max-width:1100px) { .shortcutGrid { grid-template-columns:repeat(2,1fr); } }

/* Destruktiv handling (skjermet verv-bytte) */
.btn.danger { border-color: rgba(255,102,127,.45); background: rgba(255,102,127,.1); color: #ff9fb0; box-shadow: none; }
.btn.danger:hover { background: rgba(255,102,127,.16); border-color: rgba(255,102,127,.6); }

/* ===== Raffinert tett — global forfining (låst designretning) ===== */
.table td, .table th, .metric b { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: 0; }
.pill { border-radius: 7px; }
.table td { padding-top: 10px; padding-bottom: 10px; }
.table th { letter-spacing: .07em; }

/* ===== Raffinert tett — komponenter (KPI-stripe, tett tabell, mono, funksjonell farge) ===== */
.rt-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface-2)}
.rt-kpis .k{padding:13px 16px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
.rt-kpis .k:last-child{border-right:0}
.rt-kpis .k .l{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.rt-kpis .k .v{font-size:21px;font-weight:750;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.rt-kpis .k .d{color:var(--muted);font-size:11px}
.rt-kpis .k.accent{background:linear-gradient(180deg,rgba(53,216,255,.07),transparent)}
.rt-kpis .k.accent .v{color:var(--cyan)}
@media(max-width:1100px){.rt-kpis{grid-template-columns:repeat(3,1fr)}.rt-kpis .k:nth-child(3n){border-right:0}}
.rt-cols{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;margin-top:14px;align-items:start}
@media(max-width:1000px){.rt-cols{grid-template-columns:1fr}}
.rt-stack{display:flex;flex-direction:column;gap:14px;min-width:0}
.rt-panel{border:1px solid var(--line);border-radius:11px;background:var(--surface-2);overflow:hidden}
.rt-ph{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-bottom:1px solid var(--line)}
.rt-ph .ey{color:var(--cyan);font-size:9px;font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.rt-ph h2{margin:1px 0 0;font-size:14px;font-weight:700}
.rt-table{width:100%;border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums}
.rt-table th{text-align:left;background:var(--surface-3);color:#718197;font-size:9.5px;font-weight:850;letter-spacing:.07em;text-transform:uppercase;padding:8px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
.rt-table td{padding:9px 14px;border-bottom:1px solid var(--line);font-size:12.5px}
.rt-table tr:last-child td{border-bottom:0}
.rt-table tbody tr:hover td{background:rgba(53,216,255,.03)}
.rt-id{font-family:ui-monospace,"SF Mono",Menlo,monospace;font-size:11.5px;color:var(--text)}
.rt-role{padding:2px 8px;border-radius:6px;font-size:11px;font-weight:700}
.rt-role.admin{background:rgba(53,216,255,.14);color:var(--cyan)}
.rt-role.agent{background:rgba(76,230,165,.14);color:var(--mint)}
.rt-role.trust{background:rgba(240,74,221,.14);color:var(--pink)}
.rt-role.customer{background:rgba(255,205,98,.14);color:var(--warn)}
.rt-port{font-family:ui-monospace,"SF Mono",Menlo,monospace;font-size:11px;color:var(--mint);background:rgba(76,230,165,.08);border:1px solid rgba(76,230,165,.22);border-radius:5px;padding:1px 7px}
.rt-form{padding:13px}
.rt-form label{display:block;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;margin:0 0 5px}
.rt-form .fld{margin-bottom:11px}
.rt-form select,.rt-form input{width:100%;height:34px;padding:0 10px;border:1px solid var(--line-bright);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:12.5px}
.rt-form .go{width:100%;height:36px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:linear-gradient(135deg,var(--cyan),#5d8cff);color:#031018;font-weight:850;font-size:12.5px;border:0;cursor:pointer}
.rt-scs{padding:6px}
.rt-sc{display:flex;align-items:center;gap:10px;padding:8px 9px;border-radius:8px;color:var(--text-2,#aeb9c9)}
.rt-sc:hover{background:rgba(255,255,255,.03)}
.rt-sc .ic{width:26px;height:26px;border-radius:7px;display:grid;place-items:center;background:rgba(53,216,255,.1);color:var(--cyan);flex:0 0 26px}
.rt-sc .ic svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8}
.rt-sc b{font-size:12.5px;font-weight:600}
.rt-sc .ch{margin-left:auto;color:#4e5c70}

/* ================= Raffinert tett — GLOBAL skall-forfining ================= */
/* Dypere, kjøligere palett (kun standard/dagens-tema; rolig/lys uendret) */
:root{
  --bg:#04060a; --surface:#090d14; --surface-2:#0b0f18; --surface-3:#111827;
  --line:#1b2431; --line-bright:#2a3646; --muted:#74839a;
}
body{ background: radial-gradient(circle at 78% -12%, rgba(40,110,200,.09), transparent 32rem), var(--bg); }

/* Kompakt kommandolinje (topbar) på alle innloggede sider */
.enterpriseMain .top.commandBar{ padding:10px 20px; gap:11px; }
.enterpriseMain .top .title h1{ font-size:17px; letter-spacing:-.01em; }
.enterpriseMain .top .title p{ font-size:12px; margin-top:1px; }
.commandActions{ gap:8px; }
.commandActions .input{ min-height:32px; height:32px; padding:0 11px; font-size:12.5px; border-radius:8px; }
.commandActions .btn, .commandActions a.btn{ min-height:32px; height:32px; padding:0 12px; font-size:12.5px; border-radius:8px; }
.commandActions .notificationButton{ width:32px; padding:0; }
.accountMenu .accountName{ font-size:12.5px; } .accountMenu .accountRole{ font-size:10.5px; }
.pageCanvas{ padding:16px 20px; }

/* Tette tabeller globalt (data-verktøy-følelse) */
.table td{ padding:9px 12px; font-size:12.5px; }
.table th{ padding:8px 12px; font-size:9.5px; letter-spacing:.07em; }
.table tr:hover td{ background:rgba(63,215,255,.03); }

/* Tette skjemakontroller */
.form input, .form select{ height:34px; padding:6px 10px; font-size:12.5px; border-radius:8px; }
.form textarea{ padding:8px 10px; font-size:12.5px; border-radius:8px; }
.form label{ font-size:10.5px; letter-spacing:.02em; }

/* Metrikk-kort strammere */
.metric{ padding:15px 16px; }
.metric span{ font-size:11px; }
.metric b{ font-size:20px; }

/* Piller/knapper strammere */
.pill{ border-radius:6px; padding:3px 8px; font-size:11px; }
.btn{ min-height:36px; border-radius:9px; }

/* ===== Raffinert tett — Saker (operativ arbeidsflate) ===== */
.rtSaker{ display:flex; flex-direction:column; }
.rtSaker .kpis{ display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); border-bottom:1px solid var(--line); background:var(--surface); }
.rtSaker .kpi .v.mint{ color:var(--mint); }
.rtSaker .chipf{ display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 11px; border:1px dashed var(--line-bright); border-radius:8px; color:var(--text-2,#aeb9c9); font-size:12px; }
.rtSaker .kpi{ padding:13px 18px; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:4px; }
.rtSaker .kpi:last-child{ border-right:0; }
.rtSaker .kpi .l{ color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.rtSaker .kpi .v{ font-size:22px; font-weight:750; letter-spacing:-.02em; font-variant-numeric:tabular-nums; color:var(--text); }
.rtSaker .kpi .v.amber{ color:var(--warn); }
.rtSaker .kpi.accent{ background:linear-gradient(180deg, rgba(53,216,255,.06), transparent); }
.rtSaker .kpi.accent .v{ color:var(--cyan); }
.rtSaker .toolbar{ display:flex; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.rtSaker .toolbar .eyebrow{ color:var(--pink); font-size:9.5px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.rtSaker .toolbar .sp{ flex:1; }
.rtSaker .toolbar .meta{ color:var(--muted); font-size:11.5px; font-variant-numeric:tabular-nums; }
.rtSaker .seg{ display:flex; border:1px solid var(--line-bright); border-radius:8px; overflow:hidden; background:var(--surface); }
.rtSaker .segItem{ padding:6px 12px; font-size:12px; font-weight:600; color:var(--muted); border-right:1px solid var(--line-bright); }
.rtSaker .segItem:last-child{ border-right:0; }
.rtSaker .segItem.on{ color:var(--text); background:rgba(53,216,255,.12); box-shadow:inset 0 -2px var(--cyan); }
.rtSaker .tablewrap{ overflow:auto; }
.rtSaker .rtTable{ width:100%; border-collapse:separate; border-spacing:0; font-variant-numeric:tabular-nums; }
.rtSaker .rtTable thead th{ position:sticky; top:0; background:var(--surface-3); color:var(--muted); font-size:9.5px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; text-align:left; padding:9px 14px; border-bottom:1px solid var(--line-bright); white-space:nowrap; z-index:1; }
.rtSaker .rtTable tbody td{ padding:9px 14px; border-bottom:1px solid var(--line); font-size:12.5px; white-space:nowrap; vertical-align:middle; }
.rtSaker .rtTable tbody tr:hover td{ background:rgba(53,216,255,.03); }
.rtSaker .cChk{ width:26px; }
.rtSaker .chk{ width:15px; height:15px; border:1px solid var(--line-bright); border-radius:4px; display:inline-block; vertical-align:middle; }
.rtSaker .id a{ font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:11.5px; color:var(--text-2,#aeb9c9); }
.rtSaker .id a:hover{ color:var(--cyan); }
.rtSaker .subj a{ color:var(--text); font-weight:550; max-width:340px; overflow:hidden; text-overflow:ellipsis; display:inline-block; vertical-align:bottom; }
.rtSaker .subj a:hover{ color:var(--cyan); }
.rtSaker .dim{ color:var(--muted); }
.rtSaker .dot{ width:7px; height:7px; border-radius:50%; display:inline-block; margin-right:8px; vertical-align:middle; }
.rtSaker .p-high{ background:var(--red); box-shadow:0 0 7px rgba(255,97,120,.55); }
.rtSaker .p-med{ background:var(--warn); }
.rtSaker .p-low{ background:var(--blue); }
.rtSaker .qbadge{ font-size:10.5px; color:var(--muted); border:1px solid var(--line-bright); border-radius:6px; padding:1px 7px; }
.rtSaker .ava{ width:21px; height:21px; border-radius:50%; background:var(--surface-3); border:1px solid var(--line-bright); display:inline-flex; align-items:center; justify-content:center; font-size:9px; font-weight:800; color:var(--muted); vertical-align:middle; }
.rtSaker .sla{ font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:11.5px; }
.rtSaker .sla.ok{ color:var(--mint); }
.rtSaker .sla.warn{ color:var(--warn); }
.rtSaker .sla.crit{ color:var(--red); }
.rtSaker .sla.done{ color:var(--muted); }
.rtSaker .prioTxt{ font-size:12px; }
/* Inline pille-editor (uten JS: <details> utvider seg i cellen) */
.rtSaker .rtInline{ display:inline-block; }
.rtSaker .rtInline summary{ list-style:none; cursor:pointer; display:inline-flex; align-items:center; }
.rtSaker .rtInline summary::-webkit-details-marker{ display:none; }
.rtSaker .rtInline summary::marker{ content:""; }
.rtSaker .rtInline[open] summary{ opacity:.6; }
.rtSaker .rtMenu{ display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; max-width:236px; }
.rtSaker .rtMenu .opt{ font-size:11px; font-weight:600; color:var(--text-2,#c7d0dd); background:var(--surface-3); border:1px solid var(--line-bright); border-radius:6px; padding:3px 9px; cursor:pointer; }
.rtSaker .rtMenu .opt:hover{ border-color:var(--cyan); color:var(--cyan); }
.rtSaker .rtMenu .opt.on{ background:rgba(53,216,255,.14); border-color:transparent; color:var(--cyan); }

/* Saker full-bleed: fjern polstret/sentrert canvas så den tette layouten går kant-til-kant (som godkjent mock) */
.enterpriseMain:has(.rtSaker) .pageCanvas{ width:100%; max-width:none; padding:0; }
.enterpriseMain:has(.rtSaker) .commandBar{ min-height:52px; }
.enterpriseMain:has(.rtSaker) .pageCanvas > .updateBanner{ margin:10px 18px 0; }
.rtSaker .tablewrap{ max-height:calc(100vh - 210px); }

/* Saker: slank kommandolinje (matcher mock-ens presise data-verktøy-topp) */
.enterpriseMain:has(.rtSaker) .commandBar{ min-height:52px; padding:9px 18px; }
.enterpriseMain:has(.rtSaker) .commandBar .title h1{ font-size:15.5px; line-height:1.15; font-weight:700; }
.enterpriseMain:has(.rtSaker) .commandBar .title p{ display:none; }
.enterpriseMain:has(.rtSaker) .commandActions{ gap:9px; }
.enterpriseMain:has(.rtSaker) .commandActions .input{ height:32px; min-width:230px; font-size:12.5px; padding:0 12px; }
.enterpriseMain:has(.rtSaker) .commandActions .btn{ min-height:32px; height:32px; border-radius:8px; }
.enterpriseMain:has(.rtSaker) .commandPrimary{ font-size:12.5px; padding:0 13px; box-shadow:none; }
.enterpriseMain:has(.rtSaker) .notificationButton{ padding:0 9px; font-size:13px; }
.enterpriseMain:has(.rtSaker) .accountMenu{ gap:8px; }
.enterpriseMain:has(.rtSaker) .accountName{ font-size:12px; }
.enterpriseMain:has(.rtSaker) .accountRole{ font-size:10px; }
/* litt tettere rader for data-verktøy-følelse */
.rtSaker .rtTable tbody td{ padding:8px 14px; }

/* Saker: autoritativ topp-slanking + ekte kant-til-kant (vinner over desktop-media-query) */
.enterpriseMain:has(.rtSaker){ padding:0 !important; overflow:hidden; }
.enterpriseMain:has(.rtSaker) .commandBar{ align-items:center !important; min-height:52px !important; height:auto !important; padding:9px 18px !important; border-bottom:1px solid var(--line); }
.enterpriseMain:has(.rtSaker) .commandBar .title h1{ font-size:16px !important; margin:0 !important; line-height:1.2 !important; letter-spacing:-.01em !important; }
.enterpriseMain:has(.rtSaker) .commandBar .title p{ display:none !important; }
.enterpriseMain:has(.rtSaker) .commandActions a,
.enterpriseMain:has(.rtSaker) .commandActions .btn,
.enterpriseMain:has(.rtSaker) .commandActions .input{ min-height:34px !important; height:34px !important; padding:0 12px !important; font-size:12.5px !important; border-radius:8px !important; }
.enterpriseMain:has(.rtSaker) .commandActions .input{ width:250px !important; }
.enterpriseMain:has(.rtSaker) .commandActions .notificationButton{ width:34px !important; padding:0 !important; }
.enterpriseMain:has(.rtSaker) .commandActions .commandPrimary{ box-shadow:none !important; background:linear-gradient(135deg,var(--cyan),var(--blue)) !important; color:#04121a !important; border-color:transparent !important; font-weight:700 !important; }
.enterpriseMain:has(.rtSaker) .accountName{ font-size:12px !important; }
.enterpriseMain:has(.rtSaker) .accountRole{ font-size:10px !important; }

/* Subnav kø-gruppe (Saker) */
.navSub .subGroup{ color:var(--faint,#6b7a90); font-size:9.5px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; padding:12px 11px 5px; }

/* ===== Dashboard: Raffinert tett (flush KPI-stripe + tette, flate paneler) ===== */
.enterpriseMain:has(.dashboardReference){ padding:0 !important; overflow:hidden; }
.enterpriseMain:has(.dashboardReference) .pageCanvas{ padding:0 !important; width:100% !important; max-width:none !important; }
.enterpriseMain:has(.dashboardReference) .commandBar{ display:flex !important; align-items:center !important; min-height:52px !important; height:auto !important; padding:9px 18px !important; border-bottom:1px solid var(--line) !important; }
.enterpriseMain:has(.dashboardReference) .commandBar .title h1{ font-size:16px !important; margin:0 !important; line-height:1.2 !important; }
.enterpriseMain:has(.dashboardReference) .commandBar .title p{ display:none !important; }
.enterpriseMain:has(.dashboardReference) .commandActions a,
.enterpriseMain:has(.dashboardReference) .commandActions .btn,
.enterpriseMain:has(.dashboardReference) .commandActions .input{ min-height:34px !important; height:34px !important; padding:0 12px !important; font-size:12.5px !important; }
.enterpriseMain:has(.dashboardReference) .commandActions .notificationButton{ width:34px !important; padding:0 !important; }
.enterpriseMain:has(.dashboardReference) .commandActions .commandPrimary{ box-shadow:none !important; }
.dashboardReference{ max-width:none !important; margin:0 !important; }
.dashboardReferenceHead{ display:none !important; }
/* metric-kort -> flush KPI-stripe */
.dashboardMetrics{ grid-template-columns:repeat(5,minmax(0,1fr)) !important; gap:0 !important; margin:0 !important; border-bottom:1px solid var(--line) !important; background:var(--surface) !important; }
.dashboardMetric{ min-height:0 !important; padding:13px 18px !important; border:0 !important; border-right:1px solid var(--line) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
.dashboardMetric:last-child{ border-right:0 !important; }
.dashboardMetric span{ color:var(--muted) !important; font-size:10px !important; font-weight:700 !important; letter-spacing:.05em !important; text-transform:uppercase !important; }
.dashboardMetric b{ font-size:22px !important; margin-top:4px !important; letter-spacing:-.02em !important; }
.dashboardMetric small{ font-size:11px !important; color:var(--muted) !important; }
.dashboardMetricIcon{ display:none !important; }
/* paneler: polstret innholdsområde, flatere, tettere */
.dashPriorityPanel, .dashboardMainGrid{ margin:14px 18px !important; }
.dashboardPanel{ min-height:0 !important; padding:14px 16px !important; border:1px solid var(--line) !important; border-radius:11px !important; background:var(--surface) !important; box-shadow:none !important; }
.dashboardPanel h2{ font-size:13.5px !important; letter-spacing:-.01em !important; }

/* Dashboard: accent på første KPI-tile + flate hurtighandlinger */
.dashboardMetrics .dashboardMetric:first-child{ background:linear-gradient(180deg,rgba(53,216,255,.06),transparent) !important; }
.dashboardMetrics .dashboardMetric:first-child b{ color:var(--cyan) !important; }
.dashboardActionGrid a{ border:1px solid var(--line) !important; box-shadow:none !important; background:var(--surface-2) !important; }

/* ===== Kunder: Raffinert tett (liste + detalj) ===== */
.enterpriseMain:has(.rtKunder){ padding:0 !important; overflow:hidden; }
.enterpriseMain:has(.rtKunder) .pageCanvas{ padding:0 !important; width:100% !important; max-width:none !important; }
.rtKunder .kpis{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-bottom:1px solid var(--line); background:var(--surface); }
.rtKunder .kpi{ padding:13px 18px; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:4px; }
.rtKunder .kpi:last-child{ border-right:0; }
.rtKunder .kpi .l{ color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.rtKunder .kpi .v{ font-size:22px; font-weight:750; font-variant-numeric:tabular-nums; color:var(--text); }
.rtKunder .kpi.accent{ background:linear-gradient(180deg,rgba(53,216,255,.06),transparent); }
.rtKunder .kpi.accent .v{ color:var(--cyan); }
.rtKunder .ksplit{ display:grid; grid-template-columns:minmax(0,1fr) 360px; }
.rtKunder .klist{ border-right:1px solid var(--line); min-width:0; }
.rtKunder .toolbar{ display:flex; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.rtKunder .toolbar .eyebrow{ color:var(--pink); font-size:9.5px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.rtKunder .toolbar .sp{ flex:1; }
.rtKunder .tablewrap{ overflow:auto; }
.rtKunder .rtTable{ width:100%; border-collapse:separate; border-spacing:0; }
.rtKunder .rtTable thead th{ position:sticky; top:0; background:var(--surface-3); color:var(--muted); font-size:9.5px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; text-align:left; padding:9px 16px; border-bottom:1px solid var(--line-bright); white-space:nowrap; }
.rtKunder .rtTable tbody td{ padding:9px 16px; border-bottom:1px solid var(--line); font-size:12.5px; vertical-align:middle; }
.rtKunder .rtTable tbody tr:hover td{ background:rgba(53,216,255,.03); }
.rtKunder .krow.on td{ background:rgba(53,216,255,.07); }
.rtKunder .cust{ display:flex; align-items:center; gap:9px; }
.rtKunder .logo-sq{ width:26px; height:26px; border-radius:7px; background:var(--surface-3); border:1px solid var(--line-bright); display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--cyan); }
.rtKunder .cust .name{ font-weight:600; }
.rtKunder .qbadge{ font-size:10.5px; color:var(--muted); border:1px solid var(--line-bright); border-radius:6px; padding:1px 7px; }
.rtKunder .kdetail{ background:var(--surface-2); overflow:auto; padding:16px; display:flex; flex-direction:column; gap:14px; }
.rtKunder .kdetail .customerProfile{ display:block !important; margin:0 !important; min-height:0 !important; padding:14px !important; border:1px solid var(--line) !important; background:var(--surface) !important; }
.rtKunder .kdetail .customerProfile h2{ font-size:16px !important; margin:2px 0 6px !important; line-height:1.2 !important; }
.rtKunder .kdetail .customerProfile .muted{ font-size:12px !important; max-width:none !important; }
.rtKunder .kdetail .profileFacts{ display:grid !important; grid-template-columns:1fr 1fr !important; gap:8px !important; margin-top:10px !important; }
.rtKunder .kdetail .profileFacts span{ padding:8px !important; font-size:11px !important; }
.rtKunder .kdetail .profileFacts b{ font-size:13px !important; }
.rtKunder .kdetail .customerStageBoard{ display:grid !important; grid-template-columns:1fr 1fr !important; gap:8px !important; }
.rtKunder .kdetail .customerStageBoard article{ min-height:0 !important; padding:10px !important; }
.rtKunder .kdetail .customerStageBoard b{ font-size:20px !important; }
.rtKunder .kdetail .customerStageBoard p{ font-size:10.5px !important; }

/* ===== Kunnskap/Feilsøking: full-bleed flate seksjoner (rtFlat) ===== */
.enterpriseMain:has(.rtFlat){ padding:0 !important; }
.enterpriseMain:has(.rtFlat) .pageCanvas{ padding:0 !important; width:100% !important; max-width:none !important; }
.rtFlat > .panel, .rtFlat > .grid.two{ margin:0 !important; }
.rtFlat .panel{ border-radius:0 !important; border-left:0 !important; border-right:0 !important; box-shadow:none !important; padding:16px 18px !important; }
.rtFlat > .panel + .panel, .rtFlat > .grid.two + .panel{ border-top:0 !important; }
.rtFlat .grid.two{ display:grid !important; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) !important; gap:0 !important; }
.rtFlat .grid.two > .panel{ border-radius:0 !important; }
.rtFlat .grid.two > .panel:first-child{ border-right:1px solid var(--line) !important; }
.rtFlat .grid.two > .panel + .panel{ border-left:0 !important; }
.rtFlat .table th{ background:var(--surface-3) !important; color:var(--muted) !important; font-size:9.5px !important; font-weight:800 !important; letter-spacing:.08em !important; text-transform:uppercase !important; padding:8px 14px !important; }
.rtFlat .table td{ padding:8px 14px !important; font-size:12.5px !important; }

/* Global: gamle .grid+.metric KPI-kort -> flush stripe (Rapporter, admin-undersider, SLA, automatisering, AI-dev) */
.grid:has(.metric){ gap:0 !important; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface); }
.grid:has(.metric) .metric{ border:0 !important; border-right:1px solid var(--line) !important; border-radius:0 !important; box-shadow:none !important; min-height:0 !important; padding:13px 18px !important; background:transparent !important; }
.grid:has(.metric) .metric:last-child{ border-right:0 !important; }
.grid:has(.metric) .metric:before{ display:none !important; }
.grid:has(.metric) .metric:hover{ border-color:var(--line) !important; }
.grid:has(.metric) .metric b{ text-shadow:none !important; font-size:22px !important; }
.grid:has(.metric) .metric span{ font-size:10px !important; }

/* ===== Admin: full-bleed flush overhaling (matcher Kunder-tettheten) ===== */
.enterpriseMain:has(.rtAdmin){ padding:0 !important; overflow:hidden; }
.enterpriseMain:has(.rtAdmin) .pageCanvas{ padding:0 !important; width:100% !important; max-width:none !important; }
.rtAdmin .rt-kpis{ border-radius:0 !important; border-left:0 !important; border-right:0 !important; border-top:0 !important; background:var(--surface) !important; }
.rtAdmin .rt-cols{ margin:0 !important; gap:0 !important; grid-template-columns:minmax(0,1fr) 340px !important; align-items:stretch !important; }
.rtAdmin .rt-stack{ gap:0 !important; }
.rtAdmin .rt-panel{ border-radius:0 !important; border-left:0 !important; border-right:0 !important; background:transparent !important; }
.rtAdmin .rt-stack > .rt-panel:first-child{ border-top:0 !important; }
.rtAdmin .rt-stack > .rt-panel:last-child{ border-bottom:1px solid var(--line) !important; }
.rtAdmin .rt-rail{ border-left:1px solid var(--line) !important; background:var(--surface) !important; }
.rtAdmin .rt-rail .rt-panel > form, .rtAdmin .rt-rail .rt-panel > .form{ padding:12px 14px !important; }
.rtAdmin .rt-rail .rt-ph{ border-bottom:0 !important; padding-bottom:4px !important; }
.rtAdmin .rt-rail .rt-scs{ padding:4px 6px 10px !important; }

/* ===== Endre tilgang (/admin/access/edit): match access-dense mock ===== */
.enterpriseMain:has(.rtAccess){ padding:0 !important; overflow:hidden; }
.enterpriseMain:has(.rtAccess) .pageCanvas{ padding:0 !important; width:100% !important; max-width:none !important; }
.rtAccess > .grid:has(.metric){ border-radius:0 !important; border-left:0 !important; border-right:0 !important; border-top:0 !important; }
.rtAccess .accessEditor{ border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; margin:0 !important; padding:18px 22px 26px !important; max-width:1200px; }
.rtAccess .accessEditor .panelHead{ padding:0 0 6px !important; border:0 !important; }
.rtAccess .accessEditor .panelHead h2{ font-size:19px !important; }
.rtAccess .accessSection{ margin:18px 0 0 !important; }
.rtAccess .accessSectionHead{ display:flex !important; align-items:center; justify-content:space-between; margin-bottom:10px; }
.rtAccess .accessSectionHead .eyebrow{ color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.rtAccess .accessGrid{ grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:10px !important; }
.rtAccess .accessOption{ border:1px solid var(--line-bright) !important; border-radius:9px !important; padding:12px 14px !important; background:var(--surface-2) !important; }
.rtAccess .accessOption:has(input:checked){ border-color:var(--cyan) !important; background:rgba(53,216,255,.08) !important; }
.rtAccess .accessOption span{ font-weight:600; }
.rtAccess .accessEditor .formgrid{ margin-top:20px !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
.rtAccess .accessEditor .heroActions{ margin-top:18px !important; display:flex; gap:10px; }
@media(max-width:1000px){ .rtAccess .accessGrid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; } }

/* Admin: klikkbar brukerrad-handling (Endre tilgang) */
.rtAdmin .rt-table .rowact{ text-align:right; white-space:nowrap; }
.rtAdmin .rt-table .rowact .btn{ padding:4px 11px !important; min-height:0 !important; height:auto !important; font-size:11.5px !important; }
.rtAdmin .rt-table tr:hover td{ background:rgba(53,216,255,.04); }

/* ===== Mobil: app-løft + fiks offentlig login-layout (≤640px) ===== */
@media (max-width:640px){
  html,body{ max-width:100%; overflow-x:hidden; }
  .grid, .grid.two, .grid.three, [data-shell='norscode-enterprise-v1'] .grid, [data-shell='norscode-enterprise-v1'] .grid.two, [data-shell='norscode-enterprise-v1'] .grid.three{ grid-template-columns:1fr !important; gap:12px !important; }
  .panel, .metric, [data-shell='norscode-enterprise-v1'] .panel{ min-width:0 !important; }
  .panel h2, .panel h1{ overflow-wrap:anywhere; }
  .formgrid, [data-shell='norscode-enterprise-v1'] .formgrid{ grid-template-columns:1fr !important; }
  .form input, .form select, .form textarea{ min-height:50px; font-size:16px; border-radius:12px; }
  .form .btn, .btn.primary{ min-height:50px; border-radius:12px; font-size:15px; }
  [data-shell='norscode-enterprise-v1'] .publicShell:has(.loginEnterprise) .pageCanvas{ padding:0 !important; min-height:100dvh !important; display:block !important; place-items:initial !important; }
  .loginHero, [data-shell='norscode-enterprise-v1'] .loginHero{ min-height:100dvh !important; display:flex !important; place-items:initial !important; padding:0 !important; }
  .loginEnterprise, [data-shell='norscode-enterprise-v1'] .loginEnterprise{ width:100% !important; height:auto !important; min-height:100dvh !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; background:radial-gradient(circle at 50% 6%,rgba(63,150,255,.12),transparent 62%),var(--bg,#05070c) !important; display:flex !important; flex-direction:column; justify-content:center; padding:calc(env(safe-area-inset-top,0px) + 46px) 24px calc(env(safe-area-inset-bottom,0px) + 30px) !important; }
  .loginEnterpriseLogo, [data-shell='norscode-enterprise-v1'] .loginEnterpriseLogo{ width:88px !important; height:88px !important; margin:0 auto 2px !important; }
  .loginEnterprise h1, [data-shell='norscode-enterprise-v1'] .loginEnterprise h1{ font-size:26px !important; margin:14px 0 6px !important; }
  .loginEnterpriseForm, [data-shell='norscode-enterprise-v1'] .loginEnterpriseForm{ margin-top:30px !important; }
  .loginRecovery{ display:block; text-align:center; margin-top:18px; }
}

/* ===== Mobil app-løft: KPI 2-kol + tabeller som kort + stable split (≤640px) ===== */
@media (max-width:640px){
  /* KPI-striper: 2 kolonner, lesbart (ikke 5–6 i rad) */
  .rt-kpis, .rtSaker .kpis, .rtKunder .kpis, .dashboardMetrics{ grid-template-columns:1fr 1fr !important; }
  .rt-kpis .k, .rtSaker .kpi, .rtKunder .kpi{ border-right:1px solid var(--line) !important; border-bottom:1px solid var(--line) !important; }
  .rt-kpis .k:nth-child(2n), .rtSaker .kpi:nth-child(2n), .rtKunder .kpi:nth-child(2n){ border-right:0 !important; }
  .dashboardMetric{ border-bottom:1px solid var(--line) !important; }
  /* Dense tabeller -> kort på mobil (app-lignende sakskort) */
  .rtSaker .tablewrap, .rtKunder .tablewrap, .rtAdmin .rt-table, .tblwrap{ overflow:visible; }
  .rtSaker .rtTable thead, .rtKunder .rtTable thead, .rtAdmin .rt-panel .rt-table thead{ display:none; }
  .rtSaker .rtTable, .rtSaker .rtTable tbody, .rtKunder .rtTable, .rtKunder .rtTable tbody, .rtAdmin .rt-table, .rtAdmin .rt-table tbody{ display:block; }
  .rtSaker .rtTable tbody tr, .rtKunder .rtTable tbody tr, .rtAdmin .rt-table tbody tr{ display:flex; flex-wrap:wrap; gap:7px 10px; align-items:center; border:1px solid var(--line); border-radius:12px; margin:9px 0; padding:12px 13px; background:var(--surface-2); }
  .rtSaker .rtTable tbody td, .rtKunder .rtTable tbody td, .rtAdmin .rt-table tbody td{ display:inline-flex; align-items:center; border:0 !important; padding:0 !important; white-space:normal; font-size:12.5px; }
  .rtSaker td.cChk, .rtSaker td.cOwn{ display:none !important; }
  .rtSaker td.subj{ flex:1 1 100%; order:-1; }
  .rtSaker td.subj a{ font-weight:650; font-size:13.5px; max-width:none; white-space:normal; }
  .rtSaker td.id a{ font-size:11px; }
  .rtSaker td.dim{ color:var(--muted); }
  /* Kunder: stable liste + detalj */
  .rtKunder .ksplit{ grid-template-columns:1fr !important; }
  .rtKunder .klist{ border-right:0 !important; border-bottom:1px solid var(--line); }
  .rtKunder .kdetail{ border-left:0 !important; }
  /* Admin: stable hovedkolonne + rail */
  .rtAdmin .rt-cols{ grid-template-columns:1fr !important; }
  .rtAdmin .rt-rail{ border-left:0 !important; border-top:1px solid var(--line); }
  /* Endre tilgang: 1-kol avkrysning */
  .rtAccess .accessGrid{ grid-template-columns:1fr !important; }
  .rtAccess .accessEditor .formgrid{ grid-template-columns:1fr !important; }
}

/* Mobil-fiks: admin rt-table bruker <tr><th> uten <thead> -> kort + skjul header-rad */
@media (max-width:640px){
  .rtAdmin .rt-table{ display:block !important; }
  .rtAdmin .rt-table tr{ display:flex !important; flex-wrap:wrap; gap:6px 9px; align-items:center; border:1px solid var(--line); border-radius:12px; margin:9px 0; padding:12px 13px; background:var(--surface-2); }
  .rtAdmin .rt-table tr:first-child{ display:none !important; }
  .rtAdmin .rt-table td{ display:inline-flex !important; align-items:center; border:0 !important; padding:0 !important; white-space:normal; font-size:12.5px; }
  .rtAdmin .rt-table td .rt-id{ font-weight:600; }
  .rtAdmin .rt-table td.rowact{ margin-left:auto; }
}

/* Mobil-fiks: Kunnskap/Feilsøking .table (i .rtFlat) -> kort, skjul header-rad */
@media (max-width:640px){
  .rtFlat .tableWrap, .rtFlat .tblwrap{ overflow:visible; }
  .rtFlat .table{ display:block; }
  .rtFlat .table tr{ display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; border:1px solid var(--line); border-radius:12px; margin:9px 0; padding:12px 13px; background:var(--surface-2); }
  .rtFlat .table tr:first-child{ display:none; }
  .rtFlat .table td, .rtFlat .table th{ display:inline-flex; align-items:center; border:0 !important; padding:0 !important; white-space:normal; font-size:12.5px; }
  .rtFlat .table td:first-child{ font-weight:600; }
  .rtFlat .table td.muted, .rtFlat .table td:empty{ color:var(--muted); }
}

/* Mobil-fiks 2: tving rtFlat .table-kort til container-bredde + fullbredde tittel */
@media (max-width:640px){
  .rtFlat .table{ width:100% !important; }
  .rtFlat .table tr{ max-width:100%; box-sizing:border-box; }
  .rtFlat .table td{ min-width:0; }
  .rtFlat .table td:nth-child(2){ flex:1 1 100%; font-weight:600; }
  .rtFlat .table td:first-child{ font-size:11px; color:var(--muted); }
}

/* Mobil: ALLE dense .table i app-innhold -> kort (Kunnskap/Feilsøking/admin-undersider) */
@media (max-width:640px){
  .enterpriseMain .tableWrap, .enterpriseMain .tblwrap{ overflow:visible !important; }
  .enterpriseMain .table{ display:block !important; width:100% !important; }
  .enterpriseMain .table thead{ display:none !important; }
  .enterpriseMain .table tr{ display:flex !important; flex-wrap:wrap; align-items:center; gap:5px 9px; max-width:100%; box-sizing:border-box; border:1px solid var(--line); border-radius:12px; margin:9px 0; padding:12px 13px; background:var(--surface-2); }
  .enterpriseMain .table tr:first-child:has(th){ display:none !important; }
  .enterpriseMain .table td, .enterpriseMain .table th{ display:inline-flex !important; align-items:center; min-width:0; border:0 !important; padding:0 !important; white-space:normal; font-size:12.5px; }
  .enterpriseMain .table td:first-child{ font-size:11px; color:var(--muted); }
  .enterpriseMain .table td:nth-child(2){ flex:1 1 100%; font-weight:600; color:var(--text); }
}

/* Mobil: flytande side- og bunn-marger som skalerer med skjermbreidda
   (erstattar faste px). Bunn-klareringa held seg alltid klar av .mobileTabs. */
@media (max-width:920px){
  /* Baseline for alle sider: trygg bunn-klarering bak tab-baren */
  [data-shell='norscode-enterprise-v1'] .pageCanvas{ padding-bottom: calc(clamp(80px, 15vw, 108px) + env(safe-area-inset-bottom,0px)) !important; }
  /* Innhaldssider: flytande side-, topp- og bunn-marger */
  .enterpriseMain:has(.rtSaker) .pageCanvas,
  .enterpriseMain:has(.rtKunder) .pageCanvas,
  .enterpriseMain:has(.rtAdmin) .pageCanvas,
  .enterpriseMain:has(.rtAccess) .pageCanvas,
  .enterpriseMain:has(.dashboardReference) .pageCanvas,
  .enterpriseMain:has(.rtFlat) .pageCanvas{
    padding-left: clamp(14px, 4.5vw, 30px) !important;
    padding-right: clamp(14px, 4.5vw, 30px) !important;
    padding-top: clamp(14px, 3.2vw, 22px) !important;
    padding-bottom: calc(clamp(80px, 15vw, 108px) + env(safe-area-inset-bottom,0px)) !important;
  }
  .rtSaker .tablewrap, .rtKunder .tablewrap{ max-height:none !important; }
}

/* Fil-/bilde-opplasting: tydelig kamera-/velg-knapp (mobil «Ta bilde») */
.form input[type=file]{ width:100%; min-height:50px; padding:9px 11px; border:1px dashed var(--line-bright); border-radius:10px; background:var(--surface-2); color:var(--muted); font-size:12.5px; cursor:pointer; }
.form input[type=file]::file-selector-button{ margin-right:11px; padding:9px 14px; border:0; border-radius:9px; background:linear-gradient(135deg,var(--cyan),var(--blue)); color:#04121a; font-weight:700; font-size:12.5px; cursor:pointer; }
.form input[type=file]::-webkit-file-upload-button{ margin-right:11px; padding:9px 14px; border:0; border-radius:9px; background:linear-gradient(135deg,var(--cyan),var(--blue)); color:#04121a; font-weight:700; font-size:12.5px; cursor:pointer; }
