/* Hustle – fælles stylesheet. Tokens og komponenter fra designet (design_handoff_hustle/README.md).
   Side-specifik CSS ligger i assets/css/pages/<side>.css. Brug tokens (var(--…)) – ikke nye farver. */

:root {
  --bg: #17181A; --bg-deep: #0E0F10;
  --surface: #202124; --surface-2: #1E1F22; --surface-3: #1A1B1D;
  --raised: #26272B; --raised-2: #2E2F33;
  --border: #2A2B2F; --border-strong: #323338; --divider: #222326; --line: #2E2F33;
  --text: #F3F4F2; --text-2: #D6D7D4; --muted: #9A9BA0; --faint: #6B6C72;
  --lime: #B8F24A; --lime-hover: #C8F86A; --lime-tint: #26301A; --lime-tint-2: #1F2419; --on-lime: #121314;
  --lav: #B5B3F5; --lav-tint: #26253A; --lav-border: #3A3860; --lav-text: #C9C8E8;
  --salmon: #F0956A; --salmon-tint: #3A2620; --salmon-tint-2: #2A201D; --salmon-border: #4A2E25;
  --danger: #F2735E;
  --paper: #F3F4F2; --paper-text: #17181A; --paper-muted: #5A5B60;
  --focus-ring: 0 0 0 3px rgba(184, 242, 74, .18);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .45);
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, .5);
  --shadow-toast: 0 12px 30px rgba(0, 0, 0, .4);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; font-size: 15px; line-height: 1.4; }
a { color: var(--lime); text-decoration: none; }
a:hover { color: #D4FA8A; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
input, select, textarea, button { font-family: inherit; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: #3A3B40 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #34353A; border-radius: 10px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: #4A4B50; }

/* ───────── App-shell ───────── */
/* Låst til alle fire kanter (ikke 100dvh): iOS-standalone med transparent statuslinje regner 100dvh for kort, så bundmenuen ikke stod i bunden. */
.h-app { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; display: flex; overflow: hidden; }
.h-sidebar { width: 248px; flex: none; height: 100%; display: none; flex-direction: column; gap: 24px; padding: 28px 16px 20px; border-right: 1px solid var(--divider); }
.h-sidebar-logo { display: block; margin: 0 12px; align-self: flex-start; }
.h-sidebar-logo img { height: 34px; width: auto; display: block; }
.h-sidenav { display: flex; flex-direction: column; gap: 4px; }
.h-sidenav-item { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-size: 15px; font-weight: 500; }
.h-sidenav-item:hover { background: var(--surface); color: var(--text); }
.h-sidenav-item.is-active { background: var(--raised); color: var(--text); font-weight: 600; }
.h-usercard { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.h-usercard:hover { background: #232427; }
.h-usercard-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.h-usercard-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-usercard-co { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-avatar { flex: none; border-radius: 50%; background: var(--lav); color: var(--bg); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; object-fit: cover; }

.h-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.h-topbar { flex: none; height: 64px; display: none; align-items: center; gap: 14px; padding: 0 32px; border-bottom: 1px solid var(--divider); }
.h-topbar-title { font-size: 16px; font-weight: 600; }
.h-topbar-sub { font-size: 14px; color: var(--muted); }
.h-topbar-status { font-size: 13px; color: var(--muted); }
.h-topbar-actions { display: flex; align-items: center; gap: 8px; }
.h-crumbs { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; min-width: 0; }
.h-crumbs a { color: var(--muted); font-weight: 500; }
.h-crumbs a:hover { color: var(--text); }
.h-crumb-sep { color: var(--faint); }
.h-topbar-m { flex: none; height: calc(60px + var(--sat)); padding: var(--sat) 16px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--divider); }
.h-topbar-mark img { height: 24px; width: auto; display: block; }
.h-topbar-co { min-height: 44px; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: none; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; }
.h-topbar-co span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-topbar-avatar { flex: none; width: 44px; height: 44px; border: none; border-radius: 50%; background: transparent; padding: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.h-main { flex: 1; min-height: 0; overflow: auto; padding: 20px 16px 28px; -webkit-overflow-scrolling: touch; }
.h-bottomnav { flex: none; height: calc(76px + var(--sab)); padding: 6px 8px calc(14px + var(--sab)); display: flex; align-items: stretch; border-top: 1px solid var(--divider); background: var(--surface-3); }
.h-bottomnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: none; background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; cursor: pointer; }
.h-bottomnav-item.is-active { color: var(--text); font-weight: 600; }
.h-bottomnav-item:hover { color: var(--text); }

/* Profilmenu */
.h-menu-backdrop { position: fixed; inset: 0; z-index: 40; }
.h-menu { position: fixed; z-index: 41; left: 16px; top: calc(56px + var(--sat)); width: 260px; max-width: calc(100% - 32px); max-height: calc(100% - 80px); overflow: auto; background: var(--raised); border: 1px solid #34353A; border-radius: 16px; padding: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 2px; }
.h-menu.is-more { top: auto; left: auto; right: 16px; bottom: calc(84px + var(--sab)); }
.h-menu.is-more.at-top { top: calc(56px + var(--sat)); bottom: auto; }
.h-menu:not(.is-more) .h-menu-more, .h-menu.is-profile .h-menu-more { display: none; } /* profilbilledet (mobil): kun profil, feedback og log ud */
/* Mobil: virksomhedsnavnet = kun skift virksomhed; Mere = alt andet (uden virksomhedsskift). Desktop-brugerkortet viser hele menuen. */
.h-menu.is-more .h-menu-co { display: none; }
.h-menu.is-co .h-menu-rest, .h-menu.is-co .h-menu-co > .h-menu-sep:last-child { display: none; }
.h-menu-label { font-size: 12px; color: var(--muted); padding: 8px 10px 6px; }
.h-menu-item { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: none; border-radius: 10px; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; width: 100%; }
.h-menu-item:hover { background: var(--raised-2); color: var(--text); }
.h-menu-check { color: var(--lime); font-weight: 800; }
.h-menu-sep { height: 1px; background: #34353A; margin: 6px 4px; }
.h-menu-danger { color: var(--danger); }
.h-menu-danger:hover { background: var(--salmon-tint); color: var(--danger); }

@media (min-width: 720px) {
  .h-sidebar { display: flex; }
  .h-topbar { display: flex; }
  .h-topbar-m, .h-bottomnav { display: none; }
  .h-main { padding: 24px 32px 48px; }
  .h-menu, .h-menu.is-more { top: auto; bottom: 88px; left: 16px; right: auto; }
}

/* Bare shell (login, fotoguide) */
.h-bare { min-height: 100%; min-height: 100dvh; }

/* ───────── Typografi ───────── */
.h-h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.h-h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.h-h3 { margin: 0; font-size: 17px; font-weight: 600; }
.h-muted { color: var(--muted); }
.h-faint { color: var(--faint); }
.h-label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.h-help { font-size: 13px; color: var(--faint); }
.h-err { font-size: 13px; color: var(--salmon); }

/* ───────── Kort ───────── */
.h-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; min-width: 0; }
.h-page { width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* ───────── Knapper ───────── */
.h-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, filter .15s, opacity .15s; }
.h-btn:disabled, .h-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.h-btn-primary { background: var(--lime); color: var(--on-lime); }
.h-btn-primary:hover:not(:disabled) { background: var(--lime-hover); color: var(--on-lime); }
.h-btn-secondary { background: var(--raised-2); border-color: var(--border-strong); color: var(--text); font-weight: 600; }
.h-btn-secondary:hover:not(:disabled) { filter: brightness(1.12); color: var(--text); }
.h-btn-ghost { background: transparent; color: var(--text); font-weight: 600; }
.h-btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.h-btn-danger { background: var(--salmon-tint); border-color: var(--salmon-border); color: var(--danger); font-weight: 600; }
.h-btn-lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.h-btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.h-btn-block { width: 100%; }
.h-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.h-btn.is-busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--on-lime) transparent var(--on-lime) transparent; animation: h-spin .7s linear infinite; }
.h-btn-secondary.is-busy::after, .h-btn-ghost.is-busy::after { border-color: var(--text) transparent var(--text) transparent; }
@keyframes h-spin { to { transform: rotate(360deg); } }

/* ───────── Felter ───────── */
.h-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.h-input, .h-select, .h-textarea { width: 100%; min-height: 48px; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.h-textarea { padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.45; }
.h-input::placeholder, .h-textarea::placeholder { color: var(--faint); }
.h-input:focus, .h-select:focus, .h-textarea:focus { border-color: var(--lime); box-shadow: var(--focus-ring); }
.h-input.is-invalid, .h-textarea.is-invalid, .h-select.is-invalid { border-color: var(--salmon); }
.h-input-wrap { position: relative; display: flex; align-items: center; }
.h-input-wrap .h-input { padding-right: 52px; }
.h-input-suffix { position: absolute; right: 14px; color: var(--muted); font-size: 15px; pointer-events: none; }

/* Valgkort / chips */
.h-choice { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.h-choice:hover:not(:disabled) { border-color: #45464C; }
.h-choice.is-selected, .h-choice[aria-pressed="true"], .h-choice[aria-checked="true"] { background: var(--lime-tint-2); border-color: var(--lime); }
.h-choice:disabled { opacity: .35; cursor: not-allowed; }
.h-chip { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.h-chip.is-selected { background: var(--border-strong); border-color: #3E3F44; color: var(--text); }

/* Status-pill */
.h-pill { height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--raised-2); color: var(--text-2); }
.h-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.h-pill.no-dot::before { display: none; }
.h-pill-lime { background: var(--lime-tint); color: var(--lime); }
.h-pill-lav { background: var(--lav-tint); color: var(--lav); }
.h-pill-salmon { background: var(--salmon-tint); color: var(--salmon); }
.h-pill-muted { background: var(--raised-2); color: var(--muted); }

/* Toggle 46×28 */
.h-toggle { position: relative; width: 46px; height: 28px; flex: none; border: none; border-radius: 999px; background: #3A3B40; cursor: pointer; padding: 0; transition: background .15s; }
.h-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.h-toggle[aria-checked="true"] { background: var(--lime); }
.h-toggle[aria-checked="true"]::after { transform: translateX(18px); background: var(--text); }

/* Segmenteret kontrol */
.h-seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.h-seg button { min-height: 36px; padding: 0 14px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.h-seg button[aria-pressed="true"], .h-seg button.is-active { background: var(--border-strong); color: var(--text); }

/* Custom dropdown */
.h-dd { position: relative; }
.h-dd-trigger { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); font-size: 16px; text-align: left; cursor: pointer; }
.h-dd-trigger[aria-expanded="true"] { border-color: var(--lime); box-shadow: var(--focus-ring); }
.h-dd-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; background: var(--raised); border: 1px solid #34353A; border-radius: 14px; padding: 6px; box-shadow: var(--shadow-pop); max-height: 280px; overflow: auto; }
.h-dd-row { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: none; border-radius: 10px; background: transparent; color: var(--text); font-size: 15px; text-align: left; cursor: pointer; }
.h-dd-row:hover, .h-dd-row.is-hl { background: var(--raised-2); }
.h-dd-row .h-check { margin-left: auto; color: var(--lime); font-weight: 800; }
.h-overlay { position: fixed; inset: 0; z-index: 29; background: transparent; }

/* Tjekliste-ikoner ✓ ! ? */
.h-ck { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.h-ck-ok { background: var(--lime-tint); color: var(--lime); }
.h-ck-miss { background: var(--salmon-tint); color: var(--salmon); }
.h-ck-assess { background: var(--lav-tint); color: var(--lav); }

/* Toast */
.h-toast { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--sab)); max-width: calc(100% - 32px); width: max-content; padding: 12px 16px; border-radius: 12px; background: var(--paper); color: var(--paper-text); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-toast); }
.h-toast.is-error { background: var(--salmon); color: #1A0F0A; }
.h-toast.has-act:not([hidden]) { display: flex; align-items: center; gap: 12px; }
.h-toast-act { min-height: 32px; padding: 0 10px; margin: -6px -8px -6px 0; border: none; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.h-toast-act:hover { background: rgba(0, 0, 0, .08); }
.h-shell-bare .h-toast { bottom: calc(24px + var(--sab)); }
@media (min-width: 720px) { .h-toast { bottom: 24px; } }

/* Modal */
.h-modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.h-modal { width: 100%; max-width: 520px; max-height: calc(100% - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-modal); }

/* Side-panel (filtre) */
.h-panel-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); }
.h-panel { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
@media (max-width: 719px) { .h-panel { width: 100%; border-left: none; } }

/* Tomme/fejl/loading-tilstande */
.h-empty { padding: 48px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 560px; margin: 0 auto; }
.h-skeleton { background: linear-gradient(90deg, #202124 0%, #26272B 50%, #202124 100%); background-size: 200% 100%; animation: h-shimmer 1.2s infinite; border-radius: 12px; }
@keyframes h-shimmer { to { background-position: -200% 0; } }
.h-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.h-banner-error { background: var(--salmon-tint-2); border: 1px solid var(--salmon-border); color: var(--text); }
.h-banner-info { background: var(--lav-tint); border: 1px solid var(--lav-border); color: var(--lav-text); }
.h-banner-ok { background: var(--lime-tint-2); border: 1px solid #3A4A22; color: var(--text); }

/* Wizard-shell */
.h-wiz { max-width: 1240px; margin: 0 auto; display: flex; gap: 24px; align-items: flex-start; }
.h-wiz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.h-wiz-side { width: 320px; flex: none; position: sticky; top: 0; display: none; }
@media (min-width: 900px) { .h-wiz-side { display: block; } }
.h-wiz-step { font-size: 13px; color: var(--muted); font-weight: 600; }
.h-progress { display: flex; gap: 4px; }
.h-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--border-strong); }
.h-progress span.is-done { background: var(--lime); }
.h-wiz-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; }

/* Tabeller */
.h-table { width: 100%; border-collapse: collapse; }
.h-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.h-table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.h-table tr.is-click { cursor: pointer; }
.h-table tr.is-click:hover td { background: #232427; }

/* Ikon-tile (produkt) */
.h-tile { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--raised); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); overflow: hidden; }
.h-tile img { width: 100%; height: 100%; object-fit: cover; }

/* Paper (dokumentvisning) */
.h-paper { background: var(--paper); color: var(--paper-text); border-radius: 12px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ═════════ App-følelse (installeret PWA) – se assets/js/native.js ═════════ */
:root { --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); }
html { -webkit-tap-highlight-color: transparent; }
a, button, label, summary, [role="button"], [data-click], .h-btn, .h-choice, .h-chip, .h-toggle, .h-dd-trigger, .h-dd-row { touch-action: manipulation; }
/* Ingen markering/long-press-menu på knapper, navigation og ikoner – tekst og felter kan stadig markeres. */
button, .h-btn, .h-choice, .h-chip, .h-seg, .h-toggle, .h-pill, .h-tile, .h-dd-trigger, .h-dd-row,
.h-bottomnav, .h-sidenav, .h-topbar-m, .h-menu, .h-usercard, .h-toast, .h-offline, svg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.h-bottomnav a, .h-sidenav a, .h-menu a, .h-topbar-m a, button img, a.h-btn img, .h-tile img { -webkit-touch-callout: none; -webkit-user-drag: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* Kun #h-main ruller – ingen gummibånd på hele siden (app-shell). Login/fotoguide (bare) ruller som før. */
html.h-html-app, html.h-html-wizard, .h-html-app body, .h-html-wizard body { overflow: hidden; overscroll-behavior: none; }
.h-main { overscroll-behavior-y: contain; }

/* Safe area hele vejen rundt (landskab: notch i siden) */
.h-topbar-m { padding-left: calc(16px + var(--sal)); padding-right: calc(16px + var(--sar)); }
.h-bottomnav { padding-left: calc(8px + var(--sal)); padding-right: calc(8px + var(--sar)); }
@media (max-width: 719px) { .h-main { padding-left: calc(16px + var(--sal)); padding-right: calc(16px + var(--sar)); } }
@media (min-width: 720px) {
  .h-sidebar { padding-left: calc(16px + var(--sal)); padding-top: calc(28px + var(--sat)); padding-bottom: calc(20px + var(--sab)); }
  .h-topbar { padding-right: calc(32px + var(--sar)); height: calc(64px + var(--sat)); padding-top: var(--sat); }
  .h-main { padding-right: calc(32px + var(--sar)); padding-bottom: calc(48px + var(--sab)); }
  .h-menu, .h-menu.is-more { left: calc(16px + var(--sal)); bottom: calc(88px + var(--sab)); }
}

/* Tryk-feedback */
.h-btn { transition: background .15s, filter .15s, opacity .15s, transform .12s; }
.h-btn:active:not(:disabled):not(.is-busy), .h-choice:active:not(:disabled), .h-chip:active, .h-seg button:active,
.h-dd-row:active, .h-menu-item:active, .h-usercard:active, .h-topbar-co:active, .h-topbar-avatar:active { transform: scale(.97); }
.h-choice, .h-chip, .h-seg button, .h-dd-row, .h-menu-item, .h-usercard, .h-topbar-co, .h-topbar-avatar { transition: transform .12s, background .15s, border-color .15s; }
.h-bottomnav-item svg, .h-sidenav-item svg { transition: transform .12s; }
.h-bottomnav-item:active svg, .h-sidenav-item:active svg { transform: scale(.88); }
.h-bottomnav-item:active, .h-sidenav-item:active { color: var(--text); }
a.h-card, button.h-card, .h-card[data-click] { transition: transform .12s, filter .15s; }
a.h-card:active, button.h-card:active, .h-card[data-click]:active { transform: scale(.985); filter: brightness(1.08); }
.h-table tr.is-click:active td { background: var(--raised); }
@media (hover: none) { .h-menu-item:active, .h-dd-row:active { background: var(--raised-2); } }

/* Åbn/luk-overgange (lukning: core.js lægger en kopi ovenpå, der toner ud) */
.h-modal-backdrop { animation: h-fade-in .18s ease-out backwards; }
.h-modal { animation: h-pop-in .22s cubic-bezier(.2, .9, .3, 1.1) backwards; }
.h-panel-backdrop { animation: h-fade-in .2s ease-out backwards; }
.h-panel { animation: h-slide-in-r .26s cubic-bezier(.2, .9, .3, 1) backwards; }
.h-menu:not([hidden]) { animation: h-menu-in .16s ease-out backwards; transform-origin: top left; }
.h-menu.is-more:not([hidden]) { transform-origin: bottom right; }
.h-menu.is-more.at-top:not([hidden]) { transform-origin: top right; }
.h-dd-panel { animation: h-fade-in .12s ease-out backwards; }
.h-ghost-out { z-index: 70 !important; }
.h-ghost-out.h-modal-backdrop, .h-ghost-out.h-panel-backdrop { animation: h-fade-out .18s ease-in forwards; }
.h-ghost-out .h-modal { animation: h-pop-out .16s ease-in forwards; }
.h-ghost-out.h-panel { animation: h-slide-out-r .2s ease-in forwards; }
@keyframes h-fade-in { from { opacity: 0; } }
@keyframes h-fade-out { to { opacity: 0; } }
@keyframes h-pop-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes h-pop-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes h-slide-in-r { from { transform: translateX(100%); } }
@keyframes h-slide-out-r { to { transform: translateX(100%); } }
@keyframes h-menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

/* Toast: glid ind, flueben ved bekræftelser */
.h-toast.is-in { animation: h-toast-in .24s cubic-bezier(.2, .9, .3, 1.15) backwards; }
.h-toast.is-out { animation: h-toast-out .18s ease-in forwards; }
.h-toast.has-ic:not([hidden]) { display: flex; align-items: center; gap: 8px; }
.h-toast-ic { flex: none; }
.h-toast-ic path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: h-check .32s .12s ease-out forwards; }
@keyframes h-toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
@keyframes h-toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes h-check { to { stroke-dashoffset: 0; } }

/* Træk ned for at opdatere */
.h-ptr { position: fixed; z-index: 45; top: 0; left: 50%; width: 38px; height: 38px; border-radius: 50%; background: var(--raised); border: 1px solid var(--border-strong); color: var(--lime); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-toast); opacity: 0; pointer-events: none; transform: translate3d(-50%, -60px, 0); }
.h-ptr.is-armed { background: var(--lime-tint); border-color: var(--lime); }
.h-ptr.is-spin svg { animation: h-spin .7s linear infinite; }

/* Ingen forbindelse */
.h-offline { position: fixed; z-index: 90; left: 50%; top: calc(60px + var(--sat) + 8px); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--salmon-tint-2); border: 1px solid var(--salmon-border); color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.3; box-shadow: var(--shadow-toast); animation: h-drop-in .22s ease-out backwards; }
.h-offline-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--salmon); }
.h-offline-t { min-width: 0; }
.h-offline-btn { flex: none; min-height: 36px; padding: 0 12px; border: none; border-radius: 10px; background: var(--raised-2); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; position: relative; }
.h-offline-btn.is-busy { color: transparent; }
.h-offline-btn.is-busy::after { content: ''; position: absolute; left: calc(50% - 8px); top: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text); border-color: var(--text) transparent var(--text) transparent; animation: h-spin .7s linear infinite; }
.h-shell-bare .h-offline { top: calc(var(--sat) + 8px); }
@media (min-width: 720px) { .h-offline { top: calc(64px + var(--sat) + 10px); } }
@keyframes h-drop-in { from { opacity: 0; transform: translate(-50%, -10px); } }

/* Skærmtastatur åbent (html.h-kb): appen fylder kun det synlige område, bundmenuen skjules */
.h-kb .h-app { position: fixed; top: 0; left: 0; right: 0; bottom: auto; height: var(--vvh, 100dvh); transform: translateY(var(--vvt, 0px)); }
.h-kb .h-bottomnav { display: none; }
.h-kb .h-toast { bottom: auto; top: calc(var(--vvt, 0px) + 10px); }
.h-kb .h-offline { top: calc(var(--vvt, 0px) + 8px); }

/* Sideskift uden blink (View Transitions mellem sider – Chrome 126+/Safari 18.2+; andre browsere skifter bare) */
@view-transition { navigation: auto; }
/* Kun indholdet navngives: skallen (menuer/topbar) er ens på alle sider og krydstoner usynligt med roden.
   (Et navn gør elementet til en stacking context – navngivet bundmenu ville lægge sig over sidernes modaler.) */
.h-main { view-transition-name: h-main; }
::view-transition-group(*) { animation-duration: .2s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; }
::view-transition-old(h-main) { animation: h-fade-out .12s ease-in both; }
::view-transition-new(h-main) { animation: h-vt-in .22s cubic-bezier(.2, .9, .3, 1) both; }
:root:active-view-transition-type(back)::view-transition-new(h-main) { animation-name: h-vt-in-back; }
@keyframes h-vt-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes h-vt-in-back { from { opacity: 0; transform: translateX(-14px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .h-btn:active, .h-choice:active, .h-chip:active, .h-card:active, .h-menu-item:active { transform: none !important; }
}
