/*
 * BoligDash — stylesheet.
 *
 * Almindelig CSS uden framework (stakken: Jinja2 + almindelig JavaScript).
 * Farver og skrifttyper er de samme som i den tidligere React-udgave.
 * Byg videre med de navngivne klasser herunder i stedet for at skrive
 * stil direkte i skabelonerne.
 */

:root {
  --font-serif: "Newsreader", Georgia, serif;
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 1rem;

  --bg: oklch(0.968 0.008 95);
  --fg: oklch(0.26 0.03 160);
  --card: oklch(0.99 0.004 95);
  --muted: oklch(0.94 0.01 95);
  --muted-fg: oklch(0.52 0.015 150);
  --accent: oklch(0.94 0.015 90);
  --border: oklch(0.9 0.01 95);

  --forest: oklch(0.27 0.035 163);
  --forest-deep: oklch(0.22 0.03 163);
  --forest-fg: oklch(0.97 0.01 95);
  --forest-muted: oklch(0.78 0.015 150);
  --forest-border: oklch(0.42 0.03 163);
  --gold: oklch(0.78 0.11 82);
  --gold-fg: oklch(0.25 0.04 80);
  --danger: oklch(0.577 0.245 27.325);
  --danger-bg: oklch(0.95 0.04 27);
  --sky: oklch(0.6 0.12 235);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
}
img,
svg {
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------- */
/* Typografi                                                        */
/* --------------------------------------------------------------- */

.display {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.08;
}
.h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.2;
}
.h3 {
  font-size: 1.05rem;
  font-weight: 600;
}
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-fg);
}
.muted {
  color: var(--muted-fg);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.lead {
  font-size: 1.1rem;
  color: var(--muted-fg);
  max-width: 42rem;
}
.mono {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.pre-line {
  white-space: pre-line;
}
.danger-text {
  color: var(--danger);
}
.forest-text {
  color: var(--forest);
}

/* --------------------------------------------------------------- */
/* Afstand og layout                                                */
/* --------------------------------------------------------------- */

.stack > * + * {
  margin-top: 1rem;
}
.stack-sm > * + * {
  margin-top: 0.5rem;
}
.stack-lg > * + * {
  margin-top: 2rem;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.grow {
  flex: 1 1 auto;
  min-width: 0;
}
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2.5rem;
}
.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 760px) {
  .container {
    padding: 0 2rem;
  }
}

/* --------------------------------------------------------------- */
/* Knapper                                                          */
/* --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn:hover {
  background: var(--accent);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--forest-fg);
}
.btn-primary:hover {
  background: var(--forest-deep);
}
.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-fg);
}
.btn-danger {
  color: var(--danger);
}
.btn-pill {
  border-radius: 999px;
}
.btn-sm {
  min-height: 2rem;
  padding: 0.3rem 0.75rem;
  font-size: 12px;
}
.btn-link {
  border: 0;
  background: none;
  padding: 0;
  min-height: 0;
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

/* --------------------------------------------------------------- */
/* Kort, felter og tabeller                                         */
/* --------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-tight {
  padding: 1rem;
}
.card-muted {
  background: color-mix(in oklch, var(--bg) 60%, var(--card));
}
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.field {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.field > .input,
.field > .textarea,
.field > .select,
.field > .dictation {
  margin-top: 0.35rem;
}
.field .hint {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted-fg);
}
.input,
.select,
.textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
  padding: 0.6rem 0.85rem;
  font-size: 14px;
}
.input,
.select {
  min-height: 2.75rem;
}
.textarea {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.5;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--forest) 15%, transparent);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 14px;
}
.check input {
  margin-top: 0.25rem;
  accent-color: var(--forest);
}
.honeypot {
  position: absolute;
  left: -9999px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-fg);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover td {
  background: color-mix(in oklch, var(--accent) 50%, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--muted);
  color: var(--fg);
}
.badge-forest {
  background: color-mix(in oklch, var(--forest) 12%, transparent);
  color: var(--forest);
}
.badge-gold {
  background: color-mix(in oklch, var(--gold) 35%, transparent);
  color: var(--gold-fg);
}
.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.alert {
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  font-size: 14px;
  background: var(--muted);
}
.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.alert-ok {
  background: color-mix(in oklch, var(--forest) 10%, transparent);
  color: var(--forest);
}
.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted-fg);
}

/* --------------------------------------------------------------- */
/* Arbejdsrummet: menu til venstre                                  */
/* --------------------------------------------------------------- */

.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: 288px;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  background: var(--forest);
  color: var(--forest-fg);
  padding: 2rem 1.5rem;
}
@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }
  .shell-main {
    padding-left: 288px;
  }
  .mobile-bar {
    display: none !important;
  }
}
.shell-main {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand-mark {
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #fff;
  padding: 0.35rem;
}
.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}
.brand-tag {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--forest-muted);
}
.nav {
  margin-top: 1rem;
}
.nav a,
.nav summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.8rem;
  padding: 0.75rem 1rem;
  color: color-mix(in oklch, var(--forest-fg) 90%, transparent);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}
.nav summary::-webkit-details-marker {
  display: none;
}
.nav a:hover,
.nav summary:hover {
  background: var(--forest-deep);
}
.nav a.active {
  background: var(--gold);
  color: var(--gold-fg);
  font-weight: 500;
}
.nav .sub a {
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  font-size: 14px;
}
.nav .count {
  margin-left: auto;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-fg);
  padding: 0 0.5rem;
  font-size: 11px;
  font-weight: 600;
}
.nav details[open] > summary .chev {
  transform: rotate(180deg);
}
.nav .chev {
  margin-left: auto;
  color: var(--forest-muted);
  transition: transform 0.15s;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
.page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.page-wide {
  max-width: 96rem;
}
.avatar {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--forest-border);
  background: var(--forest-deep);
  color: var(--gold);
  font-weight: 500;
}

/* --------------------------------------------------------------- */
/* Dialoger (<dialog>) og beskeder                                  */
/* --------------------------------------------------------------- */

dialog.modal {
  width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  border: 0;
  border-radius: 1.5rem;
  padding: 0;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 30px 60px -20px rgba(20, 40, 30, 0.35);
}
dialog.modal::backdrop {
  background: color-mix(in oklch, var(--forest-deep) 40%, transparent);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.75rem 1rem;
}
.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0 1.75rem 1.5rem;
}
.close-x {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted-fg);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem;
}
.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  min-width: 16rem;
  max-width: 24rem;
  border-radius: 0.8rem;
  background: var(--forest-deep);
  color: var(--forest-fg);
  padding: 0.75rem 1rem;
  font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}
.toast.error {
  background: var(--danger);
}

/* --------------------------------------------------------------- */
/* Mikrofon-knap                                                     */
/* --------------------------------------------------------------- */

.dictation {
  position: relative;
  display: block;
}
.dictation > .textarea {
  padding-bottom: 2.75rem;
}
.dictate-btn {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  padding: 0 0.6rem;
  color: var(--muted-fg);
  font-size: 12px;
  cursor: pointer;
}
.dictate-btn.rec {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

/* --------------------------------------------------------------- */
/* Hjemmesiden                                                      */
/* --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
  background: color-mix(in oklch, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-nav {
  display: none;
  gap: 1.75rem;
  font-size: 14px;
}
.site-nav a {
  color: var(--muted-fg);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--fg);
}
@media (min-width: 760px) {
  .site-nav {
    display: flex;
  }
  .only-mobile {
    display: none !important;
  }
}
@media (max-width: 759px) {
  .only-desktop {
    display: none !important;
  }
}
.site-footer {
  margin-top: 6rem;
  background: var(--forest);
  color: var(--forest-fg);
}
.site-footer a {
  color: var(--forest-fg);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--gold);
}
.site-footer .muted {
  color: var(--forest-muted);
}
.hero {
  display: grid;
  gap: 3.5rem;
  align-items: center;
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}
@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    padding-top: 6rem;
  }
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.prose {
  max-width: 48rem;
  margin: 0 auto;
}
.prose h2 {
  margin-top: 3rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
}
.prose h3 {
  margin-top: 2rem;
  font-size: 1rem;
}
.prose p,
.prose ul {
  margin-top: 1rem;
}
.prose li {
  margin-top: 0.5rem;
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.area-list {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
}
.area-list li + li {
  border-top: 1px solid var(--border);
}
.area-list a {
  display: grid;
  gap: 0.5rem;
  padding: 1.75rem 0;
  text-decoration: none;
}
@media (min-width: 760px) {
  .area-list a {
    grid-template-columns: 80px 1fr 1.3fr 24px;
    align-items: baseline;
    gap: 2rem;
  }
}
.area-list a:hover .display {
  color: var(--forest);
}
.dot {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--gold);
  margin-right: 0.6rem;
  vertical-align: middle;
}
details.faq {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
details.faq summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  justify-content: space-between;
  font-weight: 500;
  font-size: 17px;
}
details.faq[open] summary .plus {
  transform: rotate(45deg);
}
.underline-gold {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  font-weight: 500;
}

/* Indstillinger */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 0.8rem;
  background: color-mix(in oklab, var(--forest) 10%, transparent);
}
.list-box {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
}
.list-box > li {
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}
.list-box > li + li {
  border-top: 1px solid var(--border);
}
.signature-editor {
  position: relative;
  min-height: 140px;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #fff;
  color: #171717;
  font-size: 0.875rem;
  line-height: 1.6;
  outline: none;
}
.signature-editor:focus {
  border-color: var(--forest);
}
.signature-editor:empty::before {
  content: attr(data-placeholder);
  color: #a3a3a3;
}
.signature-editor a {
  text-decoration: underline;
}
.signature-editor img {
  display: inline-block;
  max-width: 100%;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3rem;
  height: 1.75rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: var(--muted);
  cursor: pointer;
}
.switch .knob {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  transition: transform 0.15s;
}
.switch.on {
  background: var(--forest);
}
.switch.on .knob {
  transform: translateX(1.25rem);
}
.note-box {
  padding: 1rem;
  border-radius: 0.8rem;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Overblik */
.overview-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .overview-grid {
    grid-template-columns: 1fr 1.6fr;
  }
}
.seg {
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 12px;
  color: var(--muted-fg);
  text-decoration: none;
}
.seg:hover {
  background: var(--accent);
  color: var(--fg);
}
.seg.on {
  background: var(--forest);
  color: var(--forest-fg);
  font-weight: 500;
}
.empty-state {
  padding: 2.5rem 0;
  text-align: center;
}
.icon-tile.big {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
}
.icon-tile.big .icon {
  width: 1.75rem;
  height: 1.75rem;
}
.icon-tile.gold {
  background: color-mix(in oklab, var(--gold) 40%, transparent);
}
.agenda-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
}
.agenda-item:hover {
  border-color: color-mix(in oklab, var(--forest) 40%, transparent);
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  color: var(--fg);
  font-size: 1.2rem;
  text-decoration: none;
}
.icon-btn:hover {
  background: var(--accent);
}
.soft-box {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
}
.soft-box.dashed {
  padding: 1.25rem;
  border-style: dashed;
}
.bubble {
  max-width: 90%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--card);
}
.bubble.out {
  margin-left: auto;
  background: color-mix(in oklab, var(--forest) 10%, transparent);
}
.suggestion {
  padding: 1.25rem;
  border: 1px solid color-mix(in oklab, var(--gold) 50%, transparent);
  border-radius: 1rem;
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gold-text {
  color: var(--gold-fg);
}
.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--muted-fg);
  cursor: pointer;
}
.btn-quiet:hover {
  color: var(--fg);
}
.btn-quiet-border {
  color: var(--muted-fg);
}
.btn-quiet-border:hover {
  border-color: var(--fg);
  color: var(--fg);
}
.mail-frame {
  width: 100%;
  height: 60vh;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #fff;
}
.pick-list {
  max-height: 50vh;
  overflow-y: auto;
}
.pick {
  width: 100%;
  border: 0;
  border-radius: 0.8rem;
  background: none;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
}
.pick:hover {
  background: var(--accent);
}
.ai-draft-box {
  padding: 1rem;
  border: 1px solid color-mix(in oklab, var(--gold) 50%, transparent);
  border-radius: 0.8rem;
  background: color-mix(in oklab, var(--gold) 8%, var(--card));
}
/* Lister uden punkttegn og indryk. :where() giver ingen vægt, så .mt-* stadig virker. */
:where(ul.stack-sm, ol.stack-sm, ul.stack, ol.stack) {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list {
  min-width: 16rem;
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  font-size: 14px;
  cursor: pointer;
}
.check-row:hover {
  background: var(--accent);
}
.check-row input {
  width: 1rem;
  height: 1rem;
}
.preview-box {
  max-height: 45vh;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border-radius: 0.8rem;
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Opgavetavle og Sager */
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
}
.view-btn:hover {
  background: var(--accent);
}
.view-btn.on {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--forest-fg);
  font-weight: 500;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 16rem;
}
.search-field .icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: var(--muted-fg);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.75rem 0 2.25rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
  font: inherit;
  font-size: 14px;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
}
.filter-btn:hover {
  background: var(--accent);
}
.filter-btn.on {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--forest-fg);
}
.filter-count {
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-fg);
  font-size: 11px;
}
.filter-btn.on .filter-count {
  background: color-mix(in oklab, var(--forest-fg) 20%, transparent);
  color: inherit;
}
.count-pill {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
}
.board-grid {
  display: grid;
  gap: 1rem;
}
.activity {
  height: fit-content;
}
@media (min-width: 1280px) {
  .board-grid {
    grid-template-columns: 340px minmax(0, 1fr);
  }
  .activity {
    position: sticky;
    top: 5rem;
  }
}
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0.75rem 1rem 0;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--muted);
}
.seg-tabs button {
  padding: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-fg);
  cursor: pointer;
}
.seg-tabs button.on {
  background: var(--forest-deep);
  color: var(--forest-fg);
}
.activity-list {
  max-height: 70vh;
  overflow-y: auto;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.activity-list > li + li {
  border-top: 1px solid var(--border);
}
.activity-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
}
.activity-row:hover {
  background: color-mix(in oklab, var(--accent) 50%, transparent);
}
.activity-plain {
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
}
.who {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-fg);
}
.who .icon {
  width: 0.875rem;
  height: 0.875rem;
}
.who-new {
  background: color-mix(in oklab, var(--forest) 15%, transparent);
  color: var(--forest);
}
.who-tenant {
  background: color-mix(in oklab, var(--gold) 30%, transparent);
  color: var(--gold-fg);
}
.who-contact {
  background: #e0f2fe;
  color: #0369a1;
}
.columns-3 {
  display: grid;
  gap: 1rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.board-col {
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.board-col > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 1rem 1rem 0 0;
}
.col-ny {
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}
.col-ny > header {
  background: var(--muted);
}
.col-igang {
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}
.col-igang > header {
  background: color-mix(in oklab, var(--gold) 30%, transparent);
}
.col-afsluttet {
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.col-afsluttet > header {
  background: color-mix(in oklab, var(--forest) 15%, transparent);
}
.col-count {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
}
.board-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  cursor: pointer;
}
.board-card:hover {
  border-color: color-mix(in oklab, var(--forest) 40%, transparent);
}
.board-card.urgent {
  border-color: color-mix(in oklab, var(--danger) 45%, transparent);
}
.board-card .icon {
  width: 0.875rem;
  height: 0.875rem;
}
.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}
.clamp2,
.clamp3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp2 {
  -webkit-line-clamp: 2;
}
.clamp3 {
  -webkit-line-clamp: 3;
}
.age {
  flex-shrink: 0;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: color-mix(in oklab, var(--forest) 10%, transparent);
  color: var(--forest);
}
.age.mid {
  background: color-mix(in oklab, var(--gold) 30%, transparent);
  color: var(--gold-fg);
}
.age.old {
  background: color-mix(in oklab, var(--danger) 10%, transparent);
  color: var(--danger);
}
.age.closed {
  background: var(--muted);
  color: var(--muted-fg);
}
.pill-urgent {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.craft-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  background: color-mix(in oklab, var(--forest) 5%, transparent);
  color: var(--forest);
  font-size: 12px;
  font-weight: 500;
}
.sched {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.6rem;
  background: color-mix(in oklab, var(--forest) 10%, transparent);
  color: var(--forest);
  font-size: 12px;
  font-weight: 500;
}
.card-foot {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: nowrap;
  gap: 0.5rem;
}
.avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--muted);
  color: var(--fg);
  font-size: 10px;
  font-weight: 600;
}
.status-select {
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  font: inherit;
  font-size: 12px;
}
.archive-grid {
  display: grid;
  gap: 0.75rem;
  align-items: start;
}
@media (min-width: 768px) {
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.cases-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 1280px) {
  .cases-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}
.cases-cols {
  display: grid;
  gap: 0.75rem;
  align-items: start;
}
@media (min-width: 768px) {
  .cases-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1536px) {
  .cases-cols {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.case-col {
  min-height: 200px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.case-col > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.25rem;
}
.tone-gold {
  background: color-mix(in oklab, var(--gold) 15%, transparent);
}
.tone-forest5 {
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.tone-forest10 {
  background: color-mix(in oklab, var(--forest) 10%, transparent);
}
.tone-muted {
  background: color-mix(in oklab, var(--muted) 60%, transparent);
}
.urgent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-fg);
  cursor: pointer;
}
.urgent-toggle.on {
  border-color: var(--danger);
  background: color-mix(in oklab, var(--danger) 10%, transparent);
  color: var(--danger);
}
.tab-row {
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--muted-fg);
  cursor: pointer;
}
.tab.on {
  border-color: var(--forest);
  color: var(--forest);
  font-weight: 500;
}
.tab-count {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.tab.on .tab-count {
  background: var(--forest);
  color: var(--forest-fg);
}
.case-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  list-style: none;
}
.case-row::-webkit-details-marker,
.tl-body > summary::-webkit-details-marker {
  display: none;
}
details[open] > summary .chev {
  transform: rotate(180deg);
}
.progress {
  display: flex;
  gap: 0.375rem;
}
.progress > span {
  flex: 1;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--muted);
}
.progress > span.done {
  background: var(--forest);
}
.progress > span.next {
  background: var(--gold);
}
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl-step {
  display: flex;
  gap: 1rem;
}
.tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 2rem;
}
.tl-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-fg);
}
.tl-dot.done {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--forest-fg);
}
.tl-dot.next {
  border-color: var(--gold);
  background: color-mix(in oklab, var(--gold) 20%, transparent);
  color: var(--gold-fg);
}
.tl-dot.current {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--forest) 20%, transparent);
}
.tl-pin {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}
.tl-line {
  flex: 1;
  width: 2px;
  background: var(--border);
}
.tl-line.done {
  background: var(--forest);
}
.tl-body {
  flex: 1;
  min-width: 0;
}
.tl-body > summary {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}
.chat {
  display: flex;
}
.chat.mine {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: 90%;
  padding: 0.75rem 1rem;
  border-radius: 1rem 1rem 1rem 0.25rem;
  background: var(--card);
}
.chat.mine .chat-bubble {
  border-radius: 1rem 1rem 0.25rem 1rem;
  background: var(--forest);
  color: var(--forest-fg);
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 11px;
  color: var(--muted-fg);
}
.chat.mine .chat-meta {
  color: color-mix(in oklab, var(--forest-fg) 70%, transparent);
}
.chat-meta .icon {
  width: 0.75rem;
  height: 0.75rem;
}

/* Opgaver og vedligeholdelsesplan */
.check-circle {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: none;
  cursor: pointer;
}
.check-circle:hover {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 10%, transparent);
}
.icon-plain {
  display: inline-flex;
  padding: 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--muted-fg);
  cursor: pointer;
}
.icon-plain:hover {
  background: var(--accent);
  color: var(--fg);
}
.icon-plain.danger-hover:hover {
  color: var(--danger);
}
.big-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.grid-3 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.wheel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .wheel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .wheel {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.wheel-cell {
  min-height: 88px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
}
.wheel-cell.now {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.wheel-month {
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--muted-fg);
}
.wheel-cell.now .wheel-month {
  color: var(--forest);
}
.wheel-cell ul {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}
.wheel-cell li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 12px;
}
.plan-dot {
  width: 0.375rem;
  height: 0.375rem;
  margin-top: 0.4rem;
  flex-shrink: 0;
  border-radius: 999px;
}
.plan-dot.state-overdue {
  background: var(--danger);
}
.plan-dot.state-soon {
  background: var(--gold);
}
.plan-dot.state-planned {
  background: color-mix(in oklab, var(--muted-fg) 40%, transparent);
}
.plan-dot.state-done {
  background: var(--forest);
}
.badge.state-overdue {
  background: color-mix(in oklab, var(--danger) 10%, transparent);
  color: var(--danger);
}
.badge.state-soon {
  background: color-mix(in oklab, var(--gold) 30%, transparent);
  color: var(--gold-fg);
}
.badge.state-planned {
  background: var(--muted);
  color: var(--muted-fg);
}
.badge.state-done {
  background: color-mix(in oklab, var(--forest) 10%, transparent);
  color: var(--forest);
}
.chip {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--fg);
  cursor: pointer;
}
.chip:hover {
  background: var(--accent);
}
.chip.on {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--forest-fg);
}
a.tab {
  text-decoration: none;
}
.list-box {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Kalender */
.view-switch {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
}
.view-switch a {
  padding: 0.35rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
}
.view-switch a:hover {
  background: var(--accent);
}
.view-switch a.on {
  background: var(--forest);
  color: var(--forest-fg);
}
.cal {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
}
.cal-weekdays,
.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-weekdays {
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}
.cal-weekdays > div {
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted-fg);
}
.cal-cell {
  min-height: 112px;
  min-width: 0;
  padding: 0.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cal-cell:nth-child(7n) {
  border-right: 0;
}
.cal-cell:nth-last-child(-n + 7) {
  border-bottom: 0;
}
.cal-cell.outside {
  background: color-mix(in oklab, var(--muted) 20%, transparent);
}
.cal-daynum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 12px;
}
.cal-cell.outside .cal-daynum {
  color: color-mix(in oklab, var(--muted-fg) 60%, transparent);
}
.cal-daynum.big {
  min-width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.25rem;
  font-size: 14px;
}
.cal-daynum.today {
  background: var(--forest);
  color: var(--forest-fg);
  font-weight: 600;
}
.cal-chip {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0.1rem 0.35rem;
  border: 0;
  border-left: 2px solid var(--gold);
  border-radius: 0.35rem;
  background: color-mix(in oklab, var(--forest) 5%, transparent);
  font: inherit;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--fg);
  cursor: pointer;
}
.cal-chip:hover {
  background: color-mix(in oklab, var(--forest) 10%, transparent);
}
.cal-head {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}
.cal-head-day {
  flex: 1;
  padding: 0.5rem;
  border-left: 1px solid var(--border);
  text-align: center;
}
.cal-scroll {
  max-height: 620px;
  overflow-y: auto;
}
.cal-hour {
  position: relative;
  height: 56px;
}
.cal-hour span {
  position: absolute;
  top: -0.5rem;
  right: 0.5rem;
  font-size: 11px;
  color: var(--muted-fg);
}
.cal-col {
  position: relative;
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border);
}
.cal-slot {
  height: 56px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.cal-now {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 10;
  height: 1px;
  background: var(--gold);
  pointer-events: none;
}
.cal-now span {
  position: absolute;
  top: -0.25rem;
  left: -0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--gold);
}
.cal-event {
  position: absolute;
  right: 0.25rem;
  left: 0.25rem;
  overflow: hidden;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-left: 3px solid var(--gold);
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--forest) 10%, transparent);
  font: inherit;
  font-size: 11px;
  text-align: left;
  color: var(--fg);
  cursor: pointer;
}
.cal-event:hover {
  background: color-mix(in oklab, var(--forest) 20%, transparent);
}
.btn-danger-solid {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}
.btn-danger-solid:hover {
  opacity: 0.9;
}

/* Fagfolk og Grossister */
.pill-select {
  width: auto;
  min-height: 3rem;
  padding: 0 1.25rem;
  border-radius: 999px;
}
.people-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .people-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.person-card:hover {
  border-color: color-mix(in oklab, var(--forest) 40%, transparent);
}
.person-name {
  display: block;
  margin-top: 1.25rem;
  font-size: 1.5rem;
  color: var(--fg);
  text-decoration: none;
}
a.person-name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.person-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.stars {
  display: inline-flex;
  gap: 0.1rem;
  color: var(--border);
}
.stars .icon.on {
  color: var(--gold);
  fill: var(--gold);
}
.chip-static {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--muted-fg);
}
.chip-static.on {
  background: color-mix(in oklab, var(--forest) 10%, transparent);
  color: var(--forest);
}
.pick-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  cursor: pointer;
}
.pick-row:hover {
  background: var(--accent);
}
.pick-row:has(input:checked) {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.pick-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--forest);
}
.profile-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .profile-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

/* Beskeder */
.pill-tabs {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}
.pill-tabs a {
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted-fg);
  text-decoration: none;
}
.pill-tabs a:hover {
  color: var(--fg);
}
.pill-tabs a.on {
  background: var(--forest);
  color: var(--forest-fg);
  font-weight: 500;
}
.threads-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .threads-grid {
    grid-template-columns: 280px 1fr;
  }
}
.thread-btn {
  display: block;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
}
.thread-btn:hover {
  background: var(--accent);
}
.thread-btn.on {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.attachment {
  display: block;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 0.8rem;
  background: rgb(0 0 0 / 0.1);
}
.attachment img,
.attachment video {
  display: block;
  width: 100%;
  max-height: 18rem;
  object-fit: cover;
}

/* Portaler */
.portal-center {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: var(--bg);
}
.portal-card {
  padding: 2rem;
  border-radius: 1.5rem;
}
.portal-page {
  min-height: 100vh;
  padding: 2rem 1rem;
  background: var(--bg);
}
@media (min-width: 768px) {
  .portal-page {
    padding: 2rem;
  }
}
.portal-wrap {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}
.tiles {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.tile {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
}
.tile.strong {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, transparent);
}
.tile-value {
  margin-top: 0.5rem;
  font-size: 1.5rem;
}
.tile.strong .tile-value {
  color: var(--forest);
}
.raise-box,
.accept-box {
  padding: 1.25rem;
  border: 1px solid color-mix(in oklab, var(--gold) 60%, transparent);
  border-radius: 1rem;
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}
.notice {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
}
.notice-warning {
  border-color: var(--gold);
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}
.notice-outage {
  border-color: color-mix(in oklab, var(--danger) 40%, transparent);
  background: color-mix(in oklab, var(--danger) 5%, transparent);
}
.pending-file {
  position: relative;
  list-style: none;
}
.pending-file img,
.pending-video {
  display: flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  object-fit: cover;
  background: var(--forest-deep);
  color: var(--forest-fg);
}
.pending-remove {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
}
.star-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--border);
}
.big-stars .icon {
  width: 2.25rem;
  height: 2.25rem;
}
.job-card {
  display: block;
  padding: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}
.job-card:hover {
  border-color: color-mix(in oklab, var(--forest) 40%, transparent);
}

/* Søgning (Ctrl+K) */
.search-open {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--card);
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--muted-fg);
  cursor: pointer;
}
.search-open:hover {
  background: var(--accent);
}
.search-open kbd {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  font-family: inherit;
  font-size: 11px;
}
.search-dialog {
  width: min(42rem, calc(100vw - 2rem));
  margin-top: 12vh;
  padding: 0;
}
.search-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
}
.search-head input {
  flex: 1;
  height: 3.5rem;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
}
.search-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.5rem;
}
.search-note {
  padding: 1.5rem 1rem;
  font-size: 14px;
  color: var(--muted-fg);
}
.search-group {
  padding: 0.5rem 1rem 0.25rem;
}
.search-hit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 0.8rem;
  color: var(--fg);
  text-decoration: none;
}
.search-hit .icon {
  color: var(--forest);
}
.search-hit.on {
  background: var(--forest);
  color: var(--forest-fg);
}
.search-hit.on .icon {
  color: var(--gold);
}
.search-title,
.search-sub {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.search-title {
  font-size: 14px;
  font-weight: 500;
}
.search-sub {
  font-size: 12px;
  opacity: 0.75;
}

/* ------------------------------------------------------------------ Økonomi */
.block {
  display: block;
}
.snapshot,
.period-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .snapshot,
  .period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .snapshot {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .period-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.snapshot .tile-value {
  font-family: var(--font-serif);
  font-weight: 600;
}
.tile.tile-bad {
  border-color: color-mix(in oklab, var(--danger) 30%, transparent);
  background: color-mix(in oklab, var(--danger) 5%, transparent);
}
.num {
  font-variant-numeric: tabular-nums;
}
.ledger {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.ledger-tile {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
}
.ledger-value {
  margin-top: 0.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ledger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  min-width: 480px;
}
.bars-year {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
}
.bars-cols {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  height: 9rem;
}
.bar {
  width: 1.25rem;
  border-radius: 0.25rem 0.25rem 0 0;
}
.swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.25rem;
}
.bar-charged {
  background: var(--forest);
}
.bar-paid {
  background: color-mix(in oklab, var(--forest) 40%, transparent);
}
.bar-expenses {
  background: var(--gold);
}
.btn-dashed {
  border-style: dashed;
  color: var(--muted-fg);
}
.receipt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
}
.receipt-preview {
  max-height: 420px;
  max-width: 100%;
  border-radius: 0.5rem;
  object-fit: contain;
}
.pill-tabs {
  max-width: 100%;
  overflow-x: auto;
}
.pill-tabs a {
  white-space: nowrap;
}

/* ------------------------------------------------------------------ Udlejning */
.chip.on {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--forest-fg);
}
.code-input {
  width: 10rem;
  text-align: center;
  font-size: 1.125rem;
  letter-spacing: 0.3em;
}
.code-box {
  max-height: 14rem;
  overflow: auto;
  margin: 0;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--forest-deep);
  color: var(--forest-fg);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}
.form-preview {
  width: 100%;
  height: 820px;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
}
.turnover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  list-style: none;
}
.turnover-head::-webkit-details-marker {
  display: none;
}
.turnover-body {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}
.progress-steps {
  display: flex;
  gap: 0.375rem;
}
.progress-steps span {
  flex: 1;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--muted);
}
.progress-steps span.done {
  background: var(--forest);
}
.progress-steps span.next {
  background: var(--gold);
}

/* ------------------------------------------------------------------ Import */
.step-no {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--forest-fg);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}
.import-done {
  border: 2px solid var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, var(--card));
}
.import-missing {
  border-color: color-mix(in oklab, var(--danger) 40%, transparent);
  background: color-mix(in oklab, var(--danger) 5%, var(--card));
}
.icon-tile.solid {
  background: var(--forest);
  color: var(--forest-fg);
}
.import-file {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .import-file {
    grid-template-columns: 1fr 16rem;
    align-items: end;
  }
}
.file-pick {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.file-pick:hover {
  background: var(--accent);
}
.extra {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.extra-grid {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .extra-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.extra-item {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
}
.table tr.row-warn td {
  background: color-mix(in oklab, var(--gold) 6%, transparent);
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------ Telefon */
/* Under 1024 px: fast bjælke med logo, søg og Menu. Menuen åbner som en hel side. */
.mobile-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--forest);
  color: var(--forest-fg);
}
.mobile-brand {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.mobile-brand .brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  padding: 0.25rem;
}
.mobile-brand .brand-name {
  font-size: 1.25rem;
}
.mobile-icon,
.mobile-menu-btn,
.mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  border: 1px solid var(--forest-border);
  border-radius: 0.8rem;
  background: none;
  color: var(--forest-fg);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.mobile-icon,
.mobile-close {
  width: 2.75rem;
}
.mobile-menu-btn {
  padding: 0 0.9rem;
}
.mobile-menu-btn .count {
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-fg);
  padding: 0 0.45rem;
  font-size: 11px;
  font-weight: 600;
}
.mobile-menu {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  border: 0;
  padding: 1rem 1.25rem 2rem;
  overflow-y: auto;
  background: var(--forest);
  color: var(--forest-fg);
}
.mobile-menu::backdrop {
  background: var(--forest-deep);
}
.mobile-menu .nav a,
.mobile-menu .nav summary {
  min-height: 2.75rem;
}
.mobile-user {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--forest-border);
}
@media (max-width: 1023px) {
  /* Søgefeltet ligger i bjælken på telefonen. */
  .topbar {
    display: none;
  }
  .page {
    padding: 1.5rem 1rem 3rem;
  }
}
.search-open kbd {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .search-open kbd {
    display: inline-block;
  }
}
/* Kolonner må gerne blive smallere end deres indhold (ellers stikker siden ud til siden). */
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.overview-grid > *,
.columns-3 > * {
  min-width: 0;
}
@media (max-width: 1023px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.feature-row {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 6rem;
  gap: 2.5rem;
}
@media (min-width: 760px) {
  .feature-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
}

@media (max-width: 759px) {
  /* Nøgletal to og to i stedet for én pr. række. */
  .grid-3:has(> .card-tight),
  .grid-4:has(> .card-tight),
  .snapshot,
  .period-grid,
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .card-tight .display,
  .tile-value {
    font-size: 1.25rem !important;
  }
  .snapshot .tile {
    padding: 1rem;
  }
}
@media (max-width: 639px) {
  /* Tabeller bliver til kort: én række = ét kort, kolonnenavnet står foran værdien.
     app.js lægger kolonnenavnet i data-label. Tabeller med .table-keep bevares som tabel. */
  .table:not(.table-keep) thead {
    display: none;
  }
  .table:not(.table-keep),
  .table:not(.table-keep) tbody,
  .table:not(.table-keep) tr,
  .table:not(.table-keep) td {
    display: block;
    width: 100%;
  }
  .table-wrap:has(.table:not(.table-keep)) {
    overflow: visible;
    border: 0;
    background: none;
  }
  .table:not(.table-keep) {
    min-width: 0 !important;
  }
  .table:not(.table-keep) tr {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
  }
  .table:not(.table-keep) td {
    padding: 0.35rem 0;
    border: 0;
    text-align: right;
  }
  .table:not(.table-keep) td::after {
    content: "";
    display: table;
    clear: both;
  }
  .table:not(.table-keep) td:first-child {
    display: block;
    text-align: left;
    font-weight: 500;
  }
  .table:not(.table-keep) td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    float: left;
    margin-right: 1rem;
    color: var(--muted-fg);
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
  }
  .table:not(.table-keep) td:empty {
    display: none;
  }
}

/* ------------------------------------------------------------------ Koncerner */
.koncerner {
  margin-top: 0.75rem;
  border: 1px solid var(--forest-border);
  border-radius: 0.8rem;
}
.koncerner > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--forest-fg);
  font-size: 14px;
  list-style: none;
  cursor: pointer;
}
.koncerner > summary::-webkit-details-marker {
  display: none;
}
.koncerner[open] > summary .chev {
  transform: rotate(180deg);
}
.koncerner .chev {
  color: var(--forest-muted);
}
.koncern-sum {
  margin-left: auto;
  color: var(--forest-muted);
  font-size: 12px;
}
.koncerner form {
  padding: 0 0.75rem 0.75rem;
}
.koncern-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.25rem;
  padding: 0 0.25rem;
  color: color-mix(in oklch, var(--forest-fg) 90%, transparent);
  font-size: 14px;
  cursor: pointer;
}
.koncern-row input {
  accent-color: var(--gold);
}
.koncern-count {
  color: var(--forest-muted);
  font-size: 12px;
}

/* ------------------------------------------------------------------ Vedligehold */
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.5rem;
}
.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.6rem;
  object-fit: cover;
}
.badge.state-done {
  background: color-mix(in oklab, var(--forest) 10%, transparent);
  color: var(--forest);
}

/* Flyttesyn (nyt i Python-udgaven) */
.sign-pad {
  display: block;
  width: 100%;
  height: 10rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  touch-action: none;
  cursor: crosshair;
}
.photo-cell {
  position: relative;
  display: block;
}
.photo-cell .photo-del {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: var(--card);
}
.save-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  padding: 0.6rem 0.75rem;
  border-radius: 0.9rem;
  background: color-mix(in oklab, var(--card) 92%, transparent);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.08);
}
@media (max-width: 640px) {
  .meter-row {
    grid-template-columns: 1fr 1fr;
  }
  .meter-row .field:first-child {
    grid-column: 1 / -1;
  }
}

/* Cookie-samtykke på de offentlige sider */
.cookie-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 60;
  max-width: 42rem;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.15);
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-btn {
  min-width: 8rem;
}
