/* Medarbejderportal – design efter FinSet-dashboardet:
   lavendel ramme, hvid app-flade, lys sidebar, lilla accent, runde piller.
   Kun lyst tema. */

:root {
  --page: #c9c2f6;
  --frame: #ffffff;
  --side: #f7f6fd;
  --card: #ffffff;
  --card-soft: #f7f6fd;
  --border: #e8e6f6;
  --border-strong: #d9d5f2;
  --text: #1e1b2e;
  --muted: #8a87a0;
  --faint: #c3c0d6;
  --accent: #7d6cf5;
  --accent-strong: #6a58ee;
  --accent-soft: #efedfd;
  --accent-light: #c8c1fa;
  --on-accent: #ffffff;
  --green: #3aa56b;
  --green-bg: #e7f5ec;
  --red: #e45b5b;
  --red-bg: #fdeaea;
  --amber: #d9962b;
  --amber-bg: #fbf1dc;
  --shadow: 0 24px 60px rgba(60, 40, 140, .18);
  --bubble-me: #7d6cf5;
  --bubble-them: #f1effc;
  --radius: 24px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
svg.i { width: 20px; height: 20px; flex: none; }
::selection { background: var(--accent-light); }

/* ---------------------------------------------------------------- ramme */

.app { min-height: 100%; padding: 22px; }
.frame {
  background: var(--frame);
  border-radius: 32px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 44px);
  overflow: hidden;
  position: relative;
  transition: grid-template-columns .25s ease;
}
.frame.collapsed { grid-template-columns: 92px 1fr; }

/* ---------------------------------------------------------------- sidebar */

.sidebar {
  background: var(--side);
  border-right: 1px solid var(--border);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.logo { display: block; padding: 0 4px 22px; }
.logo img { width: 100%; max-width: 210px; display: block; }
.frame.collapsed .logo img { max-width: 48px; object-fit: cover; object-position: left; height: 48px; width: 48px; }
.collapse {
  position: absolute; right: -14px; top: 118px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--frame); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--muted);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.collapse svg { width: 16px; height: 16px; transition: transform .25s; }
.frame.collapsed .collapse svg { transform: rotate(180deg); }

.nav a, .nav button {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 500;
  border: 0; background: transparent; width: 100%; text-align: left;
  transition: background .15s;
  white-space: nowrap; overflow: hidden;
}
.nav a:hover, .nav button:hover { background: var(--accent-soft); }
.nav a.active { background: var(--accent); color: var(--on-accent); }
.nav .badge { margin-left: auto; }
.nav a.active .badge { background: #fff; color: var(--accent); }
.frame.collapsed .nav a, .frame.collapsed .nav button { padding: 13px 14px; justify-content: center; }
.frame.collapsed .nav .label, .frame.collapsed .nav .badge { display: none; }
.frame.collapsed .nav a { position: relative; }
.frame.collapsed .nav a[data-count]:not([data-count="0"])::after {
  content: ""; position: absolute; top: 9px; right: 12px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red); border: 2px solid var(--side);
}
.sidebar .spacer { flex: 1; }

/* ---------------------------------------------------------------- main */

.main { padding: 28px 32px 32px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: flex; align-items: flex-start; gap: 16px; }
.topbar h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.topbar .sub { color: var(--muted); margin-top: 4px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.iconbtn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); display: grid; place-items: center; color: var(--text); position: relative;
}
.iconbtn:hover { background: var(--accent-soft); }
.iconbtn .dot {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600;
  display: grid; place-items: center; border: 2px solid var(--frame);
}
.iconbtn .dot:empty { display: none; }
.profile {
  display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card); text-align: left;
}
.profile .who { line-height: 1.25; }
.profile .who b { display: block; font-weight: 600; }
.profile .who span { color: var(--muted); font-size: 12px; }
.mobile-only { display: none; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 15px; color: #fff; flex: none; letter-spacing: .02em;
  position: relative;
}
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.img { background-size: cover; background-position: center; background-color: var(--card-soft); }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.swatch span { position: absolute; inset: 0; border-radius: 50%; background: var(--c); border: 2px solid transparent; transition: transform .1s; }
.swatch input:checked + span { border-color: var(--text); transform: scale(1.12); box-shadow: 0 0 0 2px var(--card); }
.swatch.auto span { background: conic-gradient(#7d6cf5, #3aa56b, #e6b422, #e45b5b, #7d6cf5); display: grid; place-items: center; font-size: 9px; color: #fff; font-weight: 600; }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-edit .row { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-edit .avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.group { background: var(--accent-soft); color: var(--accent); }
.avatar .online {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--card);
}

/* toolbar under overskriften */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .right { margin-left: auto; display: flex; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 22px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  font-weight: 500; color: var(--text);
}
.chip.round { width: 52px; padding: 0; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  font-weight: 500; color: var(--text); white-space: nowrap;
}
.btn:hover { background: var(--accent-soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn.xs { height: 32px; padding: 0 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { border-color: transparent; background: transparent; }

.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
}
.badge.zero { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--accent-soft); color: var(--accent);
}
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.grey { background: var(--card-soft); color: var(--muted); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
/* fejlmeldinger */
.bug-howto .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bug-howto .row > div:first-child { color: var(--accent); display: flex; }
.bug-howto .row > div:first-child .i { width: 28px; height: 28px; }
.bug-howto .row > div:nth-child(2) { flex: 1; min-width: 240px; color: var(--muted); }
.bug-howto .row b { color: var(--text); }
.bug-new .bug-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.bug-new .shot img { width: 100%; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(80, 60, 160, .12); }
.bug-new .shot .hint { margin-top: 6px; }
.bug-new .form-actions { justify-content: flex-end; }
.buglist { display: flex; flex-direction: column; gap: 10px; }
.bugrow { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 10px 16px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: 16px; }
.bugrow .casehead { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.bugrow .caseid { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.bugrow .from { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.bugrow .from b { color: var(--text); }
.bugrow.closed { opacity: .65; }
.bugrow .thumb img { width: 132px; height: 88px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--border); display: block; }
.bugrow .noshot { width: 132px; height: 88px; border-radius: 10px; background: var(--card-soft); display: grid; place-items: center; color: var(--faint); }
.bugrow .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bugrow .tags a.pill { text-decoration: none; }
.bugrow .desc { white-space: pre-wrap; word-break: break-word; }
.bugrow .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.bugrow .note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.bugrow .side { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 760px) {
  .bug-new .bug-grid { grid-template-columns: 1fr; }
  .bugrow { grid-template-columns: 1fr; }
  .bugrow .thumb img, .bugrow .noshot { width: 100%; height: 140px; }
}

/* ---------------------------------------------------------------- kort */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; min-width: 0;
}
.card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card .head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.card .head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.stat .head { margin-bottom: 8px; }
.stat .value { font-size: 32px; font-weight: 600; letter-spacing: -.01em; margin: 8px 0 10px; }
.stat .value small { color: var(--faint); font-weight: 500; font-size: 20px; }
.stat .foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.stat .arrow { margin-left: auto; }
.arrow {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); display: grid; place-items: center; color: var(--text);
}
.arrow:hover { background: var(--accent-soft); }
.arrow svg { width: 18px; height: 18px; }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.empty { color: var(--muted); padding: 26px 8px; text-align: center; }
.empty svg { width: 36px; height: 36px; opacity: .5; display: block; margin: 0 auto 8px; }

/* opslag */
.posts { display: flex; flex-direction: column; gap: 12px; }
.post {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px;
  background: var(--card); position: relative;
}
.post.unread { border-color: var(--accent-light); background: var(--card-soft); }
.post.unread::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px;
  background: var(--accent); border-radius: 0 4px 4px 0;
}
.post .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.post h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.post .body { white-space: pre-wrap; word-break: break-word; color: var(--text); }
.post .body.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post .actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.post .actions .right { margin-left: auto; display: flex; gap: 4px; }
.post.compact h3 { font-size: 14px; }
.post.compact .body { font-size: 13px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; }
.linkish:hover { text-decoration: underline; }

/* kollegaer */
.people { display: flex; flex-direction: column; gap: 4px; }
.person {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px;
  background: none; border: 0; width: 100%; text-align: left;
}
.person:hover { background: var(--accent-soft); }
.person .who { min-width: 0; line-height: 1.25; }
.person .who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who span { color: var(--muted); font-size: 12px; }
.person .status { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------------------------------------------------------------- chat */

.chat {
  display: grid; grid-template-columns: 340px 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  min-height: 0; flex: 1; overflow: hidden; height: calc(100vh - 44px - 28px - 32px - 60px - 22px);
}
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.chat-list .top { padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 12px; }
.chat-list .top .row { display: flex; align-items: center; gap: 10px; }
.chat-list h2 { margin: 0; font-size: 20px; font-weight: 600; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card-soft); }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; }
.search svg { color: var(--muted); width: 18px; height: 18px; }
.chat-list .scroll { overflow-y: auto; flex: 1; padding: 0 10px 14px; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 12px 10px 6px; }
.conv {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 16px;
  width: 100%; text-align: left; border: 0; background: none;
}
.conv:hover { background: var(--accent-soft); }
.conv.active { background: var(--accent); color: #fff; }
.conv.active .preview, .conv.active .when { color: rgba(255,255,255,.8); }
.conv.active .avatar.group { background: rgba(255,255,255,.2); color: #fff; }
.conv .txt { min-width: 0; flex: 1; line-height: 1.3; }
.conv .txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .preview { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv .when { font-size: 11px; color: var(--muted); }
.conv.unread .txt b { font-weight: 700; }
.conv.active .badge { background: #fff; color: var(--accent); }

.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread .head {
  display: flex; align-items: center; gap: 14px; padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.thread .head .who { line-height: 1.25; min-width: 0; }
.thread .head .who b { font-weight: 600; font-size: 16px; display: block; }
.thread .head .who span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.thread .head .right { margin-left: auto; display: flex; gap: 6px; }
.messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.day { text-align: center; color: var(--muted); font-size: 11px; font-weight: 500; margin: 12px 0 6px; }
.msg { display: flex; gap: 10px; max-width: 78%; align-items: flex-end; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { visibility: hidden; }
.msg.first .avatar { visibility: visible; }
.msg .bubble {
  background: var(--bubble-them); padding: 10px 14px; border-radius: 18px;
  white-space: pre-wrap; word-break: break-word; line-height: 1.45;
  border-bottom-left-radius: 6px;
}
.msg.me .bubble { background: var(--bubble-me); color: #fff; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.msg.me .bubble a { color: #fff; }
.msg .sender { font-size: 11px; color: var(--muted); margin: 0 0 3px 4px; font-weight: 500; }
.msg .time { font-size: 10px; color: var(--muted); margin: 3px 4px 0; }
.msg.me .time { text-align: right; }
.msg .bubble-wrap { min-width: 0; }
.load-more { align-self: center; }

.composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px 18px; border-top: 1px solid var(--border); }
.composer textarea {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 22px; padding: 12px 18px;
  background: var(--card-soft); outline: none; max-height: 160px; line-height: 1.4; overflow-y: hidden;
}
.composer textarea:focus { border-color: var(--accent-light); }
.composer .send { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; display: grid; place-items: center; flex: none; }
.composer .send:hover { background: var(--accent-strong); }
.thread .placeholder { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }
.thread .placeholder svg { width: 56px; height: 56px; opacity: .35; margin: 0 auto 12px; display: block; }
.member-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- opgaver (boards) */

.subtabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: var(--card-soft); border: 1px solid var(--border); }
.subtabs button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.subtabs button:hover { color: var(--text); }
.subtabs button.active { background: var(--card); color: var(--accent); box-shadow: 0 2px 8px rgba(80, 60, 160, .12); }
.subtabs button .badge { margin-left: 2px; }
.board-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.board-tabs .chip { height: 44px; padding: 0 18px; cursor: pointer; }
.board-tabs .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.board-tabs .chip .badge { margin-left: 4px; }
.board-tabs .chip.active .badge { background: #fff; color: var(--accent); }

.board {
  display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding: 4px 4px 16px;
  min-height: calc(100vh - 44px - 28px - 32px - 60px - 22px - 66px);
}
.board .list {
  flex: 0 0 300px; width: 300px; background: var(--card-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); display: flex; flex-direction: column; max-height: calc(100vh - 260px);
}
.board .list.dragging { opacity: .4; }
.board .list.drop-before { box-shadow: -4px 0 0 var(--accent); }
.board .list.drop-after { box-shadow: 4px 0 0 var(--accent); }
.board .list .lhead { display: flex; align-items: center; gap: 8px; padding: 14px 12px 8px 16px; cursor: grab; }
.board .list .lhead h3 { margin: 0; font-size: 14px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .list .lhead .count { color: var(--muted); font-size: 12px; }
.board .list .lhead .iconbtn { width: 32px; height: 32px; border: 0; background: transparent; }
.board .list .lhead .iconbtn svg { width: 18px; height: 18px; }
.board .list .cards { flex: 1; overflow-y: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.board .list .lfoot { padding: 8px 10px 12px; }
.board .list .lfoot button.add { width: 100%; justify-content: flex-start; height: 40px; border-color: transparent; background: transparent; color: var(--muted); }
.board .list .lfoot button.add:hover { background: var(--accent-soft); color: var(--accent); }
.board .list.new { background: transparent; border-style: dashed; }
.board .list.new button.add { width: 100%; height: 52px; justify-content: center; }
.inline-form { display: flex; flex-direction: column; gap: 8px; }
.inline-form input { border: 1px solid var(--accent-light); border-radius: 12px; padding: 10px 12px; background: var(--card); outline: none; }
.inline-form .row { display: flex; gap: 6px; }

.cardItem {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  cursor: grab; box-shadow: 0 1px 2px rgba(30, 20, 80, .04); transition: box-shadow .15s, transform .15s;
}
.cardItem:hover { box-shadow: 0 6px 18px rgba(60, 40, 140, .12); transform: translateY(-1px); border-color: var(--accent-light); }
.cardItem.dragging { opacity: .35; }
.cardItem .ctitle { font-weight: 500; word-break: break-word; }
.cardItem .cmeta { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cardItem .cmeta .pill { font-size: 11px; padding: 3px 8px; }
.cardItem .cmeta .avatars { margin-left: auto; display: flex; }
.avatars .avatar { width: 26px; height: 26px; font-size: 10px; margin-left: -6px; border: 2px solid var(--card); }
.avatars .avatar:first-child { margin-left: 0; }
.placeholder-card { border: 2px dashed var(--accent-light); border-radius: 14px; background: var(--accent-soft); min-height: 44px; }
.board .empty { flex: 1; }

.mytasks { display: flex; flex-direction: column; gap: 6px; }
.mytask { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: none; border: 0; text-align: left; width: 100%; }
.mytask:hover { background: var(--accent-soft); }
.mytask .txt { min-width: 0; flex: 1; line-height: 1.3; }
.mytask .txt b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mytask .txt span { color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- mail */

.mail { display: grid; grid-template-columns: 380px 1fr; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; height: calc(100vh - 44px - 28px - 32px - 60px - 22px - 66px); min-height: 480px; }
.maillist { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.maillist .top { padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.board-tabs.small .chip { height: 32px; padding: 0 12px; font-size: 12px; }
.maillist .scroll { overflow-y: auto; flex: 1; padding: 0 8px 12px; }
.mailrow { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 8px; border-radius: 12px; border-bottom: 1px solid var(--border); }
.mailrow:hover { background: var(--accent-soft); }
.mailrow.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.mailrow .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: transparent; }
.mailrow.unread .dot { background: var(--accent); }
.mailrow.unread .subj, .mailrow.unread .line b { font-weight: 700; }
.mailrow.handled { opacity: .7; }
.mailrow .txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mailrow .line { display: flex; justify-content: space-between; gap: 8px; }
.mailrow .line b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailrow .when { color: var(--muted); font-size: 11px; white-space: nowrap; }
.mailrow .subj { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailrow .snip { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailrow .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.mailrow .tags .pill { font-size: 10px; padding: 2px 7px; }
.mailview { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.mailview .head { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.mailview .head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.mailview .head .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.mailview .head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.mailview .placeholder { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }
.mailview .placeholder svg { width: 56px; height: 56px; opacity: .35; margin: 0 auto 12px; display: block; }
.thread-links { padding: 8px 22px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.mailbody { padding: 18px 22px; line-height: 1.6; word-break: break-word; }
.mailbody pre.plain { white-space: pre-wrap; font: inherit; margin: 0; }
.mailbody img { max-width: 100%; }
.mailview .files { border-top: 1px solid var(--border); padding: 12px 22px; }
.replybox { margin-top: auto; border-top: 1px solid var(--border); padding: 14px 22px 18px; display: flex; flex-direction: column; gap: 8px; background: var(--card-soft); }
.replybox textarea { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; resize: vertical; background: var(--card); outline: none; }
.replybox textarea:focus { border-color: var(--accent-light); }
.replybox .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.replybox .row .btns { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 1000px) { .mail { grid-template-columns: 1fr; height: auto; } .maillist { border-right: 0; max-height: 50vh; } }

/* ---------------------------------------------------------------- tabel */

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 14px; background: var(--accent-soft); }
table.list th:first-child { border-radius: 12px 0 0 12px; }
table.list th:last-child { border-radius: 0 12px 12px 0; }
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list .who { display: flex; align-items: center; gap: 12px; }
table.list .who b { font-weight: 500; display: block; }
table.list .who span { color: var(--muted); font-size: 12px; }
table.list .actions { display: flex; gap: 4px; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
tr.inactive { opacity: .55; }

/* ---------------------------------------------------------------- formularer og modal */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; background: var(--card-soft); outline: none; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent-light); background: var(--card); }
.field textarea { min-height: 120px; resize: vertical; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline input[type="checkbox"], .field.inline input[type="radio"] { width: 18px; height: 18px; padding: 0; flex: 0 0 auto; accent-color: var(--accent); }
.field .field.inline { margin: 2px 0 0; }
.field.inline label { color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--red); background: var(--red-bg); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; }
.form-error:empty { display: none; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.form-actions .left { margin-right: auto; }
.checklist { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
.checklist label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.checklist label:hover { background: var(--accent-soft); }
.checklist input { accent-color: var(--accent); width: 18px; height: 18px; }
.hint { color: var(--muted); font-size: 12px; }

.modal-back {
  position: fixed; inset: 0; background: rgba(20, 15, 50, .45); display: grid; place-items: center;
  padding: 20px; z-index: 50; backdrop-filter: blur(3px);
}
.modal {
  background: var(--frame); border-radius: 28px; padding: 28px; width: 100%; max-width: 520px;
  max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: var(--shadow);
}
.modal.wide { max-width: 680px; }
.modal.wide:has(table.norm) { max-width: 1100px; }
.modal h2 { margin: 0 0 18px; font-size: 22px; font-weight: 600; }
.modal .close { float: right; }

.menu {
  position: absolute; background: var(--frame); border: 1px solid var(--border); border-radius: 16px;
  padding: 6px; box-shadow: var(--shadow); z-index: 40; min-width: 200px;
}
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: none; border-radius: 10px; text-align: left; }
.menu button:hover { background: var(--accent-soft); }
.menu button.danger { color: var(--red); }
.menu button svg { width: 18px; height: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--text); color: var(--frame); padding: 12px 20px; border-radius: 999px;
  font-weight: 500; z-index: 60; box-shadow: var(--shadow); animation: toast .2s ease;
}
.toast.error { background: var(--red); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------------------------------------------------------------- login */

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login {
  background: var(--frame); border-radius: 32px; padding: 40px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow);
}
.login .logo { padding: 0 0 20px; }
.login .logo img { max-width: 260px; margin: 0 auto; }
.login h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; text-align: center; }
.login .sub { color: var(--muted); text-align: center; margin-bottom: 24px; }
.login .btn { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------- responsivt */

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { padding: 0; }
  .frame { border-radius: 0; grid-template-columns: 1fr; min-height: 100vh; box-shadow: none; }
  .frame.collapsed { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 45; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .frame.menu-open .sidebar { transform: none; }
  .frame.collapsed .logo img { max-width: 210px; width: auto; height: auto; }
  .frame.collapsed .nav a, .frame.collapsed .nav button { padding: 13px 20px; justify-content: flex-start; }
  .frame.collapsed .nav .label, .frame.collapsed .nav .badge { display: initial; }
  .collapse { display: none; }
  .mobile-only { display: inline-grid; }
  .main { padding: 18px 16px 24px; gap: 16px; }
  .topbar h1 { font-size: 22px; }
  .topbar .sub { display: none; }
  .profile .who { display: none; }
  .profile { padding: 4px; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .board .list { flex-basis: 270px; width: 270px; max-height: calc(100vh - 230px); }
  .board { min-height: 0; }
  .chat-list { border-right: 0; }
  .chat.open .chat-list { display: none; }
  .chat:not(.open) .thread { display: none; }
  .msg { max-width: 88%; }
  .form-row { grid-template-columns: 1fr; }
  .stat .value { font-size: 26px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 16px; }
  .stat .arrow { display: none; }
  .toolbar .chip.date, .toolbar .chip.round { display: none; }
}

/* ---------------------------------------------------------------- ferie */

.chip.select { padding-right: 14px; cursor: pointer; }
.chip.select select { border: 0; background: transparent; outline: none; font-weight: 500; cursor: pointer; max-width: 200px; }
table.cal { border-collapse: separate; border-spacing: 2px; width: 100%; }
table.cal th { font-weight: 500; font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; }
table.cal thead th span { display: block; font-size: 9px; text-transform: uppercase; color: var(--faint); }
table.cal th.we { color: var(--faint); }
table.cal th.who { text-align: left; white-space: nowrap; padding: 0 12px 0 4px; font-size: 13px; color: var(--text); position: sticky; left: 0; background: var(--card); z-index: 1; }
table.cal th.who > div { display: flex; align-items: center; gap: 8px; }
table.cal th.who .avatar { width: 26px; height: 26px; font-size: 10px; }
table.cal thead th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
table.cal td.d { height: 26px; min-width: 18px; background: var(--card-soft); border-radius: 4px; }
table.cal td.we { background: var(--accent-soft); }
table.cal td.today { box-shadow: inset 0 0 0 2px var(--accent-light); }
table.cal td.approved { background: var(--green); }
table.cal td.approved.k-feriefridage, .legend i.approved.k-feriefridage { background: #3f9bd6; }
table.cal td.approved.k-kursus, .legend i.approved.k-kursus { background: var(--accent); }
table.cal td.approved.k-andet, .legend i.approved.k-andet { background: #8a87a0; }
table.cal td.approved.k-sygdom, .legend i.approved.k-sygdom { background: var(--red); }
table.cal td.approved.k-barsel, .legend i.approved.k-barsel { background: #e05a9a; }
.pill.kind.barsel { background: #fbe4ef; color: #b0306f; }
table.list.time.norm th { white-space: normal; letter-spacing: .02em; padding: 10px 8px; font-size: 11px; line-height: 1.25; vertical-align: bottom; min-width: 74px; }
table.list.time.norm th:first-child { min-width: 120px; }
table.list.time.norm th.num { white-space: normal; text-align: right; }
table.norm td { padding: 10px 8px; }
table.norm td.num { text-align: right; white-space: nowrap; }
table.norm td .neg { color: var(--red); } table.norm td .pos { color: var(--green); }
table.norm td.num.neg { color: var(--red); } table.norm td.num.pos { color: var(--green); }
table.norm td .hint { font-size: 11px; }
.pill.kind.sygdom { background: var(--red-bg); color: var(--red); }
.pill.kind { background: var(--green-bg); color: var(--green); }
.pill.kind.feriefridage { background: #e3f1fb; color: #2b7fb8; }
.pill.kind.kursus { background: var(--accent-soft); color: var(--accent); }
.pill.kind.andet { background: var(--card-soft); color: var(--muted); }
table.cal td.pending { background: repeating-linear-gradient(45deg, var(--amber) 0 4px, var(--amber-bg) 4px 8px); }
table.cal td.start { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
table.cal td.end { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.legend { display: flex; gap: 18px; margin-top: 10px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.approved { background: var(--green); }
.legend i.pending { background: repeating-linear-gradient(45deg, var(--amber) 0 4px, var(--amber-bg) 4px 8px); }
.legend i.we { background: var(--accent-soft); }

.vacs { display: flex; flex-direction: column; gap: 6px; }
.vac { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; flex-wrap: wrap; }
.vac .txt { flex: 1; min-width: 180px; line-height: 1.35; }
.vac .txt b { font-weight: 600; }
.vac .actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }

/* ---------------------------------------------------------------- afstemning */

.polls { display: flex; flex-direction: column; gap: 20px; }
.poll .head { align-items: flex-start; }
.poll .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.poll .desc { margin: 0 0 12px; white-space: pre-wrap; }
.poll.closed { opacity: .85; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--card);
}
.opt:hover { border-color: var(--accent-light); }
.opt.mine { border-color: var(--accent-light); }
.opt .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); transition: width .3s; z-index: 0; }
.opt.top .bar { background: #e2ddfd; }
.opt > *:not(.bar) { position: relative; z-index: 1; }
.opt input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
.opt .mark { width: 18px; height: 18px; display: grid; place-items: center; color: var(--accent); flex: none; }
.opt .txt { flex: 1; min-width: 0; line-height: 1.3; }
.opt .txt b { font-weight: 500; display: block; }
.opt .txt .who { color: var(--muted); font-size: 12px; }
.opt .num { text-align: right; line-height: 1.2; flex: none; }
.opt .num b { font-weight: 600; font-size: 16px; display: block; }
.opt .num span { color: var(--muted); font-size: 11px; }
.pfoot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pfoot .btn { margin-left: auto; }

/* ---------------------------------------------------------------- timer */

.stats.stats-3 { grid-template-columns: repeat(4, 1fr); }
.stats.three { grid-template-columns: repeat(3, 1fr); align-items: start; }
.stats.three .card .head { margin-bottom: 8px; }
.person.absent .who b { text-decoration: line-through; color: var(--muted); }
.person.absent .avatar { opacity: .6; }
.person.c-yellow { background: #fbe9a6; } .person.c-red { background: #f7c4c4; } .person.c-green { background: #c6ecd3; } .person.c-blue { background: #c9def8; }
@media (max-width: 1180px) { .stats.three { grid-template-columns: 1fr; } }
table.list.time td.num, table.list.time th.num { text-align: right; white-space: nowrap; }
table.list.time td.note { color: var(--muted); font-size: 13px; }
table.list.time tr.total td { font-weight: 600; background: var(--card-soft); border-bottom: 0; }
table.list.time .actions .btn { padding: 0 8px; }
@media (max-width: 1180px) { .stats.stats-3 { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- instrukser */

.instr { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.tree .frow { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px calc(8px + var(--d, 0) * 18px); border-radius: 12px; cursor: pointer; }
.tree .frow:hover { background: var(--accent-soft); }
.tree .frow.active { background: var(--accent); color: #fff; }
.tree .frow.active .fcount, .tree .frow.active .twist { color: rgba(255,255,255,.8); }
.tree .frow .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tree .frow .fcount { font-size: 11px; color: var(--muted); }
.tree .frow.root { padding-left: 34px; margin-bottom: 4px; }
.tree .twist { width: 20px; height: 20px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; padding: 0; }
.tree .twist svg { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform .15s; }
.tree .twist.open svg { transform: none; }
.tree .twist.none { visibility: hidden; }
.tree .fmenu { width: 26px; height: 26px; border: 0; background: transparent; opacity: 0; }
.tree .fmenu svg { width: 16px; height: 16px; }
.tree .frow:hover .fmenu, .tree .frow.active .fmenu { opacity: 1; }
.tree .frow.active .fmenu { color: #fff; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.doclist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.docrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); }
.docrow:hover { border-color: var(--accent-light); background: var(--card-soft); }
.docrow > svg { color: var(--accent); }
.docrow .txt { flex: 1; min-width: 0; line-height: 1.3; }
.docrow .txt b { display: block; font-weight: 500; }
.docrow .txt span { color: var(--muted); font-size: 12px; }
.doc .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.docbody { line-height: 1.65; margin: 8px 0 18px; word-break: break-word; }
.docbody h2 { font-size: 18px; margin: 18px 0 6px; }
.docbody h3 { font-size: 15px; margin: 14px 0 4px; }
.docbody p { margin: 0 0 10px; }
.docbody ul, .docbody ol { margin: 0 0 10px; padding-left: 24px; }
.docbody blockquote { border-left: 3px solid var(--accent-light); margin: 0 0 10px; padding: 4px 12px; color: var(--muted); }
.files { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.filerow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; background: var(--card-soft); }
.filerow a { color: var(--text); text-decoration: none; }
.filerow a:hover { color: var(--accent); }
.filerow .hint { flex: 1; }
.readbox { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.readbox .readlist { flex-basis: 100%; }
.editor-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card-soft); }
.toolbar-mini { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--card); }
.toolbar-mini .tb { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 4px 9px; font-size: 12px; }
.toolbar-mini .tb:hover { background: var(--accent-soft); }
.editor { min-height: 220px; max-height: 50vh; overflow-y: auto; padding: 12px 16px; outline: none; line-height: 1.6; background: var(--card); }
.editor h2 { font-size: 18px; margin: 12px 0 6px; } .editor h3 { font-size: 15px; margin: 10px 0 4px; } .editor p { margin: 0 0 8px; }
@media (max-width: 1180px) { .instr { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- rutiner */

.ritems { display: flex; flex-direction: column; gap: 8px; }
.ritem { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; }
.ritem.done { background: var(--green-bg); border-color: transparent; }
.ritem.done .txt > b { text-decoration: line-through; color: var(--muted); }
.ritem .txt { flex: 1; min-width: 0; line-height: 1.35; }
.ritem .txt b { font-weight: 500; }
.ritem .done-by { color: var(--green); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.ritem .done-by svg { width: 14px; height: 14px; }
.checkbox { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--border-strong); background: var(--card); display: grid; place-items: center; color: transparent; flex: none; margin-top: 2px; }
.checkbox:hover { border-color: var(--accent); }
.checkbox.on { background: var(--green); border-color: var(--green); color: #fff; }
.checkbox svg { width: 16px; height: 16px; }
.card .meta { color: var(--muted); font-size: 12px; }
table.hist td.c { text-align: center; }
table.hist th:not(:first-child) { text-align: center; white-space: nowrap; }
table.hist .ok { color: var(--green); } table.hist .miss { color: var(--red); }
table.hist .ok svg, table.hist .miss svg { width: 18px; height: 18px; }
.person.inactive { opacity: .55; }

/* ---------------------------------------------------------------- vagtplan */

.rota-card { padding: 16px; }
.rota-wrap { max-height: calc(100vh - 300px); overflow: auto; }
table.rota { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
table.rota th, table.rota td { padding: 5px 7px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: center; }
table.rota thead th { position: sticky; top: 0; background: var(--card); z-index: 2; }
table.rota thead tr:nth-child(2) th { top: 41px; }
table.rota th.grp { font-weight: 600; font-size: 13px; padding: 6px 8px; border-left: 2px solid var(--border-strong); }
table.rota th.grp .avatar { width: 24px; height: 24px; font-size: 10px; display: inline-grid; vertical-align: middle; margin-right: 4px; }
table.rota th.grp.me { background: var(--accent-soft); color: var(--accent); }
table.rota th.sub { font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.rota .sticky { position: sticky; background: var(--card); z-index: 1; text-align: left; }
table.rota .sticky.w { left: 0; min-width: 62px; font-weight: 600; }
table.rota .sticky.d { left: 62px; min-width: 110px; }
table.rota thead .sticky { z-index: 3; }
table.rota td.rc { border-left: 1px solid var(--border); }
table.rota td.rc.hrs { color: var(--muted); }
table.rota td.rc.hrs + td.rc { border-left: 2px solid var(--border-strong); }
table.rota tr td:nth-child(3) { border-left: 2px solid var(--border-strong); }
table.rota td.rc.edit { cursor: pointer; }
table.rota td.rc.edit:hover { background: var(--accent-soft); }
table.rota td.rc.me { background: var(--accent-soft); }
table.rota tr.we td { background: var(--card-soft); color: var(--muted); }
table.rota tr.we td.rc.me { background: #e6e2fb; }
table.rota tr.today td.sticky { color: var(--accent); font-weight: 600; }
table.rota tr.sum td { background: var(--card-soft); font-weight: 600; border-bottom: 2px solid var(--border-strong); }
table.rota tr.sum td.hrs { color: var(--text); }
table.rota tr.grand td { background: var(--accent-soft); }
table.rota td.c-yellow, .swatch span.c-yellow, .legend i.c-yellow { background: #fbe9a6 !important; color: #6b5300; }
table.rota td.c-red, .swatch span.c-red, .legend i.c-red { background: #f7c4c4 !important; color: #7a1f1f; }
table.rota td.c-green, .swatch span.c-green, .legend i.c-green { background: #c6ecd3 !important; color: #14532d; }
table.rota td.c-blue, .swatch span.c-blue, .legend i.c-blue { background: #c9def8 !important; color: #1e3a8a; }
table.rota td.c-kursus, .swatch span.c-kursus, .legend i.c-kursus { background: #ddd6fe !important; color: #4c1d95; font-weight: 600; }
table.rota td.conflict, .legend i.conflict { background: #d92d2d !important; color: #fff !important; font-weight: 700; }
table.rota td.conflict.hrs { color: #fff; }
.warnbox { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 16px; background: var(--red-bg); color: #7a1f1f; border: 1px solid #f3b4b4; margin-bottom: 4px; }
.warnbox svg { width: 22px; height: 22px; flex: none; color: var(--red); }
.warnbox .hint { color: #9b4b4b; margin-top: 4px; }
.warnbox.small { padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.person.c-kursus { background: #ddd6fe; }
.form-row.map { align-items: end; }
.lunch { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; margin-left: 4px; vertical-align: middle; }
table.rota td.sticky.d.edit { cursor: pointer; }
table.rota td.sticky.d.edit:hover { color: var(--accent); }
.stats.two { grid-template-columns: repeat(2, 1fr); align-items: start; }
@media (max-width: 900px) { .stats.two { grid-template-columns: 1fr; } }
.post.compact { padding: 12px 14px; }
.post.compact .body { color: var(--text); }
.post.compact .meta { margin-bottom: 4px; }
/* fødselsdags-popup */
.modal.bday { position: relative; overflow: hidden; text-align: center; padding: 60px 28px 28px; max-width: 560px; background: linear-gradient(180deg, #fff7f7 0%, #fff 60%); }
.modal.bday .bunting { position: absolute; top: 0; left: 0; width: 100%; height: 70px; }
.modal.bday .confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.modal.bday .confetti i { position: absolute; top: -20px; border-radius: 2px; opacity: .9; animation: confetti linear infinite; }
@keyframes confetti { 0% { transform: translateY(-20px) rotate(0deg); } 100% { transform: translateY(620px) rotate(720deg); } }
.modal.bday .bday-body { position: relative; }
.modal.bday .gifts { display: flex; justify-content: center; align-items: flex-end; gap: 18px; height: 110px; margin-bottom: 6px; }
.modal.bday .gift { width: 64px; height: 64px; animation: bob 2.4s ease-in-out infinite; }
.modal.bday .gift.g2 { animation-delay: .6s; width: 56px; height: 56px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.balloons { display: flex; gap: 6px; align-items: flex-end; height: 110px; }
.balloon { display: block; width: 34px; height: 44px; border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%; position: relative; animation: float 3s ease-in-out infinite; }
.balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 40px; background: #999; }
.balloon.b1 { background: #e45b5b; } .balloon.b2 { background: #f0c94a; animation-delay: .8s; height: 50px; width: 38px; margin-bottom: 10px; } .balloon.b3 { background: #7d6cf5; animation-delay: 1.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.modal.bday .bday-avatars { display: flex; justify-content: center; gap: 12px; margin-bottom: 10px; }
.modal.bday .bday-avatars .avatar.xl { border: 4px solid #fff; box-shadow: 0 8px 24px rgba(60,40,140,.2); }
.modal.bday h2 { margin: 6px 0 4px; font-size: 24px; }
.modal.bday p { color: var(--muted); margin: 0 0 18px; }

.hours-hist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.form-row.three { grid-template-columns: 1fr 1fr 1.3fr; }
.hours-hist .linkish { color: var(--red); font-size: 14px; margin-left: 4px; }
.search.sm { height: 38px; padding: 0 12px; }
.search.sm input { width: 150px; font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.pager .btn svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .search.sm input { width: 100px; } }
.board-tabs.small .chip .badge { margin-left: 6px; min-width: 18px; height: 18px; font-size: 10px; }
.board-tabs.small .chip.active .badge { background: #fff; color: var(--accent); }
