/* ===================================================================
   KAM-radar designsystem – inspirert av knowit.no
   Krem som papir, mørk navy som blekk, lavendel som aksent.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;

  /* === Palett === */
  --paper:       #fffef6;   /* primær bakgrunn */
  --paper-warm:  #f8f6f4;   /* sekundær / hover på papir */
  --surface:     #ffffff;   /* kortflate */
  --tint:        #e9e9ff;   /* lavendel-tint */
  --tint-deep:   #d4d4ff;
  --ink:         #0b0b26;   /* primær tekst */
  --ink-soft:    #4a4a6b;   /* sekundær tekst */
  --ink-mute:    #8b8ba3;   /* tertiær tekst */
  --ink-light:   #fefbe6;   /* tekst på mørk */
  --border:      #ebe9e3;
  --border-strong: #d4d1c8;

  /* Status-farger */
  --warm:        #c97a2b;
  --warm-soft:   #fef0e0;
  --cool:        #4d4dff;
  --cool-soft:   #e9e9ff;
  --cold:        #4a4a6b;
  --cold-soft:   #ebe9e3;
  --ok:          #1e8a4c;
  --ok-soft:     #e3f3ea;
  --danger:      #b91c1c;
  --danger-soft: #fef2f2;

  /* Form */
  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 11, 38, 0.04);
  --shadow-md: 0 4px 16px rgba(11, 11, 38, 0.06);
  --shadow-lg: 0 12px 32px rgba(11, 11, 38, 0.08);

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  /* Layout */
  --content-max: 1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
   Layout
   =================================================================== */

.app {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px 120px;
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand .mark {
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 2px;
  transform: rotate(45deg);
  margin-right: 4px;
}
.brand .tagline {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0;
}

nav.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
}
nav.topnav button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s ease;
}
nav.topnav button:hover {
  background: var(--paper-warm);
  color: var(--ink);
}
nav.topnav button.active {
  background: var(--ink);
  color: var(--ink-light);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--paper-warm);
  border-radius: 100px;
  font-size: 13px;
  color: var(--ink-soft);
}
.user-chip .avatar {
  width: 24px; height: 24px;
  background: var(--ink);
  color: var(--ink-light);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
}
.user-chip button.logout {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  cursor: pointer;
  font-size: 12px;
  padding: 0 0 0 4px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
  font-family: inherit;
}
.user-chip button.logout:hover { color: var(--ink); }

/* ===================================================================
   Views (router-like)
   =================================================================== */
.view { display: none; }
.view.active { display: block; }

/* ===================================================================
   Typography
   =================================================================== */
h1, h2, h3, h4 { color: var(--ink); }
h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lead {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 640px;
}

/* ===================================================================
   Cards
   =================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card.paper {
  background: var(--paper-warm);
  border-color: var(--border);
}
.card.tint {
  background: var(--tint);
  border-color: var(--tint-deep);
}
.card.dark {
  background: var(--ink);
  color: var(--ink-light);
  border-color: var(--ink);
}
.card.dark h1, .card.dark h2, .card.dark h3 { color: var(--ink-light); }
.card.dark .lead, .card.dark .text-soft { color: rgba(254, 251, 230, 0.7); }

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ink);
  color: var(--ink-light);
  border: 1px solid var(--ink);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover {
  background: #1a1a40;
  border-color: #1a1a40;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn.ghost:hover {
  background: var(--paper-warm);
}

.btn.tint {
  background: var(--tint);
  color: var(--ink);
  border-color: var(--tint-deep);
}
.btn.tint:hover { background: var(--tint-deep); }

.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: #fecaca;
}
.btn.danger:hover {
  background: var(--danger-soft);
}

.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 14px 24px; font-size: 16px; }

.btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.link {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.link:hover { color: var(--cool); }

/* ===================================================================
   Forms
   =================================================================== */
input[type=text], input[type=email], input[type=url], input[type=date],
select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 11, 38, 0.08);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.55; }

label.field { display: block; margin-bottom: 18px; }
label.field > span { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
label.field > small { display: block; color: var(--ink-mute); margin-bottom: 8px; font-size: 13px; }

/* ===================================================================
   Tables
   =================================================================== */
table.list {
  width: 100%;
  border-collapse: collapse;
}
table.list th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
table.list td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.list tr.row { cursor: pointer; transition: background 0.1s; }
table.list tr.row:hover td { background: var(--paper-warm); }
table.list td.name {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
table.list td.muted { color: var(--ink-mute); font-size: 13px; }

/* ===================================================================
   Badges and pills
   =================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: var(--paper-warm);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}
.badge.tint { background: var(--tint); color: var(--ink); border-color: var(--tint-deep); }
.badge.warm { background: var(--warm-soft); color: var(--warm); border-color: var(--warm-soft); }
.badge.cool { background: var(--cool-soft); color: var(--cool); border-color: var(--cool-soft); }
.badge.cold { background: var(--cold-soft); color: var(--cold); border-color: var(--border); }
.badge.ok   { background: var(--ok-soft);   color: var(--ok); border-color: var(--ok-soft); }
.badge.count { background: var(--surface); color: var(--ink-soft); }

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* ===================================================================
   Customer card – tabs and summary
   =================================================================== */
.cust-summary {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}
.cust-summary .stat {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  min-width: 120px;
}
.cust-summary .stat .label {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.cust-summary .stat .value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
  color: var(--ink);
}
.cust-summary .stat .sub {
  font-size: 11px;
  color: var(--ink-mute);
}
.cust-summary .stat.won .value { color: var(--ok); }
.cust-summary .stat.lost .value { color: #b91c1c; }

.cust-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 24px 0 24px;
  overflow-x: auto;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
  padding-top: 4px;
}
.cust-tabs button {
  background: transparent;
  border: none;
  padding: 14px 18px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.cust-tabs button:hover {
  color: var(--ink);
}
.cust-tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.cust-tabs button .count {
  display: inline-block;
  background: var(--paper-warm);
  color: var(--ink-mute);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 4px;
}
.cust-tabs button.active .count {
  background: var(--tint);
  color: var(--ink);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===================================================================
   Customer card layout
   =================================================================== */
.kundekort-hero {
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
  margin-bottom: 20px;
  position: relative;
}
.kundekort-hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.kundekort-hero .bransje {
  color: var(--ink-soft);
  font-size: 15px;
  font-style: italic;
}

.split-cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
}
@media (max-width: 760px) {
  .split-cols { grid-template-columns: 1fr; gap: 20px; }
}

.leveranse {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.leveranse:last-child { border-bottom: none; }
.leveranse .title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}
.leveranse .desc {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.ressurs-team {
  margin-bottom: 18px;
}
.ressurs-team .team-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.ressurs-team .role {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* ===================================================================
   Contacts grid
   =================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; gap: 20px; } }

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface);
}
.contact-card .name { font-weight: 500; }
.contact-card .role { color: var(--ink-soft); font-size: 13px; }
.contact-card .meta { color: var(--ink-mute); font-size: 12px; margin-top: 2px; }

/* ===================================================================
   Signals
   =================================================================== */
.signal-item {
  border-left: 3px solid var(--tint-deep);
  padding: 10px 0 10px 16px;
  margin-bottom: 12px;
}
.signal-item .title {
  font-weight: 500;
  margin-bottom: 4px;
}
.signal-item .meta {
  color: var(--ink-mute);
  font-size: 12px;
  margin-bottom: 6px;
}
.signal-item .notes {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin-top: 6px;
}

/* ===================================================================
   Tiltak
   =================================================================== */
.tiltak-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}
.tiltak-item .text { font-weight: 500; }
.tiltak-item .begrunnelse { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.tiltak-item .meta { color: var(--ink-mute); font-size: 12px; margin-top: 6px; }
.tiltak-item .actions { display: flex; flex-direction: column; gap: 4px; }
.tiltak-item.gjort { opacity: 0.55; }
.tiltak-item.gjort .text { text-decoration: line-through; }

/* ===================================================================
   Empty states
   =================================================================== */
.empty {
  text-align: center;
  color: var(--ink-mute);
  padding: 28px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--paper-warm);
  font-size: 14px;
}

/* ===================================================================
   Toast
   =================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--ink-light);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===================================================================
   Loader
   =================================================================== */
.loader {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================================
   AI-aktivitets-indikator – flytende pille nede i høyre hjørne
   =================================================================== */
.ai-busy {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  background: var(--ink);
  color: var(--ink-light);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(11, 11, 38, 0.25);
  z-index: 110;
  animation: ai-busy-pop 0.2s ease-out;
}
.ai-busy[hidden] { display: none; }
.ai-busy-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(254, 251, 230, 0.25);
  border-top-color: var(--ink-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.ai-busy-text {
  display: inline-block;
}
.ai-busy-text::after {
  content: '';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: ai-busy-dots 1.4s steps(4, end) infinite;
}
@keyframes ai-busy-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}
@keyframes ai-busy-pop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Inline overlay (vises over et område der AI-en jobber, f.eks. syntese-kortet) */
.ai-inline-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 254, 246, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  border-radius: inherit;
  z-index: 5;
  pointer-events: all;
}

.skeleton {
  background: linear-gradient(90deg, var(--paper-warm), var(--border) 50%, var(--paper-warm));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  height: 1em;
  display: inline-block;
  width: 100%;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.muted { color: var(--ink-mute); }
.text-soft { color: var(--ink-soft); }
.footer-meta {
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
  margin-top: 32px;
}

/* ===================================================================
   Interview chat
   =================================================================== */
.chat-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  margin-top: 20px;
}
.chat-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header h2 { margin: 0; font-size: 17px; }
.chat-messages {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  max-height: 480px;
  min-height: 300px;
  background: var(--paper);
}
.msg {
  display: flex;
  margin-bottom: 14px;
}
.msg.user { justify-content: flex-end; }
.msg .bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 14px;
}
.msg.agent .bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.msg.user .bubble {
  background: var(--ink);
  color: var(--ink-light);
  border-bottom-right-radius: 4px;
}
.typing {
  display: inline-flex;
  gap: 3px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.typing span {
  width: 6px; height: 6px;
  background: var(--ink-mute);
  border-radius: 50%;
  opacity: 0.4;
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chat-input {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  gap: 8px;
  background: var(--surface);
}
.chat-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 160px;
}
.chat-meta {
  padding: 10px 22px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--border);
  background: var(--paper-warm);
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 600px) { .role-picker { grid-template-columns: 1fr; } }
.role-card {
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.15s ease;
}
.role-card:hover {
  border-color: var(--ink);
  background: var(--paper-warm);
}
.role-card .label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 16px;
}
.role-card .desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ===================================================================
   Modal (HTML <dialog>)
   =================================================================== */
dialog.modal {
  border: none;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
}
/* Når modalen er åpen, gjør den til en flex-kolonne så header/body/footer
   ligger riktig og footer alltid er synlig (sticky nederst). */
dialog.modal[open] {
  display: flex;
  flex-direction: column;
}
dialog.modal::backdrop {
  background: rgba(11, 11, 38, 0.5);
  backdrop-filter: blur(2px);
}
dialog.modal .modal-header {
  padding: 22px 26px 6px;
  flex-shrink: 0;
}
dialog.modal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
dialog.modal .modal-sub {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 4px 0 0;
}
/* Body tar all gjenværende plass og scroller hvis innholdet er for stort.
   Slik blir footer alltid synlig. */
dialog.modal .modal-body {
  padding: 18px 26px 4px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
dialog.modal .modal-footer {
  padding: 16px 26px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: var(--paper-warm);
  flex-shrink: 0;
  /* Stick footer to the bottom and make it visually distinct.
     Slik er Lagre/Bekreft-knappen alltid synlig uten å scrolle. */
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 12px rgba(11, 11, 38, 0.04);
}
dialog.modal .modal-footer.no-border {
  border-top: none;
  background: transparent;
  box-shadow: none;
}
dialog.modal label.field {
  margin-bottom: 18px;
}
dialog.modal label.field > span.req { color: var(--danger); margin-left: 2px; }

/* Større inputs/textareas inne i modaler så teksten ikke føles trang */
dialog.modal input[type=text],
dialog.modal input[type=email],
dialog.modal input[type=url],
dialog.modal input[type=date],
dialog.modal select,
dialog.modal textarea {
  font-size: 15px;
  padding: 12px 14px;
}
dialog.modal textarea {
  min-height: 120px;
  line-height: 1.55;
}
