:root {
  --bg: #f4f6f8;
  --card: #fff;
  --text: #1c2430;
  --muted: #667085;
  --line: #e2e6ea;
  --brand: #2e1a6b;       /* I.F. Bytoftens blå (fra logoet) */
  --brand-2: #4a34a6;
  --link: #3b2590;
  --topbar: #2e1a6b;
  --ok-bg: #e6f4ec;
  --ok: #0b5d3b;
  --err-bg: #fdecec;
  --err: #b42318;
  --warn-bg: #fff6e0;
  --warn: #8a5a00;
  --pick: #f2f0fa;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --card: #1b2128;
    --text: #e6e9ed;
    --muted: #97a1ad;
    --line: #2c343d;
    --brand: #6a58d6;
    --brand-2: #8373e8;
    --link: #b3a8ff;
    --topbar: #231650;
    --ok-bg: #173226;
    --ok: #6fdcaa;
    --err-bg: #3a1c1c;
    --err: #ff9a91;
    --warn-bg: #3a2f14;
    --warn: #ffd27a;
    --pick: #221d3a;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 1150px; margin: 0 auto; padding: 20px 16px 120px; }
h1 { font-size: 1.6rem; margin: .2em 0 .5em; }
h2 { font-size: 1.15rem; margin-top: 0; }
a { color: var(--link); }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
code { background: var(--bg); padding: 1px 4px; border-radius: 4px; }

.topbar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 16px; background: var(--topbar); color: #fff; }
.topbar a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 1.1rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.topbar nav a { padding: 4px 10px; border-radius: 6px; opacity: .85; }
.topbar nav a.active, .topbar nav a:hover { background: rgba(255,255,255,.18); opacity: 1; }
.logout { display: flex; gap: 10px; align-items: center; margin: 0; }
.who { opacity: .85; }
button.link { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.card.narrow { max-width: 460px; margin: 40px auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; }
button, .button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 6px; padding: 7px 14px; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--brand); }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--brand-2); }
button.danger { color: var(--err); border-color: var(--err); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.small { padding: 3px 9px; font-size: .85em; }
.stack { display: grid; gap: 14px; }
.stack label, .grid-form label { display: grid; gap: 4px; font-weight: 500; }
label.check { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 400; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin: 20px 0; }
.actions.reverse { flex-direction: row-reverse; }
tr.done td { background: var(--ok-bg); }
.delivery input[type=checkbox] { width: 20px; height: 20px; }

.flash { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.flash ul { margin: 4px 0 0; padding-left: 20px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; }
.tag { display: inline-block; font-size: .75em; padding: 1px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.part { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tfoot th { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.missing td { color: var(--muted); }
tr.picked { background: var(--pick); }
.order-table input.qty { width: 64px; text-align: right; }
.status-form input[type=text] { width: 170px; }
.w-s { width: 70px; } .w-m { width: 90px; }
.products input:not([type]) { width: 100%; min-width: 120px; }

.totals { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 12px; }
.totals div { display: grid; }
.totals span { font-size: .8em; color: var(--muted); }
.totals strong { font-size: 1.15rem; }
.totals .over { color: var(--err); }
.sticky { position: sticky; bottom: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.comment { display: grid; gap: 4px; margin-top: 12px; }
.guide { max-width: 100%; height: auto; margin-top: 10px; }
details summary { cursor: pointer; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; }
.stats span { font-size: .8em; color: var(--muted); }
.stats strong { font-size: 1.2rem; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.filters a { padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; background: var(--card); }
.filters a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.summary .sizes { display: flex; flex-wrap: wrap; gap: 4px; }
.size { border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Mobil: bestillingstabellen som kort */
@media (max-width: 640px) {
  .order-table thead { display: none; }
  .order-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; padding: 10px; border-bottom: 1px solid var(--line); }
  .order-table td { border: 0; padding: 2px 0; text-align: left; }
  .order-table td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .order-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: .75em; color: var(--muted); }
  .actions { flex-direction: column-reverse; }
}
a.plain { text-decoration: none; }
.budget-form { margin-bottom: 8px; } .budget-form label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.season-picker { display: flex; gap: 8px; align-items: center; margin: 0; } .season-picker label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Bestillingsside med varekort ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.08); transform: translateY(-2px); }
.product-card.picked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset, 0 6px 22px rgba(0,0,0,.08); }
.product-image { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 0; background: #fff; cursor: zoom-in; }
.product-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-image.placeholder { cursor: default; background: var(--bg); display: grid; place-items: center; }
.product-image.placeholder img { width: 45%; height: 45%; opacity: .7; }
.picked-badge { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; transform: scale(0); transition: transform .15s; }
.product-card.picked .picked-badge { transform: scale(1); }
.product-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.product-body h3 { font-size: 1rem; margin: 0; line-height: 1.3; }
.product-meta { margin: 0; font-size: .8em; color: var(--muted); }
.price { margin: 2px 0 4px; font-size: 1.15rem; font-weight: 700; }
.one-size { flex: 1; font-size: .85em; color: var(--muted); }
.stepper { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { border: 0; border-radius: 0; width: 34px; padding: 6px 0; font-size: 1.1rem; line-height: 1; background: var(--bg); }
.stepper button:hover { background: var(--line); }
.stepper input.qty { width: 40px; border: 0; border-radius: 0; text-align: center; padding: 6px 0; -moz-appearance: textfield; }
.stepper input.qty::-webkit-outer-spin-button, .stepper input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.line-total-row { margin: 0; min-height: 1.4em; font-size: .85em; display: flex; justify-content: space-between; gap: 8px; }
.line-total-row .line-total { color: var(--link); font-weight: 600; }
.order-shop .comment { display: grid; gap: 4px; margin-top: 20px; }

.checkout-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.1); }
.checkout-inner { max-width: 1150px; margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px 24px; align-items: center; }
.checkout-figures { display: flex; gap: 24px; }
.checkout-figures div { display: grid; }
.checkout-figures span { font-size: .75em; color: var(--muted); }
.checkout-figures strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.checkout-figures .over { color: var(--err); }
.budget-meter { height: 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.budget-meter-fill { height: 100%; width: 0; background: var(--brand-2); transition: width .2s, background-color .2s; }
.budget-meter-fill.over { background: var(--err); }
main:has(.checkout-bar) { padding-bottom: 170px; }

.lightbox { border: 0; border-radius: 14px; padding: 16px; max-width: min(92vw, 720px); background: var(--card); color: var(--text); }
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lightbox img { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; object-fit: contain; }
.lightbox-title { text-align: center; margin: 10px 0 0; font-weight: 600; }
.lightbox form { position: absolute; top: 8px; right: 8px; margin: 0; }
.lightbox-close { width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; padding: 0; }

.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); vertical-align: middle; }
.thumb.empty { display: inline-block; background: var(--bg); }

@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-body { padding: 10px; }
  .checkout-inner { grid-template-columns: 1fr; gap: 8px; padding: 8px 12px; }
  .checkout-inner .primary { width: 100%; }
  .checkout-figures { justify-content: space-between; gap: 8px; }
  .checkout-figures strong { font-size: 1rem; white-space: nowrap; }
  .budget-meter { grid-row: 1; }
}
.image-cell { white-space: nowrap; }
.image-cell > * { vertical-align: middle; }
.file-button { position: relative; cursor: pointer; }
.file-button input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.button.small { padding: 3px 9px; font-size: .85em; }
.line-name .thumb { margin-right: 8px; }

/* Ensartede, kompakte varebilleder */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.product-image { aspect-ratio: auto; height: 150px; padding: 10px; }
.product-image.placeholder img { width: 70px; height: 70px; }

/* Størrelsesrækker: størrelse øverst, antal og evt. fjern-knap under */
.size-rows { display: grid; gap: 10px; margin-top: auto; }
.size-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.size-row + .size-row { padding-top: 10px; border-top: 1px dashed var(--line); }
.size-row select, .size-row .one-size { grid-column: 1 / -1; min-width: 0; }
.size-row select.needs-size { border-color: var(--err); outline: 2px solid var(--err-bg); }
.size-row .one-size { padding: 7px 0; font-size: .85em; color: var(--muted); }
.size-row .stepper { justify-content: space-between; }
.size-row .stepper input.qty { flex: 1; }
.remove-size { padding: 0 10px; color: var(--muted); }
.add-size { align-self: flex-start; border: 0; background: none; padding: 2px 0; color: var(--link); font-size: .85em; font-weight: 600; }
.add-size:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .product-image { height: 120px; }
}
.email-input { min-width: 220px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { height: 38px; width: auto; display: block; }
.login-logo { display: block; height: 110px; width: auto; margin: 0 auto 8px; }
.card.narrow h1 { text-align: center; }

/* ---------- Portal: modulmenu og forside ---------- */
.subnav { background: var(--card); border-bottom: 1px solid var(--line); }
.subnav-inner { max-width: 1150px; margin: 0 auto; padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.subnav-title { font-weight: 700; margin-right: 10px; white-space: nowrap; }
.subnav a { padding: 5px 12px; border-radius: 99px; text-decoration: none; color: var(--text); font-size: .92em; }
.subnav a:hover { background: var(--bg); }
.subnav a.active { background: var(--brand); color: #fff; }
.subnav a.admin-first { margin-left: auto; }
.subnav a.admin-link { color: var(--muted); }
.subnav a.admin-link.active { color: #fff; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.module-tile { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.module-tile:hover { border-color: var(--brand); box-shadow: 0 6px 22px rgba(0,0,0,.08); transform: translateY(-2px); }
.module-icon { font-size: 2rem; line-height: 1; }
.module-tile h2 { margin: 0 0 4px; font-size: 1.1rem; }
.module-tile p { margin: 0; color: var(--muted); font-size: .92em; }
.module-tile .tag { margin-top: 8px; }
.access-select { min-width: 110px; }

/* ---------- VEO-booking ---------- */
.filters-sep { flex: 0 0 12px; }
a.button.primary-link { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.day-head { font-size: .95rem; color: var(--muted); margin: 22px 0 8px; }
.day-head::first-letter { text-transform: uppercase; }
.booking { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.booking.ongoing { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn) inset; }
.booking.mine { background: var(--pick); }
.booking-camera { font-weight: 700; color: #fff; text-align: center; border-radius: 8px; padding: 8px 4px; }
.booking-time { font-weight: 600; }
.booking-details { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 2px; }
.booking-comment { margin: 6px 0 0; font-style: italic; }
.booking p.small { margin: 4px 0 0; }
.booking-actions { display: flex; gap: 6px; align-items: center; }

.booking-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.booking-form { margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.camera-choice { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; }
.camera-choice legend { font-weight: 500; margin-bottom: 4px; padding: 0; }
.camera-option { flex: 1; cursor: pointer; }
.camera-option input { position: absolute; opacity: 0; }
.camera-option span { display: block; text-align: center; padding: 14px; border-radius: 10px; font-weight: 700; font-size: 1.1rem; color: #fff; opacity: .45; transition: opacity .15s, transform .15s; }
.camera-option input:checked + span { opacity: 1; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--text); transform: scale(1.02); }
.camera-option input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 3px; }
.busy-list { margin: 0; }
.busy-list h3 { margin: 14px 0 4px; font-size: 1rem; }
.busy-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.busy-list li { font-size: .9em; }

@media (max-width: 760px) {
  .booking-layout, .two-col { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; }
  .booking-camera { justify-self: start; padding: 4px 12px; }
}

/* Smal skærm: portal- og modulmenu på hver sin vandret-scrollbare linje */
@media (max-width: 700px) {
  .topbar { gap: 6px 12px; }
  .topbar nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .topbar nav a { white-space: nowrap; }
  .logout { margin-left: auto; }
  .logout .who { display: none; }
  .subnav-inner { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .subnav a { white-space: nowrap; }
  .subnav a.admin-first { margin-left: 0; }
}
.booking-camera small { display: block; font-weight: 400; font-size: .7em; opacity: .85; }

/* ---------- VEO: kalendere ---------- */
.cal-nav { display: inline-flex; gap: 4px; }
.section-head { font-size: 1.1rem; margin: 28px 0 10px; }
.cam-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
table.compact td, table.compact th { padding: 6px 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: .9em; }

/* Uge: tidslinje med en række pr. kamera */
.timeline { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tl-row { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-label { padding: 12px; font-weight: 700; border-left: 5px solid transparent; display: flex; flex-direction: column; justify-content: center; }
.tl-head .tl-label { font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.tl-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.tl-day { padding: 8px 6px; text-align: center; text-decoration: none; color: var(--text); border-left: 1px solid var(--line); font-size: .85em; line-height: 1.3; }
.tl-day span { display: block; color: var(--muted); text-transform: capitalize; }
.tl-day:hover { background: var(--bg); }
.tl-day.today { background: var(--pick); }
.tl-day.today strong { color: var(--link); }
.tl-track { position: relative; min-height: 54px; background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 7)); }
.tl-bar { position: absolute; top: 9px; bottom: 9px; min-width: 6px; border: 0; border-radius: 7px; color: #fff; font: inherit; font-size: .8em; font-weight: 600; padding: 0 6px; display: flex; align-items: center; overflow: hidden; text-decoration: none; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tl-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-bar:hover { filter: brightness(1.15); }
.tl-bar.cont-before { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cont-after { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--err); z-index: 2; }

/* Måned: klassisk kalender */
table.month-cal { table-layout: fixed; }
.month-cal th { text-align: center; }
.month-cal th.wk { width: 44px; }
.month-cal th.wk a { color: var(--muted); text-decoration: none; }
.month-cal td { vertical-align: top; height: 96px; padding: 4px; border-left: 1px solid var(--line); }
.month-cal td.out { background: var(--bg); }
.month-cal td.out .daynum { color: var(--muted); }
.month-cal td.today { background: var(--pick); }
.month-cal td.today .daynum { background: var(--brand); color: #fff; }
.daynum { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; font-size: .85em; font-weight: 600; text-decoration: none; color: var(--text); margin-bottom: 2px; }
.daynum:hover { background: var(--line); }
.chip { display: block; width: 100%; margin: 2px 0; padding: 2px 6px; border: 0; border-radius: 5px; color: #fff; font: inherit; font-size: .75em; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; cursor: pointer; }
.chip:hover { filter: brightness(1.15); }
.chip-time { font-weight: 700; }

.tip-box { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: min(92vw, 520px); background: var(--text); color: var(--card); padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.3); z-index: 50; font-size: .9em; }

@media (max-width: 700px) {
  .tl-row { grid-template-columns: 70px 1fr; }
  .tl-label { padding: 8px 6px; font-size: .8em; }
  .tl-day { padding: 6px 2px; font-size: .7em; }
  .tl-bar span { display: none; }
  .month-cal td { height: 64px; padding: 2px; }
  .month-cal th.wk { width: 28px; font-size: .75em; }
  .chip { height: 8px; padding: 0; margin: 3px 0; font-size: 0; }
}

/* ---------- Træningsbibliotek ---------- */
.doc-list { display: grid; gap: 10px; }
.doc { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.doc-icon { display: grid; place-items: center; width: 52px; height: 64px; border-radius: 6px; background: #b42318; color: #fff; font-weight: 800; font-size: .8em; letter-spacing: .05em; text-decoration: none; box-shadow: inset -8px 8px 0 -4px rgba(255,255,255,.25); }
.doc-main h2 { font-size: 1.05rem; margin: 0; }
.doc-main h2 a { color: var(--text); text-decoration: none; }
.doc-main h2 a:hover { color: var(--link); text-decoration: underline; }
.doc-desc { margin: 4px 0; }
.doc-main p.small { margin: 2px 0 0; }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.narrow-form { max-width: 620px; }
.versions { display: grid; gap: 12px; }

.pdf-viewer { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pdf-toolbar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.pdf-toolbar button { padding: 4px 12px; }
.pdf-status { color: var(--muted); font-size: .9em; margin-left: 6px; }
.pdf-open { margin-left: auto; font-size: .9em; }
.pdf-pages { display: grid; justify-items: center; gap: 14px; padding: 14px; background: #525659; overflow-x: auto; min-height: 60vh; }
.pdf-page { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.4); max-width: none; }
.pdf-page canvas { display: block; }
.pdf-fallback { color: #fff; text-align: center; padding: 40px 10px; }
.pdf-fallback a { color: #fff; }

@media (max-width: 640px) {
  .doc { grid-template-columns: 40px 1fr; }
  .doc-icon { width: 40px; height: 50px; font-size: .7em; }
  .doc-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .pdf-pages { padding: 6px; gap: 8px; }
}

/* Træningsbibliotek: mapper */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 4px 0 8px; font-size: .92em; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span:last-child:not([aria-hidden]) { color: var(--text); font-weight: 600; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 18px; }
.folder-tile { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); margin: 0; }
.folder-tile:hover { border-color: var(--brand); }
.folder-tile > span:last-child { display: grid; min-width: 0; }
.folder-tile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-icon { font-size: 1.6rem; line-height: 1; }
.new-folder { border-style: dashed; background: transparent; }
.new-folder input[name=name] { flex: 1; min-width: 0; padding: 5px 8px; }
.module-icon img { width: 56px; height: 56px; object-fit: contain; display: block; }
.subnav-icon { height: 1.1em; width: auto; vertical-align: -0.15em; }
.doc-icon.link-icon { background: var(--brand); font-size: 1.4rem; }
.external { font-size: .8em; color: var(--muted); }
.count-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--err); color: #fff; font-size: .7em; font-weight: 700; vertical-align: middle; }

/* ---------- Opslagstavle ---------- */
.post-list { display: grid; gap: 10px; }
.post-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--text); }
.post-card:hover { border-color: var(--brand); }
.post-card.pinned, .post-full.pinned { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn) inset; }
.post-card.unread { border-left: 4px solid var(--link); }
.post-card h2 { font-size: 1.05rem; margin: 2px 0 4px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .8em; color: var(--muted); }
.tag.new { background: var(--link); color: #fff; border-color: transparent; }
.post-excerpt { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.post-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: .8em; color: var(--muted); }
.post-full h1 { margin: 4px 0; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin-top: 10px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.comments { display: grid; gap: 8px; }
.comment { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.comment.mine { background: var(--pick); }
.comment-head { display: flex; gap: 8px; align-items: baseline; }
.comment .post-body { margin-top: 4px; }
.comment-delete { margin-left: auto; }
.link-button { background: none; border: 0; padding: 0; color: var(--err); font-size: .85em; text-decoration: underline; cursor: pointer; }
.comment-form { margin-top: 12px; }
.member-list { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.member-list legend { font-weight: 500; padding: 0 4px; }
.filters .count-badge { margin-left: 4px; }
/* Markering af nyt på forsidens modulfelter */
.module-icon { position: relative; }
.icon-badge { position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--err); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--card); }
.module-tile.has-news { border-color: var(--err); }
.tile-news { margin: 6px 0 0 !important; color: var(--err) !important; font-weight: 600; font-size: .88em !important; }

/* ---------- Trænerinfo ---------- */
.tile-wrap { position: relative; }
.tile-wrap .module-tile { height: 100%; padding-right: 64px; }
.tile-edit { position: absolute; top: 10px; right: 10px; }
.tile-kind { margin-top: 6px !important; font-size: .8em !important; }
.module-icon { font-size: 2rem; }
.icon-choice, .kind-choice { border: 0; padding: 0; margin: 0; }
.icon-choice legend, .kind-choice legend { font-weight: 500; margin-bottom: 6px; padding: 0; }
.icon-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-choice label { cursor: pointer; }
.icon-choice input { position: absolute; opacity: 0; }
.icon-choice span { display: grid; place-items: center; width: 44px; height: 44px; font-size: 1.4rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.icon-choice input:checked + span { border: 2px solid var(--brand); background: var(--pick); }
.icon-choice input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.kind-choice { display: grid; gap: 4px; }
.icon-preview { display: flex; align-items: center; gap: 12px; }
.preview-tile { pointer-events: none; }
.link-rows, .pdf-choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.link-rows legend, .pdf-choice legend { font-weight: 500; margin-bottom: 4px; padding: 0; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; }
.info-links { display: grid; gap: 8px; margin: 12px 0 16px; }
.info-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.info-link:hover { border-color: var(--brand); }
.info-link-icon { font-size: 1.3rem; }
.info-link-text { display: grid; flex: 1; min-width: 0; }
.info-link-text strong { overflow-wrap: anywhere; }
@media (max-width: 640px) { .link-row { grid-template-columns: 1fr auto; } .link-row input[name^=link_url_] { grid-column: 1; } }
.link-row + .link-row { padding-top: 8px; border-top: 1px dashed var(--line); }
.link-rows .add-size { justify-self: start; }
.links-head { margin-top: 4px; }
.links-head + .doc-list { margin-bottom: 20px; }
.pinned-list { margin-bottom: 20px; }

/* VEO: retningslinjer (sammenklappet) */
.guidelines-box { background: var(--err-bg); border: 2px solid var(--err); border-radius: 10px; margin: 0 0 16px; }
.guidelines-box summary { padding: 10px 14px; font-weight: 700; color: var(--err); cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.guidelines-box summary::-webkit-details-marker { display: none; }
.guidelines-box summary::after { content: "▾"; margin-left: auto; color: var(--err); transition: transform .15s; }
.guidelines-box .guidelines-body { color: var(--text); border-top: 1px solid var(--err); padding-top: 12px; }
.guidelines-box .guidelines-body .button { background: var(--card); }
.guidelines-box[open] summary::after { transform: rotate(180deg); }
.guidelines-body { padding: 0 14px 14px; }
.guidelines-body .post-body { margin-top: 0; }
.guidelines-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Ture & events ---------- */
.ev-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
.year-nav { display: flex; align-items: center; gap: 10px; }
.year-nav strong { font-size: 1.15rem; min-width: 3.2em; text-align: center; }
.cat-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cat-chip { cursor: pointer; position: relative; }
.cat-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cat-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--muted); text-decoration: line-through; transition: background .15s, color .15s; }
.cat-chip span i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--cat); }
.cat-chip input:checked + span { background: var(--cat); border-color: var(--cat); color: #fff; text-decoration: none; font-weight: 600; }
.cat-chip input:checked + span i { background: #fff; border-color: #fff; }
.cat-chip input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 2px; }

.ev-month { margin-bottom: 18px; }
.ev-month h2 { font-size: 1.05rem; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.ev-month.current h2 { color: var(--brand); }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev-item a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--cat); border-radius: 10px; text-decoration: none; color: var(--text); transition: box-shadow .15s; }
.ev-item a:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.ev-item.past a { opacity: .55; }
.ev-date { display: grid; justify-items: center; min-width: 2.6em; line-height: 1.1; }
.ev-date b { font-size: 1.4rem; color: var(--cat); }
.ev-date small { color: var(--muted); font-size: .75em; }
.ev-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ev-cat { font-size: .8em; font-weight: 600; color: var(--cat); white-space: nowrap; }
@media (max-width: 640px) {
  .ev-item a { flex-wrap: wrap; gap: 4px 12px; }
  .ev-cat { flex-basis: 100%; padding-left: calc(2.6em + 12px); }
}

.ev-detail { border-top: 6px solid var(--cat); }
.ev-cat-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--cat); font-size: .9em; }
.ev-cat-label i, .wheel-legend i, .wheel-list i { width: 10px; height: 10px; border-radius: 50%; background: var(--cat); display: inline-block; flex: none; }
.ev-detail h1 { margin-top: 2px; }
.ev-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 6px 0 12px; }
.ev-facts dt { color: var(--muted); font-size: .85em; padding-top: 2px; }
.ev-facts dd { margin: 0; font-weight: 600; }
.ev-detail .info-link { margin: 12px 0; }
.ev-detail + form { margin-top: 10px; }

.wheel-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.wheel { margin: 0; }
.wheel svg { width: 100%; height: auto; display: block; max-width: 640px; margin: 0 auto; }
.wheel-monthband { stroke: var(--brand); }
.wheel-month { fill: #fff; font-size: 15px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.wheel-sep { stroke: var(--line); stroke-width: 1.5; }
.wheel-track { stroke: var(--bg); }
.wheel-event path { opacity: .92; transition: opacity .15s; }
.wheel-event.past path { opacity: .5; }
.wheel-event:hover path, .wheel-event:focus path { opacity: 1; stroke: var(--text); }
.wheel-today { stroke: var(--err); stroke-width: 3; stroke-linecap: round; }
.wheel-year { font-size: 44px; font-weight: 800; fill: var(--brand); }
.wheel-count { font-size: 15px; fill: var(--muted); }
.wheel-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 10px; font-size: .9em; }
.wheel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-today i { width: 14px; height: 3px; border-radius: 2px; background: var(--err); display: inline-block; }
.wheel-list h2 { font-size: 1rem; margin-top: 0; }
.wheel-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 620px; overflow-y: auto; }
.wheel-list li { display: grid; gap: 1px; }
.wheel-list li.past { opacity: .5; }
.wheel-list a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.wheel-list .small { padding-left: 18px; }
@media (max-width: 760px) { .wheel-layout { grid-template-columns: 1fr; } }

.cat-rows { display: grid; gap: 10px; }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; padding-bottom: 0; }
.cat-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-edit input[name=name] { width: 14em; }
.cat-meta { display: flex; align-items: center; gap: 10px; }
.sort-input { width: 6em; }
.sr-label { font-size: 0; display: inline-block; }
.sr-label input { font-size: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.color-choice { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.color-choice legend { font-weight: 500; margin-bottom: 4px; }
.color-choice label { cursor: pointer; position: relative; }
.color-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.color-choice span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--cat); transition: transform .1s; }
.color-choice.compact span { width: 20px; height: 20px; }
.color-choice input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--text); transform: scale(1.05); }
.color-choice input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: 3px; }

/* Brugere: statusfilter */
.user-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 18px 0 10px; }
.user-filter .cat-chip span { text-decoration: none; }
.user-filter .cat-chip small { opacity: .8; }
.user-filter .filter-count { margin-left: auto; }

/* Trænertøj: sæsoner under Indstillinger */
.season-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-left: 6px solid var(--warn); }
.season-status.open { border-left-color: var(--ok); }
.season-status > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.season-big { font-size: 1.6rem; }
table.seasons tr.current td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.season-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Trænerkalender ---------- */
.cal-toolbar { align-items: flex-start; }
.cat-all { padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--text); }
.cat-all.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.cat-chip.filter span { text-decoration: none; }
.month-cal .chip { text-decoration: none; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 140px; display: grid; align-content: start; gap: 6px; }
.cal-day.today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.cal-day.past { opacity: .6; }
.cal-day h2 { font-size: .85rem; margin: 0; display: flex; justify-content: space-between; align-items: center; text-transform: capitalize; }
.cal-day h2 a { text-decoration: none; font-size: 1.1rem; line-height: 1; }
.cal-item { display: grid; gap: 2px; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--cat) 12%, var(--card)); border-left: 4px solid var(--cat); text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.cal-item-cat { color: var(--cat); font-weight: 600; }
@media (max-width: 900px) { .cal-week { grid-template-columns: 1fr; } .cal-day { min-height: 0; } }
.cal-cat summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; cursor: pointer; }
.cal-cat .cat-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--cat); display: inline-block; }
.cal-cat[open] summary { margin-bottom: 12px; }
.cal-cat { border-left: 6px solid var(--cat); margin-bottom: 10px; }
.cat-delete { margin-top: 10px; }
.editor-choice { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.editor-choice legend { font-weight: 500; padding: 0 4px; }
.series ul { margin: 6px 0 0; padding-left: 18px; }
.series summary { cursor: pointer; color: var(--muted); }

/* ---------- Brugere: kompakt oversigt + redigeringsside ---------- */
.create-user summary { cursor: pointer; }
.create-user[open] summary { margin-bottom: 12px; }
.user-search { min-width: 220px; flex: 1 1 220px; max-width: 320px; }
.module-filter { max-width: 260px; }
.access-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); margin: 0 0 8px; }
.users-matrix td, .users-matrix th { padding: 6px 8px; }
.users-matrix tbody tr:hover td { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.users-matrix .user-name { text-decoration: none; color: var(--text); }
.users-matrix .user-name:hover strong { text-decoration: underline; }
.users-matrix th.mod-col { text-align: center; vertical-align: bottom; width: 76px; font-size: .7em; line-height: 1.2; text-transform: none; letter-spacing: 0; }
.users-matrix .mod-icon { display: block; font-size: 1.4em; margin-bottom: 2px; }
.users-matrix .mod-name { display: block; overflow-wrap: anywhere; }
.users-matrix td.mod-col { text-align: center; }
.acc { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-weight: 700; font-size: .8rem; }
.acc-user { background: color-mix(in srgb, var(--brand) 14%, var(--card)); color: var(--brand); }
.acc-admin { background: var(--brand); color: #fff; }
.acc-none { color: var(--line); }
.acc-all { background: var(--ok-bg); color: var(--ok); }
.users-matrix tr[hidden] { display: none; }

.access-grid { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin: 0; }
.access-grid legend { font-weight: 600; padding: 0 4px; }
.access-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.access-row:last-child { border-bottom: 0; }
.access-module { font-weight: 500; }
.access-options { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.access-option { position: relative; cursor: pointer; }
.access-option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.access-option span { display: block; padding: 5px 12px; font-size: .85rem; border-left: 1px solid var(--line); background: var(--card); }
.access-option:first-child span { border-left: 0; }
.access-option input:checked + span { background: var(--muted); color: #fff; font-weight: 600; }
.access-option.lvl-user input:checked + span { background: color-mix(in srgb, var(--brand) 70%, var(--card)); }
.access-option.lvl-admin input:checked + span { background: var(--brand); }
.access-option input:focus-visible + span { outline: 3px solid var(--brand-2); outline-offset: -3px; }
.user-edit-form { max-width: 760px; }

/* Trænertøj: budgetter direkte i oversigten */
.budget-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 8px 0; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: 0; z-index: 2; }
.budget-cell { white-space: nowrap; }
.budget-input { text-align: right; }
.budget-input.personal { font-weight: 700; border-color: var(--brand); }
.budget-input::placeholder { color: var(--muted); font-weight: 400; }
.budget-input.changed { background: var(--warn-bg); border-color: var(--warn); }

/* ---------- Tilmeldinger ---------- */
.signup-list { display: grid; gap: 10px; margin-top: 12px; }
.signup-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .15s; }
.signup-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.08); transform: translateY(-1px); }
.signup-card.needs-answer { border-left-color: var(--warn); }
.signup-card.answered-yes { border-left-color: var(--ok); }
.signup-card.answered-no { border-left-color: var(--muted); }
.signup-date { display: grid; justify-items: center; min-width: 3em; line-height: 1.05; }
.signup-date b { font-size: 1.6rem; color: var(--brand); }
.signup-date small { text-transform: uppercase; font-size: .72em; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.signup-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.signup-kind { font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.signup-status { display: grid; justify-items: end; gap: 6px; }
.tag.warn-tag { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.signup-counts { display: inline-flex; align-items: center; gap: 4px; }
.cnt { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: .78rem; }
.cnt.yes { background: var(--ok-bg); color: var(--ok); }
.cnt.no { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.cnt.missing { background: var(--warn-bg); color: var(--warn); }
.signup-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .signup-card { flex-wrap: wrap; }
  .signup-status { justify-items: start; grid-auto-flow: column; padding-left: calc(3em + 16px); }
}

.signup-detail-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.signup-detail-layout > .card { margin: 0; }
@media (max-width: 860px) { .signup-detail-layout { grid-template-columns: 1fr; } }
.my-answer { border-top: 6px solid var(--warn); }
.my-answer.answered-yes { border-top-color: var(--ok); }
.my-answer.answered-no { border-top-color: var(--muted); }
.my-answer h2 { margin-bottom: 6px; }
.answer-now { margin: 0 0 12px; }
.answer-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.answer-buttons button { flex: 1; }
.signup-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.signup-summary .sum { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--card); }
.signup-summary .sum b { font-size: 1.3rem; }
.signup-summary .sum.yes b { color: var(--ok); }
.signup-summary .sum.missing b { color: var(--warn); }
.signup-summary .sum.active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.name-list { columns: 3 180px; margin: 0; padding-left: 18px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.mail-copy { margin-bottom: 4px; }
.audience-choice { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; display: grid; gap: 6px; }
.audience-choice legend { font-weight: 600; padding: 0 4px; }
.invite-picker { display: grid; gap: 8px; margin-top: 4px; }
.invite-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.invite-tools input[type=search] { flex: 1 1 180px; }
.editor-choice label[hidden] { display: none !important; }

/* Trænertøj: størrelsesguide under Indstillinger */
.guide-admin { display: grid; grid-template-columns: minmax(200px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.guide-preview { display: grid; gap: 8px; justify-items: start; }
.guide-preview img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.guide-preview p { margin: 0; }
@media (max-width: 760px) { .guide-admin { grid-template-columns: 1fr; } }

/* Vælg adgangskode: regler med flueben, der opdateres mens man skriver */
.pw-rules { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.pw-rules ul { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pw-rules li::before { content: "○"; display: inline-block; width: 1.3em; color: var(--muted); font-weight: 700; }
.pw-rules li.ok { color: var(--ok); font-weight: 600; }
.pw-rules li.ok::before { content: "✓"; color: var(--ok); }
.pw-rules p { margin: 4px 0 0; }

/* ---------- Veste ---------- */
.vest-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 4px 0 14px; }
.vest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vest-grid .card { margin: 0; }
.vest-team[hidden] { display: none; }
.vest-team h2 { margin-bottom: 10px; }
.vest-team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vest-team li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.vest-swatch { display: inline-block; padding: 6px 12px; border-radius: 10px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); justify-self: start; }
.vest-code { display: inline-flex; align-items: center; gap: 8px; }
.vest-code code { font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; background: var(--bg); border: 1px solid var(--line); padding: 3px 10px; border-radius: 8px; }
.vest-note { grid-column: 1 / -1; }
.vest-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.vest-table input:not([type]) { width: 100%; min-width: 120px; }

/* Veste: lille vest farvet i vestens farve (fotoets form og skygger, farven fra --vest) */
.vest-icon {
  display: inline-block; width: 22px; height: 32px; vertical-align: middle; flex: none;
  background: url(/modules/veste/vest-shade.png) center / contain no-repeat, var(--vest, #f97316);
  background-blend-mode: multiply;
  -webkit-mask: url(/modules/veste/vest-shade.png) center / contain no-repeat;
  mask: url(/modules/veste/vest-shade.png) center / contain no-repeat;
}
.vest-icon.small-icon { width: 16px; height: 24px; margin-right: 6px; }
.vest-swatch {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border-radius: 10px; font-weight: 700;
  background: color-mix(in srgb, var(--vest) 14%, var(--card)); border: 2px solid var(--vest); color: var(--text); box-shadow: none;
}

/* Trænertøj: "Bestiller ikke trænertøj" på trænerens side */
.no-order-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.no-order-toggle.on { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); }
