/* PayTjek-system
   Designet følger paytjek.io: monokromt (næsten sort på lysegrå), Switzer til overskrifter,
   Inter til tekst, 10 px knapper og 20 px paneler. Farve bruges kun til status:
   grøn = OK/færdig, rød = afvigelse/overskredet, rav = snart/note, blå = venter/fokus.
   Layout: mørk topbar, boards som vandrette kolonner (Trello-princippet), sider med paneler. */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-d: "Switzer", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --page: #f3f3f3;
  --surface: #fafafa;
  --surface-2: #f0f0f0;
  --card-bg: #ffffff;
  --list-bg: #f3f3f3;
  --inbox-bg: #ececec;
  --weekend: #f6f6f6;
  --text: #171717;
  --text-2: #404040;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: #e5e5e5;
  --hover: rgba(23, 23, 23, .05);
  --hover-strong: rgba(23, 23, 23, .1);
  --card-shadow: 0 1px 0 rgba(10, 10, 10, .06), 0 0 0 1px rgba(10, 10, 10, .06);
  --pop-shadow: 0 16px 40px rgba(10, 10, 10, .16), 0 0 0 1px rgba(10, 10, 10, .06);
  --top-bg: #0a0a0a;
  --top-fg: #f5f5f5;
  --top-mute: #a3a3a3;
  --top-btn: rgba(255, 255, 255, .07);
  --top-btn-hover: rgba(255, 255, 255, .13);
  --accent: #171717;
  --accent-hover: #262626;
  --accent-fg: #f5f5f5;
  --accent-soft: #e9e9e9;
  --focus: #2563eb;
  --ok: #16a34a;
  --ok-ink: #15803d;
  --ok-soft: rgba(22, 163, 74, .12);
  --dev: #dc2626;
  --dev-ink: #b91c1c;
  --dev-soft: rgba(220, 38, 38, .11);
  --note: #d97706;
  --note-ink: #92400e;
  --note-soft: rgba(217, 119, 6, .14);
  --wait: #2563eb;
  --wait-soft: rgba(37, 99, 235, .1);
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --backdrop: rgba(10, 10, 10, .55);
  --ph: rgba(23, 23, 23, .08);
  --r-btn: 10px;
  --r-card: 10px;
  --r-list: 14px;
  --r-panel: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0a0a0a; --surface: #141414; --surface-2: #1c1c1c; --card-bg: #1c1c1c; --list-bg: #121212;
    --inbox-bg: #101010; --weekend: #121212;
    --text: #f5f5f5; --text-2: #d4d4d4; --muted: #a3a3a3; --faint: #737373; --line: #262626;
    --hover: rgba(255, 255, 255, .06); --hover-strong: rgba(255, 255, 255, .11);
    --card-shadow: 0 0 0 1px rgba(255, 255, 255, .06); --pop-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
    --accent: #f5f5f5; --accent-hover: #ffffff; --accent-fg: #0a0a0a; --accent-soft: #262626;
    --focus: #60a5fa; --ok-ink: #4ade80; --dev-ink: #f87171; --note-ink: #fbbf24;
    --ok-soft: rgba(74, 222, 128, .14); --dev-soft: rgba(248, 113, 113, .15); --note-soft: rgba(251, 191, 36, .15); --wait-soft: rgba(96, 165, 250, .15);
    --backdrop: rgba(0, 0, 0, .72); --ph: rgba(255, 255, 255, .07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0a0a0a; --surface: #141414; --surface-2: #1c1c1c; --card-bg: #1c1c1c; --list-bg: #121212;
  --inbox-bg: #101010; --weekend: #121212;
  --text: #f5f5f5; --text-2: #d4d4d4; --muted: #a3a3a3; --faint: #737373; --line: #262626;
  --hover: rgba(255, 255, 255, .06); --hover-strong: rgba(255, 255, 255, .11);
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .06); --pop-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
  --accent: #f5f5f5; --accent-hover: #ffffff; --accent-fg: #0a0a0a; --accent-soft: #262626;
  --focus: #60a5fa; --ok-ink: #4ade80; --dev-ink: #f87171; --note-ink: #fbbf24;
  --ok-soft: rgba(74, 222, 128, .14); --dev-soft: rgba(248, 113, 113, .15); --note-soft: rgba(251, 191, 36, .15); --wait-soft: rgba(96, 165, 250, .15);
  --backdrop: rgba(0, 0, 0, .72); --ph: rgba(255, 255, 255, .07);
  color-scheme: dark;
}

/* Sitets kornede støj, brugt meget svagt på topbar og board-baggrund */
:root {
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--page);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.ico { flex: none; vertical-align: -3px; }
h1, h2, h3, h4 { font-family: var(--font-d); letter-spacing: -.01em; }

/* ---------- knapper ---------- */
.btn-primary, .btn-plain, .btn-soft, .btn-danger {
  border: 0; border-radius: var(--r-btn); padding: 7px 14px; font-weight: 500; line-height: 20px; letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-plain { background: transparent; }
.btn-plain:hover { background: var(--hover); }
.btn-soft { background: var(--hover); }
.btn-soft:hover { background: var(--hover-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-primary.sm, .btn-soft.sm, .btn-plain.sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
  border: 0; background: transparent; border-radius: 8px; width: 32px; height: 32px;
  display: inline-grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { background: var(--hover-strong); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--danger); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

.text-input, .inline-input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  background: var(--card-bg); outline: none; min-width: 0;
}
.text-input:focus, .inline-input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--wait-soft); }
textarea.text-input, textarea.inline-input { resize: vertical; }
select.text-input { padding-right: 28px; }

/* ---------- topbar ---------- */
.topbar {
  flex: none; height: 52px; display: flex; align-items: center; gap: 4px;
  padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  background: var(--top-bg) var(--grain); background-blend-mode: soft-light; color: var(--top-fg);
  position: relative; z-index: 20; border-bottom: 1px solid #1c1c1c;
}
.brand {
  display: flex; align-items: center; gap: 9px; color: var(--top-fg); text-decoration: none;
  font-family: var(--font-d); font-weight: 500; font-size: 17px; letter-spacing: -.02em;
  padding: 6px 10px 6px 6px; border-radius: 10px; margin-right: 6px;
}
.brand:hover { background: var(--top-btn); }
.brand-mark { width: 20px; height: 20px; display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.top-btn {
  border: 0; border-radius: 10px; background: transparent; color: var(--top-mute); text-decoration: none;
  padding: 7px 10px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.top-btn:hover { background: var(--top-btn); color: var(--top-fg); }
.top-btn.on { background: var(--top-btn-hover); color: var(--top-fg); }
.top-btn.primary { background: var(--top-fg); color: #0a0a0a; margin-left: 4px; }
.top-btn.primary:hover { background: #ffffff; }
.top-btn .count {
  background: #dc2626; color: #fff; border-radius: 9px; font-size: 11px; font-weight: 600; line-height: 18px;
  min-width: 18px; padding: 0 5px; text-align: center; font-variant-numeric: tabular-nums;
}
.top-spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--top-btn); border-radius: 10px;
  padding: 0 12px; height: 34px; width: min(280px, 30vw); color: var(--top-mute); border: 1px solid #262626;
}
.search:focus-within { background: var(--card-bg); color: var(--muted); border-color: var(--focus); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--top-fg); }
.search:focus-within input { color: var(--text); }
.search input::placeholder { color: #8a8a8a; }
.me { border: 0; background: transparent; padding: 2px; border-radius: 50%; margin-left: 6px; }
.me:hover { background: var(--top-btn-hover); }

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600;
  width: 28px; height: 28px; font-size: 11px; letter-spacing: .02em; flex: none; user-select: none;
}
.avatar.s24 { width: 24px; height: 24px; font-size: 10px; }
.avatar.s32 { width: 32px; height: 32px; font-size: 12px; }
.avatar.unknown { background: var(--faint); }

/* ---------- skal: indbakke + visning ---------- */
.shell { flex: 1; min-height: 0; display: flex; }
#view { flex: 1; min-height: 0; min-width: 0; }
.view-page { overflow-y: auto; }
.loading { padding: 40px; color: var(--muted); }
#inbox-root {
  flex: none; width: 300px; display: flex; flex-direction: column; padding: 12px 0 12px 12px;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  background: var(--inbox-bg); border-right: 1px solid var(--line);
}
.inbox-list { flex: 1; min-height: 0; width: 100%; max-height: none; background: var(--surface) !important; }
.inbox-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 4px 14px; }
.inbox-h h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.inbox-add { padding: 6px 8px; }
.inbox-add textarea { min-height: 44px; }
.inbox-empty { color: var(--muted); font-size: 13px; padding: 8px 6px; margin: 0; }
.inbox-note { color: var(--faint); font-size: 12px; margin: 0; padding: 6px 14px 10px; }

/* ---------- forside ---------- */
.home { display: flex; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 44px max(20px, env(safe-area-inset-right, 0px)) 60px max(20px, env(safe-area-inset-left, 0px)); height: 100%; overflow: auto; }
.side { width: 220px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.side-h { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 18px 10px 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.side-item:hover { background: var(--hover); }
.side-item.is-active { background: var(--accent); color: var(--accent-fg); }
.side-item .sq { width: 18px; height: 14px; border-radius: 4px; flex: none; }
.side-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-main { flex: 1; min-width: 0; }
.home-title, .page-title { font-size: 34px; font-weight: 500; margin: 0 0 6px; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.home-sub, .page-sub { color: var(--muted); margin: 0 0 26px; max-width: 62ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  height: 112px; padding: 14px 16px; border-radius: 16px; color: #fff; text-decoration: none; border: 0; text-align: left;
  background: var(--grain), linear-gradient(150deg, var(--tile), color-mix(in srgb, var(--tile) 62%, #000));
  background-blend-mode: soft-light, normal;
}
.tile:hover { filter: brightness(1.1); }
.tile-name { font-family: var(--font-d); font-weight: 500; font-size: 18px; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.tile-meta { font-size: 12px; opacity: .8; }
.tile-new { background: transparent; color: var(--muted); justify-content: center; align-items: center; font-weight: 500; border: 1.5px dashed var(--line); }
.tile-new:hover { background: var(--hover); filter: none; color: var(--text); }
.archived-boards { margin-top: 28px; }
.arch-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.arch-row .name { flex: 1; min-width: 0; }
.home-foot { margin-top: 18px; }

/* ---------- board ---------- */
.view-board {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--grain), linear-gradient(160deg, var(--board-bg), color-mix(in srgb, var(--board-bg) 66%, #000));
  background-blend-mode: soft-light, normal;
}
.board-head {
  flex: none; display: flex; align-items: center; gap: 8px; min-height: 56px; flex-wrap: wrap;
  padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, .24); color: #fff;
}
.board-title {
  margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; padding: 4px 8px; border-radius: 8px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.board-title:hover { background: rgba(255, 255, 255, .16); }
.board-head .inline-input { width: min(360px, 60vw); font-size: 18px; font-weight: 600; color: var(--text); }
.board-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.head-btn {
  border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff;
  padding: 7px 11px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500;
}
.head-btn:hover { background: rgba(255, 255, 255, .26); }
.head-btn.on { background: #fafafa; color: #171717; }
.filter-note { font-size: 13px; opacity: .9; }
.pipe-note {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
  background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 6px 10px; font-variant-numeric: tabular-nums;
}

.canvas {
  flex: 1; min-height: 0; display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; overflow-y: hidden;
  padding: 14px max(14px, env(safe-area-inset-right, 0px)) 16px max(14px, env(safe-area-inset-left, 0px));
}
.list {
  flex: 0 0 280px; width: 280px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--list-bg); border-radius: var(--r-list); box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.list.is-dragging { display: none; }
.list-ph { flex: 0 0 280px; border-radius: var(--r-list); background: rgba(0, 0, 0, .25); }
.list-head { display: flex; align-items: flex-start; gap: 4px; padding: 10px 8px 4px 8px; cursor: grab; }
.list-name {
  flex: 1; min-width: 0; margin: 0; font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: 0;
  padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; cursor: pointer;
}
.list-name:hover { background: var(--hover); }
.list-head .inline-input { font-weight: 600; padding: 4px 7px; }
.list-count { font-size: 12px; color: var(--muted); padding: 6px 2px 0; font-variant-numeric: tabular-nums; }
.list-sum { font-size: 12px; color: var(--muted); padding: 0 16px 4px; font-variant-numeric: tabular-nums; font-weight: 500; }
.list-cards { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 2px; overflow-y: auto; min-height: 6px; }
.list-foot { padding: 6px 8px 8px; }
.foot-row { display: flex; align-items: center; gap: 4px; }
.foot-row .add-card-btn { flex: 1; }
.add-card-btn {
  width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; color: var(--muted);
  padding: 7px 8px; display: flex; align-items: center; gap: 6px; font-weight: 500;
}
.add-card-btn:hover { background: var(--hover-strong); color: var(--text); }
.composer textarea {
  width: 100%; border: 0; border-radius: var(--r-card); padding: 9px 12px; background: var(--card-bg);
  box-shadow: var(--card-shadow); resize: none; outline: none; min-height: 60px;
}
.composer textarea:focus { box-shadow: var(--card-shadow), 0 0 0 2px var(--focus); }
.add-list { flex: 0 0 280px; }
.add-list-btn {
  width: 100%; border: 0; border-radius: var(--r-list); padding: 12px 14px; text-align: left; font-weight: 500;
  background: rgba(255, 255, 255, .18); color: #fff; display: flex; align-items: center; gap: 6px;
}
.add-list-btn:hover { background: rgba(255, 255, 255, .28); }
.add-list form { background: var(--list-bg); border-radius: var(--r-list); padding: 8px; }

.card {
  background: var(--card-bg); border-radius: var(--r-card); box-shadow: var(--card-shadow);
  padding: 9px 12px 7px; cursor: pointer; position: relative; outline: none;
}
.card:hover { box-shadow: var(--card-shadow), 0 0 0 2px var(--text); }
.card:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.card.is-dragging { display: none; }
.card-ph { border-radius: var(--r-card); background: var(--ph); flex: none; }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-title { overflow-wrap: anywhere; color: var(--text); }
.card-title-row { display: flex; align-items: flex-start; }
.card-next {
  display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 12px; color: var(--text-2);
  background: var(--surface-2); border-radius: 6px; padding: 4px 6px;
}
.card-next .ico { width: 12px; height: 12px; margin-top: 2px; color: var(--muted); }
.card-next span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: flex-end; gap: 6px; margin-top: 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px 6px; flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 6px; line-height: 20px; font-variant-numeric: tabular-nums; }
.badge .ico { width: 13px; height: 13px; }
.badge.is-done, .badge.due-done { background: var(--ok-soft); color: var(--ok-ink); }
.badge.due-overdue { background: var(--dev-soft); color: var(--dev-ink); font-weight: 600; }
.badge.due-soon { background: var(--note-soft); color: var(--note-ink); font-weight: 600; }
.badge.tpl { background: var(--wait-soft); color: var(--wait); font-weight: 600; }
.badge.deal { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.badge.org { background: var(--surface-2); color: var(--text-2); }
.avatars { display: flex; gap: 2px; flex: none; margin-left: auto; }
.card-foot:empty { display: none; }

.card-check {
  flex: none; width: 0; height: 16px; margin: 2px 0 0; padding: 0; opacity: 0; overflow: hidden;
  border: 1.5px solid var(--faint); border-radius: 50%; background: transparent; color: transparent;
  display: grid; place-items: center; transition: width .12s ease, margin .12s ease, opacity .12s ease;
}
.card-check .ico { width: 11px; height: 11px; stroke-width: 3.2; }
.card:hover .card-check, .card:focus-within .card-check, .card.is-complete .card-check, .card-check.always {
  width: 16px; margin-right: 7px; opacity: 1;
}
.card-check:hover { border-color: var(--ok); color: var(--ok); }
.is-complete .card-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.card.is-complete .card-title { color: var(--muted); }
.card.is-template { box-shadow: var(--card-shadow), inset 0 3px 0 var(--wait); }

.label {
  display: inline-flex; align-items: center; min-width: 40px; max-width: 100%; height: 18px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.label.lg { height: 32px; line-height: 32px; padding: 0 12px; font-size: 14px; min-width: 48px; border-radius: 8px; }

/* ---------- popover ---------- */
.pop {
  position: fixed; z-index: 60; background: var(--card-bg); color: var(--text); border-radius: 14px;
  box-shadow: var(--pop-shadow); display: flex; flex-direction: column; max-height: calc(100vh - 16px); max-width: calc(100vw - 16px);
}
.pop-h { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; padding: 6px 8px; min-height: 42px; }
.pop-h span { text-align: center; font-weight: 600; color: var(--text-2); font-size: 14px; }
.pop-b { padding: 4px 14px 14px; overflow-y: auto; }
.pop-sec { margin-top: 14px; }
.pop-sec:first-child { margin-top: 0; }
.pop-lbl { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; display: block; }
.pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pop-item {
  width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; text-align: left; text-decoration: none;
  display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--text);
}
.pop-item:hover { background: var(--hover); }
.pop-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item .tick { color: var(--ok-ink); font-weight: 700; }
.pop-item.danger { color: var(--danger); }
.pop-note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.pop-hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.label-row { display: flex; align-items: center; gap: 4px; }
.label-pick {
  flex: 1; min-width: 0; border: 0; border-radius: 8px; height: 32px; padding: 0 12px; text-align: left;
  font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.label-pick:hover { filter: brightness(.95); }
.label-pick .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.swatch { border: 0; border-radius: 8px; height: 32px; position: relative; }
.swatch[aria-pressed="true"]::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.swatch-board { height: 36px; }
.preview-tile { height: 70px; border-radius: 10px; margin-bottom: 10px; display: grid; place-items: center; }
.preview-tile .mini { display: flex; gap: 4px; }
.preview-tile .mini i { width: 22px; height: 30px; background: rgba(255, 255, 255, .75); border-radius: 4px; display: block; }
.check-line { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--accent); }
.check-line .grow { flex: 1; min-width: 0; }
.confirm-box { background: var(--surface-2); border-radius: 10px; padding: 10px; margin-top: 8px; }
.confirm-box p { margin: 0 0 8px; }

/* ---------- kortvindue (indhold til venstre, kommentarer til højre) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40; background: var(--backdrop); overflow-y: auto;
  padding: 44px max(16px, env(safe-area-inset-right, 0px)) 44px max(16px, env(safe-area-inset-left, 0px));
}
.modal {
  position: relative; margin: 0 auto; background: var(--card-bg); border-radius: var(--r-panel); box-shadow: var(--pop-shadow);
}
.modal.card-modal { max-width: 1080px; padding: 0; overflow: hidden; }
.cm-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--line);
}
.list-chip {
  border: 0; background: var(--hover); border-radius: 8px; padding: 4px 8px 4px 10px; font-weight: 600;
  display: inline-flex; gap: 6px; align-items: center; color: var(--text);
}
.list-chip:hover { background: var(--hover-strong); }
.cm-board { color: var(--muted); font-size: 13px; }
.tpl-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--wait); background: var(--wait-soft); border-radius: 6px; padding: 3px 8px;
}
.cm-top-actions { margin-left: auto; display: flex; gap: 2px; }
.archived-banner {
  padding: 12px 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--note-soft); color: var(--note-ink); font-weight: 600;
}
.archived-banner .btn-soft { background: rgba(0, 0, 0, .08); color: inherit; }
.cm-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
.cm-main { min-width: 0; padding: 22px 26px 34px; display: flex; flex-direction: column; gap: 22px; }
.cm-side { min-width: 0; background: var(--surface); border-left: 1px solid var(--line); padding: 18px 20px 28px; }
.cm-title-row { display: flex; gap: 10px; align-items: flex-start; }
.title-input {
  width: 100%; border: 0; background: transparent; font-family: var(--font-d); font-size: 24px; font-weight: 500; letter-spacing: -.02em;
  padding: 2px 8px; margin-left: -8px; border-radius: 8px; resize: none; overflow: hidden; line-height: 1.25; outline: none;
}
.cm-title-row .title-input { margin-left: 0; }
.title-input:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--focus); }
.complete-btn {
  flex: none; width: 22px; height: 22px; margin-top: 7px; padding: 0; border-radius: 50%;
  border: 2px solid var(--faint); background: transparent; color: transparent; display: grid; place-items: center;
}
.complete-btn .ico { width: 13px; height: 13px; stroke-width: 3.2; }
.complete-btn:hover { border-color: var(--ok); color: var(--ok); }
.complete-btn.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 32px; }
.chip-btn {
  border: 1px solid var(--line); background: var(--card-bg); border-radius: 8px; padding: 5px 11px;
  display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--text);
}
.chip-btn:hover { background: var(--hover); }
.meta-row { display: flex; flex-wrap: wrap; gap: 16px 22px; }
.meta-row:empty { display: none; }
.cm-main .meta-row, .cm-main .sec { padding-left: 32px; }
.meta-h { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.meta-v { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.round-add {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--hover); display: grid; place-items: center; color: var(--text);
}
.round-add.sq { border-radius: 8px; }
.round-add:hover { background: var(--hover-strong); }
.due-pill {
  border: 0; border-radius: 8px; background: var(--hover); padding: 6px 10px; display: inline-flex; gap: 8px; align-items: center; font-weight: 500;
}
.due-pill:hover { background: var(--hover-strong); }
.due-pill .tag { font-size: 12px; padding: 0 6px; border-radius: 4px; font-weight: 600; }
.due-pill.due-overdue .tag { background: var(--dev-soft); color: var(--dev-ink); }
.due-pill.due-soon .tag { background: var(--note-soft); color: var(--note-ink); }
.due-pill.due-done .tag { background: var(--ok-soft); color: var(--ok-ink); }
.due-check input { width: 18px; height: 18px; accent-color: var(--ok); margin: 0 2px 0 0; vertical-align: middle; }
.sec { position: relative; }
.sec-h { display: flex; align-items: flex-start; gap: 12px; margin-left: -32px; margin-bottom: 8px; }
.sec-h > .ico { margin-top: 3px; color: var(--muted); width: 20px; height: 20px; }
.sec-h h3 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; }
.desc-view { padding: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; border-radius: 8px; color: var(--text-2); }
.desc-view:hover { background: var(--hover); }
.desc-view a { color: var(--wait); }
.desc-empty {
  width: 100%; border: 0; text-align: left; background: var(--hover); border-radius: 10px; padding: 10px 12px; min-height: 56px;
  color: var(--muted); align-items: flex-start; display: flex;
}
.desc-empty:hover { background: var(--hover-strong); }
.desc-input { min-height: 160px; }
.progress { display: flex; align-items: center; gap: 10px; margin: 0 0 8px -32px; }
.progress .pct { width: 22px; font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.progress .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--hover-strong); overflow: hidden; }
.progress .fill { height: 100%; background: var(--text); border-radius: 4px; transition: width .25s; }
.progress .fill.full { background: var(--ok); }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; }
.ci { display: flex; align-items: flex-start; gap: 10px; margin-left: -32px; padding: 4px 0; border-radius: 8px; }
.ci:hover { background: var(--hover); }
.ci input { width: 16px; height: 16px; margin: 3px 0 0 3px; accent-color: var(--ok); flex: none; }
.ci-text { flex: 1; min-width: 0; overflow-wrap: anywhere; cursor: pointer; padding: 0 4px; }
.ci.is-done .ci-text { text-decoration: line-through; color: var(--muted); }
.ci .icon-btn { opacity: 0; }
.ci:hover .icon-btn, .ci .icon-btn:focus-visible { opacity: 1; }
.ci form { flex: 1; }

/* deal-felter */
.deal-grid { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.deal-grid .dl { font-size: 12px; font-weight: 600; color: var(--muted); }
.deal-grid .dv { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.deal-pair { display: flex; gap: 8px; min-width: 0; }
.deal-pair > .text-input:first-child { flex: 1 1 auto; }
.deal-pair input[type="date"] { flex: 0 0 150px; }
.unit-input { position: relative; flex: 1 1 0; min-width: 0; }
.unit-input .text-input { padding-right: 52px; font-variant-numeric: tabular-nums; }
.unit-input span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.org-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--accent); color: var(--accent-fg);
  font-weight: 600; text-decoration: none;
}
.org-chip:hover { background: var(--accent-hover); }

.cm-side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cm-side-h h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.comment-form { display: block; margin: 0; }
.comment-input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg); padding: 8px 12px;
  resize: vertical; min-height: 40px; outline: none;
}
.comment-input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--wait-soft); min-height: 76px; }
.feed { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feed > li { display: flex; gap: 10px; }
.feed .f-main { flex: 1; min-width: 0; }
.feed .who { font-weight: 600; }
.feed time { color: var(--muted); font-size: 12px; margin-left: 6px; }
.feed .act { color: var(--muted); padding-top: 5px; }
.feed .act .who { color: var(--text); }
.fc-body {
  margin-top: 4px; background: var(--card-bg); border-radius: 10px; box-shadow: var(--card-shadow);
  padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.fc-body a { color: var(--wait); }
.fc-actions { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.feed-empty { color: var(--muted); font-size: 13px; }

/* ---------- sider: kunder og følg op ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 40px max(20px, env(safe-area-inset-right, 0px)) 64px max(20px, env(safe-area-inset-left, 0px)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .page-sub { margin-bottom: 0; }
.page-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-tools select { width: auto; }
.table-card { background: var(--card-bg); border-radius: var(--r-panel); box-shadow: var(--card-shadow); overflow: auto; }
.kind-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.kind-chip.warn { background: var(--note-soft); color: var(--note-ink); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }
.org-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.org-head .page-title { margin: 0; cursor: pointer; border-radius: 10px; padding: 2px 6px; margin-left: -6px; }
.org-head .page-title:hover { background: var(--hover); }
.org-head .inline-input { font-size: 26px; font-family: var(--font-d); max-width: 560px; }
.org-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.org-icon .ico { width: 22px; height: 22px; }
.org-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.org-main, .org-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel { background: var(--card-bg); border-radius: var(--r-panel); box-shadow: var(--card-shadow); padding: 18px 20px; }
.panel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 0 8px; line-height: 20px; font-variant-numeric: tabular-nums; }
.panel-empty { color: var(--muted); margin: 0; font-size: 13px; }
.deal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.deal-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.deal-row:first-child { border-top: 0; padding-top: 2px; }
.deal-row .card-check { margin-top: 3px; }
.deal-main { flex: 1; min-width: 0; }
.link-title { border: 0; background: none; padding: 0; font-weight: 600; text-align: left; color: var(--text); font-size: 14px; }
.link-title:hover { text-decoration: underline; text-underline-offset: 2px; }
.deal-row.is-complete .link-title { color: var(--muted); }
.deal-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.stage-chip { background: var(--surface-2); border-radius: 5px; padding: 0 6px; color: var(--text-2); }
.deal-next { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.deal-next .ico { width: 13px; height: 13px; margin-top: 3px; color: var(--muted); }
.deal-next.empty { color: var(--faint); font-style: italic; }
.deal-side { display: flex; align-items: center; gap: 6px; flex: none; }
.contacts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.contact.editing { background: var(--surface-2); }
.contact.editing .pop-lbl { margin-top: 8px; }
.contact-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contact-name { font-weight: 600; }
.contact-actions { opacity: .6; }
.contact:hover .contact-actions { opacity: 1; }
.contact-title { color: var(--muted); font-size: 13px; }
.contact-line { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.contact-line:hover { color: var(--wait); }
.contact-line .ico { width: 14px; height: 14px; color: var(--muted); }
.contact-notes { font-size: 12.5px; color: var(--muted); white-space: pre-wrap; margin-top: 4px; overflow-wrap: anywhere; }
.org-fields .pop-lbl { margin-top: 10px; }
.org-fields .pop-lbl:first-child { margin-top: 0; }
.org-notes { min-height: 120px; }
.fu-group { margin-bottom: 24px; }
.fu-gh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fu-gh h2 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.fu-overdue .fu-gh h2 { color: var(--dev-ink); }
.fu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fu-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: start;
  background: var(--card-bg); border-radius: 14px; box-shadow: var(--card-shadow); padding: 12px 14px;
}
.fu-overdue .fu-row { box-shadow: var(--card-shadow), inset 3px 0 0 var(--dev); }
.fu-main { min-width: 0; }
.fu-side { display: flex; align-items: center; gap: 8px; }
.fu-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fu-form { margin-top: 10px; background: var(--surface); border-radius: 10px; padding: 10px; }
.fu-q { margin: 0 0 8px; font-weight: 600; }
.ctable .num { text-align: right; font-variant-numeric: tabular-nums; }
.t-muted { color: var(--muted); font-size: 13px; }
.ctable tr[data-org] { cursor: pointer; }
.ctable tr[data-org]:hover td { background: var(--hover); }
.ctable .t-title a { text-decoration: none; font-weight: 600; }
.ctable .t-title .ico { color: var(--muted); margin-right: 6px; }

/* ---------- tabelvisning ---------- */
.table-wrap {
  flex: 1; min-height: 0; overflow: auto; margin: 14px max(14px, env(safe-area-inset-right, 0px)) 16px max(14px, env(safe-area-inset-left, 0px));
  background: var(--card-bg); border-radius: var(--r-panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.ctable { width: 100%; min-width: 820px; border-collapse: collapse; }
.ctable th {
  position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-size: 12px; font-weight: 600;
  color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.ctable th button { border: 0; background: none; padding: 0; color: inherit; font-weight: 600; }
.ctable th button:hover { color: var(--text); }
.ctable td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ctable tbody tr:last-child td { border-bottom: 0; }
.ctable tr[data-card] { cursor: pointer; }
.ctable tr[data-card]:hover td { background: var(--hover); }
.ctable tr.is-complete .t-title span { color: var(--muted); }
.ctable .badge { white-space: nowrap; }
.t-title { display: flex; align-items: center; gap: 2px; font-weight: 500; min-width: 220px; }
.t-title .badge { margin-left: 8px; font-size: 11px; }
.t-list { border: 1px solid var(--line); background: var(--card-bg); border-radius: 8px; padding: 3px 6px; max-width: 170px; }
.t-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.t-none { color: var(--faint); }
.t-empty { text-align: center; color: var(--muted); padding: 30px !important; }

/* ---------- kalendervisning ---------- */
.cal-wrap {
  flex: 1; min-height: 0; overflow: auto;
  padding: 14px max(14px, env(safe-area-inset-right, 0px)) 16px max(14px, env(safe-area-inset-left, 0px));
}
.cal { background: var(--card-bg); border-radius: var(--r-panel); min-width: 780px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h2 { margin: 0 6px; font-size: 18px; font-weight: 500; min-width: 160px; text-align: center; font-variant-numeric: tabular-nums; }
.cal-row { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-head > div { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-wk { font-size: 11px; color: var(--faint); padding: 8px 4px; text-align: center; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cal-day { min-height: 112px; min-width: 0; padding: 4px 6px 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.cal-day:last-child { border-right: 0; }
.cal-day.is-weekend { background: var(--weekend); }
.cal-day.is-over { background: var(--wait-soft); box-shadow: inset 0 0 0 2px var(--wait); }
.cal-num { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--muted); padding: 1px 7px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.cal-day.is-out .cal-num { color: var(--faint); font-weight: 500; }
.cal-day.is-today .cal-num { background: var(--accent); color: var(--accent-fg); }
.cal-items { display: flex; flex-direction: column; gap: 3px; }
.cal-card {
  display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12px; line-height: 1.3; cursor: pointer;
  padding: 3px 6px 3px 9px; border-radius: 6px; background: var(--surface); box-shadow: inset 3px 0 0 var(--lbl, var(--faint));
}
.cal-card:hover { box-shadow: inset 3px 0 0 var(--lbl, var(--faint)), inset 0 0 0 1px var(--text); }
.cal-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-card .ico { width: 12px; height: 12px; color: var(--ok); flex: none; stroke-width: 3; }
.cal-card.due-overdue span { color: var(--dev-ink); font-weight: 600; }
.cal-card.due-done span { color: var(--muted); text-decoration: line-through; }

/* ---------- toast ---------- */
#toast-root {
  position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 80;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #171717; color: #f5f5f5; border-radius: 12px; padding: 10px 14px; box-shadow: var(--pop-shadow);
  display: flex; align-items: center; gap: 14px; max-width: min(420px, calc(100vw - 32px));
}
.toast.err { background: #7f1d1d; }
.toast button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 600; }
.toast button:hover { background: rgba(255, 255, 255, .26); }

/* ---------- smalle skærme ---------- */
@media (max-width: 900px) {
  .top-btn .lbl { display: none; }
  .org-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cm-cols { grid-template-columns: 1fr; }
  .cm-side { border-left: 0; border-top: 1px solid var(--line); }
  .cm-actions, .cm-main .meta-row, .cm-main .sec { padding-left: 0; }
  .cm-main .sec-h, .cm-main .progress, .cm-main .ci { margin-left: 0; }
  .deal-grid { grid-template-columns: 1fr; gap: 4px; }
  .deal-grid .dl { margin-top: 8px; }
  .fu-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fu-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .brand-name { display: none; }
  .search { width: 34vw; }
  .home { flex-direction: column; gap: 8px; padding-top: 22px; }
  .side { width: auto; flex-direction: row; flex-wrap: wrap; }
  .side-h, .side .board-link { display: none; }
  .home-title, .page-title { font-size: 28px; }
  .modal-backdrop { padding-top: 12px; }
  .deal-pair { flex-wrap: wrap; }
  .deal-pair input[type="date"] { flex: 1 1 140px; }
  #inbox-root {
    position: fixed; z-index: 30; top: 52px; bottom: 0; left: 0; width: min(320px, 88vw);
    box-shadow: var(--pop-shadow); padding-right: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Markdown i beskrivelser og kommentarer ---------- */
.md { white-space: normal; }
.md p { margin: 0 0 8px; }
.md p:last-child, .md ul:last-child { margin-bottom: 0; }
.md h4 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.md h4:first-child { margin-top: 0; }
.md ul { margin: 0 0 8px; padding-left: 18px; }
.md li { margin: 2px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.md code { font-size: 12.5px; background: var(--surface-2); border-radius: 4px; padding: 1px 4px; }
.md strong { color: var(--text); font-weight: 600; }

/* deal-felterne: tekstfeltet tager pladsen, datoen holder sin bredde */
.deal-pair > .text-input:not([type="date"]) { flex: 1 1 0; min-width: 120px; }
.dv.deal-pair { flex-wrap: nowrap; }
.dv.deal-pair:has(> button) { flex-wrap: wrap; }

/* ---------- Min dag: opgaver til venstre, tidslinje til højre ---------- */
.view-day { overflow-y: auto; }
.day-page { max-width: 1280px; margin: 0 auto; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); }
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.day-head .page-sub { margin-bottom: 0; }
.day-cols { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.day-todo { background: var(--card-bg); border-radius: var(--r-panel); box-shadow: var(--card-shadow); padding: 16px; max-height: calc(100vh - 200px); overflow-y: auto; position: sticky; top: 12px; }
.day-group { margin-bottom: 16px; }
.day-group .fu-gh h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.day-items { display: flex; flex-direction: column; gap: 6px; }
.day-item {
  display: flex; align-items: flex-start; gap: 6px; background: var(--surface); border-radius: 10px; padding: 8px 8px 8px 10px;
  cursor: grab; border: 1px solid transparent;
}
.day-item:hover { border-color: var(--text); }
.day-item.is-planned { opacity: .6; }
.day-item-main { flex: 1; min-width: 0; }
.day-item-title { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.day-item-next { display: flex; gap: 5px; font-size: 12px; color: var(--text-2); margin-top: 3px; }
.day-item-next .ico { width: 12px; height: 12px; margin-top: 2px; color: var(--muted); }
.day-add { flex: none; }
.day-timeline { background: var(--card-bg); border-radius: var(--r-panel); box-shadow: var(--card-shadow); padding: 16px 16px 10px; min-width: 0; }
.tl-scroll { max-height: calc(100vh - 230px); overflow-y: auto; border-radius: 10px; }
.tl { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); margin: 10px 0; }
.tl-hours { position: relative; }
.tl-hour { position: absolute; left: 0; right: 8px; text-align: right; transform: translateY(-50%); }
.tl-hour span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-grid {
  position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--slot) * 2)),
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--line) 50%, transparent) 0 1px, transparent 1px var(--slot));
}
.tl-now { position: absolute; left: -6px; right: 0; height: 0; border-top: 2px solid var(--dev); z-index: 3; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: -1px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--dev); }
.tl-now span { position: absolute; right: 4px; top: -18px; font-size: 11px; font-weight: 600; color: var(--dev-ink); background: var(--card-bg); padding: 0 4px; border-radius: 4px; }
.tl-block {
  position: absolute; z-index: 2; display: flex; align-items: flex-start; gap: 6px; overflow: hidden; cursor: grab;
  background: var(--accent); color: var(--accent-fg); border-radius: 8px; padding: 6px 6px 6px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.tl-block.kind-free { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--faint); }
.tl-block.kind-meeting { background: var(--wait-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--wait); }
.tl-block.is-done { opacity: .55; }
.tl-block.is-done .tl-b-title { text-decoration: line-through; }
.tl-block .card-check { margin-top: 1px; border-color: currentColor; }
.tl-block .card-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-b-main { flex: 1; min-width: 0; cursor: pointer; }
.tl-b-title { font-weight: 600; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-b-time { font-size: 11.5px; opacity: .75; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-block.is-short { align-items: center; padding-top: 2px; padding-bottom: 2px; }
.tl-block.is-short .tl-b-main { display: flex; gap: 8px; align-items: baseline; }
.tl-block.is-short .tl-b-title { -webkit-line-clamp: 1; }
.tl-b-x { color: inherit; opacity: 0; width: 22px; height: 22px; }
.tl-block:hover .tl-b-x, .tl-b-x:focus-visible { opacity: .8; }
.tl-b-x:hover { background: rgba(127, 127, 127, .25); color: inherit; }
.tl-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.tl-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 24px; height: 3px; margin-left: -12px; border-radius: 2px; background: currentColor; opacity: 0; }
.tl-block:hover .tl-resize::after { opacity: .4; }
.tl-drop {
  position: absolute; left: 3px; right: 3px; z-index: 4; pointer-events: none; border-radius: 8px;
  border: 2px dashed var(--wait); background: var(--wait-soft); color: var(--wait); font-size: 12px; font-weight: 600; padding: 4px 8px;
}

/* ---------- beskeder ---------- */
.top-btn.bell { padding: 7px 8px; }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif {
  width: 100%; border: 0; background: transparent; border-radius: 10px; padding: 8px; text-align: left;
  display: flex; gap: 10px; align-items: flex-start; color: var(--text);
}
.notif:hover { background: var(--hover); }
.notif .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-text { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.notif time { font-size: 11.5px; color: var(--muted); }
.notif.unread { background: var(--wait-soft); }
.notif.unread .notif-text { color: var(--text); font-weight: 500; }
.remind {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  background: var(--note-soft); color: var(--note-ink); text-decoration: none; font-weight: 600;
}
.remind:hover { filter: brightness(.97); }

@media (max-width: 860px) {
  .day-cols { grid-template-columns: 1fr; }
  .day-todo { position: static; max-height: none; }
}

/* ---------- personlige og private boards ---------- */
.bd-badge { margin-left: auto; color: var(--muted); display: inline-flex; }
.bd-badge .ico { width: 14px; height: 14px; }
.tile-meta { display: inline-flex; align-items: center; gap: 4px; }
.tile-meta .ico { width: 13px; height: 13px; }

/* ---------- forsiden: Mine boards og PayTjek ---------- */
.home-sec-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.home-sec-h:first-of-type { margin-top: 0; }
.home-sec-h h2 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.tile-new { gap: 6px; }

/* ---------- Chat (Slack-opbygning i PayTjek-design) ---------- */
.view-chat { overflow: hidden; }
.chat { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: 100%; min-height: 0; }
.chat-side {
  background: #0f0f0f var(--grain); background-blend-mode: soft-light; color: #d4d4d4; overflow-y: auto;
  padding: 14px 10px 20px max(10px, env(safe-area-inset-left, 0px)); border-right: 1px solid #1f1f1f;
}
.chat-sec { margin-bottom: 18px; }
.chat-sec-h {
  display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #8a8a8a;
}
.chat-sec-h .icon-btn { color: #a3a3a3; }
.chat-sec-h .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.chat-link {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; border: 0; background: none;
  color: #bdbdbd; text-decoration: none; text-align: left; font-size: 14px; min-height: 32px;
}
.chat-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.chat-link.on { background: #f5f5f5; color: #0a0a0a; }
.chat-link.unread { color: #fff; font-weight: 700; }
.chat-link.on.unread { color: #0a0a0a; }
.chat-link .hash { width: 18px; text-align: center; opacity: .7; font-weight: 500; }
.chat-link .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-link .name em { font-style: normal; opacity: .6; font-weight: 400; }
.chat-link .count { background: #dc2626; color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card-bg); }
.chat-head {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 56px; flex-wrap: wrap;
}
.chat-head h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.chat-hash { font-family: var(--font-d); font-size: 20px; color: var(--muted); }
.chat-topic { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 2px 6px; border-radius: 6px; max-width: 60ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-topic:hover { background: var(--hover); color: var(--text); }
.chat-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 0 8px; }
.chat-empty { padding: 40px 24px; }
.chat-empty h2 { margin: 0 0 6px; font-size: 22px; font-weight: 500; }
.chat-empty p { margin: 0; color: var(--muted); }
.day-divider, .new-divider { position: relative; text-align: center; margin: 14px 20px 6px; }
.day-divider::before, .new-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.day-divider span, .new-divider span {
  position: relative; background: var(--card-bg); padding: 2px 12px; font-size: 12px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 12px;
}
.new-divider::before { border-top-color: var(--dev); }
.new-divider span { color: var(--dev-ink); border-color: var(--dev); }
.msg { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); padding: 6px 20px 6px 8px; }
.msg.compact { padding-top: 1px; padding-bottom: 1px; }
.msg:hover { background: var(--surface); }
.msg.mentions-me { background: var(--note-soft); box-shadow: inset 3px 0 0 var(--note); }
.msg-av { display: flex; justify-content: center; padding-top: 2px; }
.msg-hover-time { font-size: 11px; color: var(--muted); opacity: 0; padding-top: 3px; font-variant-numeric: tabular-nums; }
.msg:hover .msg-hover-time { opacity: 1; }
.msg-body { min-width: 0; }
.msg-h { display: flex; align-items: baseline; gap: 8px; }
.msg-h .who { font-weight: 700; }
.msg-h time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg-text { color: var(--text); overflow-wrap: anywhere; }
.msg-text a { color: var(--wait); }
.msg-text.deleted { color: var(--muted); font-style: italic; }
.msg-text .edited { color: var(--muted); font-size: 12px; margin-left: 6px; }
.mention { background: var(--wait-soft); color: var(--wait); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention.me { background: var(--note-soft); color: var(--note-ink); }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 1px 8px; font-size: 13px; line-height: 20px;
}
.react span { font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.react:hover { border-color: var(--text); }
.react.mine { background: var(--wait-soft); border-color: var(--wait); }
.react.mine span { color: var(--wait); }
.msg-actions {
  position: absolute; right: 16px; top: -14px; display: none; gap: 2px; background: var(--card-bg); border-radius: 10px; padding: 2px;
  box-shadow: var(--pop-shadow); z-index: 2;
}
.msg:hover .msg-actions, .msg-actions:focus-within { display: flex; }
.msg-actions button { border: 0; background: none; border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.msg-actions button:hover { background: var(--hover-strong); color: var(--text); }
.emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.emoji-grid button { border: 0; background: var(--surface); border-radius: 10px; height: 44px; font-size: 22px; }
.emoji-grid button:hover { background: var(--hover-strong); }
.chat-composer { flex: none; position: relative; padding: 8px 20px 14px; }
.composer-box {
  display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-bg);
  padding: 8px 8px 8px 6px;
}
.composer-row { display: flex; align-items: flex-end; gap: 6px; }
.composer-row .attach-btn { flex: none; width: 36px; height: 36px; }
.composer-box:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px var(--hover); }
.composer-box textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; max-height: 200px; line-height: 1.45; padding: 4px 0; }
.send-btn { flex: none; border: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.send-btn:hover { background: var(--accent-hover); }
.chat-hint { font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.mention-pop {
  position: absolute; left: 20px; bottom: calc(100% - 6px); width: 280px; background: var(--card-bg); border-radius: 12px; box-shadow: var(--pop-shadow);
  padding: 4px; display: flex; flex-direction: column; z-index: 5;
}
.mention-item { border: 0; background: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; text-align: left; color: var(--text); }
.mention-item:hover, .mention-item.on { background: var(--hover-strong); }
@media (max-width: 720px) {
  .chat { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .chat-side { max-height: 34vh; border-right: 0; border-bottom: 1px solid #1f1f1f; }
}

/* ---------- login ---------- */
body.is-login .topbar { display: none; }
.view-login { overflow-y: auto; background: var(--top-bg) var(--grain); background-blend-mode: soft-light; }
.login { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 16px; }
.login-card {
  width: min(400px, 100%); background: var(--card-bg); color: var(--text); border-radius: var(--r-panel); padding: 32px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4); display: flex; flex-direction: column; align-items: center; text-align: center;
}
.login-mark { width: 52px; height: 52px; border-radius: 14px; background: var(--top-bg); color: #f5f5f5; display: grid; place-items: center; margin-bottom: 14px; }
.login-mark svg { width: 26px; height: 26px; }
.login-card h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -.03em; }
.login-sub { color: var(--muted); margin: 6px 0 22px; }
.gsi-btn { min-height: 44px; display: flex; justify-content: center; }
.dev-login { width: 100%; text-align: left; margin-top: 8px; }
.dev-login .pop-note { margin-bottom: 8px; }
.login-err { color: var(--dev-ink); font-weight: 600; margin: 12px 0 0; }
.login-foot { color: #737373; font-size: 12px; margin: 0; }
.profile { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.profile-name { font-weight: 600; }

/* ---------- forside ---------- */
.start-head { margin-bottom: 22px; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mod {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; text-decoration: none; color: var(--text);
  background: var(--card-bg); border: 0; border-radius: var(--r-panel); box-shadow: var(--card-shadow); padding: 18px 18px 16px; min-height: 168px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.mod:hover { transform: translateY(-2px); box-shadow: var(--card-shadow), 0 10px 24px rgba(10, 10, 10, .08); }
.mod-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; margin-bottom: 6px; }
.mod-icon .ico { width: 20px; height: 20px; }
.mod-title { font-family: var(--font-d); font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.mod-desc { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.mod-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.mod-chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.mod-chip.bad { background: var(--dev-soft); color: var(--dev-ink); }
.mod-chip.soon { background: var(--note-soft); color: var(--note-ink); }
.mod-chip.ok { background: var(--ok-soft); color: var(--ok-ink); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--card-bg); box-shadow: var(--card-shadow);
  text-decoration: none; color: var(--text); font-weight: 500;
}
.quick-link:hover { box-shadow: var(--card-shadow), 0 0 0 2px var(--text); }
.quick-link .sq { width: 14px; height: 12px; border-radius: 3px; }
.quick-link .ico { width: 13px; height: 13px; color: var(--muted); }

/* ---------- Salg: faner over pipeline, kunder og følg op ---------- */
.sales-nav {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--card-bg); border-bottom: 1px solid var(--line);
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); flex: none;
}
.sales-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-d); font-weight: 500; font-size: 16px; }
.sales-tabs { display: flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.sales-tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 500; }
.sales-tab:hover { color: var(--text); }
.sales-tab.on { background: var(--card-bg); color: var(--text); box-shadow: var(--card-shadow); }
.sales-tab .count { background: #dc2626; color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; }
.pipe-pick { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pipe-pick select { width: auto; }
.view-page > .sales-nav { position: sticky; top: 0; z-index: 5; }

/* Installeret app på telefon: topbaren går under statuslinjen */
.topbar { height: calc(52px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
.pipe-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pipe-tools .pipe-pick { margin-left: 0; }
.sales-tab .ico { width: 14px; height: 14px; }

/* ================================================================ vedhæftede filer */
.card.has-cover { padding-top: 0; overflow: hidden; flex-shrink: 0; }
.card-cover {
  display: block; width: calc(100% + 24px); margin: 0 -12px 8px; max-height: 160px; object-fit: cover;
  border-radius: var(--r-card) var(--r-card) 0 0; background: var(--surface);
}
.files { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file-row { display: flex; gap: 12px; align-items: flex-start; }
.file-thumb {
  flex: none; width: 88px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface);
  display: grid; place-items: center; color: var(--muted); font: 600 13px/1 var(--font-d); text-decoration: none;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-thumb.is-doc:hover { background: var(--hover-strong); color: var(--text); }
.file-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.file-name { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.file-name:hover { text-decoration: underline; }
.file-meta { font-size: 12px; color: var(--muted); }
.file-info .fc-actions { margin-top: 2px; }
.file-info .fc-actions a.link-btn { color: var(--muted); }

/* Filer trukket ind fra computeren */
.card-modal.file-over, .chat-main.file-over { outline: 2px dashed var(--text); outline-offset: -8px; }

/* Chat: ventende filer og filer i beskeder */
.chat-pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 0 8px; }
.chat-pending[hidden] { display: none; }
.pending-file {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 4px 4px 6px;
  border-radius: 10px; background: var(--surface); font-size: 12.5px;
}
.pending-file img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.pending-file .ico { width: 16px; height: 16px; color: var(--muted); }
.pending-file .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-file.is-loading { padding-right: 10px; color: var(--muted); }
.msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.msg-img img { display: block; max-width: min(360px, 100%); max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 320px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card-bg); color: var(--text); text-decoration: none; font-size: 13px;
}
.file-chip:hover { border-color: var(--text); }
.file-chip .ico { width: 16px; height: 16px; flex: none; }
.file-chip .fn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .fs { color: var(--muted); flex: none; }

/* ================================================================ leads på salgsboardet og næste skridt */
.lead-composer { display: flex; flex-direction: column; gap: 6px; }
.lead-composer .text-input { width: 100%; background: var(--card-bg); }
.lead-composer #composer-input { font-weight: 600; }
.composer-hint { margin: 0 2px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.next-row { flex-wrap: wrap; }
.next-row > .text-input:first-child { flex: 1 1 180px; }
.next-row .when { display: flex; gap: 8px; flex: none; }
.next-row .when input[type="date"] { width: 150px; flex: none; }
.next-row .when input[type="time"] { width: 104px; flex: none; }
.next-row .when input:disabled { opacity: .45; }
.deal-hint { margin: -2px 0 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.deal-hint .ico { width: 13px; height: 13px; flex: none; }
.fu-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.notif-ico {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--text);
  display: grid; place-items: center;
}
.notif-ico .ico { width: 16px; height: 16px; }

/* PayTjek HQ i topbaren: "HQ" som et lille mærke efter navnet */
.brand-hq {
  margin-left: 6px; padding: 1px 5px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .35);
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em; vertical-align: 2px; opacity: .85;
}
