/* ==========================================================================
   Booking-skabelon – ADMINISTRATION (forretningens side)
   Bygger oven på booking.css (samme --bk-* tema). Præfiks: .ad-
   ========================================================================== */

.ad { min-height: 100vh; background: var(--bk-bg); }

/* ---------- Topbjælke ----------
   Vandret, så kalenderen får hele skærmbredden til medarbejderkolonnerne.
   Aktiv fane markeres med en streg under – samme sprog som bookingsidens seddel. */
.ad-top { position: sticky; top: 0; z-index: 60; display: flex; align-items: stretch; gap: 20px; height: 58px; padding: 0 28px; background: var(--bk-surface); border-bottom: 1px solid var(--bk-line); }
.ad-top__brand { align-self: center; flex: none; max-width: 220px; }
.ad-top__brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-nav { display: flex; align-items: stretch; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ad-nav::-webkit-scrollbar { display: none; }
.ad-nav button { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; background: transparent; color: var(--bk-muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.ad-nav button svg { width: 17px; height: 17px; }
.ad-nav button:hover { color: var(--bk-ink); }
.ad-nav button.is-active { color: var(--bk-ink); }
.ad-nav button.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--bk-accent); }
.ad-nav__count { font-size: 0.7rem; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--bk-accent-soft); color: var(--bk-accent-dark); text-align: center; }
.ad-top__end { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.ad-top__proto { padding: 3px 8px; border: 1px dashed var(--bk-line); border-radius: 999px; }
.ad-ref { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; letter-spacing: 0.12em; font-weight: 600; padding: 2px 8px; margin-left: 6px; border: 1px dashed var(--bk-line); border-radius: 6px; color: var(--bk-accent-dark); vertical-align: middle; }

/* ---------- Hovedområde ---------- */
.ad-main { padding: 22px 28px 60px; min-width: 0; max-width: 1600px; margin: 0 auto; }
.ad-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; min-height: 40px; }
.ad-head h1 { font-size: 1.35rem; margin: 0; letter-spacing: -0.02em; }
.ad-head__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-save { font-size: 0.82rem; color: var(--bk-accent); font-weight: 500; opacity: 0; transition: opacity 0.2s; }
.ad-save.is-show { opacity: 1; }
.ad-save.is-show::before { content: "✓ "; }
.ad-textbtn { background: none; border: 0; padding: 6px 8px; font-size: 0.86rem; font-weight: 500; color: var(--bk-muted); border-radius: var(--bk-radius-sm); }
.ad-textbtn:hover { color: var(--bk-ink); background: var(--bk-bg); }
.ad-textbtn--danger:hover { color: var(--bk-danger); }
.ad-modal__aux { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ad-modal__aux .bk-btn { margin-right: 6px; }
.ad-seg { display: inline-flex; border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); overflow: hidden; background: var(--bk-surface); }
.ad-seg button { height: 36px; padding: 0 14px; border: 0; background: transparent; font-size: 0.86rem; font-weight: 500; color: var(--bk-muted); }
.ad-seg button + button { border-left: 1px solid var(--bk-line); }
.ad-seg button.is-active { background: var(--bk-ink); color: #fff; }
.ad-datenav { display: inline-flex; align-items: center; gap: 4px; }
.ad-datenav__title { min-width: 200px; height: 36px; padding: 0 12px; text-align: center; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; border: 1px solid transparent; border-radius: var(--bk-radius-sm); background: transparent; }
.ad-datenav__title:hover { border-color: var(--bk-line); background: var(--bk-surface); }
.ad-datenav > button:not(.ad-datenav__title) { width: 36px; height: 36px; border-radius: var(--bk-radius-sm); border: 1px solid var(--bk-line); background: var(--bk-surface); display: grid; place-items: center; }
.ad-datenav button svg { width: 16px; height: 16px; }
.ad-datenav > button:not(.ad-datenav__title):hover { border-color: var(--bk-ink); }
.ad-input { min-height: 36px; padding: 7px 12px; border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); background: var(--bk-surface); min-width: 0; }
.ad-input:focus { outline: none; border-color: var(--bk-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bk-accent) 18%, transparent); }
.ad-input--search { min-width: 260px; }

.ad-card { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-radius); padding: 20px; }
.ad-card + .ad-card { margin-top: 16px; }
.ad-card h2 { font-size: 1.05rem; margin-bottom: 14px; }
.ad-grid { display: grid; gap: 16px; }
.ad-grid--2 { grid-template-columns: 1fr 1fr; }
.ad-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ad-grid--stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* Nøgletal */
.ad-stat { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-radius); padding: 16px 18px; }
.ad-stat__label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bk-muted); }
.ad-stat__value { font-family: var(--bk-font-head); font-size: 1.7rem; margin: 4px 0 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ad-stat__sub { font-size: 0.8rem; color: var(--bk-muted); margin-top: 4px; }
.ad-stat--accent { background: var(--bk-accent); border-color: var(--bk-accent); color: #fff; }
.ad-stat--accent .ad-stat__label, .ad-stat--accent .ad-stat__sub { color: rgba(255, 255, 255, 0.75); }

/* ---------- Kalender (dag/uge) ---------- */
.ad-cal { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-radius); overflow: auto; max-height: calc(100vh - 150px); position: relative; }
.ad-cal__grid { display: grid; grid-template-columns: 56px repeat(var(--cols, 3), minmax(150px, 1fr)); min-width: 100%; }
.ad-cal__corner, .ad-cal__colhead { position: sticky; top: 0; z-index: 5; background: var(--bk-surface); border-bottom: 1px solid var(--bk-line); }
.ad-cal__colhead { padding: 10px 12px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--bk-line); }
.ad-cal__colhead small { font-weight: 500; color: var(--bk-muted); }
.ad-cal__colhead.is-today { color: var(--bk-accent); }
.ad-cal__colhead .bk-avatar--sm { flex: none; }
.ad-cal__axis { position: relative; border-right: 1px solid var(--bk-line); }
.ad-cal__hour { position: absolute; left: 0; right: 6px; text-align: right; font-size: 0.72rem; color: var(--bk-muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.ad-cal__col { position: relative; border-left: 1px solid var(--bk-line); background-image: linear-gradient(var(--bk-line) 1px, transparent 1px); background-size: 100% var(--hour-h, 64px); }
.ad-cal__col.is-today { background-color: color-mix(in srgb, var(--bk-accent-soft) 45%, transparent); }
.ad-cal__off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, 0.04) 6px 7px); pointer-events: none; }
.ad-cal__slot { position: absolute; left: 0; right: 0; cursor: pointer; }
.ad-cal__slot:hover { background: color-mix(in srgb, var(--bk-accent) 10%, transparent); }
.ad-cal__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bk-danger); z-index: 3; pointer-events: none; }
.ad-cal__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bk-danger); }
.ad-ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 8px; font-size: 0.78rem; line-height: 1.3; overflow: hidden; cursor: pointer; border: 1px solid color-mix(in srgb, var(--ev, var(--bk-accent)) 30%, transparent); border-top: 3px solid var(--ev, var(--bk-accent)); background: color-mix(in srgb, var(--ev, var(--bk-accent)) 11%, var(--bk-surface)); color: var(--bk-ink); z-index: 2; font-variant-numeric: tabular-nums; transition: transform 0.1s, box-shadow 0.1s; }
.ad-ev:hover { transform: scale(1.01); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); z-index: 4; }
.ad-ev strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-ev span { color: var(--bk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ad-ev.is-bekraeftet { cursor: grab; user-select: none; }
.ad-ev.is-dragging { cursor: grabbing; opacity: 0.9; z-index: 10; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); transform: scale(1.02); transition: none; }
.ad-ev.is-afsluttet { opacity: 0.6; }
.ad-ev.is-aflyst { opacity: 0.5; text-decoration: line-through; background: repeating-linear-gradient(135deg, var(--bk-surface) 0 5px, var(--bk-bg) 5px 10px); border-color: var(--bk-line); }
.ad-ev.is-udeblevet { background: #fdecea; border: 1px dashed var(--bk-danger); border-top: 3px solid var(--bk-danger); }
.ad-ev.is-online::after { content: "web"; position: absolute; top: 4px; right: 5px; font-size: 0.56rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--ev, var(--bk-accent)) 80%, #000); opacity: 0.7; }
.ad-ev--sm { padding: 2px 6px; font-size: 0.7rem; }

/* Greb i bunden af en aftale: træk for at ændre varigheden */
.ad-ev__grip { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; touch-action: none; }
.ad-ev__grip::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: color-mix(in srgb, var(--ev, var(--bk-accent)) 55%, transparent); opacity: 0; transition: opacity 0.12s; }
.ad-ev:hover .ad-ev__grip::after, .ad-ev.is-resizing .ad-ev__grip::after { opacity: 1; }
.ad-ev.is-resizing { z-index: 10; transform: none; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); transition: none; outline: 2px dashed color-mix(in srgb, var(--ev, var(--bk-accent)) 60%, transparent); outline-offset: 1px; }
@media (hover: none) { .ad-ev__grip { height: 16px; } .ad-ev__grip::after { opacity: 1; } }

/* Månedsoversigt */
.ad-month { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-radius); overflow: hidden; }
.ad-month__sum { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 16px; border-bottom: 1px solid var(--bk-line); font-size: 0.86rem; color: var(--bk-muted); }
.ad-month__sum strong { color: var(--bk-ink); font-variant-numeric: tabular-nums; }
.ad-month__grid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
.ad-month__wd { padding: 8px 10px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bk-muted); border-bottom: 1px solid var(--bk-line); }
.ad-month__wk { border: 0; border-bottom: 1px solid var(--bk-line); background: var(--bk-bg); font-size: 0.72rem; font-weight: 600; color: var(--bk-muted); font-variant-numeric: tabular-nums; padding: 10px 0 0; align-self: stretch; display: flex; justify-content: center; align-items: flex-start; }
.ad-month__wk:hover { color: var(--bk-accent-dark); background: var(--bk-accent-soft); }
.ad-month__day { display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 118px; padding: 8px 8px 10px; border: 0; border-left: 1px solid var(--bk-line); border-bottom: 1px solid var(--bk-line); background: var(--bk-surface); text-align: left; }
.ad-month__day:hover { background: color-mix(in srgb, var(--bk-accent-soft) 55%, var(--bk-surface)); }
.ad-month__day.is-other { background: color-mix(in srgb, var(--bk-bg) 60%, var(--bk-surface)); }
.ad-month__day.is-other > * { opacity: 0.5; }
.ad-month__day.is-closed { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, 0.035) 6px 7px), var(--bk-bg); }
.ad-month__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ad-month__head strong { font-family: var(--bk-font-head); font-size: 0.95rem; font-variant-numeric: tabular-nums; min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 30%; }
.ad-month__day.is-today .ad-month__head strong { background: var(--bk-accent); color: var(--bk-on-accent); }
.ad-month__count { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bk-accent-soft); color: var(--bk-accent-dark); font-variant-numeric: tabular-nums; }
.ad-month__note { font-size: 0.68rem; color: var(--bk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-month__load { display: block; height: 4px; border-radius: 2px; background: var(--bk-line); overflow: hidden; }
.ad-month__load i { display: block; height: 100%; border-radius: 2px; background: var(--bk-accent); }
.ad-month__evs { display: grid; gap: 2px; min-width: 0; }
.ad-month__ev { font-size: 0.72rem; padding: 1px 5px; border-radius: 4px; border-left: 2px solid var(--ev); background: color-mix(in srgb, var(--ev) 10%, var(--bk-surface)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ad-month__more { font-size: 0.7rem; color: var(--bk-muted); }

/* Ugeoversigt: kolonne pr. dag */
.ad-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ad-week__day { background: var(--bk-surface); border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); padding: 10px; min-height: 160px; cursor: pointer; }
.ad-week__day:hover { border-color: var(--bk-accent); }
.ad-week__day.is-today { border-color: var(--bk-accent); box-shadow: inset 0 0 0 1px var(--bk-accent); }
.ad-week__day.is-closed { background: var(--bk-bg); color: var(--bk-muted); }
.ad-week__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 0.85rem; }
.ad-week__head strong { font-size: 1.05rem; }
.ad-week__head span { color: var(--bk-muted); font-size: 0.75rem; }
.ad-week__ev { font-size: 0.74rem; padding: 3px 6px; border-radius: 5px; margin-bottom: 3px; border-top: 2px solid var(--ev); background: color-mix(in srgb, var(--ev) 11%, var(--bk-surface)); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-week__ev.is-aflyst { opacity: 0.4; text-decoration: line-through; }
.ad-week__more { font-size: 0.74rem; color: var(--bk-muted); margin-top: 4px; }

/* ---------- Tabeller ---------- */
.ad-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ad-table th, .ad-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bk-line); vertical-align: middle; }
.ad-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bk-muted); font-weight: 600; background: var(--bk-bg); }
.ad-table tbody tr:hover { background: color-mix(in srgb, var(--bk-accent-soft) 50%, transparent); }
.ad-table tr.is-clickable { cursor: pointer; }
.ad-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-table .actions { text-align: right; white-space: nowrap; }
.ad-table .actions .bk-btn { margin-left: 4px; }
.ad-table__wrap { overflow-x: auto; }

/* Status-badges */
.ad-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; }
.ad-status--bekraeftet { background: var(--bk-accent-soft); color: var(--bk-accent-dark); }
.ad-status--afsluttet { background: #e9ecef; color: #495057; }
.ad-status--aflyst { background: #f1f1f1; color: #888; }
.ad-status--udeblevet { background: #fdecea; color: var(--bk-danger); }
.ad-status--online { background: #eef3ff; color: #2b4a9e; }

/* ---------- Kundekort ---------- */
.ad-customer { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }
.ad-customer__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ad-customer__head .bk-avatar { width: 48px; height: 48px; font-size: 1rem; }
.ad-customer__head h2 { margin: 0; }
.ad-customer__head p { margin: 0; font-size: 0.86rem; color: var(--bk-muted); }
.ad-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.9rem; margin: 0; }
.ad-kv dt { color: var(--bk-muted); }
.ad-kv dd { margin: 0; font-weight: 500; }
.ad-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ad-journal li { padding: 10px 12px; border-radius: var(--bk-radius-sm); background: var(--bk-bg); font-size: 0.9rem; }
.ad-journal time { display: block; font-size: 0.74rem; color: var(--bk-muted); margin-bottom: 2px; }
.ad-journal__form { display: flex; gap: 8px; margin-top: 12px; }
.ad-journal__form textarea { flex: 1; min-height: 60px; }

/* ---------- Kassen ---------- */
.ad-pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.ad-pos__pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ad-pos__item { text-align: left; padding: 12px; border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); background: var(--bk-surface); display: grid; gap: 2px; }
.ad-pos__item:hover { border-color: var(--bk-accent); }
.ad-pos__item strong { font-size: 0.88rem; font-weight: 600; }
.ad-pos__item span { font-size: 0.8rem; color: var(--bk-muted); }
.ad-pos__item.is-low span::after { content: " · få tilbage"; color: var(--bk-warn); }
.ad-pos__item.is-out { opacity: 0.4; pointer-events: none; }
.ad-receipt { position: sticky; top: 78px; border-top: 2px dashed var(--bk-line); }
.ad-receipt__lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.ad-receipt__lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 0.9rem; }
.ad-receipt__lines .qty { display: inline-flex; align-items: center; gap: 4px; }
.ad-receipt__lines .qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--bk-line); background: var(--bk-surface); font-size: 0.85rem; display: grid; place-items: center; }
.ad-receipt__lines .price { min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.ad-receipt__lines .is-empty { color: var(--bk-muted); font-style: italic; grid-column: 1 / -1; }
.ad-receipt__sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding-top: 12px; border-top: 1px solid var(--bk-line); font-size: 0.9rem; }
.ad-receipt__sum .total { font-family: var(--bk-font-head); font-size: 1.5rem; padding-top: 6px; }
.ad-receipt__sum .total + .total { text-align: right; }
.ad-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.ad-pay button { padding: 12px; border-radius: var(--bk-radius-sm); border: 1px solid var(--bk-line); background: var(--bk-surface); font-weight: 600; }
.ad-pay button.is-active { background: var(--bk-ink); color: #fff; border-color: var(--bk-ink); }
.ad-discount { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; margin-top: 10px; }
.ad-discount input { width: 90px; }
.ad-receipt__done { text-align: center; padding: 20px 0; }
.ad-receipt__done .bk-done__icon { width: 56px; height: 56px; }
.ad-receipt__done .bk-done__icon svg { width: 28px; height: 28px; }

/* ---------- Statistik ---------- */
.ad-bars { display: grid; gap: 8px; }
.ad-bar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 0.86rem; }
.ad-bar__track { height: 10px; border-radius: 999px; background: var(--bk-bg); overflow: hidden; }
.ad-bar__fill { height: 100%; border-radius: 999px; background: var(--bk-accent); }
.ad-bar .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ad-bar .bk-muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.ad-spark div { flex: 1; background: var(--bk-accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; opacity: 0.85; }
.ad-spark div:hover { opacity: 1; }
.ad-spark div[title]:hover::after { content: attr(title); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--bk-ink); color: #fff; font-size: 0.7rem; padding: 3px 7px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; }
.ad-spark__labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--bk-muted); margin-top: 6px; }

/* ---------- Indstillinger ---------- */
.ad-hours { display: grid; gap: 6px; font-size: 0.9rem; }
.ad-hours div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--bk-line); }
.ad-hours .closed { color: var(--bk-muted); }
.ad-staffrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bk-line); font-size: 0.9rem; }
.ad-staffrow .bk-avatar { width: 36px; height: 36px; font-size: 0.85rem; }
.ad-staffrow span { color: var(--bk-muted); }
.ad-code { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; background: var(--bk-bg); padding: 12px; border-radius: var(--bk-radius-sm); white-space: pre-wrap; word-break: break-all; }

/* ---------- Indstillinger: editorer ---------- */
.ad-tabs { margin-bottom: 18px; }
.ad-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-card__head h2 { margin: 0; }
.ad-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; }
.ad-input--num { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.ad-input--sub { margin-top: 4px; font-size: 0.82rem; color: var(--bk-muted); border-color: transparent; background: transparent; padding-top: 4px; padding-bottom: 4px; }
.ad-input--sub:hover, .ad-input--sub:focus { border-color: var(--bk-line); background: var(--bk-surface); }
.ad-iconbtn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--bk-radius-sm); border: 1px solid transparent; background: transparent; color: var(--bk-muted); text-decoration: none; font-size: 0.95rem; }
.ad-iconbtn svg { width: 16px; height: 16px; }
.ad-iconbtn:hover { border-color: var(--bk-line); color: var(--bk-danger); background: var(--bk-surface); }
a.ad-iconbtn:hover { color: var(--bk-accent); }
.ad-linkbtn { background: none; border: 0; padding: 4px 0; color: var(--bk-accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-align: left; font-size: 0.88rem; white-space: nowrap; }
.ad-linkbtn:hover { color: var(--bk-accent-dark); }

/* Til/fra-kontakt */
.ad-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; user-select: none; }
.bk-field label.ad-switch { display: inline-flex; margin-bottom: 0; font-weight: 400; }
.ad-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ad-switch__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #cfd6d3; transition: background 0.15s; flex: none; }
.ad-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.ad-switch input:checked + .ad-switch__track { background: var(--bk-accent); }
.ad-switch input:checked + .ad-switch__track::after { transform: translateX(16px); }
.ad-switch input:focus-visible + .ad-switch__track { outline: 3px solid color-mix(in srgb, var(--bk-accent) 45%, transparent); outline-offset: 2px; }

/* Ugedage med intervaller */
.ad-days { display: grid; gap: 2px; }
.ad-dayrow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--bk-line); }
.ad-dayrow:last-child { border-bottom: 0; }
.ad-dayrow.is-closed .ad-dayrow__name strong { color: var(--bk-muted); }
.ad-dayrow__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; }
.ad-dayrow__name strong { font-weight: 600; }
.ad-dayrow__name select { max-width: 100%; font-size: 0.85rem; padding: 6px 8px; }
.ad-days--compact .ad-dayrow { grid-template-columns: 300px minmax(0, 1fr); padding: 8px 0; }
.ad-days--compact .ad-dayrow__name { display: grid; grid-template-columns: 80px 1fr; }
.ad-intervals { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.ad-interval { display: inline-flex; align-items: center; gap: 6px; }
.ad-interval input[type="time"] { width: 104px; padding: 7px 8px; }
.ad-interval input[type="date"] { width: 150px; padding: 7px 8px; }
.ad-list { display: grid; gap: 6px; }

/* Chips (lukkedage, betalingsmetoder) */
.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--bk-accent-soft); color: var(--bk-accent-dark); font-size: 0.85rem; font-weight: 500; }
.ad-chip button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; opacity: 0.7; }
.ad-chip button svg { width: 12px; height: 12px; }
.ad-chip button:hover { background: rgba(0, 0, 0, 0.1); opacity: 1; }

/* Medarbejderkort */
.ad-stafflist { display: grid; gap: 8px; }
.ad-staffcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); background: var(--bk-surface); }
.ad-staffcard:hover { border-color: var(--bk-accent); }
.ad-staffcard.is-inactive { opacity: 0.6; }
.ad-staffcard .bk-avatar { width: 44px; height: 44px; font-size: 0.95rem; }
.ad-staffcard__body { min-width: 0; }
.ad-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad-swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.ad-swatch.is-active { border-color: var(--bk-ink); }
.ad-swatches input[type="color"] { width: 28px; height: 28px; border: 1px solid var(--bk-line); border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.ad-checklist { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 4px 2px; }
.ad-checklist hr { border: 0; border-top: 1px solid var(--bk-line); margin: 4px 0; }
.ad-checklist__group { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bk-muted); margin-top: 6px; }
.ad-checklist .bk-check { padding: 2px 0; }

/* Redigerbare tabeller */
.ad-table--edit td { padding: 8px 8px; }
.ad-table--edit th { padding-left: 8px; padding-right: 8px; }
.ad-table--edit input.ad-input, .ad-table--edit select.ad-input { padding: 7px 9px; font-size: 0.9rem; }
.ad-table--edit input.ad-input:not(:focus):not(:hover) { border-color: transparent; background: transparent; }
.ad-table--edit .ad-td-navn { min-width: 220px; }
.ad-table--edit tbody tr:hover { background: transparent; }
.ad-table--edit tbody tr:hover input.ad-input:not(:focus) { border-color: var(--bk-line); background: var(--bk-surface); }
.ad-table--edit tr.is-inactive td { opacity: 0.5; }
.ad-table--edit tr.is-inactive td:last-child, .ad-table--edit tr.is-inactive td:nth-last-child(2) { opacity: 1; }
.ad-table__group td { background: var(--bk-bg); font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bk-muted); padding: 8px 8px 4px; border-bottom: 0; }
.ad-table--edit .actions { white-space: nowrap; }
.ad-table--edit .actions .ad-iconbtn { margin-left: 2px; }

/* Forhåndsvisning, farver, temaer */
.ad-preview { background: var(--bk-bg); border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); padding: 14px; }
.ad-preview pre { margin: 0 0 14px; white-space: pre-wrap; font: inherit; font-size: 0.9rem; line-height: 1.5; background: var(--bk-surface); padding: 12px; border-radius: var(--bk-radius-sm); border: 1px solid var(--bk-line); }
.ad-preview pre:last-child { margin-bottom: 0; }
.ad-preview__label { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bk-muted); margin-bottom: 6px; }
.ad-themes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ad-theme { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--bk-line); border-radius: 999px; background: var(--bk-surface); font-size: 0.85rem; font-weight: 500; }
.ad-theme span { width: 22px; height: 22px; border-radius: 50%; }
.ad-theme:hover { border-color: var(--bk-ink); }
.ad-theme.is-active { border-color: var(--bk-ink); box-shadow: inset 0 0 0 1px var(--bk-ink); font-weight: 600; }
.ad-katrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--bk-line); }
.ad-katrow:last-child { border-bottom: 0; }
.ad-katrow__move { display: inline-flex; flex-direction: column; gap: 1px; }
.ad-katrow__move button { width: 22px; height: 15px; border: 0; background: transparent; color: var(--bk-muted); font-size: 0.7rem; line-height: 1; padding: 0; border-radius: 3px; }
.ad-katrow__move button:hover:not(:disabled) { background: var(--bk-bg); color: var(--bk-ink); }
.ad-katrow__move button:disabled { opacity: 0.25; cursor: default; }
.ad-katrow .bk-muted { white-space: nowrap; }
.ad-select-ny { font-style: italic; }
.ad-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.ad-colorfield { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--bk-line); border-radius: var(--bk-radius-sm); font-size: 0.86rem; cursor: pointer; }
.ad-colorfield input[type="color"] { width: 30px; height: 30px; border: 0; padding: 0; background: none; border-radius: 6px; cursor: pointer; flex: none; }
.ad-colorfield:hover { border-color: var(--bk-accent); }

/* Notifikationsmatrix */
.ad-matrix th, .ad-matrix td { text-align: center; padding: 8px 10px; }
.ad-matrix th:first-child, .ad-matrix td:first-child { text-align: left; }
.ad-matrix input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--bk-accent); margin: 0; vertical-align: middle; }
.ad-matrix tbody tr:hover { background: transparent; }

/* ---------- Modal ---------- */
.ad-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(15, 25, 22, 0.45); backdrop-filter: blur(2px); }
.ad-modal__box { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--bk-surface); border-radius: var(--bk-radius); padding: 24px; box-shadow: var(--bk-shadow); animation: bk-in 0.18s ease-out; }
.ad-modal__box--wide { max-width: 760px; }
.ad-modal__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.ad-modal__head h2 { margin: 0; font-size: 1.25rem; }
.ad-modal__head p { margin: 2px 0 0; color: var(--bk-muted); font-size: 0.88rem; }
.ad-modal__close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bk-bg); display: grid; place-items: center; flex: none; }
.ad-modal__close svg { width: 16px; height: 16px; }
.ad-modal__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.ad-modal__foot > div { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-modal .bk-times { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.ad-modal .bk-time { padding: 7px 4px; font-size: 0.86rem; }
.ad-modal .bk-times__wrap { max-height: 180px; overflow: auto; padding: 2px; }
.bk-btn--danger { background: transparent; color: var(--bk-danger); border-color: color-mix(in srgb, var(--bk-danger) 40%, transparent); }
.bk-btn--danger:hover { background: #fdecea; }

/* Toast */
.ad-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200; background: var(--bk-ink); color: #fff; padding: 12px 18px; border-radius: var(--bk-radius-sm); font-size: 0.9rem; box-shadow: var(--bk-shadow); opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.ad-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Tom tilstand */
.ad-empty { padding: 36px 20px; text-align: center; color: var(--bk-muted); }
.ad-empty strong { display: block; color: var(--bk-ink); margin-bottom: 4px; }



/* ---------- Responsivt ---------- */
@media (max-width: 1100px) {
  .ad-pos, .ad-customer, .ad-grid--3 { grid-template-columns: 1fr; }
  .ad-receipt { position: static; }
  .ad-week { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .ad-top { padding: 0 16px; height: 54px; }
  .ad-top__proto { display: none; }
  .ad-top__end .bk-btn span { display: none; }
  .ad-top__end .bk-btn { width: 40px; padding: 0; }
  .ad-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bk-surface); border-top: 1px solid var(--bk-line); justify-content: space-around; gap: 0; overflow: visible; }
  .ad-nav button { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 0 2px; font-size: 0.62rem; }
  .ad-nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .ad-nav button svg { width: 20px; height: 20px; }
  .ad-nav button.is-active::after { top: 0; bottom: auto; border-radius: 0 0 3px 3px; left: 22%; right: 22%; }
  .ad-nav__count { position: absolute; top: 5px; left: calc(50% + 6px); font-size: 0.6rem; min-width: 16px; padding: 0 4px; }
  .ad-main { padding: 16px 16px 90px; }
  .ad-month__grid { grid-template-columns: 26px repeat(7, minmax(0, 1fr)); }
  .ad-month__wd { padding: 6px 2px; text-align: center; letter-spacing: 0.04em; font-size: 0.6rem; }
  .ad-month__wk { font-size: 0.6rem; padding-top: 8px; }
  .ad-month__day { min-height: 70px; padding: 5px 3px 6px; gap: 4px; align-items: center; }
  .ad-month__head { flex-direction: column; gap: 2px; }
  .ad-month__head strong { font-size: 0.82rem; min-width: 22px; height: 22px; }
  .ad-month__note { display: none; }
  .ad-month__count { font-size: 0.62rem; padding: 0 5px; }
  .ad-month__load { width: 100%; }
  .ad-month__evs { display: none; }
  .ad-toast { bottom: 76px; }
  .ad-grid--2 { grid-template-columns: 1fr; }
  .ad-week { grid-template-columns: repeat(2, 1fr); }
  .ad-datenav strong { min-width: 0; font-size: 0.95rem; }
  .ad-input--search { min-width: 0; width: 100%; }
  .ad-cal { max-height: none; }
  .ad-bar { grid-template-columns: 90px 1fr 80px; }
  .ad-dayrow, .ad-days--compact .ad-dayrow { grid-template-columns: 1fr; gap: 6px; }
  .ad-colors { grid-template-columns: 1fr; }
  .ad-staffcard { grid-template-columns: auto minmax(0, 1fr); }
  .ad-staffcard > .bk-btn { grid-column: 1 / -1; }
  .ad-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .ad-tabs button { white-space: nowrap; }
}
