/* ═══════════════════════════════════════════════════════════
   DORA GRC — designsystem «Skifer»
   Teknisk presis, rolig, norsk. Farger betyr noe: rødt, gult og
   grønt brukes kun om risiko, frister og status. Alt annet er
   blekk på lys flate.
   Fonter: Geist (UI) · Geist Mono (tall, datoer, koder, etiketter)
   ═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  /* ── Flater ── */
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-2: #edeff1;
  --border: #e2e5e9;
  --border-2: #c9cfd6;

  /* ── Tekst ── */
  --ink: #14181c;
  --text-2: #4b545c;
  --muted: #626b74;
  --inv: #ffffff;

  /* ── Semantikk. Kun risiko, frister og status. Aldri pynt. ── */
  --red: #b93a1e;
  --red-soft: #fceee9;
  --amber: #8d5d08;
  --amber-soft: #f9f1df;
  --green: #1c7d50;
  --green-soft: #e7f4ed;

  /* ── Effekter ── */
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.05);
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 12px;

  /* ── Typografi ── */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;
}

/* ── KOMPATIBILITETSKART ──
   83 gamle variabelnavn i public/ peker hit. Ingen av dem innfører en farge:
   hver alias er en Skifer-token. 17 av navnene var udefinerte før Skifer, blant
   dem --text2 (327 bruk) og --accent-deep (68), som kun var definert i
   marketing.css og derfor døde i appen.

   Regelen matcher body.dark med vilje. Custom properties substitueres på det
   elementet de er deklarert på, og body.dark er ikke :root: en alias deklarert
   kun på :root ville låst seg til den lyse verdien. */
:root,
body.dark,
[data-theme='dark'] {
  /* flater */
  --surface2: var(--surface-2);
  --surface-3: var(--border);
  --elevated: var(--surface);
  --surface-dark: var(--ink);
  --bg2: var(--surface-2);
  --bg-2: var(--surface-2);
  --bg-tertiary: var(--surface-2);
  --input-bg: var(--surface);
  --white: #ffffff;

  /* kanter */
  --border2: var(--border-2);
  --border-focus: var(--ink);

  /* tekst */
  --text: var(--ink);
  --fg: var(--ink);
  --text2: var(--text-2);
  --text-secondary: var(--text-2);
  --text-inv: var(--inv);
  --text3: var(--muted);
  --text-3: var(--muted);
  --muted2: var(--muted);
  --text-muted: var(--muted);
  --grey: var(--muted);

  /* Primærflaten er blekk, ikke en aksentfarge. Skifer har ingen aksent. */
  --accent: var(--ink);
  --accent-hover: var(--text-2);
  --accent-deep: var(--ink);
  --accent-soft: var(--surface-2);
  --accent-light: var(--surface-2);
  --accent-mute: var(--border-2);
  --primary: var(--ink);
  --primary-faint: var(--surface-2);
  --navy: var(--ink);

  /* semantikk, gamle navn */
  --danger: var(--red);
  --red-bg: var(--red-soft);
  --red-mute: var(--red-soft);
  --warning: var(--amber);
  --amber-bg: var(--amber-soft);
  --amber-mute: var(--amber-soft);
  --amber-light: var(--amber-soft);
  --amber-dark: var(--amber);
  --warning-bg: var(--amber-soft);
  --warning-text: var(--amber);
  --warning-border: var(--amber);
  --success: var(--green);
  --green-bg: var(--green-soft);
  --green-mute: var(--green-soft);

  /* Dekorfargene er borte. Blått, lilla og pilarfargene faller ned på blekk. */
  --blue: var(--ink);
  --blue-bg: var(--surface-2);
  --blue-soft: var(--surface-2);
  --purple: var(--ink);
  --purple-bg: var(--surface-2);
  --purple-soft: var(--surface-2);
  --info: var(--ink);
  --p2: var(--ink);
  --p2-bg: var(--surface-2);
  --p2-border: var(--border-2);
  --p4: var(--ink);
  --p4-bg: var(--surface-2);
  --p4-border: var(--border-2);

  /* sidefelt */
  --sidebar-bg: #101418;
  --sidebar-w: 232px;

  /* radius */
  --r: var(--radius-md);
  --r-sm: var(--radius-sm);
  --r-md: var(--radius-md);
  --r-lg: var(--radius-lg);
  --r-xl: 14px;
  --r-full: 9999px;

  /* skygger */
  --shadow-xs: var(--shadow);
  --shadow-sm: var(--shadow);
  --shadow-md: 0 4px 12px rgba(20, 24, 28, 0.07);
  --shadow-lg: 0 12px 40px rgba(20, 24, 28, 0.12);
  --shadow-xl: 0 24px 64px rgba(20, 24, 28, 0.16);

  /* Skifer har én UI-font */
  --font-head: var(--font);

  /* bevegelse */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── SKIP NAVIGATION ── */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent); color: #fff; padding: 8px 16px; z-index: 9999; font-size: 14px; border-radius: 0 0 var(--r-md) 0; transition: top 0.2s; }
.skip-link:focus { top: 0; }

/* ── DARK MODE ── */
body.dark,
[data-theme='dark'] {
  --bg: #101418;
  --surface: #151a1f;
  --surface-2: #1a2026;
  --border: #222930;
  --border-2: #39434c;
  --ink: #e8eaec;
  --text-2: #c7cdd2;
  --muted: #8b949c;
  --inv: #101418;
  --red: #ff5c3d;
  --red-soft: #2a1712;
  --amber: #ffb224;
  --amber-soft: #291f0a;
  --green: #4ade80;
  --green-soft: #0e241a;

  /* Skifer: ingen flateskygge i mørkt tema. Modaler beholder dybde. */
  --shadow: none;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
  --sidebar-bg: #0b0e12;
}
body.dark .sidebar {
  background: var(--sidebar-bg);
}
body.dark .sidebar-logo {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
body.dark .modal {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
body.dark input,
body.dark select,
body.dark textarea {
  /* background-color, ikke background: kortformen nullstiller
     background-image, og da forsvinner pila på nedtrekksfeltene i mørkt tema. */
  background-color: var(--surface2);
  color: var(--text);
  border-color: var(--border2);
}
body.dark .hm-cell {
  border-color: transparent;
}
body.dark img {
  opacity: 0.9;
}
body.dark .wiz-card-header {
  background: var(--surface-2);
}
body.dark .topbar {
  background: rgba(18, 22, 31, 0.85);
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transition: width 0.25s var(--ease);
}

.sidebar-logo {
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo .logo-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 6px;
}

.sidebar-logo h1 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sidebar-logo .pillar-badge {
  margin-top: 8px;
  display: inline-block;
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  padding: 3px 8px;
  border-radius: var(--r-sm);
}

/* Sidebar nav */
.sidebar-nav {
  padding: 8px 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  padding: 16px 18px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.nav-section-label:hover {
  color: rgba(255, 255, 255, 0.45);
}
.nav-section-label .nav-chevron {
  display: inline-flex;
  transition: transform 0.2s;
  opacity: 0.5;
}
.nav-section-label .nav-chevron svg { width: 12px; height: 12px }
.nav-section-label.collapsed .nav-chevron {
  transform: rotate(-90deg);
}
.nav-section-group {
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.nav-section-group.collapsed {
  max-height: 0 !important;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  margin: 1px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 400;
  position: relative;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.nav-item.active {
  background: rgba(20, 24, 28, 0.15);
  color: var(--white);
  font-weight: 500;
  border-left-color: var(--white);
}


.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  text-align: center;
}

.nav-icon svg {
  flex-shrink: 0;
}
.nav-item.active .nav-icon {
  opacity: 1;
}

/* Nav badge counts (v85) */
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
  padding: 0 5px;
  flex-shrink: 0;
}
.nav-item.active .nav-badge {
  background: rgba(232, 234, 236, 0.2);
  color: var(--white);
}

/* Sidebar toggle */
.sidebar-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ════════════════════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100vw - var(--sidebar-w));
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  transition: margin-left 0.25s var(--ease), width 0.25s var(--ease), max-width 0.25s var(--ease);
}

/* Topbar */
.topbar {
  height: 52px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.topbar-left .sep {
  color: var(--border2);
}
.topbar-left .current {
  color: var(--text);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-right: 4px;
}

/* Content area */
.content {
  padding: 28px 32px;
  flex: 1;
  max-width: 1400px;
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--inv);
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(20, 24, 28, 0.3);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(20, 24, 28, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface2);
  border-color: var(--border2);
}

.btn-ghost {
  background: none;
  color: var(--text-2);
  border: none;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red-mute);
}
.btn-danger:hover {
  background: var(--red);
  color: var(--white);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

.btn .btn-icon {
  font-size: 15px;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.btn-export:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════════════════════ */
.page-header {
  margin-bottom: 24px;
}

.page-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.page-header h2,
.page-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-header p,
.page-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  max-width: 680px;
  line-height: 1.6;
}

.page-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stats-row.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}
.stats-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s var(--ease);
  cursor: default;
}

.stat-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.stat-card.blue::before {
  background: var(--accent);
}
.stat-card.green::before {
  background: var(--green);
}
.stat-card.amber::before {
  background: var(--amber);
}
.stat-card.red::before {
  background: var(--red);
}
.stat-card.purple::before {
  background: var(--purple);
}
.stat-card.navy::before {
  background: var(--navy);
}

.stat-card[data-nav] {
  cursor: pointer;
}
.stat-card[data-nav]:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-value.v-green {
  color: var(--green);
}
.stat-value.v-amber {
  color: var(--amber);
}
.stat-value.v-red {
  color: var(--red);
}
.stat-value.v-blue {
  color: var(--blue);
}
.stat-value.v-purple {
  color: var(--purple);
}

.stat-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--r-full);
}
.stat-trend.up {
  background: var(--green-soft);
  color: var(--green);
}
.stat-trend.down {
  background: var(--red-soft);
  color: var(--red);
}
.stat-trend.flat {
  background: var(--surface2);
  color: var(--text-3);
}

/* QW5: stat-row inline stat bars */
.stat-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stat-row .stat-card {
  flex: 1;
  min-width: 100px;
}
.stat-number {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   COMPLIANCE SCORE RING
   ════════════════════════════════════════════════════════════ */
.score-ring-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.score-ring {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.score-ring svg {
  transform: rotate(-90deg);
}
.score-ring .score-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.score-details h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.score-details p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.article-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.article-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.article-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.article-pill.ok {
  background: var(--green-bg);
  border-color: var(--green-mute);
  color: var(--green);
}
.article-pill.warn {
  background: var(--amber-bg);
  border-color: var(--amber-mute);
  color: var(--amber);
}
.article-pill.gap {
  background: var(--red-bg);
  border-color: var(--red-mute);
  color: var(--red);
}

/* ════════════════════════════════════════════════════════════
   CARDS & TABLES
   ════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 20px;
  transition: box-shadow 0.2s var(--ease);
}

/* QW1: Horizontal scroll for tables inside cards */
.card > table,
.card > div > table {
  min-width: 100%;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  left: 0;
}

.card-header h3 {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-header .article-ref,
.article-ref {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

/* Table — v85: auto layout with standardised column classes */
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Standardised column-width classes */
thead th.col-id      { width: 80px; }
thead th.col-check   { width: 36px; }
thead th.col-xs      { width: 50px; }
thead th.col-sm      { width: 80px; }
thead th.col-md      { width: 120px; }
thead th.col-date    { width: 100px; }
thead th.col-status  { width: 100px; }
thead th.col-actions { width: 140px; white-space: nowrap; }
td:last-child:has(.btn) { white-space: nowrap; }

thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 22px;
}
thead th.no-sort {
  cursor: default;
  padding-right: 12px;
}

/* Resizable column drag handle */
thead th::before {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 3px;
  cursor: col-resize;
  border-right: 1px solid transparent;
  transition: border-color 0.15s;
}
thead th:hover::before {
  border-right-color: var(--border);
}
thead th:last-child::before { display: none; }

thead th:hover {
  color: var(--text);
  background: var(--border);
}
thead th.no-sort:hover {
  color: var(--muted);
  background: var(--surface2);
}
thead th::after {
  content: '↕';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0.3;
}
thead th.no-sort::after { content: none; }
thead th.sort-asc::after {
  content: '↑';
  opacity: 0.7;
  color: var(--accent);
}
thead th.sort-desc::after {
  content: '↓';
  opacity: 0.7;
  color: var(--accent);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
tbody tr:last-child {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--surface2);
}
tbody td {
  padding: 11px 12px;
  font-size: 13px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}
/* Action column cells: no truncation so buttons remain visible */
.col-actions + td, th.col-actions ~ td:last-child,
tbody td:last-child:has(.btn) {
  max-width: none;
  text-overflow: clip;
  overflow: visible;
}
/* Allow wrapping in cells with explicit class */
tbody td.wrap {
  white-space: normal;
  overflow: visible;
}

/* Compact mode for wide tables */
#risk-table td,
#asset-table td {
  padding: 8px 10px;
  font-size: 11px;
}
#risk-table th,
#asset-table th {
  padding: 8px 10px;
  font-size: 11px;
}
#risk-table th {
  white-space: nowrap;
}
#asset-table th {
  white-space: normal;
  word-break: break-word;
}
#asset-table th:nth-child(1) {
  width: 14%;
}
#asset-table th:nth-child(2) {
  width: 8%;
}
#asset-table th:nth-child(3) {
  width: 7%;
}
#asset-table th:nth-child(4) {
  width: 7%;
}
#asset-table th:nth-child(5) {
  width: 7%;
}
#asset-table th:nth-child(6) {
  width: 8%;
}
#asset-table th:nth-child(7) {
  width: 7%;
}
#asset-table th:nth-child(8) {
  width: 5%;
}
#asset-table th:nth-child(9) {
  width: 5%;
}
#asset-table th:nth-child(10) {
  width: 5%;
}
#asset-table th:nth-child(11) {
  width: 9%;
}
#asset-table th:nth-child(12) {
  width: 8%;
}
#asset-table th:nth-child(13) {
  width: 3%;
}
/* Risk table column widths — match asset table pattern */
#risk-table td:nth-child(2) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table:has(> tbody#risk-table) {
  table-layout: fixed;
  width: 100%;
}
table:has(> tbody#risk-table) th:nth-child(1)  { width: 8%; }   /* Risk ID */
table:has(> tbody#risk-table) th:nth-child(2)  { width: 18%; }  /* Description */
table:has(> tbody#risk-table) th:nth-child(3)  { width: 8%; }   /* Category */
table:has(> tbody#risk-table) th:nth-child(4)  { width: 3%; }   /* L */
table:has(> tbody#risk-table) th:nth-child(5)  { width: 3%; }   /* I */
table:has(> tbody#risk-table) th:nth-child(6)  { width: 6%; }   /* Inherent */
table:has(> tbody#risk-table) th:nth-child(7)  { width: 6%; }   /* Residual */
table:has(> tbody#risk-table) th:nth-child(8)  { width: 10%; }  /* Owner */
table:has(> tbody#risk-table) th:nth-child(9)  { width: 7%; }   /* Treatment */
table:has(> tbody#risk-table) th:nth-child(10) { width: 10%; }  /* ICT System */
table:has(> tbody#risk-table) th:nth-child(11) { width: 8%; }   /* Next Review */
table:has(> tbody#risk-table) th:nth-child(12) { width: 7%; }   /* Risk Decision */
table:has(> tbody#risk-table) th:nth-child(13) { width: 6%; }   /* Actions */
/* Truncate long-text risk columns */
#risk-table td:nth-child(1),
#risk-table td:nth-child(8),
#risk-table td:nth-child(10) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#asset-table td:nth-child(1) {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Row actions on hover */
.row-actions {
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  gap: 4px;
}
tr:hover .row-actions {
  opacity: 1;
}

.row-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-3);
  transition: all 0.1s;
}
.row-action-btn:hover {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--text);
}

/* QW3: Loading skeleton */
.skeleton-row td {
  position: relative;
  overflow: hidden;
}
.skeleton-row td::after {
  content: '';
  position: absolute;
  inset: 10px 16px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.skeleton-stat {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  color: transparent !important;
}

/* QW4: Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 16px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.empty-state .btn {
  margin-top: 4px;
}

/* QW5: Contextual help tooltips */
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  color: var(--muted);
  border: 1.5px solid var(--border2);
  border-radius: 50%;
  cursor: help;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
  user-select: none;
}
.help-icon:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }

[data-help] {
  position: relative;
}
[data-help]::after {
  content: attr(data-help);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-dark);
  color: var(--inv);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 280px;
  min-width: 160px;
  width: max-content;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 9000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
[data-help]:hover::after,
[data-help]:focus-within::after {
  opacity: 1;
  visibility: visible;
}
/* Keep tooltip on screen for left-edge labels */
[data-help].help-left::after { left: 0; transform: none; }
[data-help].help-right::after { left: auto; right: 0; transform: none; }

/* ════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-family: var(--font);
  white-space: nowrap;
}

.badge-green {
  background: var(--green-soft);
  color: var(--green);
}
.badge-amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge-red {
  background: var(--red-soft);
  color: var(--red);
}
.badge-blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge-purple {
  background: var(--purple-soft);
  color: var(--purple);
}
.badge-grey {
  background: var(--surface2);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Incident badges */
.badge-major {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-mute);
}
.badge-minor {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-mute);
}
.badge-open {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge-contained {
  background: var(--blue-bg);
  color: var(--blue);
}
.badge-resolved {
  background: var(--green-bg);
  color: var(--green);
}
.badge-closed {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   PAGE TAB BAR
   ════════════════════════════════════════════════════════════ */
#page-tab-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: none;
  align-items: center;
  gap: 0;
  height: 42px;
  position: sticky;
  top: 52px;
  z-index: 49;
  overflow-x: auto;
  scrollbar-width: none;
}
#page-tab-bar::-webkit-scrollbar {
  display: none;
}

.page-tab {
  padding: 0 16px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font);
  flex-shrink: 0;
}
.page-tab:hover {
  color: var(--text);
  background: var(--surface2);
}
.page-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
body.dark .page-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ════════════════════════════════════════════════════════════
   USER MENU DROPDOWN
   ════════════════════════════════════════════════════════════ */
.user-menu {
  position: relative;
}
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.user-menu-trigger:hover {
  background: var(--surface2);
}
.user-menu-trigger .user-name {
  font-size: 11px;
  color: var(--muted);
}
.user-menu-trigger .user-role {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.user-menu-trigger .user-caret {
  font-size: 8px;
  color: var(--muted2);
  transition: transform 0.15s;
}
.user-menu.open .user-caret {
  transform: rotate(180deg);
}
.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}
.user-menu.open .user-menu-dropdown {
  display: block;
}
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.1s;
  text-align: left;
}
.user-menu-item:hover {
  background: var(--surface2);
}
.user-menu-item.danger {
  color: var(--red);
}
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* ════════════════════════════════════════════════════════════
   TOPBAR ICON BUTTONS
   ════════════════════════════════════════════════════════════ */
.topbar-icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  transition: all 0.15s;
}
.topbar-icon-btn svg {
  flex-shrink: 0;
}
.topbar-icon-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-3);
}

.dark-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  transition: all 0.15s;
}
.dark-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   MODALS
   ════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 620px;
  max-width: 95vw;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: modal-enter 0.25s var(--ease);
}

/* Keep legacy alias: some HTML uses overflow-y:auto directly */
.modal-overlay.open .modal {
  overflow-y: auto;
}

@keyframes modal-enter {
  from {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
/* Legacy alias */
@keyframes slideUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface2);
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-content {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form-row {
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 18px;
}

.form-row label,
.form-label,
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-row label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.form-label .required {
  color: var(--red);
  margin-left: 2px;
}

.form-row input,
.form-row select,
.form-row textarea,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: all 0.15s var(--ease);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 24, 28, 0.1);
}

.form-row textarea,
.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-grid-2,
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════
   ACTION ROW & SEARCH
   ════════════════════════════════════════════════════════════ */
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  background: var(--surface);
  outline: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 24, 28, 0.1);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-bar select,
.filter-bar input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 11px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  min-width: 110px;
}
.filter-bar select:focus,
.filter-bar input:focus {
  border-color: var(--accent);
}
.filter-bar .filter-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.filter-bar .filter-reset {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
}
.filter-bar .filter-reset:hover {
  color: var(--text);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.filter-pill:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}
.filter-pill.active {
  background: var(--accent);
  color: var(--inv);
  border-color: var(--accent);
}
.filter-pill.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ════════════════════════════════════════════════════════════
   PAGES
   ════════════════════════════════════════════════════════════ */
.page {
  display: none;
}
.page.active {
  display: block;
  animation: page-in 0.25s var(--ease);
}

.page-section {
  display: none;
}
.page-section.active {
  display: block;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page tabs (within a page) */
.page-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.dashboard-grid .card {
  margin-bottom: 0;
}

/* ════════════════════════════════════════════════════════════
   PROGRESS BAR
   ════════════════════════════════════════════════════════════ */
.progress-inline {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-inline-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 0.4s;
}

/* ════════════════════════════════════════════════════════════
   REVIEW TIMELINE
   ════════════════════════════════════════════════════════════ */
.timeline {
  padding: 20px;
}
.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.timeline-dot.done {
  background: var(--green-bg);
  border-color: var(--green);
}
.timeline-dot.pending {
  background: var(--amber-bg);
  border-color: var(--amber);
}
.timeline-content {
  flex: 1;
  padding-top: 4px;
}
.timeline-content strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.timeline-content span {
  font-size: 11px;
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════════
   FRAMEWORK DOMAIN ACCORDION
   ════════════════════════════════════════════════════════════ */
.domain-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  overflow: hidden;
}

.domain-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  border-bottom: 1px solid transparent;
}
.domain-header:hover {
  background: var(--surface2);
}
.domain-header.open {
  border-bottom-color: var(--border);
}

.domain-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.domain-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
}

.domain-article {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--r-sm);
}

.domain-progress {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.domain-mini-bar {
  width: 80px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.domain-mini-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 0.4s;
}

.domain-toggle {
  font-size: 10px;
  color: var(--muted);
}
.domain-body {
  display: none;
}
.domain-body.open {
  display: block;
}

.component-row {
  display: grid;
  grid-template-columns: 28px 1fr 120px 100px 110px 110px 90px;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  transition: background 0.1s;
}
.component-row:last-child {
  border-bottom: none;
}
.component-row:hover {
  background: var(--surface2);
}

.component-row-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px;
}

.comp-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted2);
  text-align: center;
}
.comp-name {
  font-weight: 500;
}
.comp-type-badge {
  display: inline-block;
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-select {
  font-family: var(--font);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  width: 100%;
}
.status-select:focus {
  outline: none;
  border-color: var(--accent);
}
.status-select.approved {
  background: var(--green-bg);
  border-color: var(--green-mute);
  color: var(--green);
}
.status-select.inprogress {
  background: var(--amber-bg);
  border-color: var(--amber-mute);
  color: var(--amber);
}
.status-select.gap {
  background: var(--red-bg);
  border-color: var(--red-mute);
  color: var(--red);
}

.owner-input,
.date-input {
  font-family: var(--font);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.date-input {
  font-family: var(--font-mono);
}
.owner-input:focus,
.date-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   RISK SCORE & HEATMAP
   ════════════════════════════════════════════════════════════ */
.risk-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
}
.risk-low {
  background: var(--green-bg);
  color: var(--green);
}
.risk-med {
  background: var(--amber-bg);
  color: var(--amber);
}
.risk-high {
  background: var(--amber-soft);
  color: var(--amber);
}
.risk-crit {
  background: var(--red-bg);
  color: var(--red);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 22px repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr) 22px;
  gap: 3px;
  width: 100%;
}

.hm-cell {
  height: 58px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: default;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
  position: relative;
  overflow: visible;
  border: 2px solid transparent;
}
.hm-cell[style*='cursor: pointer']:hover {
  transform: scale(1.07);
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.hm-label {
  background: none;
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  text-align: center;
  border: none !important;
}
.hm-label.y-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  height: 58px;
}

/* Zone fill colours */
.hm-1 {
  background: var(--green-soft);
  color: var(--green);
}
.hm-2 {
  background: var(--green-soft);
  color: var(--green);
}
.hm-3 {
  background: var(--amber-soft);
  color: var(--amber);
}
.hm-4 {
  background: var(--red-soft);
  color: var(--red);
}
.hm-5 {
  background: var(--red-soft);
  color: var(--red);
}

/* Appetite zone borders */
.hm-app-accept {
  border-color: var(--green);
}
.hm-app-review {
  border-color: var(--amber);
}
.hm-app-escalate {
  border-color: var(--red);
}

.hm-score-label {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  /* Ingen opacity. Gjennomsiktighet blander tekstfargen med flaten bak: selv
     0.9 ga 4,29:1 på de røde cellene. Størrelsen og mono-fonten holder tallet
     dempet uten å spise kontrasten. */
  pointer-events: none;
  user-select: none;
}

.hm-count {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1;
  pointer-events: none;
}

.hm-dot {
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.88);
  color: var(--white);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.1s;
  z-index: 2;
}
.hm-dot:hover {
  transform: scale(1.2);
  z-index: 5;
}

.hm-dot-pending {
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.2);
  border: 1.5px dashed var(--border-2);
  /* Flaten er gjennomskinnelig og blandes med cellen bak; --muted ble da
     3,79:1. --text-2 bærer den sammensatte bakgrunnen. */
  color: var(--text-2);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}
.hm-dot-pending:hover {
  transform: scale(1.2);
  z-index: 5;
}

/* ════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--inv);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s var(--ease-spring);
}
.toast.success {
  background: var(--green);
}
.toast.error {
  background: var(--red);
}
.toast.info {
  background: var(--accent);
}

@keyframes toast-in {
  from {
    transform: translateY(16px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ════════════════════════════════════════════════════════════
   NOTIFICATIONS PANEL
   ════════════════════════════════════════════════════════════ */
.notif-wrap {
  position: relative;
}
#notif-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 5px 9px;
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  position: relative;
}
#notif-btn:hover {
  background: var(--surface2);
}
#notif-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  background: var(--red);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  border: 2px solid var(--surface);
}
#notif-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.notif-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
}
.notif-close-btn:hover {
  background: var(--surface2);
  color: var(--text);
}
.notif-group-label {
  padding: 10px 16px 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.notif-item {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  /* The row holds the alert and a dismiss button beside it. */
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notif-item-body {
  flex: 1;
  min-width: 0;
}
/* The dismiss control only appears on hover or keyboard focus, so a panel at
   rest stays as quiet as it was before. */
.notif-dismiss {
  opacity: 0;
  transition: opacity 0.12s;
}
.notif-item:hover .notif-dismiss,
.notif-dismiss:focus-visible {
  opacity: 1;
}
.notif-item:hover {
  background: var(--surface2);
}
.notif-item:last-of-type {
  border-bottom: none;
}
.notif-item-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.notif-item-msg {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notif-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted2);
  white-space: nowrap;
}
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.notif-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}

/* ════════════════════════════════════════════════════════════
   PILLAR ACCENT STRIP
   ════════════════════════════════════════════════════════════ */
.pillar-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.pillar-strip.p2 {
  background: var(--p2-bg);
  border: 1px solid var(--p2-border);
  color: var(--p2);
}
.pillar-strip.p4 {
  background: var(--p4-bg);
  border: 1px solid var(--p4-border);
  color: var(--p4);
}
.pillar-strip .strip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pillar-strip.p2 .strip-dot {
  background: var(--p2);
}
.pillar-strip.p4 .strip-dot {
  background: var(--p4);
}

/* ════════════════════════════════════════════════════════════
   CLASSIFICATION WIZARD
   ════════════════════════════════════════════════════════════ */
.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.wizard-step {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface2);
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.wizard-step:last-child {
  border-right: none;
}
.wizard-step.active {
  background: var(--p2-bg);
  color: var(--p2);
  font-weight: 600;
}
.wizard-step.done {
  background: var(--green-bg);
  color: var(--green);
}
.wizard-step .step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.criterion-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.criterion-card.triggered {
  border-color: var(--red-mute);
  background: var(--red-soft);
}
.criterion-card.clear {
  border-color: var(--green-mute);
  background: var(--green-soft);
}

.criterion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}
.criterion-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.criterion-card.triggered .criterion-num {
  background: var(--red-soft);
  border-color: var(--red-mute);
  color: var(--red);
}
.criterion-card.clear .criterion-num {
  background: var(--green-soft);
  border-color: var(--green-mute);
  color: var(--green);
}

.criterion-name {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
}
.criterion-threshold {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  max-width: 200px;
  text-align: right;
}
.criterion-status {
  font-size: 18px;
  flex-shrink: 0;
}
.criterion-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  display: none;
}
.criterion-body.open {
  display: block;
}

/* Verdict panel */
.verdict-panel {
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-top: 20px;
  border: 2px solid;
  display: flex;
  align-items: center;
  gap: 16px;
}
.verdict-panel.major {
  background: var(--red-bg);
  border-color: var(--red-mute);
}
.verdict-panel.minor {
  background: var(--green-bg);
  border-color: var(--green-mute);
}
.verdict-panel.pending {
  background: var(--surface2);
  border-color: var(--border);
}
.verdict-icon {
  font-size: 36px;
  flex-shrink: 0;
}
.verdict-text h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}
.verdict-text p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Report timeline (incident stages) */
.report-timeline {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
}
.rt-stage {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--surface);
  position: relative;
}
.rt-stage:first-child {
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.rt-stage:last-child {
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  border-right: 1px solid var(--border);
}
.rt-stage.active {
  background: var(--p2-bg);
  border-color: var(--p2-border);
  z-index: 1;
}
.rt-stage.done {
  background: var(--green-bg);
  border-color: var(--green-mute);
}
.rt-stage .rt-label {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rt-stage .rt-deadline {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 2px;
}
.rt-stage.active .rt-deadline {
  color: var(--p2);
}
.rt-stage.done .rt-deadline {
  color: var(--green);
}
.rt-stage .rt-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ════════════════════════════════════════════════════════════
   PROVIDER & CONTRACT COMPONENTS
   ════════════════════════════════════════════════════════════ */
.risk-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
}
.tier-cif {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-mute);
}
.tier-standard {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.tier-ctpp {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}

.clause-meter {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}
.clause-pip {
  width: 14px;
  height: 6px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.clause-pip.filled {
  background: var(--green);
}
.clause-pip.warn {
  background: var(--amber);
}
.clause-pip.missing {
  background: var(--red);
}

/* Concentration matrix */
.conc-matrix-wrap {
  overflow-x: auto;
  padding: 20px;
}
.conc-matrix {
  border-collapse: collapse;
  min-width: 500px;
  width: 100%;
}
.conc-matrix th {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.conc-matrix th.row-header {
  text-align: left;
  width: 180px;
}
.conc-matrix td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 11px;
  vertical-align: middle;
}
.conc-matrix td.cif-name {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  background: var(--surface2);
}
.conc-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.conc-0 {
  background: none;
  color: var(--muted2);
}
.conc-1 {
  background: var(--green-soft);
  color: var(--green);
}
.conc-2 {
  background: var(--amber-soft);
  color: var(--amber);
}
.conc-3 {
  background: var(--amber-soft);
  color: var(--amber);
}
.conc-4 {
  background: var(--red-soft);
  color: var(--red);
}
.conc-5 {
  background: var(--red-soft);
  color: var(--red);
}

/* ════════════════════════════════════════════════════════════
   INFO BOX
   ════════════════════════════════════════════════════════════ */
.info-box {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 12px;
  margin-bottom: 20px;
}
.info-box.info {
  background: var(--blue-bg);
  border: 1px solid var(--border);
  color: var(--ink);
}
.info-box.warn {
  background: var(--amber-bg);
  border: 1px solid var(--amber-mute);
  color: var(--amber);
}
.info-box.crit {
  background: var(--red-bg);
  border: 1px solid var(--red-mute);
  color: var(--red);
}
.info-box-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ════════════════════════════════════════════════════════════
   DETAIL GRID
   ════════════════════════════════════════════════════════════ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   WIZARD STEP PILLS (Risk Assessment)
   ════════════════════════════════════════════════════════════ */
.wiz-card-header {
  background: var(--ink);
  padding: 16px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.wiz-card-header .step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--border-2);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.wiz-card-header h3 {
  color: var(--inv);
  margin: 0;
}
.wiz-card-header .step-desc {
  font-size: 12px;
  color: var(--border-2);
  margin-top: 2px;
}
.wiz-card-header .article-ref {
  /* Basisregelen gir .article-ref en LYS bakgrunn. Her er teksten lys, ment
     for den mørke headeren — sammen ga det 1,36:1. Bakgrunnen må vekk, ikke
     fargen. */
  background: transparent;
  color: var(--border-2);
  border-color: rgba(191, 215, 237, 0.25);
}

.wiz-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.wiz-step-pill.active {
  background: var(--navy);
  color: var(--inv);
  border-color: var(--navy);
}
.wiz-step-pill.done {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green);
}
.wiz-step-pill.inactive {
  background: var(--surface2);
  color: var(--muted);
  border-color: var(--border);
}
.wiz-step-pill .pill-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}
.wiz-step-pill.active .pill-num {
  background: var(--inv);
  color: var(--navy);
}
.wiz-step-pill.done .pill-num {
  background: var(--green);
  color: var(--inv);
}
.wiz-step-pill.inactive .pill-num {
  background: var(--border);
  color: var(--muted);
}
.wiz-step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 12px;
}
.wiz-imp-btn {
  flex: 1;
  padding: 8px 4px;
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  transition: all 0.15s;
}
.wiz-imp-btn span {
  font-size: 9px;
  font-weight: 400;
  display: block;
  color: var(--muted);
}
.wiz-imp-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.wiz-imp-btn.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--inv);
}
.wiz-imp-btn.selected span {
  color: var(--border-2);
}
.wiz-threat-card {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wiz-threat-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.wiz-threat-card.selected {
  border-color: var(--navy);
  background: var(--accent-light);
}
.wiz-threat-card .tc-title {
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text);
}
.wiz-threat-card .tc-sub {
  font-size: 10px;
  color: var(--muted);
}
.wiz-threat-card .tc-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--muted);
  margin-top: 1px;
}
.wiz-threat-card.selected .tc-check {
  color: var(--navy);
  font-weight: 700;
}
.wiz-threat-group {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.wiz-threat-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface2);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.wiz-threat-group-header:hover {
  background: var(--border);
}
.wiz-group-chevron {
  color: var(--muted);
  width: 14px;
  display: inline-flex;
  justify-content: center;
  transition: transform 0.2s;
}
.wiz-group-chevron svg { width: 12px; height: 12px }
.wiz-group-chevron.collapsed { transform: rotate(-90deg) }
.wiz-threat-group-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 12px;
}
.wiz-vuln-chip {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
  background: var(--bg);
  user-select: none;
}
.wiz-vuln-chip:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.wiz-vuln-chip.selected {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}
.wiz-ctrl-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--r-lg);
}

/* ════════════════════════════════════════════════════════════
   SLIDE-OVER PANEL
   ════════════════════════════════════════════════════════════ */
.slideover-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 200;
  transition: opacity 0.2s;
}
.slideover-overlay.open {
  display: block;
}
.slideover {
  position: fixed;
  top: 0;
  right: -520px;
  bottom: 0;
  width: 520px;
  max-width: 95vw;
  background: var(--surface);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 201;
  transition: right 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.slideover-overlay.open .slideover {
  right: 0;
}
.slideover-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.slideover-header h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}
.slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.slideover-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
/* Collapsible field sections */
.field-section {
  margin-bottom: 18px;
}
.field-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.field-section-header h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0;
}
.field-section-header .fs-chevron {
  display: inline-flex;
  color: var(--muted);
  transition: transform 0.2s;
}
.field-section-header .fs-chevron svg { width: 12px; height: 12px }
.field-section-header.collapsed .fs-chevron {
  transform: rotate(-90deg);
}
.field-section-body {
  transition: max-height 0.25s ease;
  overflow: hidden;
}
.field-section-body.collapsed {
  max-height: 0 !important;
}

/* ════════════════════════════════════════════════════════════
   BATCH OPERATIONS
   ════════════════════════════════════════════════════════════ */
.batch-cb {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}
thead .batch-cb-all {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}
.batch-bar {
  display: none;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--accent);
  color: var(--inv);
  padding: 10px 20px;
  border-radius: var(--r-lg);
  margin: 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  animation: batchSlideUp 0.2s ease;
}
.batch-bar.visible {
  display: flex;
}
@keyframes batchSlideUp {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.batch-bar .batch-count {
  font-weight: 700;
  font-family: var(--font-mono);
}
.batch-bar .btn {
  background: rgba(255, 255, 255, 0.15);
  color: var(--inv);
  border-color: rgba(255, 255, 255, 0.25);
}
.batch-bar .btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
.batch-bar .batch-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

/* ════════════════════════════════════════════════════════════
   COMBOBOX
   ════════════════════════════════════════════════════════════ */
.combobox-wrap {
  position: relative;
  width: 100%;
}
.combobox-wrap input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}
.combobox-wrap input:focus {
  border-color: var(--accent);
}
.combobox-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.combobox-list.open {
  display: block;
}
.combobox-opt {
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.combobox-opt:hover {
  background: var(--surface2);
}
.combobox-opt.active {
  background: var(--accent-light);
}
.combobox-opt .cb-sub {
  font-size: 10px;
  color: var(--muted);
}
.combobox-empty {
  padding: 12px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   TREND CHARTS
   ════════════════════════════════════════════════════════════ */
.trend-chart-wrap {
  padding: 16px 20px;
}
.trend-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.trend-chart-header h4 {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}
.trend-chart-header .trend-label {
  font-size: 10px;
  color: var(--muted);
}
.trend-canvas {
  width: 100%;
  height: 80px;
  display: block;
}

/* ════════════════════════════════════════════════════════════
   COMPLIANCE STAT FILTER CARDS
   ════════════════════════════════════════════════════════════ */
.comp-stat-filter-card {
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
}
.comp-stat-filter-card:hover {
  border-color: var(--accent) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.comp-stat-filter-card.active-filter {
  border-color: var(--accent) !important;
  box-shadow:
    0 0 0 3px rgba(20, 24, 28, 0.15),
    var(--shadow-md);
}

/* ════════════════════════════════════════════════════════════
   KEYBOARD ACCESSIBILITY
   ════════════════════════════════════════════════════════════ */
.nav-item:focus-visible,
.btn:focus-visible,
.page-tab:focus-visible,
.domain-header:focus-visible,
.article-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
[role='button'] {
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */
@keyframes fade-up {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.animate-in {
  animation: fade-up 0.4s var(--ease) backwards;
}
.delay-1 {
  animation-delay: 0.05s;
}
.delay-2 {
  animation-delay: 0.1s;
}
.delay-3 {
  animation-delay: 0.15s;
}
.delay-4 {
  animation-delay: 0.2s;
}
.delay-5 {
  animation-delay: 0.25s;
}
.delay-6 {
  animation-delay: 0.3s;
}

/* ════════════════════════════════════════════════════════════
   COMMAND PALETTE (Cmd+K)
   ════════════════════════════════════════════════════════════ */
.cmd-palette-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}
.cmd-palette-overlay.open {
  display: flex;
}
.cmd-palette {
  width: 520px;
  max-width: 95vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modal-enter 0.2s var(--ease);
}
.cmd-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cmd-palette-input-wrap .cmd-icon {
  color: var(--text-3);
  font-size: 18px;
  flex-shrink: 0;
}
.cmd-palette-input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.cmd-palette-input::placeholder {
  color: var(--text-3);
}
.cmd-palette-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.1s;
}
.cmd-item:hover,
.cmd-item.active {
  background: var(--surface-2);
}
.cmd-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.cmd-item.active .cmd-item-icon {
  background: var(--accent-soft);
}
.cmd-item-text {
  flex: 1;
}
.cmd-item-title {
  font-size: 13px;
  font-weight: 500;
}
.cmd-item-desc {
  font-size: 11px;
  color: var(--text-3);
}
.cmd-item-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.cmd-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 10px 20px 4px;
}
.cmd-palette-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-3);
}
.cmd-palette-footer kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin-right: 4px;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE / MOBILE
   ════════════════════════════════════════════════════════════ */
.mobile-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.mobile-hamburger:hover {
  background: var(--surface2);
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease);
    z-index: 200;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .mobile-hamburger {
    display: block;
  }
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
    transition: opacity 0.25s;
  }
  .mobile-overlay.open {
    display: block;
  }
  .nav-item {
    padding: 11px 20px;
  }
  .content {
    padding: 20px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-row.cols-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-row.cols-3 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .pillar-progress-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .form-grid,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stats-row,
  .stats-row.cols-5 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .pillar-progress-grid {
    grid-template-columns: 1fr !important;
  }
  .score-ring-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-grid-2,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .topbar-date {
    display: none;
  }
  .modal {
    max-width: 100vw;
    border-radius: 0;
    max-height: 100vh;
  }
  .slideover {
    width: 100vw;
    max-width: 100vw;
  }
  .page-header-top {
    flex-direction: column;
  }
  .page-actions {
    align-self: flex-start;
  }
}

/* Sidebar collapsed: wider screens only */
@media (min-width: 1025px) {
  body.sidebar-collapsed .sidebar {
    width: 56px;
  }
  body.sidebar-collapsed .sidebar-logo h1,
  body.sidebar-collapsed .sidebar-logo .pillar-badge,
  body.sidebar-collapsed .sidebar-logo .logo-tag,
  body.sidebar-collapsed .nav-section-label,
  body.sidebar-collapsed .sidebar-footer {
    display: none !important;
  }
  body.sidebar-collapsed .sidebar-logo {
    padding: 16px 8px;
    text-align: center;
    flex-direction: column;
    align-items: center !important;
    gap: 8px;
  }
  body.sidebar-collapsed .sidebar-logo > div:first-child {
    justify-content: center;
  }
  body.sidebar-collapsed .sidebar-toggle {
    transform: rotate(180deg);
  }
  body.sidebar-collapsed .nav-item {
    padding: 10px 0;
    justify-content: center;
    font-size: 0;
    border-left: none;
    gap: 0;
  }
  body.sidebar-collapsed .nav-item .nav-icon {
    font-size: 17px;
    width: auto;
  }
  body.sidebar-collapsed .nav-section-group {
    max-height: none !important;
  }
  body.sidebar-collapsed .main {
    margin-left: 56px;
    width: calc(100% - 56px);
    max-width: calc(100vw - 56px);
  }
  body.sidebar-collapsed .sidebar-collapse-label {
    display: none;
  }
  body.sidebar-collapsed .nav-badge {
    display: none;
  }
  /* Tooltip on hover in collapsed mode */
  body.sidebar-collapsed .nav-item {
    position: relative;
  }
  body.sidebar-collapsed .nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: var(--ink);
    color: var(--inv);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
}

/* ── Inline form validation (v84) ── */
.form-field-error input,
.form-field-error select,
.form-field-error textarea {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.field-error-msg {
  color: var(--red);
  font-size: 0.78rem;
  margin-top: 2px;
  display: block;
}

/* ── Print styles (v84) ── */
@media print {
  .sidebar,
  .topbar,
  .mobile-overlay,
  .toast,
  .modal-overlay,
  .slideover-overlay,
  .batch-bar,
  .dark-toggle {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 16px !important;
  }
  .page.active {
    display: block !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
    break-inside: avoid;
  }
  table {
    font-size: 10pt;
  }
  body {
    background: white !important;
    color: black !important;
  }
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); position: fixed; z-index: 200; height: 100vh; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100% !important; margin-left: 0 !important; }
  .stat-cards, .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
  .filter-bar { flex-wrap: wrap; }
  .modal-content { width: 95vw !important; max-width: 95vw !important; margin: 10px auto !important; }
  table { font-size: 12px; }
  th, td { padding: 6px 8px !important; }
  .col-actions { min-width: 120px !important; }
}

@media (max-width: 480px) {
  .stat-cards, .stats-row { grid-template-columns: 1fr !important; }
  .topbar { flex-wrap: wrap; gap: 4px; }
  .topbar-right { font-size: 11px; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }
}

/* ── Skeleton Loader ────────────────────────── */
.skeleton-row { height: 44px; border-radius: var(--r); margin-bottom: 4px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ════════════════════════════════════════════════════════════
   OMRÅDENAVIGASJON — Skifer steg 2
   Sidefeltet med åtte seksjoner blir sju områder i toppbaren.
   Sidefeltet ligger igjen i DOM-en, skjult: all tilgangsstyring
   kjører mot .nav-item der, og områdene bygges av det.
   ════════════════════════════════════════════════════════════ */

.sidebar { display: none; }

.main {
  margin-left: 0;
  width: 100%;
  max-width: 100vw;
}

.topbar {
  height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  backdrop-filter: none;
  gap: 20px;
}

.topbar-left {
  gap: 28px;
  min-width: 0;
  flex: 1;
}

#brand-topbar {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

/* Brødsmulen er overflødig når området står i nav-en. Den blir
   stående for skjermlesere og for tilstanden før nav-en er bygget. */
#area-nav:not(:empty) ~ .sep,
#area-nav:not(:empty) ~ #breadcrumb {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#area-nav {
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#area-nav::-webkit-scrollbar { display: none; }

.area-link {
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.area-link:hover { color: var(--ink); }

.area-link.active {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}

.area-badge {
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
  font-family: var(--font-mono);
}

/* Faner for sidene i området */
#area-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 56px;
  z-index: 49;
}

#area-tabs[hidden] { display: none; }
#area-tabs::-webkit-scrollbar { display: none; }

.area-tab {
  padding: 11px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.area-tab:hover { color: var(--text-2); }

.area-tab.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

/* Maks innholdsbredde 1120px, sentrert (04-skjermer.md) */
.content {
  padding: 32px 24px 64px;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1024px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .topbar-left { gap: 14px; }
  #area-tabs { padding: 0 16px; }
  .content { padding: 20px 16px 48px; }
}

/* ── Avatarmeny (Innstillinger, språk, konto) ──────────────── */

/* Hamburgeren åpner mobilmenyen, ikke sidefeltet. På desktop er de sju
   områdene i toppbaren nok; på mobil rommer den bare fire av dem, og
   fanestripa under blir 2 500 px bred i et vindu på 375. Da trengs en
   liste. */
.mobile-hamburger { display: none !important; }
@media (max-width: 1024px) {
  .mobile-hamburger { display: inline-flex !important; align-items: center; }
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: var(--text-2);
}

.user-menu-trigger:hover { background: var(--surface-2); }

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--inv);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-menu-trigger .user-name {
  font-size: 13px;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-head {
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.user-menu-name { font-size: 13px; font-weight: 600; color: var(--ink); }

.user-menu-role {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 2px;
}

.user-menu-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 8px 14px 4px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 14px;
  border: none;
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.user-menu-item:hover { background: var(--surface-2); color: var(--ink); }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: var(--red-soft); }

.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

.user-menu-locale { display: flex; gap: 4px; padding: 4px 14px 6px; }

.user-menu-locale button {
  flex: 1;
  padding: 5px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}

.user-menu-locale button[aria-current='true'],
.user-menu-locale button.active {
  background: var(--ink);
  color: var(--inv);
  border-color: var(--ink);
}

/* Innfelte ikoner. Lucide, 16px, 2px strek. Arver tekstfargen slik at et
   ikon i en rød knapp blir rødt uten en egen regel. */
.ic {
  width: 1em;
  height: 1em;
  min-width: 16px;
  min-height: 16px;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   HJEM — Skifer steg 3
   Fire nøkkeltall, arbeidskø sortert etter frist, pilarpanel.
   ════════════════════════════════════════════════════════════ */

.dash-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-head h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.dash-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 6px;
}

/* Stat-grid: cellene skilles av 1px kantfarge, ikke av mellomrom. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.stat-cell {
  background: var(--surface);
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}

.stat-cell:hover { background: var(--surface-2); }

.stat-key {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  /* Uten tall skal kortet holde formen. Tankestreken gjorde den jobben før,
     og tonereglene sier ingen tankestreker. Forklaringen står i .stat-note. */
  min-height: 32px;
}

.stat-num.alarm { color: var(--red); }
.stat-num.warn { color: var(--amber); }

.stat-note {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 6px;
  min-height: 14px;
}

.section-key {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

.dash-split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  align-items: start;
}

.dash-aside { display: flex; flex-direction: column; gap: 20px; }

/* ── Arbeidskø ─────────────────────────────────────────────── */

.queue { display: flex; flex-direction: column; gap: 8px; }

.queue-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.12s var(--ease);
}

.queue-row:hover { border-color: var(--border-2); }

/* Fargestolpen er fristen, ikke pynt: rød under et døgn, gul under 14 dager. */
.queue-bar { width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }

.queue-body { flex: 1; min-width: 0; }

.queue-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}

.queue-ref { font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--muted); }

.queue-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-due { text-align: right; flex-shrink: 0; }
.queue-due .mono { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.queue-owner { font-size: 11px; color: var(--muted); }

.queue-foot { margin-top: 10px; font-size: 12px; color: var(--muted); }

.queue-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.queue-empty-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.queue-empty-sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.queue-empty-sub .mono { font-family: var(--font-mono); color: var(--muted); }

/* ── Pilarpanel ────────────────────────────────────────────── */

.pillar-progress-grid { display: flex; flex-direction: column; gap: 12px; }

.pillar-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 5px;
}

.pillar-line .mono { font-family: var(--font-mono); color: var(--muted); }

.pillar-track { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.pillar-track > div { height: 100%; border-radius: 2px; background: var(--ink); transition: width 0.4s var(--ease); }

.pillar-sub { font-size: 10px; color: var(--muted); margin-top: 4px; }

.pillar-foot {
  font-size: 12px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.pillar-foot:empty { display: none; }

/* ── Siste 30 dager ────────────────────────────────────────── */

.activity { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.activity-row { display: flex; align-items: center; gap: 10px; }
.activity-row.muted { color: var(--muted); }

.activity-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.activity-dot.green { background: var(--green); }
.activity-dot.amber { background: var(--amber); }
.activity-dot.red { background: var(--red); }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-split { grid-template-columns: 1fr; }
}

/* .card har ingen egen padding — den er bygget rundt tabeller som setter sin.
   Panelene på Hjem er innhold, ikke tabeller, og trenger luft. */
.dash-aside .card {
  padding: 20px;
  margin-bottom: 0;
  box-shadow: var(--shadow);
}

/* Innholdet er sentrert i 1120px. Uten reservert plass til rullefeltet
   hopper hele kolonnen sidelengs i det innholdet blir høyt nok til å
   utløse det. Playwright fanget det som «element is not stable». */
html { scrollbar-gutter: stable; }

/* ════════════════════════════════════════════════════════════
   HENDELSER — Skifer steg 4
   Toppkort med nedtelling til neste ITS-frist. Klokka tikker
   hvert sekund; under to døgn er sekundene informasjon.
   ════════════════════════════════════════════════════════════ */

.inc-deadline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.inc-deadline-main { flex: 1; min-width: 240px; }

.inc-deadline-tags { display: flex; align-items: center; gap: 10px; }

.inc-sev {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.04em;
}

.inc-ref { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.inc-deadline-title { font-weight: 700; font-size: 16px; color: var(--ink); margin-top: 6px; }
.inc-deadline-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

.inc-deadline-clock { text-align: center; padding: 0 10px; flex-shrink: 0; }

.inc-clock {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.inc-clock-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.inc-deadline-btn { white-space: nowrap; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   ROI-STATUS — Skifer steg 5
   Ett banner over leverandør- og registersidene. Gult når noe
   mangler, dempet når alt er validert.
   ════════════════════════════════════════════════════════════ */

.roi-banner {
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.roi-banner.ok { background: var(--surface); border-color: var(--border); }

.roi-banner-body { flex: 1; min-width: 240px; }

.roi-banner-title { font-weight: 700; font-size: 14px; color: var(--amber); }
.roi-banner.ok .roi-banner-title { color: var(--ink); }

.roi-banner-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

.roi-banner .btn { white-space: nowrap; flex-shrink: 0; }

.roi-filter-note {
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.linklike {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════
   ETTERLEVELSE ETTER TEMA — Skifer steg 6
   Seks områder i stedet for 28 artikler. Fargen på stolpen er
   dekningsgrad, ikke pynt.
   ════════════════════════════════════════════════════════════ */

.comp-area-lead {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 14px;
}

.comp-area-lead strong { color: var(--ink); }

.comp-areas { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.comp-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 200px 90px auto;
  gap: 18px;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.12s var(--ease);
}

.comp-area:hover { border-color: var(--border-2); }

.comp-area-label { font-weight: 600; font-size: 14px; color: var(--ink); }
.comp-area-ref { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.comp-area-nums {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.comp-area-nums .mono { font-family: var(--font-mono); }

.comp-area-track { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.comp-area-track > div { height: 100%; border-radius: 3px; }
.comp-area-track > div.green { background: var(--green); }
.comp-area-track > div.amber { background: var(--amber); }
.comp-area-track > div.red { background: var(--red); }

.comp-area-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  justify-self: start;
}

.comp-area-badge.green { background: var(--green-soft); color: var(--green); }
.comp-area-badge.amber { background: var(--amber-soft); color: var(--amber); }
.comp-area-badge.red { background: var(--red-soft); color: var(--red); }

.comp-area-note { font-size: 12px; color: var(--muted); }

.comp-area-foot { font-size: 12px; color: var(--muted); margin-top: -12px; margin-bottom: 20px; }

@media (max-width: 900px) {
  .comp-area { grid-template-columns: 1fr; gap: 10px; }
  .comp-area-note { display: none; }
}

/* ════════════════════════════════════════════════════════════
   OPPSETTSVEIVISER — Skifer steg 8
   Fem steg, sentrert i 760px, som i mockupen.
   ════════════════════════════════════════════════════════════ */

.obw-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  overflow-y: auto;
}

.obw-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.obw-head { text-align: center; margin-bottom: 24px; }

.obw-step {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.obw-head h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}

.obw-head p {
  color: var(--text-2);
  font-size: 14.5px;
  margin: 0 auto;
  max-width: 460px;
}

.obw-track {
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  margin-bottom: 32px;
  overflow: hidden;
}

.obw-track > div { height: 100%; border-radius: 3px; background: var(--ink); transition: width 0.3s var(--ease); }

.obw-body { margin-bottom: 24px; }

.obw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.obw-choice {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.12s var(--ease);
}

.obw-choice:hover { border-color: var(--border-2); }
.obw-choice.on { border-color: var(--ink); }

.obw-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--inv);
}

.obw-choice.on .obw-check { background: var(--ink); border-color: var(--ink); }

.obw-choice-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.obw-choice-hint { font-size: 11.5px; color: var(--muted); }

.obw-count { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }

.obw-fields, .obw-rows { display: flex; flex-direction: column; gap: 14px; }

.obw-label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.obw-optional { font-weight: 400; color: var(--muted); }

.obw-label input,
.obw-row input,
.obw-role input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
}

.obw-label input.mono { font-family: var(--font-mono); }

.obw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.obw-role {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.obw-add { margin-top: 12px; font-size: 13px; }

.obw-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.obw-sum-row { font-size: 14px; color: var(--text-2); padding: 6px 0; }
.obw-sum-row .mono { font-family: var(--font-mono); font-weight: 700; color: var(--ink); margin-right: 8px; }

.obw-sum-note {
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}

.obw-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

@media (max-width: 620px) {
  .obw-grid, .obw-row, .obw-role { grid-template-columns: 1fr; }
}

/* Skilletegnet hører til virksomhetsnavnet, ikke til markupen: uten dette
   står et løst «·» i dashbordet til dataene er lastet. */
#dash-tenant:not(:empty)::after { content: '\00a0\00b7\00a0' }

/* ── MOBILMENY ─────────────────────────────────────────────────────
   De sju områdene med sidene under, samme inndeling som toppbaren.
   Erstatter sidefeltets 45+ punkter i åtte seksjoner på små skjermer. */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 86vw);
  z-index: 200;
  background: var(--sidebar-bg, #14181c);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 0 32px;
  transform: translateX(-100%);
  transition: transform 0.25s var(--ease);
}
.mobile-nav.open {
  display: block;
  transform: translateX(0);
}
.mnav-group { padding: 6px 0 10px; }
.mnav-group + .mnav-group { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.mnav-area {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  padding: 10px 20px 6px;
}
.mnav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 20px;
  cursor: pointer;
}
.mnav-item:hover { background: rgba(255, 255, 255, 0.06); }
.mnav-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--white);
  color: var(--white);
  font-weight: 500;
}
@media (min-width: 1025px) {
  .mobile-nav { display: none !important; }
}

/* Chevronene i etterlevelse og brukerlista er SVG nå, ikke tegn. */
.comp-chevron { display: inline-flex; transition: transform 0.2s }
.comp-chevron svg { width: 14px; height: 14px }

/* ── SKJEMAFELT ─────────────────────────────────────────────────────
   .form-control (75 felt) og .field-input (31 felt) ble brukt i markupen
   uten at noen av dem var definert. 106 felt sto med nettleserens
   standardutseende: grå ramme, monospace plassholder, feil skriftstørrelse.
   Etikettene (.form-label) var stylet, så skjemaene så halvferdige ut.
   Verdiene følger .search-input, som er husstilen fra før. */
.form-control,
.field-input {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control::placeholder,
.field-input::placeholder {
  color: var(--muted);
  font-family: var(--font);
  opacity: 1;
}
.form-control:focus,
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 24, 28, 0.1);
}
.form-control:disabled,
.field-input:disabled,
.form-control[readonly],
.field-input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}
/* Tall, datoer og koder i mono, som resten av systemet. */
.form-control[type='number'],
.field-input[type='number'],
.form-control[type='date'],
.field-input[type='date'],
.form-control[type='time'],
.field-input[type='time'] {
  font-family: var(--font-mono);
}
select.form-control,
select.field-input {
  padding-right: 30px;
  cursor: pointer;
  /* Egen pil, så feltet ser likt ut i alle nettlesere. */
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2379828b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
textarea.form-control,
textarea.field-input {
  min-height: 72px;
  resize: vertical;
}

/* ── KLASSER SOM MANGLET EN REGEL ───────────────────────────────────
   Funnet av lint:contracts. Hver av dem ble brukt i markupen uten at noen
   stylesheet definerte dem, så elementene sto med nettleserens standard.
   .page-title, .page-subtitle og .field-label er slått sammen med reglene
   de hører til lenger oppe. Resten er strukturklasser uten en naturlig
   slektning. */

/* Kolonnebredder i tabeller. Brukes på <th>, så cellene under følger. */
.col-w-80 { width: 80px }
.col-w-120 { width: 120px }
.col-w-150 { width: 150px }
.col-w-160 { width: 160px }
.col-w-180 { width: 180px }
.col-w-200 { width: 200px }

/* Tabeller som er bredere enn kortet de ligger i. Uten dette dyttet de
   layouten sidelengs i stedet for å rulle inni seg selv. */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Stegraden i veiviserne. JS fyller den med ett element per steg. */
.wiz-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

/* ── KANBAN ─────────────────────────────────────────────────────────
   Kolonnene var fire like oppsett med hver sin farge, skrevet ut som
   inline-stiler på tolv elementer. Formen ligger i klassene nå, og fargen
   henger på data-col, som markupen alt hadde. Å legge til en kolonne er
   fire linjer CSS i stedet for en kopiert stilstreng. */
.kanban-col-header {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-count {
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--white);
}
.kanban-cards {
  min-height: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

[data-col='open'] .kanban-col-header { background: var(--amber-light); border: 1px solid var(--amber) }
[data-col='open'] .kanban-count { background: var(--amber) }
[data-col='in-progress'] .kanban-col-header { background: var(--surface-2); border: 1px solid var(--ink) }
[data-col='in-progress'] .kanban-count { background: var(--ink); color: var(--inv) }
[data-col='blocked'] .kanban-col-header { background: var(--red-soft); border: 1px solid var(--red) }
[data-col='blocked'] .kanban-count { background: var(--red) }
[data-col='done'] .kanban-col-header { background: var(--green-soft); border: 1px solid var(--green) }
[data-col='done'] .kanban-count { background: var(--green) }

/* Feltet som holder valgte etiketter i AI-modulen. */
.ai-tag-field {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* Kolonnen i kanban-tavla. Header og kortliste har egne regler over. */
.kanban-col { display: flex; flex-direction: column; min-width: 0 }

/* Infoboks over en tabell eller et skjema: en rolig flate med forklaring.
   Sto som den samme stilstrengen på sju elementer. */
.card-info {
  font-size: 13px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--surface-2);
  border-radius: 6px;
  padding: 10px 14px;
}

/* Plassholder mens data lastes. Størrelsen settes der den brukes, siden den
   skal etterligne innholdet som kommer. Skimmeret hører til klassen. */
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
