:root {
    --vf-canvas: #101824;
    --vf-header: #151f2e;
    --vf-surface: #1a2535;
    --vf-ink: #f4f7fc;
    --vf-muted: #b3c1d3;
    --vf-border: #334158;
    --vf-input-border: #697d96;
    --vf-action: #b52a3b;
    --vf-action-hover: #972031;
    --vf-focus: #fbd5a6;
    --vf-open-ink: #ffbe78;
    --vf-open-edge: #ffbe78;
    --vf-filled-ink: #afd4b9;
    --vf-interest-ink: #accdf4;
    --vf-error-ink: #ffabb3;
    --vf-panel-radius: 8px;
    --vf-control-radius: 6px;
}

:root[data-vf-theme="light"]:not(:has(.vf-login)) {
    --vf-canvas: #f2f5f9;
    --vf-header: #fff;
    --vf-surface: #fff;
    --vf-ink: #172438;
    --vf-muted: #516176;
    --vf-border: #dce4ee;
    --vf-input-border: #8393a6;
    --vf-focus: #225780;
    --vf-open-ink: #844511;
    --vf-open-edge: #b36a32;
    --vf-filled-ink: #285f45;
    --vf-interest-ink: #255787;
    --vf-error-ink: #a8202c;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--vf-canvas); }
body { font: 16px/1.45 system-ui, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
a { color: inherit; text-decoration: none; }
.vf { min-height: 100vh; color: var(--vf-ink); background: var(--vf-canvas); }
.vf h1, .vf h2, .vf-station, .vf-time, .vf-wordmark strong, .vf-counts strong {
    font-weight: 650;
    letter-spacing: -.02em;
}
.vf h1, .vf h2, .vf p { margin-top: 0; }
.vf h1 { margin-bottom: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; }
.vf h2 { margin-bottom: 0; font-size: 1.125rem; line-height: 1.25; }
.vf-tabular, .vf-time, .vf-counts strong { font-variant-numeric: tabular-nums; }
.vf :focus-visible { outline: 2px solid var(--vf-focus); outline-offset: 3px; }
.vf-dashboard { --vf-sidebar-width: 216px; --vf-topbar-height: 64px; }
.vf-dashboard-content { min-width: 0; }
.vf-skip-link {
    position: fixed; z-index: 9; top: 8px; inset-inline-start: 12px; padding: 10px 12px;
    transform: translateY(calc(-100% - 12px)); color: var(--vf-ink); background: var(--vf-header);
    border: 1px solid var(--vf-input-border); border-radius: var(--vf-control-radius);
}
.vf-skip-link:focus { transform: none; }
html { scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); }
:root.vf-modal-open { overflow: hidden; }
.vf-dashboard-content h1 { scroll-margin-top: calc(var(--vf-topbar-height) + 12px); }
.vf-appbar {
    position: sticky; z-index: 7; top: 0; padding-top: env(safe-area-inset-top, 0px);
    color: var(--vf-ink); background: var(--vf-header); border-bottom: 1px solid var(--vf-border);
}
.vf-appbar-inner { min-height: var(--vf-topbar-height); padding: 8px 24px; display: flex; align-items: center; gap: 14px; }
.vf-wordmark { display: flex; align-items: center; gap: 10px; }
.vf-wordmark::before { width: 3px; height: 26px; flex: none; border-radius: 2px; background: var(--vf-action); content: ""; }
.vf-wordmark span { display: grid; gap: 1px; }
.vf-wordmark strong { font-size: 18px; line-height: 1.15; }
.vf-wordmark small { color: var(--vf-muted); font-size: 12px; font-weight: 650; line-height: 1.2; }
.vf-header-actions { display: flex; gap: 8px; margin-left: auto; }
.vf-icon { display: block; width: 20px; height: 20px; flex: none; }
.vf-theme-button, .vf-close-button, .vf-menu-button {
    display: grid; width: 44px; height: 44px; flex: none; padding: 0; place-items: center;
    border: 1px solid transparent; border-radius: var(--vf-control-radius);
    color: var(--vf-ink); background: transparent; font-size: 24px; line-height: 1;
}
.vf-theme-button:hover, .vf-close-button:hover, .vf-menu-button:hover { background: color-mix(in srgb, var(--vf-ink) 7%, var(--vf-header)); }
.vf-theme-to-dark, :root[data-vf-theme="light"] .vf-theme-to-light { display: none; }
:root[data-vf-theme="light"] .vf-theme-to-dark { display: block; }
.vf-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vf-drawer-edge { position: fixed; z-index: 6; top: var(--vf-topbar-height); bottom: 0; left: 0; width: 18px; }
.vf-drawer-scrim { position: fixed; z-index: 20; inset: 0; display: flex; justify-content: start; background: rgb(4 8 11 / 58%); animation: vf-fade-in 180ms ease-out; }
.vf-mobile-menu {
    --vf-nav-background: #142338;
    --vf-nav-highlight: #20334d;
    --vf-nav-accent: #ff9da7;
    width: min(330px, calc(100% - 32px)); min-height: 100%; display: flex; flex-direction: column;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 18px; overflow-y: auto;
    border-right: 1px solid var(--vf-border); color: var(--vf-ink); background: var(--vf-nav-background);
    animation: vf-drawer-in 220ms cubic-bezier(.2,.8,.2,1);
}
:root[data-vf-theme="light"] .vf-mobile-menu {
    --vf-nav-background: #f8fafd;
    --vf-nav-highlight: #e9eff7;
    --vf-nav-accent: var(--vf-action);
}
.vf-drawer-grab { display: grid; height: 26px; margin: -4px 0 2px; place-items: center; touch-action: pan-y; }
.vf-drawer-grab span { width: 42px; height: 4px; border-radius: 4px; background: var(--vf-border); }
.vf-drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 16px; border-bottom: 1px solid var(--vf-border); }
.vf-menu-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--vf-border); }
.vf-menu-user { display: flex; align-items: center; gap: 11px; padding: 0 0 14px; }
.vf-menu-avatar { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border: 1px solid var(--vf-border); border-radius: 50%; color: var(--vf-muted); font-size: 13px; font-weight: 650; }
.vf-menu-user div { display: grid; gap: 2px; min-width: 0; }
.vf-menu-user small, .vf-menu-user em { color: var(--vf-muted); font-size: 12px; font-style: normal; }
.vf-menu-user strong { font-size: 14px; overflow-wrap: anywhere; }
.vf-menu-links { display: grid; gap: 3px; padding: 12px 0 20px; }
.vf-menu-links .vf-menu-section { margin: 15px 0 4px; padding-inline: 10px; color: var(--vf-muted); font-size: 12px; font-weight: 600; }
.vf-menu-links .vf-menu-section:first-child { margin-top: 0; }
.vf-menu-links a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-inline-start: 2px solid transparent; border-radius: var(--vf-control-radius); color: var(--vf-ink); font-size: 14px; font-weight: 500; }
.vf-menu-links a .vf-icon { width: 18px; height: 18px; color: var(--vf-muted); }
.vf-menu-links a.vf-menu-child { margin-inline-start: 20px; padding-inline-start: 18px; color: var(--vf-muted); }
.vf-menu-links a.vf-menu-child.is-current { color: var(--vf-ink); }
.vf-menu-links a:hover, .vf-menu-links a.is-current { background: var(--vf-nav-highlight); }
.vf-menu-links a.is-current { border-inline-start-color: var(--vf-nav-accent); font-weight: 650; }
.vf-menu-links a.is-current .vf-icon { color: var(--vf-nav-accent); }
.vf-menu-links b { margin-left: auto; color: var(--vf-muted); font-size: 12px; font-weight: 600; }
.vf-notification-indicator { width: 7px; height: 7px; flex: none; margin-left: auto; border-radius: 50%; background: var(--vf-error-ink); }
.vf-notification-indicator.is-active { background: var(--vf-filled-ink); }
.vf-menu-logout { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--vf-border); border-radius: var(--vf-control-radius); color: var(--vf-ink); background: transparent; font-size: 14px; font-weight: 650; text-align: left; }
.vf-menu-logout:hover { background: var(--vf-nav-highlight); }
@keyframes vf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vf-drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.vf-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--vf-input-border); border-radius: var(--vf-control-radius); color: var(--vf-ink); background: transparent; font-size: 14px; font-weight: 600; }
.vf-button:has(> .vf-icon) { gap: 8px; }
.vf-button > .vf-icon { width: 17px; height: 17px; }
.vf-button:hover { background: color-mix(in srgb, var(--vf-header) 80%, var(--vf-border)); }
.vf-primary { border-color: var(--vf-action); color: #fff; background: var(--vf-action); }
.vf-primary:hover { border-color: var(--vf-action-hover); background: var(--vf-action-hover); }
.vf-secondary { background: transparent; }

/* Udviklings-login */
.vf-back-link { color: var(--vf-interest-ink); font-size: 13px; font-weight: 800; }
.vf-back-link:hover { text-decoration: underline; }
.vf-back-link { display: inline-block; margin-bottom: 6px; }
.vf-users-panel .vf-panel-head p { margin: 0; color: var(--vf-muted); font-size: 14px; }
.vf-user-competencies { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--vf-border); }
.vf-user-competencies legend { padding: 0 8px 0 0; color: var(--vf-ink); font-size: 15px; font-weight: 650; }

/* Brandmandsvisning */
.vf-mobile-main { width: min(100%, 560px); margin: 0 auto; padding: 26px 16px 40px; }
.vf-page-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 20px; }
.vf-filter-row { display: flex; align-items: center; justify-content: end; gap: 8px; margin-top: 12px; }
.vf-filter-row label { margin: 0; color: var(--vf-muted); font-size: 13px; }
.vf-field-error { color: var(--vf-error-ink); }
.vf .vf-filter-row select { width: auto; min-width: min(190px, 100%); max-width: 100%; margin-left: auto; }
.vf select, .vf input:not([type="checkbox"]) { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--vf-input-border); border-radius: var(--vf-control-radius); color: var(--vf-ink); background: var(--vf-header); }
.vf select { appearance: none; padding-right: 35px; background: var(--vf-header) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238b9bb1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
.vf-danger { border-color: var(--vf-error-ink); color: var(--vf-error-ink); }
.vf-danger:hover { background: color-mix(in srgb, var(--vf-error-ink) 9%, transparent); }

/* Mine vagter */

/* Planlæggervisning */
.vf-planner-main { width: min(100%, 1440px); margin: 0 auto; padding: 30px clamp(18px, 3vw, 42px) 54px; }
.vf-planner-title { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 22px; }
.vf-planner-title .vf-button { flex: none; }
.vf-panel { overflow: hidden; border: 1px solid var(--vf-border); border-radius: var(--vf-panel-radius); background: var(--vf-surface); }
.vf-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; }
.vf-planner-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.vf-planner-filters label, .vf-fields label { display: grid; gap: 4px; color: var(--vf-muted); font-size: 13px; font-weight: 650; }
.vf-planner-filters select { display: block; min-width: 150px; margin-top: 0; font-size: 14px; }
.vf-table-wrap { overflow-x: auto; }
.vf-shift-table { width: 100%; border-collapse: collapse; color: var(--vf-ink); font-size: 14px; text-align: left; white-space: nowrap; }
.vf-shift-table td, .vf-shift-table th { padding: 10px 14px; border-top: 1px solid var(--vf-border); }
.vf-shift-table td { min-height: 64px; }
.vf-shift-table th { color: var(--vf-muted); background: transparent; font-size: 13px; font-weight: 600; }
.vf-shift-table tbody tr:hover { background: color-mix(in srgb, var(--vf-interest-ink) 5%, var(--vf-surface)); }
.vf-shift-table td:last-child, .vf-shift-table th:last-child { text-align: right; }
.vf-shift-table small { color: var(--vf-muted); font-size: 12px; }
.vf-table-actions .vf-button { min-height: 38px; white-space: nowrap; font-size: 14px; }
.vf-table-action-stack { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.vf-table-delete { min-height: 28px; padding: 0; border: 0; color: var(--vf-error-ink); background: transparent; font-size: 13px; font-weight: 750; }
.vf-table-delete:hover { text-decoration: underline; }

/* Oprettelsespanel */
.vf-drawer-backdrop { position: fixed; z-index: 10; inset: 0; display: flex; justify-content: end; background: rgb(8 12 16 / 48%); }
.vf-drawer { width: min(440px, 100%); min-height: 100%; padding: 24px; overflow-y: auto; color: var(--vf-ink); background: var(--vf-surface); border-left: 1px solid var(--vf-border); }
.vf-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vf-fields, .vf-drawer-actions { display: grid; gap: 12px; margin-top: 20px; }
.vf-fields .vf-checkbox { display: flex; align-items: center; min-height: 44px; color: var(--vf-ink); }
.vf-checkbox input { width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--vf-action); }
.vf-field-error { margin: 12px 0 0; font-size: 14px; font-weight: 650; }
.vf-drawer-actions p { margin: 0; color: var(--vf-muted); font-size: 14px; }
.vf-drawer-actions .vf-button { width: 100%; }
.vf-read-intro { margin: 4px 0 0; color: var(--vf-muted); font-size: 13px; font-weight: 500; }
.vf-confirm-backdrop { position: fixed; z-index: 25; inset: 0; display: grid; place-items: center; padding: 16px; background: rgb(8 12 16 / 48%); }
.vf-confirm-dialog { display: grid; gap: 14px; width: min(100%, 440px); padding: 24px; border: 1px solid var(--vf-border); border-top: 2px solid var(--vf-error-ink); border-radius: var(--vf-panel-radius); color: var(--vf-ink); background: var(--vf-surface); }
.vf-confirm-dialog h2 { font-size: 22px; }
.vf-confirm-dialog p { margin: 0; color: var(--vf-muted); }
.vf-confirm-dialog .vf-dialog-kicker { color: var(--vf-error-ink); font-size: 12px; font-weight: 650; letter-spacing: .05em; }
.vf-confirm-dialog > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

#blazor-error-ui { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: none; padding: 12px 16px; color: #fff; background: var(--vf-action); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
.vf-toast-region { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 72px); right: 16px; left: 16px; display: flex; justify-content: center; pointer-events: none; }
.vf-toast { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(100%, 620px); padding: 10px 14px; border: 1px solid var(--vf-border); border-left: 2px solid var(--vf-filled-ink); border-radius: var(--vf-control-radius); color: var(--vf-ink); background: var(--vf-header); font-size: 14px; font-weight: 700; pointer-events: auto; }
.vf-toast.is-info { border-left-color: var(--vf-interest-ink); }
.vf-toast.is-error { border-left-color: var(--vf-error-ink); }
.vf-modal-open .vf-toast { pointer-events: none; }
.vf-toast-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.vf-toast-actions button { min-height: 28px; padding: 0; border: 0; color: inherit; background: transparent; font-size: 13px; font-weight: 800; }
.vf-toast-actions button:first-child { border-bottom: 1px solid currentColor; }
.vf-toast-actions button:last-child { width: 24px; color: var(--vf-muted); font-size: 20px; line-height: 1; }

@media (max-width: 767px) {
    .vf-planner-main { padding: 24px 16px; }
    .vf-appbar-inner { padding-inline: 16px; }
    .vf-planner-title { align-items: flex-start; flex-wrap: wrap; }
    .vf-panel-head { padding: 12px; }
    .vf-shift-table, .vf-shift-table tbody, .vf-shift-table tr, .vf-shift-table td { display: block; width: 100%; white-space: normal; }
    .vf-shift-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .vf-shift-table tr { padding: 12px; border-top: 1px solid var(--vf-border); }
    .vf-shift-table tr:first-child { border-top: 0; }
    .vf-shift-table td { display: grid; grid-template-columns: min(34%, 108px) minmax(0, 1fr); gap: 8px; min-height: 0; padding: 5px 0; border: 0; overflow-wrap: anywhere; text-align: left !important; }
    .vf-shift-table td::before { color: var(--vf-muted); font-size: 13px; font-weight: 700; content: attr(data-label); }
    .vf-table-actions { display: block !important; padding-top: 12px !important; }
    .vf-table-actions::before { display: none; }
    .vf-table-actions .vf-button { width: 100%; }
    .vf-table-action-stack { display: grid; justify-content: stretch; }
    .vf-table-delete { min-height: 44px; }
}
@media (min-width: 768px) {
    .firefighter-page .vf-mobile-main { width: min(100%, 1320px); padding: 30px clamp(18px, 3vw, 42px) 54px; }
}
@media (min-width: 900px) {
    .vf-drawer-edge { display: none; }
    .vf-drawer-scrim { z-index: 6; top: calc(var(--vf-topbar-height) + env(safe-area-inset-top, 0px) + 1px); background: transparent; pointer-events: none; animation: none; }
    .vf-mobile-menu { width: var(--vf-sidebar-width); padding: 16px 12px; pointer-events: auto; animation: none; }
    .vf-drawer-grab, .vf-drawer-top { display: none; }
    .vf-dashboard.is-menu-open .vf-dashboard-content { margin-left: var(--vf-sidebar-width); }
}
@media (max-width: 899px) {
    .vf-drawer-scrim.is-pending { display: none; }
}
@media (max-width: 359px) {
    .vf-mobile-main, .vf-appbar-inner { padding-inline: 12px; }
    .vf-page-title h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .vf-drawer-scrim, .vf-mobile-menu { animation: none; }
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
