/* Minuba-inspireret: lyst, rent, teal-accent */
:root {
  --teal: #00a9b5;
  --teal-dark: #008a94;
  --teal-light: #e6f7f8;
  --teal-muted: #b8e8ec;
  --navy: #1a3a4a;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1e293b;
  --muted: #64748b;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 240px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); text-decoration: underline; }
.link { font-weight: 500; }

/* —— Login —— */
.auth-shell { background: var(--bg); }
.main--auth { max-width: none; padding: 0; }
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-wrap--single {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 2rem;
}
.auth-panel--brand {
  background: linear-gradient(145deg, var(--navy) 0%, #234d62 50%, var(--teal-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.auth-panel__inner { max-width: 380px; }
.auth-logo {
  display: inline-flex;
  width: 48px;
  height: 48px;
  background: var(--teal);
  color: #fff;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.auth-panel--brand h1 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
}
.auth-panel--brand p { margin: 0 0 1.5rem; opacity: 0.9; font-size: 1rem; }
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.auth-features li {
  padding: .5rem 0 .5rem 1.5rem;
  position: relative;
  opacity: 0.95;
}
.auth-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85rem;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
}
.auth-panel--form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.auth-card h2 { margin: 0 0 .25rem; font-size: 1.5rem; color: var(--navy); }
.auth-card .muted { margin: 0 0 1.5rem; }

/* —— App layout —— */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.2s ease;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar__logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.sidebar__brand strong {
  display: block;
  font-size: .95rem;
  color: var(--navy);
  line-height: 1.2;
}
.sidebar__brand span {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
}
.sidebar__nav {
  flex: 1;
  padding: .75rem .5rem;
  overflow-y: auto;
}
.sidebar__section {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 1rem .75rem .35rem;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
}
.sidebar__link:hover {
  background: var(--surface2);
  text-decoration: none;
  color: var(--navy);
}
.sidebar__link.is-active {
  background: var(--teal-light);
  color: var(--teal-dark);
  border-left-color: var(--teal);
}
.sidebar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar__link.is-active .sidebar__icon { opacity: 1; color: var(--teal); }
.sidebar__icon svg { width: 100%; height: 100%; display: block; }
.sidebar__footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .75rem;
}
.sidebar__user-link {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  padding: .35rem .4rem;
  margin: 0 -.4rem .75rem;
  transition: background .15s;
}
.sidebar__user-link:hover,
.sidebar__user-link.is-active {
  background: rgba(255, 255, 255, .08);
}
.sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}
.sidebar__user strong { display: block; font-size: .85rem; color: var(--navy); }
.sidebar__user span { font-size: .75rem; color: var(--muted); }
.sidebar__logout {
  display: block;
  text-align: center;
  padding: .45rem;
  font-size: .8rem;
  color: var(--muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.sidebar__logout:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar__menu {
  display: none;
  background: none;
  border: none;
  padding: .35rem;
  cursor: pointer;
  color: var(--text);
}
.topbar__menu svg { width: 24px; height: 24px; }
.topbar__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  flex: 1;
  min-width: 0;
}
.topbar-mail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.topbar-mail-btn:hover,
.topbar-mail-btn.is-active {
  background: var(--teal-light, #e8f6f4);
  border-color: var(--teal, #0d9488);
  color: var(--teal, #0d9488);
}
.topbar-mail-btn__icon {
  width: 22px;
  height: 22px;
}
.admin-mail-cat--invoice { background: #e8f4fc; color: #0b4a6f; }
.admin-mail-cat--quote { background: #ecfdf5; color: #047857; }
.admin-mail-cat--reminder { background: #fff7ed; color: #9a3412; }
.admin-mail-cat--invite,
.admin-mail-cat--reset,
.admin-mail-cat--quote_leader { background: #f5f3ff; color: #5b21b6; }
.admin-mail-table-wrap { overflow-x: auto; }
.admin-mail-email {
  font-size: .85rem;
  max-width: 200px;
  word-break: break-all;
}
.admin-mail-att-cell { max-width: 220px; }
.admin-mail-att-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.admin-mail-att {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  padding: .15rem .45rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1280px;
  width: 100%;
}
.footer {
  text-align: center;
  padding: .75rem;
  color: var(--muted);
  font-size: .75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* —— Components —— */
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; font-size: 1.35rem; color: var(--navy); font-weight: 600; }
.page-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.panel--warn {
  border-color: #fcd34d;
  background: var(--warn-bg);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.panel h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}
.panel h3 { margin: 1rem 0 .5rem; font-size: .9rem; font-weight: 600; color: var(--navy); }

.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
  font-weight: 500;
}
.flash--success { background: var(--success-bg); border: 1px solid #a7f3d0; color: var(--success); }
.flash--error { background: var(--danger-bg); border: 1px solid #fecaca; color: var(--danger); }

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 1rem;
  padding: 10px 14px;
  background: var(--warn-bg);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #92400e;
}
.demo-banner__exit {
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
  white-space: nowrap;
}
.demo-banner__exit:hover { text-decoration: underline; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--border);
}
.stat-card--blue { border-top-color: var(--teal); }
.stat-card--green { border-top-color: var(--success); }

.revenue-filters { margin-bottom: 1.25rem; }
.revenue-kpis { margin-bottom: 1.5rem; }
.revenue-chart-panel { margin-bottom: 1.25rem; }
.revenue-chart-panel h2 { margin: 0 0 .35rem; font-size: 1.05rem; }
.revenue-chart-wrap {
  position: relative;
  min-height: 220px;
  max-width: 100%;
}
.revenue-chart-wrap--short { min-height: 160px; }
.revenue-chart-wrap canvas { max-width: 100%; }
.stat-card--amber { border-top-color: var(--warn); }
a.stat-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
a.stat-card--link:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.dashboard-shortcut {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dashboard-shortcut:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.dashboard-shortcut--primary {
  border-color: var(--teal);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.08) 0%, var(--surface) 100%);
}
.dashboard-shortcut strong { font-size: 1rem; }
.dashboard-shortcut .muted { font-size: 0.85rem; }
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; }

.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--muted)) 12%, white);
  color: var(--c, var(--muted));
  border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 25%, white);
}
.badge--lg { font-size: .85rem; padding: .35rem .65rem; }

.pri { font-size: .8rem; font-weight: 600; }
.pri--urgent { color: var(--danger); }
.pri--high { color: var(--warn); }
.pri--normal { color: var(--muted); }
.pri--low { color: #94a3b8; }

.user-badge {
  font-size: .7rem;
  padding: .15rem .45rem;
  border-radius: 4px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 600;
}
.role-admin { background: #fef3c7; color: #b45309; }
.role-dispatcher { background: var(--teal-light); color: var(--teal-dark); }
.role-technician { background: #dbeafe; color: #1d4ed8; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th, .table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--surface2);
}
.table tbody tr:last-child td { border-bottom: none; }
.table--clickable tbody tr { cursor: pointer; transition: background 0.1s; }
.table--clickable tbody tr:hover { background: var(--teal-light); }
.row--inactive { opacity: 0.55; }
.actions { white-space: nowrap; }
.actions form.inline { display: inline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; background: var(--border); color: var(--navy); }
.btn--primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { background: #b91c1c; color: #fff; }
.btn--ghost { background: var(--surface); }
.btn--sm { padding: .35rem .75rem; font-size: .8rem; }
.btn--block { width: 100%; }
.btn--status {
  border-color: color-mix(in srgb, var(--c) 40%, white);
  color: var(--c);
  background: color-mix(in srgb, var(--c) 8%, white);
}

.form label {
  display: block;
  margin-bottom: .85rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
}
.form input, .form select, .form textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .6rem .85rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-muted);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form--grid { max-width: 720px; }
.form-inline {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  align-items: stretch;
}
.form-inline input {
  flex: 1;
  margin: 0;
  padding: .55rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.filters select, .filters input[type="date"], .filters input[type="search"] {
  padding: .45rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .875rem;
}
.filters__search { flex: 1; min-width: 200px; max-width: 420px; margin: 0; }
.filters__search-input { width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.filters label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.chk { color: var(--text); font-size: .875rem; display: flex; align-items: center; gap: .4rem; font-weight: 500; }

.split {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 1.25rem;
  align-items: start;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: .5rem .75rem;
  margin: 0;
}
.dl dt { color: var(--muted); font-size: .8rem; font-weight: 600; }
.dl dd { margin: 0; font-size: .9rem; }

.status-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .25rem;
}
.status-bars { display: flex; flex-direction: column; gap: .65rem; }
.status-bar {
  display: grid;
  grid-template-columns: 100px 1fr 36px;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
}
.status-bar__track {
  height: 10px;
  background: var(--surface2);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.status-bar__fill { height: 100%; border-radius: 5px; }
.status-bar__count { text-align: right; color: var(--muted); font-weight: 600; }

.job-list { list-style: none; padding: 0; margin: 0; }
.job-list li {
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}
.job-list li:last-child { border: none; }
.job-list a { font-weight: 500; }

.notes { list-style: none; padding: 0; margin: 1rem 0 0; }
.notes li {
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.notes li p { margin: .35rem 0 0; color: var(--text); }
.notes .muted { font-size: .8rem; margin-left: .5rem; }

.back { margin-top: 1rem; font-size: .9rem; }
.quick-links { display: flex; gap: .75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* Kalender */
.cal-nav { display: flex; gap: .5rem; }
/* Ugekalender */
.week-cal {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  grid-template-rows: auto repeat(14, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  min-height: 400px;
  user-select: none;
}
.week-cal__corner { grid-column: 1; grid-row: 1; border-bottom: 1px solid var(--border); background: var(--surface2); }
.week-cal__dayhead {
  grid-row: 1;
  padding: .5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface2);
  font-size: .8rem;
}
.week-cal__dayhead.is-today { background: var(--teal-light); color: var(--teal-dark); font-weight: 700; }
.week-cal__dayhead.is-selected { background: var(--navy); color: #fff; }
.week-cal__dayhead.is-holiday {
  background: #fef3c7;
  color: #92400e;
  border-bottom-color: #f59e0b;
}
.week-cal__dayhead.is-holiday.is-today { background: #fde68a; color: #78350f; }
.week-cal__dayhead.is-holiday.is-selected { background: #d97706; color: #fff; }
.week-cal__holiday {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  color: #b45309;
  line-height: 1.2;
  margin-top: 2px;
}
.week-cal__col.is-holiday {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(245, 158, 11, 0.07) 8px,
    rgba(245, 158, 11, 0.07) 16px
  );
}
.week-cal__col.is-holiday .week-cal__slot { cursor: not-allowed; }
.week-cal--plan .week-cal__col.is-holiday .week-cal__slot { cursor: crosshair; }
.week-cal--plan .week-cal__dayhead {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s;
}
.week-cal--plan .week-cal__dayhead:hover { background: var(--teal-light); }
.week-cal--plan .week-cal__dayhead.is-selected:hover { background: var(--navy); color: #fff; }
.plan-day-section { margin-top: 0; }
.plan-day-section h2 { margin-top: 0; }
.week-cal__dayname { display: block; font-weight: 700; }
.week-cal__daydate { color: var(--muted); font-size: .75rem; }
.week-cal__times {
  grid-column: 1;
  grid-row: 2 / -1;
  display: grid;
  grid-template-rows: repeat(14, 48px);
  border-right: 1px solid var(--border);
  background: var(--surface2);
}
.week-cal__time {
  font-size: .65rem;
  color: var(--muted);
  padding: 2px 4px 0 0;
  text-align: right;
  border-top: 1px solid var(--border);
}
.week-cal__col {
  position: relative;
  display: grid;
  grid-template-rows: repeat(14, 48px);
  border-left: 1px solid var(--border);
  grid-row: 2 / -1;
}
.week-cal__slot {
  border-top: 1px solid var(--border);
  cursor: crosshair;
  z-index: 1;
}
.week-cal__slot.is-selecting { background: color-mix(in srgb, var(--teal) 18%, transparent); }
.week-cal__events-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.week-cal__event {
  position: absolute;
  left: 2px;
  right: 2px;
  pointer-events: auto;
  border: none;
  border-left: 3px solid var(--c, var(--teal));
  background: color-mix(in srgb, var(--c, var(--teal)) 14%, white);
  border-radius: 4px;
  padding: 10px 4px 10px;
  text-align: left;
  font-size: .7rem;
  cursor: pointer;
  overflow: hidden;
  z-index: 3;
  touch-action: none;
}
.week-cal__event.is-draggable { cursor: grab; }
.week-cal__event.is-dragging {
  cursor: grabbing;
  opacity: 0.92;
  z-index: 12;
  box-shadow: var(--shadow-md);
}
.week-cal__resize {
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 5;
  cursor: ns-resize;
}
.week-cal__resize--top { top: 0; }
.week-cal__resize--bottom { bottom: 0; }
.week-cal__event-body {
  display: block;
  pointer-events: none;
  min-height: 100%;
}
.week-cal__event:hover { filter: brightness(0.97); box-shadow: var(--shadow); }
.week-cal__event.has-time {
  background: color-mix(in srgb, var(--c, var(--teal)) 38%, #0f172a) !important;
  border-left-width: 4px;
  font-weight: 600;
  color: #fff;
}
.week-cal__event.has-time .week-cal__event-time { color: rgba(255,255,255,.85); }
.week-cal__event.has-time .week-cal__event-title { color: #fff; }
.week-cal__event.has-time .week-cal__closed { background: rgba(0,0,0,.35); }
.week-cal__event.is-closed { opacity: .88; border-style: dashed; }
.week-cal__event--break {
  border-style: dashed;
  opacity: .95;
}
.week-cal__event--break .week-cal__event-title { font-weight: 500; }
.week-cal__closed {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #64748b;
  color: #fff;
  border-radius: 3px;
  vertical-align: middle;
}
.week-cal__event-time { display: block; color: var(--muted); font-size: .65rem; }
.week-cal__event-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: .75rem 0 1.5rem;
  font-size: .8rem;
  color: var(--muted);
}
.week-cal-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.cal-modal {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-md);
}
.cal-modal::backdrop { background: rgba(15, 23, 42, 0.4); }
.cal-modal h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.cal-modal__actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.cal-action-buttons { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.btn--block { width: 100%; justify-content: center; }

.calendar { margin-bottom: 1.5rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow); }
.calendar__head, .calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar__head div {
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  padding: .5rem;
}
.calendar__cell {
  min-height: 92px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .4rem;
  font-size: .75rem;
}
.calendar__cell--empty { background: transparent; border-color: transparent; }
.calendar__cell--today {
  border-color: var(--teal);
  background: var(--teal-light);
  box-shadow: inset 0 0 0 1px var(--teal-muted);
}
.calendar__day { font-weight: 700; color: var(--navy); display: block; margin-bottom: .3rem; font-size: .8rem; }
.calendar__event {
  display: block;
  padding: 3px 5px;
  margin-bottom: 3px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--c, var(--teal)) 15%, white);
  color: var(--navy);
  text-decoration: none;
  font-size: .65rem;
  font-weight: 500;
  border-left: 2px solid var(--c, var(--teal));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar__event:hover { text-decoration: none; background: color-mix(in srgb, var(--c, var(--teal)) 22%, white); }
.calendar__time { color: var(--muted); margin-right: 3px; }
.calendar__more { font-size: .65rem; color: var(--muted); }

/* Køreplan */
.route-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.route-stop {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: .5rem;
  cursor: grab;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.route-stop:hover { box-shadow: var(--shadow-md); }
.route-stop.dragging { opacity: 0.6; box-shadow: none; }
.route-stop__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.route-stop__body { flex: 1; min-width: 0; }
.route-stop__body strong a { color: var(--navy); font-weight: 600; }
.route-stop__body p { margin: .25rem 0; font-size: .85rem; color: var(--muted); }

/* Billeder — upload på sag */
.case-photo-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.case-photo-upload__lead {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.case-photo-upload__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.case-photo-upload__actions .btn {
  min-height: 48px;
}
.case-photo-upload__name {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}
.case-photo-upload__status {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--teal-dark);
}
.case-photo-upload__status--error {
  color: var(--danger);
}
.case-photo-upload__folder {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}
.case-photo-upload__folder select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.85rem;
  font-size: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gallery__item {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.gallery__item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.gallery__item figcaption {
  padding: .6rem;
  font-size: .7rem;
  color: var(--muted);
}
.gallery__item .inline { margin-top: .4rem; }

/* Faktura */
.invoice-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--teal-light);
  border-radius: var(--radius);
  border: 1px solid var(--teal-muted);
}
.invoice-summary div { display: flex; flex-direction: column; gap: .2rem; }
.invoice-summary strong { font-size: 1.1rem; color: var(--navy); }
.invoice-rest { color: var(--teal-dark); }
.invoice-form { max-width: 560px; }
.supplier-inv-card { margin-bottom: .75rem; }
.supplier-inv-card__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.supplier-inv-card__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .75rem; }
.form--inline select { max-width: 280px; }
.input-sm { padding: .35rem .5rem; font-size: .85rem; border: 1px solid var(--border); border-radius: var(--radius); }
.invoice-frame {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}
.badge.inv-status--draft { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
.badge.inv-status--sent { background: #e6f7f8; color: #008a94; border-color: #b8e8ec; }
.badge.inv-status--paid { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.badge.inv-status--cancelled { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
.badge.inv-status--overdue { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.badge.inv-status--reminder { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.table tr.row--overdue { background: #fef2f2; }
.table tr.row--overdue:hover { background: #fee2e2; }
.inv-status-panel h2 { margin-bottom: 1rem; }
.inv-status-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.inv-status-form {
  max-width: 420px;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.inv-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Sticky faner på arbejdsseddel (order.php) */
.order-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.subcase-list {
  margin: .5rem 0 0;
  padding-left: 1.25rem;
}
.subcase-list li {
  margin: .35rem 0;
}
.order-page .order-sections,
.order-page .order-section,
.order-page .order-section .panel {
  max-width: 100%;
  min-width: 0;
}
.order-page .table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.order-page .table-scroll > .table {
  width: auto;
  min-width: 520px;
}
.order-page .form-inline {
  flex-wrap: wrap;
  max-width: 100%;
}
.order-page .fsm-address-autocomplete {
  max-width: 100%;
  min-width: 0;
}
.order-page .invoice-summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.case-tabs--dock {
  display: block;
  position: sticky;
  top: 56px;
  z-index: 45;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0;
  background: var(--bg);
  border: none;
  box-shadow: none;
  overflow: hidden;
  max-width: 100%;
}
.case-tabs--dock .case-tabs__inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.order-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.order-section {
  scroll-margin-top: 7.5rem;
}
.order-section__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.case-tab-panel {
  scroll-margin-top: 7rem;
}

.wsheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.wsheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--surface) 55%);
  border-bottom: 1px solid var(--border);
}
.wsheet__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-dark);
}
.wsheet__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.wsheet__status {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.wsheet-top {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 300px);
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 1.5rem;
}
.wsheet-steps {
  display: flex;
  min-height: 42px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.wsheet-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem 0.6rem 1rem;
  margin-right: -8px;
  background: #94a3b8;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  transition: background 0.2s, transform 0.15s;
}
.wsheet-step:first-child {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  padding-left: 0.85rem;
}
.wsheet-step:last-child {
  margin-right: 0;
}
.wsheet-step:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.wsheet-step.is-done {
  background: linear-gradient(180deg, #8b3350 0%, #7b2d45 100%);
}
.wsheet-step.is-active {
  background: linear-gradient(180deg, #f39c12 0%, #e67e22 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.wsheet-economy {
  min-width: 0;
}
.wsheet-economy__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.wsheet-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
}
.wsheet-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0;
}
.wsheet-wheel {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.wsheet-wheel__hole {
  position: absolute;
  inset: 22%;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.wsheet-wheel__pct {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--teal-dark);
}
.wsheet-wheel__pct--bad {
  color: var(--danger);
}
.wsheet-wheel__pct-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.15rem;
}
.wsheet-economy__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
}
.wsheet-economy__link:hover {
  text-decoration: underline;
}
.wsheet-customer {
  padding: 0 1.5rem 1.25rem;
}
.wsheet-customer__heading {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.wsheet-customer__grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 1fr 1fr;
  gap: 0.75rem;
}
.wsheet-customer__card {
  padding: 0.85rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.55;
}
.wsheet-customer__name {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--navy);
}
.wsheet-customer__line {
  margin: 0.1rem 0;
}
.wsheet-meta {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.wsheet-meta div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
}
.wsheet-meta dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.wsheet-meta dd {
  margin: 0;
  font-weight: 500;
}
.wsheet-subhead {
  font-weight: 700;
  font-size: 0.8rem;
  margin: 0 0 0.5rem !important;
  color: var(--navy);
}
.wsheet-label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
}
.wsheet-details {
  margin: 0 1.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  overflow: hidden;
}
.wsheet-details__toggle {
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-dark);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.wsheet-details__toggle::-webkit-details-marker {
  display: none;
}
.wsheet-details__toggle::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.15s;
}
.wsheet-details[open] .wsheet-details__toggle::before {
  transform: rotate(90deg);
}
.wsheet-details__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}
.wsheet-details__note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}
.economy-kpis--compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.economy-kpis--compact .kpi {
  padding: 0.65rem 0.75rem;
}
.wsheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-bottom: 0.5rem;
}
.wsheet-toolbar__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wsheet-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Økonomi / pizzahjul */
/* —— Sag faner —— */
.case-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.case-tabs__link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .9rem;
  border-radius: var(--radius);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, color .15s, box-shadow .15s;
}
.case-tabs__link:hover {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}
.case-tabs__link.is-active {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 137, 148, 0.35);
}
.case-tabs__count {
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  background: var(--border);
  color: var(--text);
  border-radius: 999px;
}
.case-tabs__link.is-active .case-tabs__count {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.case-tab-panel { min-height: 200px; }
.page-head__actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.case-desc { white-space: pre-wrap; }

/* Dokumentation */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: start;
}
.doc-folder-list { list-style: none; margin: 0; padding: 0; }
.doc-folder-list li {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: .25rem 0;
  font-size: .875rem;
}
.doc-folder-list a { color: var(--text); text-decoration: none; }
.doc-folder-list a.is-active { color: var(--teal-dark); font-weight: 600; }
.doc-folders h3 { margin: 0 0 .75rem; font-size: .9rem; }

/* Kvalitet */
.quality-list { display: flex; flex-direction: column; gap: 1rem; }
.quality-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
}
.quality-item__head {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: .5rem;
  align-items: baseline;
}

/* KLS Bilag 10 */
.kls-enable-panel { margin-bottom: 1.25rem; }
.kls-disable-form { margin-left: auto; }
.kls-form-panel__head { flex-wrap: wrap; gap: .5rem; }
.kls-form-panel { margin-bottom: 1.5rem; }
.kls-form-panel__head { align-items: flex-start; }
.kls-form-panel__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.kls-form__attach-flag { display: block; margin: 1rem 0 0; padding: .75rem; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border); }
.inv-send-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.kls-form-progress { margin: 0 0 1rem; font-size: .9rem; }
.kls-form__block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  background: var(--surface2);
}
.kls-form__block legend {
  font-weight: 600;
  color: var(--navy);
  padding: 0 .35rem;
}
.kls-check-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kls-check-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.kls-check-table th,
.kls-check-table td {
  padding: .5rem .4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.kls-check-table th { text-align: center; font-weight: 600; white-space: nowrap; width: 3.5rem; }
.kls-check-table__q { text-align: left; min-width: 200px; font-weight: 500; }
.kls-radio {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
.kls-radio input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--teal); }
.kls-radio span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.kls-meter-notes { display: block; margin-bottom: .75rem; }
.kls-meter-scroll { margin: .5rem 0; }
.kls-meter-table input { width: 100%; min-width: 4rem; font-size: .85rem; padding: .35rem .45rem; }
.kls-sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.kls-sign-block h3 { margin: 0 0 .5rem; font-size: .95rem; }
.kls-sign-pad-wrap {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
  touch-action: none;
}
.kls-sign-pad {
  display: block;
  width: 100%;
  height: 140px;
  cursor: crosshair;
}
.kls-sign-preview img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.kls-sign-actions { margin: .5rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.kls-sign-clear-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.kls-form-actions { margin-top: 1rem; }
@media (max-width: 768px) {
  .kls-sign-grid { grid-template-columns: 1fr; }
  .kls-sign-pad { height: 160px; }
  .kls-check-table th { font-size: .75rem; width: 2.75rem; }
}

/* Hændelsesforløb */
.activity-log { list-style: none; margin: 0; padding: 0; }
.activity-log__item {
  display: flex;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-log__item:last-child { border-bottom: none; }
.activity-log__icon { font-size: 1.25rem; flex-shrink: 0; }
.activity-log__meta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.activity-log__body p { margin: .25rem 0 0; }

/* Timeseddel */
.week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
}
.timesheet-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.panel--submit h2 { margin-top: 0; }
.muted-block p { margin: .35rem 0; }
.form--inline { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.form--inline label { margin: 0; }
.trade-cat-head {
  font-size: 1rem;
  color: var(--navy);
  margin: 1.25rem 0 .5rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.trade-cat-head:first-child { margin-top: 0; }

/* Indstillinger */
.settings-page .page-head p { margin: .35rem 0 0; }
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.settings-aside {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.settings-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: .5rem;
  box-shadow: var(--shadow);
}
.settings-nav__link {
  display: block;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.settings-nav__link:hover {
  background: var(--surface2);
  color: var(--navy);
  text-decoration: none;
}
.settings-nav__link.is-active {
  background: var(--teal-light);
  color: var(--teal-dark);
  border-left-color: var(--teal);
  font-weight: 600;
}
.settings-nav__link small {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: .1rem;
}
.settings-nav__link.is-active small { color: var(--teal-dark); opacity: .85; }
.settings-aside-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.settings-aside-card h3 {
  margin: 0 0 .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
}
.settings-aside-card p { margin: 0 0 .75rem; font-size: .8rem; }
.settings-test-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.settings-test-actions form { margin: 0; }
.settings-test-actions .btn { width: 100%; justify-content: center; }
.settings-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 5rem;
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.settings-section {
  scroll-margin-top: 88px;
  padding: 0;
  margin-bottom: 0;
  overflow: hidden;
}
.settings-section__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--surface) 70%);
  border-bottom: 1px solid var(--border);
}
.settings-section__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--teal-muted);
  border-radius: 10px;
  color: var(--teal-dark);
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}
.settings-section__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.settings-section__lead {
  margin: .25rem 0 0;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 52rem;
}
.settings-section__body {
  padding: 1.25rem 1.5rem 1.35rem;
}
.settings-section__body > .form-row:first-child,
.settings-section__body > label:first-child { margin-top: 0; }
.settings-callout {
  padding: .75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.settings-callout code {
  font-size: .78rem;
  background: var(--surface);
  padding: .1rem .35rem;
  border-radius: 4px;
}
.settings-callout--ok {
  background: var(--success-bg);
  border-color: #a7f3d0;
  color: var(--success);
}
.settings-integration {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.settings-integration h3 {
  margin: 0 0 .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
}
.settings-integration .muted { margin-bottom: .75rem; font-size: .82rem; }
.settings-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: .65rem;
  overflow: hidden;
}
.settings-accordion:last-child { margin-bottom: 0; }
.settings-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  user-select: none;
}
.settings-accordion > summary::-webkit-details-marker { display: none; }
.settings-accordion > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s;
  flex-shrink: 0;
}
.settings-accordion[open] > summary {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.settings-accordion[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.settings-accordion__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.settings-accordion__body {
  padding: 1rem 1rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}
.settings-accordion__body label { margin-bottom: .75rem; }
.settings-accordion__body label:last-of-type { margin-bottom: 0; }
.settings-placeholder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 .85rem;
}
.settings-placeholder-tags code {
  font-size: .72rem;
  padding: .2rem .45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--teal-dark);
}
.settings-savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}
.settings-savebar p {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
}
.invoice-logo-box {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem;
}
.invoice-logo-preview {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
}
.invoice-logo-preview img {
  max-height: 72px;
  max-width: 240px;
  width: auto;
  height: auto;
  display: block;
}
.invoice-logo-upload {
  flex: 1;
  min-width: 200px;
}
.email-template__textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .8rem;
  line-height: 1.45;
}
.email-template__textarea--html { min-height: 160px; }

@media (max-width: 960px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-aside {
    position: static;
  }
  .settings-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .25rem;
    padding: .4rem;
    -webkit-overflow-scrolling: touch;
  }
  .settings-nav__link {
    flex: 0 0 auto;
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: .45rem .65rem;
  }
  .settings-nav__link.is-active {
    border-left: none;
    border-bottom-color: var(--teal);
  }
  .settings-nav__link small { display: none; }
  .settings-test-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .settings-test-actions .btn { width: auto; }
}

/* Sag: kundevalg og arbejdsadresse */
.customer-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  margin: 0 0 1rem;
}
.customer-fieldset legend {
  font-weight: 600;
  padding: 0 .35rem;
}
.customer-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.customer-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  font-size: .92rem;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .92rem;
}

/* Adresse-autocomplete (DAWA) */
.fsm-address-autocomplete { position: relative; }
.address-ac-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
}
.address-ac-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .6rem .75rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .875rem;
  cursor: pointer;
  color: var(--text);
}
.address-ac-list button:hover { background: var(--teal-light); }

/* Materialeforslag (AO / Solar) */
.fsm-material-suggest { position: relative; }
.fsm-material-suggest-label { flex: 1; min-width: 0; }
.material-suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: fixed;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: min(320px, 50vh);
  overflow-y: auto;
}
.material-suggest-empty {
  padding: .75rem 1rem;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.4;
}
.material-suggest-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  text-align: left;
  padding: .5rem .65rem;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}
.material-suggest-item:hover { background: var(--teal-light); }
.material-suggest-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2, #f4f4f4);
  border-radius: 4px;
  overflow: hidden;
}
.material-suggest-thumb--empty::after {
  content: "📦";
  font-size: 1.1rem;
  opacity: .45;
}
.material-suggest-thumb img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.material-suggest-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.material-suggest-title {
  font-size: .875rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-suggest-meta {
  font-size: .75rem;
  color: var(--muted);
}
.material-suggest-badge {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .45rem;
  border-radius: 4px;
  background: var(--border);
  color: var(--text);
}
.material-suggest-badge--ao {
  background: #e8f4fc;
  color: #0b4a6f;
}
.material-suggest-badge--solar {
  background: #fff4e6;
  color: #9a3412;
}

.case-map-bar {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.btn-map-open { width: 100%; max-width: 320px; }
@media (max-width: 768px) {
  .btn-map-open {
    width: 100%;
    max-width: none;
    padding: .85rem 1rem;
    font-size: 1rem;
  }
  .case-map-bar { position: sticky; bottom: .5rem; z-index: 5; }
}

/* Arbejdsseddel (order.php) — mobil */
@media (max-width: 768px) {
  .case-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .doc-layout { grid-template-columns: 1fr; }

  .order-page {
    margin-left: 0;
    margin-right: 0;
  }
  .order-page__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  .order-page__head h1 {
    font-size: 1.2rem;
    line-height: 1.25;
  }
  .order-page__head .muted {
    font-size: 0.9rem;
  }
  .order-page__head .page-head__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    align-items: stretch;
  }
  .order-page__head .page-head__actions .badge--lg {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
  }
  .order-page__head .page-head__actions form {
    display: block;
  }
  .order-page__head .page-head__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .order-page__head .page-head__actions form:only-of-type,
  .order-page__head .page-head__actions form:last-child:nth-child(2) {
    grid-column: 1 / -1;
  }

  .order-page .case-tabs--dock {
    top: 56px;
    margin-left: 0;
    margin-right: 0;
    padding: 0.35rem 0;
    background: var(--bg);
  }
  .order-page .case-tabs--dock .case-tabs__inner {
    padding: 0.35rem;
    gap: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .order-page .case-tabs__link {
    padding: 0.65rem 0.85rem;
    min-height: 44px;
    font-size: 0.8125rem;
    scroll-snap-align: start;
  }

  .order-page .order-sections {
    gap: 1.25rem;
  }
  .order-page .order-section {
    scroll-margin-top: 7rem;
  }
  .order-page .order-section__title {
    font-size: 1.05rem;
    padding: 0 0.15rem;
  }
  .order-page .order-section .panel {
    padding: 1rem;
    border-radius: var(--radius);
  }
  .order-page .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .order-page .panel-head .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .order-page .form-row,
  .order-page .form-row--3,
  .order-page .form-row--4 {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .order-page input,
  .order-page select,
  .order-page textarea {
    font-size: 16px;
  }
  .order-page .btn--sm {
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
  }
  .order-page .status-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .order-page .status-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.85rem;
  }
  .order-page .dl {
    display: grid;
    gap: 0.65rem;
  }
  .order-page .dl dt {
    margin-bottom: 0.1rem;
  }
  .order-page .dl dd {
    margin: 0 0 0.5rem;
  }
  .order-page .table-scroll {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .order-page .table-scroll > .table {
    margin: 0;
    border: none;
    box-shadow: none;
    font-size: 0.8rem;
  }
  .order-page .table-scroll > .table th,
  .order-page .table-scroll > .table td {
    padding: 0.55rem 0.65rem;
  }
  .order-page .table-scroll .btn--sm {
    min-height: 36px;
    min-width: 36px;
  }
  .order-page .economy-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .order-page .invoice-summary {
    grid-template-columns: 1fr;
  }
  .order-page .form-row--3 label[style*="grid-column"] {
    grid-column: 1 / -1 !important;
  }
  .order-page .doc-layout {
    gap: 0.75rem;
  }
  .order-page .doc-folders.panel {
    padding: 1rem;
  }
  .order-page .doc-folder-list li {
    flex-wrap: wrap;
  }
  .order-page .doc-main .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .order-page .doc-main .form-row .btn {
    width: 100%;
  }
  .order-page .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .order-page .gallery__item img {
    height: 120px;
  }
  .order-page .gallery__item figcaption {
    font-size: 0.72rem;
  }
  .order-page .gallery__item select {
    width: 100%;
    max-width: 100%;
  }
  .order-page .flash {
    font-size: 0.875rem;
  }
  .order-page__back {
    margin-top: 1.5rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .order-page__back a {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
  }
  .order-page .inv-quick-actions,
  .order-page .form-actions {
    flex-direction: column;
  }
  .order-page .inv-quick-actions .btn,
  .order-page .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .order-page__head .page-head__actions {
    grid-template-columns: 1fr;
  }
  .order-page .status-actions {
    grid-template-columns: 1fr;
  }
  .order-page .economy-kpis {
    grid-template-columns: 1fr;
  }
}

.panel--economy { scroll-margin-top: 80px; }
.economy-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.pizza-wrap { text-align: center; }
.pizza-wheel {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  position: relative;
  box-shadow: var(--shadow-md);
}
.pizza-wheel__center {
  position: absolute;
  inset: 28%;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--border);
}
.pizza-wheel__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1.1;
}
.pizza-wheel__value--bad { color: var(--danger); }
.pizza-wheel__label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pizza-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: .875rem;
}
.pizza-legend li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 0;
  flex-wrap: wrap;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.dot--mat { background: #6b4c9a; }
.dot--time { background: #7b2d45; }
.dot--margin { background: #9cb4c9; }
.text-good { color: var(--success); }
.text-bad { color: var(--danger); }
.economy-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.kpi {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.kpi strong { font-size: 1.15rem; color: var(--navy); }
.economy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}
.economy-grid h3 { margin: 0 0 .75rem; font-size: .95rem; color: var(--navy); }
.form--compact label { margin-bottom: .5rem; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row--4 { grid-template-columns: repeat(4, 1fr); }
.table--sm th, .table--sm td { padding: .45rem .6rem; font-size: .8rem; }
@media (max-width: 900px) {
  .case-tabs--dock .case-tabs__inner {
    padding: 0.25rem 1rem;
  }
  .wsheet-top { grid-template-columns: 1fr; }
  .wsheet-economy__card { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .wsheet-legend { width: auto; flex: 1; min-width: 120px; }
  .wsheet-customer__grid { grid-template-columns: 1fr; }
  .economy-kpis--compact { grid-template-columns: 1fr 1fr; }
  .wsheet-steps {
    flex-wrap: wrap;
    overflow: visible;
    box-shadow: none;
    gap: 4px;
  }
  .wsheet-step {
    flex: 1 1 calc(50% - 4px);
    margin: 0;
    clip-path: none;
    border-radius: var(--radius) !important;
  }
  .economy-layout { grid-template-columns: 1fr; }
  .economy-grid { grid-template-columns: 1fr; }
  .economy-kpis { grid-template-columns: 1fr; }
  .form-row--3, .form-row--4 { grid-template-columns: 1fr; }
  .order-page .case-tabs--dock .case-tabs__inner {
    padding: 0.35rem 0.75rem;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-panel--brand { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-md); }
  .app-main { margin-left: 0; min-width: 0; max-width: 100%; }
  .main { min-width: 0; max-width: 100%; overflow-x: clip; }
  .topbar__menu { display: flex; }
  .split, .detail-grid, .form-row { grid-template-columns: 1fr; }
  .settings-savebar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .settings-savebar .btn { width: 100%; }
}
@media (max-width: 600px) {
  .main { padding: 1rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

.quote-price-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.quote-price-summary strong {
  font-size: 1.25rem;
  color: var(--accent, #00a9b5);
}

.team-plan-member {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.team-plan-member:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.team-plan-member__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

/* —— Huskeliste / Kanban —— */
.kanban__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.kanban__add {
  display: flex;
  flex: 1;
  min-width: 220px;
  gap: 0.5rem;
}
.kanban__add input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}
.kanban__columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}
.kanban--compact .kanban__columns {
  gap: 0.65rem;
}
.kanban__col {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 120px;
}
.kanban__col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.kanban__count {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
}
.kanban__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  min-height: 80px;
}
.kanban__list--over {
  background: var(--teal-light);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.kanban__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow);
  cursor: grab;
}
.kanban__card--drag {
  opacity: 0.55;
}
.kanban__card-title {
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
}
.kanban__card-notes {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}
.kanban__card-actions {
  display: flex;
  gap: 0.15rem;
  margin-top: 0.4rem;
  justify-content: flex-end;
}
.kanban__delete {
  color: var(--danger);
}
@media (max-width: 900px) {
  .kanban__columns {
    grid-template-columns: 1fr;
  }
}

.stat-card--red .stat-num { color: var(--danger); }

.supplier-inv-lines-details summary::-webkit-details-marker { display: none; }
.supplier-inv-lines-details summary::before { content: '▸ '; }
.supplier-inv-lines-details[open] summary::before { content: '▾ '; }
.supplier-lines-preview--compact .table { font-size: 0.82rem; }
.supplier-lines-preview--compact .table th,
.supplier-lines-preview--compact .table td { padding: 0.35rem 0.5rem; }
