:root {
    --red: #e30613;
    --ink: #151515;
    --muted: #666;
    --line: #cfcfcf;
    --paper: #fffdfa;
    --bg: #f4f5f6;
    --ok: #197a45;
    --warn: #9b5b00;
}

.planning-sync-summary {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 220px));
    margin-bottom: 18px;
}

.planning-sync-summary > div {
    border-left: 4px solid #e30613;
    display: grid;
    gap: 3px;
    padding: 8px 12px;
}

.planning-sync-summary strong {
    font-size: 24px;
    line-height: 1;
}

.planning-sync-summary span {
    color: #5c6470;
    font-size: 14px;
}

.vacation-planning-timeline {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 0 0 20px;
    overflow: visible;
    width: 100%;
}

.vacation-planning-admin-timeline {
    padding-bottom: 0;
}

.vacation-planning-admin-timeline + .planning-admin-page .panel,
.vacation-planning-admin-timeline + main .form-panel,
.vacation-planning-admin-timeline + main .planning-auto-panel {
    max-width: none;
}

.planning-rule-grid {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.planning-rule-grid > div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 4px;
    padding: 14px 16px;
}

.planning-rule-grid > div:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.planning-rule-grid dt { font-weight: 800; }
.planning-rule-grid dd { color: var(--muted); margin: 0; }

.planning-auto-panel { padding: 0; }

.planning-auto-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(280px, .9fr);
}

.planning-auto-head {
    grid-column: 1 / -1;
    margin: 0;
    padding: 22px 22px 16px;
}

.planning-auto-controls,
.planning-auto-result {
    min-width: 0;
    padding: 18px 22px 22px;
}

.planning-auto-controls { border-right: 1px solid var(--line); }

.planning-auto-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 360px) auto;
    margin: 0;
}

.planning-auto-form button { align-self: end; }

.planning-auto-result {
    align-content: start;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planning-auto-metric {
    border-left: 4px solid var(--red);
    display: grid;
    gap: 4px;
    padding: 4px 12px;
}

.planning-auto-metric strong { font-size: 30px; line-height: 1; }
.planning-auto-metric span,
.planning-auto-result p { color: var(--muted); font-size: 14px; margin: 0; }
.planning-auto-result p { grid-column: 1 / -1; }

.planning-statistics-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planning-statistics-metrics > div {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    display: grid;
    gap: 5px;
    min-height: 104px;
    padding: 18px 20px;
}

.planning-statistics-metrics > div:nth-child(3n) { border-right: 0; }
.planning-statistics-metrics > div:nth-last-child(-n + 3) { border-bottom: 0; }
.planning-statistics-metrics strong { font-size: 30px; line-height: 1; }
.planning-statistics-metrics span { color: var(--muted); font-size: 14px; }
.planning-statistics-metrics .is-warning strong,
.planning-open-count { color: #a60011; font-weight: 800; }

.planning-statistics-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planning-statistics-split > div { min-width: 0; padding: 0 20px 20px; }
.planning-statistics-split > div + div { border-left: 1px solid var(--line); }
.planning-statistics-split h3 { font-size: 18px; margin: 18px 0 12px; }

.planning-timeline-settings {
    border: 1px solid var(--line);
    margin: 8px 0 0;
    padding: 16px;
}

.planning-timeline-settings legend { font-weight: 800; padding: 0 6px; }
.planning-timeline-settings > p { color: var(--muted); font-size: 14px; margin: 10px 0 16px; }

.planning-timeline-phase-grid {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planning-timeline-phase-grid > div {
    background: #f8f8f8;
    display: grid;
    gap: 12px;
    padding: 14px;
}

/* Manual service planning matrix. */
.service-manual-panel { max-width: none; }
.service-manual-head { align-items: center; }
.service-manual-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.service-manual-legend span { align-items: center; display: inline-flex; font-size: 13px; font-weight: 700; gap: 6px; }
.service-legend-swatch { background: #f2c94c; border: 1px solid #9b7700; display: inline-block; height: 14px; width: 14px; }
.service-legend-swatch.f2 { background: #f4a261; border-color: #a74e09; }
.service-legend-swatch.eu { background: #b9e7c9; border-color: var(--ok); }
.service-legend-swatch.violation { background: #fff; border: 2px solid var(--red); }
.service-rule-alert { display: grid; gap: 6px; margin: 0 0 16px; }
.service-rule-alert summary { cursor: pointer; font-weight: 800; }
.service-rule-alert ul { margin: 8px 0 0; max-height: 220px; overflow: auto; padding-left: 22px; }
.service-manual-filters { align-items: end; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(190px, 280px)) minmax(180px, 1fr); margin-bottom: 12px; }
.service-manual-filters > strong { align-self: center; justify-self: end; }
.service-add-palette { align-items: center; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; padding: 10px 0; }
.service-add-chip { align-items: center; background: #f2c94c; border: 1px solid #9b7700; color: var(--ink); cursor: grab; display: inline-flex; gap: 5px; min-height: 34px; padding: 6px 10px; }
.service-add-chip.f2 { background: #f4a261; border-color: #a74e09; }
.service-add-chip.is-selected, .service-assignment-chip.is-selected { box-shadow: 0 0 0 3px rgba(21, 21, 21, .22); outline: 0; }
.service-manual-feedback { color: var(--red); font-size: 14px; font-weight: 700; min-height: 22px; }
.service-week-matrix.is-saving { opacity: .6; pointer-events: none; }
.service-week-matrix-scroll { border: 1px solid var(--line); max-height: none; overflow-x: auto; overflow-y: visible; }
.service-week-matrix table { table-layout: fixed; width: max-content; }
.service-week-matrix th, .service-week-matrix td { border-bottom: 1px solid var(--line); border-right: 1px solid #e2e2e2; height: 58px; padding: 5px; text-align: center; vertical-align: middle; }
.service-week-matrix thead th { position: sticky; top: 0; z-index: 3; }
.service-week-column { min-width: 68px; width: 68px; }
.service-week-column span, .service-week-column small { display: block; }
.service-week-column small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.service-week-column.is-unfilled { background: #fde8e8; box-shadow: inset 3px 0 0 var(--red), inset -3px 0 0 var(--red); color: #8a1111; }
.service-week-column em { display: block; font-size: 9px; font-style: normal; font-weight: 800; margin-top: 3px; text-transform: uppercase; }
.service-week-column em[hidden] { display: none; }
.service-week-matrix .service-employee-column { background: #fff; left: 0; min-width: 248px; position: sticky; text-align: left; width: 248px; z-index: 2; }
.service-week-matrix thead .service-employee-column { background: #f8f8f8; z-index: 4; }
.service-employee-column strong, .service-employee-column small { display: block; }
.service-employee-column small { color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-employee-counts { display: flex; gap: 5px; margin-top: 5px; }
.service-employee-counts span { background: #fff5c7; border: 1px solid #9b7700; color: #5d4700; font-size: 10px; font-weight: 800; line-height: 18px; padding: 0 5px; }
.service-employee-counts .f2 { background: #ffe1c9; border-color: #a74e09; color: #753705; }
.service-week-dropzone { background: #fff; position: relative; transition: background-color 150ms ease, box-shadow 150ms ease; }
.service-week-dropzone:nth-child(even) { background: #fafafa; }
.service-week-dropzone.is-unfilled-week { background: #fff4f4; box-shadow: inset 3px 0 0 rgba(204, 0, 0, .55), inset -3px 0 0 rgba(204, 0, 0, .55); }
.service-week-dropzone.is-drop-target { background: #e9f6ee; box-shadow: inset 0 0 0 2px var(--ok); }
.service-week-dropzone.has-vacation { padding-top: 22px; }
.service-vacation-marker { background: #b9e7c9; border: 1px solid var(--ok); color: #0f5e33; font-size: 9px; font-weight: 800; left: 50%; line-height: 14px; min-width: 20px; padding: 0 2px; position: absolute; top: 3px; transform: translateX(-50%); }
.service-assignment-wrapper { height: 34px; margin: 0 auto; position: relative; width: 48px; }
.service-assignment-chip { align-items: center; background: #f2c94c; border: 1px solid #9b7700; color: var(--ink); cursor: grab; display: flex; font-size: 12px; font-weight: 800; height: 34px; justify-content: center; position: relative; user-select: none; width: 48px; }
.service-assignment-chip.f2 { background: #f4a261; border-color: #a74e09; }
.service-assignment-chip.has-violation { border: 2px solid var(--red); color: #8d0008; }
.service-assignment-chip.has-violation strong { align-items: center; background: var(--red); border-radius: 50%; color: #fff; display: flex; font-size: 10px; height: 15px; justify-content: center; position: absolute; right: -7px; top: -8px; width: 15px; }
.service-assignment-delete { align-items: center; background: #fff; border: 1px solid var(--red); border-radius: 50%; bottom: -7px; color: var(--red); display: flex; font-size: 15px; height: 19px; justify-content: center; line-height: 1; min-height: 19px; padding: 0; position: absolute; right: -8px; width: 19px; z-index: 2; }
.service-assignment-delete:hover, .service-assignment-delete:focus { background: var(--red); color: #fff; }

@media (max-width: 760px) {
    .planning-auto-workspace { grid-template-columns: 1fr; }
    .planning-auto-controls { border-bottom: 1px solid var(--line); border-right: 0; }
    .planning-auto-form { grid-template-columns: 1fr; }
    .planning-rule-grid { grid-template-columns: 1fr; }
    .planning-rule-grid > div:nth-child(odd) { border-right: 0; }
    .planning-statistics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .planning-statistics-metrics > div:nth-child(3n) { border-right: 1px solid var(--line); }
    .planning-statistics-metrics > div:nth-child(2n) { border-right: 0; }
    .planning-statistics-metrics > div:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
    .planning-statistics-metrics > div:nth-last-child(-n + 2) { border-bottom: 0; }
    .planning-statistics-split { grid-template-columns: 1fr; }
    .planning-statistics-split > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .planning-timeline-phase-grid { grid-template-columns: 1fr; }
    .service-manual-head, .service-manual-filters { align-items: flex-start; grid-template-columns: 1fr; }
    .service-manual-filters > strong { justify-self: start; }
}

.vacation-planning-phase {
    background: #e8ebee;
    border-top: 4px solid #a0a7ae;
    display: grid;
    gap: 3px;
    min-height: 72px;
    padding: 12px 14px;
    position: relative;
}

.vacation-planning-phase small {
    color: #5c6470;
}

.vacation-planning-phase.active {
    background: #fff1f1;
    border-color: var(--red);
}

.vacation-planning-phase.completed {
    border-color: var(--ok);
}

.vacation-planning-phase-tooltip {
    background: #151515;
    border: 1px solid #151515;
    color: #fff;
    display: block;
    font-size: 13px;
    font-weight: 400;
    left: 8px;
    line-height: 1.4;
    opacity: 0;
    padding: 9px 11px;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 10px);
    transform: translateY(-4px);
    transition: opacity 120ms ease, transform 120ms ease;
    visibility: hidden;
    width: min(280px, calc(100vw - 40px));
    z-index: 30;
}

.vacation-planning-phase:nth-child(n + 5) .vacation-planning-phase-tooltip {
    left: auto;
    right: 8px;
}

.vacation-planning-phase:hover .vacation-planning-phase-tooltip,
.vacation-planning-phase:focus .vacation-planning-phase-tooltip {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.vacation-planning-phase:hover,
.vacation-planning-phase:focus {
    z-index: 31;
}

.vacation-heatmap {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(12, minmax(62px, 1fr));
    margin: 0 0 20px;
}

.vacation-heatmap > div {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.vacation-heatmap span {
    align-items: center;
    background: color-mix(in srgb, #e30613 calc(var(--heat) * 80%), #f0f1f2);
    color: #151515;
    display: flex;
    font-weight: 700;
    justify-content: center;
    min-height: 36px;
}

.vacation-year-table th:not(:first-child),
.vacation-year-table td:not(:first-child) {
    min-width: 56px;
    text-align: center;
}

.vacation-year-calendar {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.vacation-month-card h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.vacation-month-weekdays,
.vacation-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.vacation-month-weekdays span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 0;
    text-align: center;
}

.vacation-day {
    align-items: center;
    border: 1px solid #fff;
    display: flex;
    font-size: 12px;
    justify-content: center;
    min-height: 29px;
}

.vacation-day.heat-0 { background: #dff2e5; }
.vacation-day.heat-1 { background: #fff0b8; }
.vacation-day.heat-25 { background: #f7bd78; }
.vacation-day.heat-50 { background: #e77070; color: #fff; }
.vacation-day.heat-75 { background: #a70e19; color: #fff; font-weight: 700; }
.vacation-day.weekend { box-shadow: inset 0 0 0 999px rgba(82, 91, 102, .12); }
.vacation-day.holiday { box-shadow: inset 0 0 0 999px rgba(31, 130, 177, .28); }
.vacation-day.empty { background: transparent; border-color: transparent; }

.vacation-heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.vacation-heatmap-legend span { align-items: center; display: inline-flex; gap: 6px; }
.vacation-heatmap-legend i { border: 1px solid var(--line); display: inline-block; height: 16px; width: 24px; }
.vacation-heatmap-legend i.heat-0 { background: #dff2e5; }.vacation-heatmap-legend i.heat-1 { background: #fff0b8; }.vacation-heatmap-legend i.heat-25 { background: #f7bd78; }.vacation-heatmap-legend i.heat-50 { background: #e77070; }.vacation-heatmap-legend i.heat-75 { background: #a70e19; }.vacation-heatmap-legend i.weekend { background: #e5e7eb; }.vacation-heatmap-legend i.holiday { background: #b8e0f3; }

.br-vacation-statistics {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.br-vacation-stat-card {
    border: 1px solid var(--line);
    display: grid;
    gap: 10px;
    min-height: 156px;
    padding: 18px;
}

.br-vacation-stat-card h3 {
    font-size: 15px;
    margin: 0;
}

.br-vacation-stat-card strong {
    font-size: 32px;
    line-height: 1;
}

.br-vacation-stat-card p {
    color: var(--muted);
    margin: 0;
}

.br-vacation-progress {
    background: #e4e7eb;
    height: 8px;
    overflow: hidden;
}

.br-vacation-progress i {
    background: var(--red);
    display: block;
    height: 100%;
}

.vacation-month-cell.has-vacation {
    background: #fde8e9;
    color: #9b111b;
    font-weight: 700;
}

.approval-phase-form {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
}

.late-shift-matrix th,
.late-shift-matrix td {
    min-width: 62px;
    padding: 6px;
    text-align: center;
    vertical-align: middle;
}

.late-shift-matrix th:first-child {
    left: 0;
    min-width: 210px;
    position: sticky;
    text-align: left;
    z-index: 2;
}

.late-shift-matrix th small {
    display: block;
    font-weight: 400;
    margin-top: 3px;
}

.late-shift-matrix td.is-drop-target {
    background: #fff0f1;
    outline: 2px dashed var(--red);
    outline-offset: -3px;
}

.late-shift-chip {
    align-items: center;
    background: #d9f0fa;
    border: 1px solid #77b8d4;
    cursor: grab;
    display: inline-flex;
    font-weight: 700;
    gap: 3px;
    justify-content: center;
    min-height: 28px;
    min-width: 34px;
    padding: 2px 4px;
}

.late-shift-chip.automatic {
    background: #fff0c9;
    border-color: #cf9700;
}

.late-shift-filters {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(220px, 300px)) minmax(140px, 1fr);
    margin-bottom: 14px;
}

.late-shift-filters > strong {
    align-self: center;
    justify-self: end;
}

.late-shift-chip.is-dragging {
    opacity: .45;
}

.late-shift-chip button {
    background: transparent;
    border: 0;
    color: #17475e;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.checkbox-grid {
    display: grid;
    gap: 8px 18px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.checkbox-grid label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.checkbox-grid input[type="checkbox"] {
    flex: 0 0 auto;
    min-height: 0;
    width: auto;
}

.partner-area-form {
    max-width: 960px;
}

.partner-area-name {
    max-width: 460px;
}

.partner-area-selection {
    background: #fafbfc;
    border: 1px solid var(--line);
    margin: 0;
    padding: 14px 16px 16px;
}

.partner-area-selection legend {
    font-weight: 800;
    padding: 0 5px;
}

.partner-area-selection .checkbox-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.partner-area-selection .checkbox-grid label {
    font-weight: 600;
    min-height: 32px;
}

.skill-order-letter-training-options {
    background: #fafbfc;
    border: 1px solid var(--line);
    margin: 0;
    padding: 14px 16px 16px;
}

.skill-order-letter-training-options legend {
    font-weight: 800;
    padding: 0 5px;
}

.skill-order-letter-training-options .checkbox-grid label {
    align-items: flex-start;
    font-weight: 600;
    line-height: 1.35;
}

.vacation-signature {
    background: #fff;
    border: 1px solid var(--line);
    cursor: crosshair;
    max-width: 100%;
    touch-action: none;
}

@media (max-width: 640px) {
    .planning-sync-summary {
        grid-template-columns: 1fr;
    }

    .vacation-planning-timeline {
        grid-template-columns: 1fr 1fr;
    }

    .vacation-heatmap {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .vacation-year-calendar {
        grid-template-columns: 1fr;
    }

    .late-shift-filters {
        grid-template-columns: 1fr;
    }

    .late-shift-filters > strong {
        justify-self: start;
    }
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
    margin: 0;
    min-height: 100vh;
}

a {
    color: var(--red);
}

.topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 24px;
}

.topbar-menu {
    align-items: center;
    display: flex;
    flex: 1;
    gap: 24px;
    min-width: 0;
}

.brand {
    color: var(--red);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

.menu-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #999;
    border-radius: 4px;
    display: none;
    flex-direction: column;
    gap: 5px;
    height: 42px;
    justify-content: center;
    min-height: 42px;
    padding: 0;
    width: 42px;
}

.menu-toggle span[aria-hidden="true"] {
    background: var(--ink);
    display: block;
    height: 2px;
    width: 20px;
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.nav {
    align-items: center;
    display: flex;
    flex: 1;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
}

.nav a,
.nav-placeholder {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.nav-dropdown-trigger::after {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    content: "";
    display: inline-block;
    height: 6px;
    margin-top: -3px;
    transform: rotate(45deg);
    width: 6px;
}

.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown:focus-within .nav-dropdown-trigger::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.nav-dropdown-menu {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    display: none;
    gap: 0;
    left: 0;
    min-width: 170px;
    padding: 6px;
    position: absolute;
    top: calc(100% + 10px);
    z-index: 20;
}

.nav-dropdown-menu::before {
    content: "";
    height: 10px;
    left: 0;
    position: absolute;
    right: 0;
    top: -10px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
}

.nav-dropdown-menu a {
    border-radius: 3px;
    padding: 8px 10px;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus {
    background: #f5f5f5;
}

.admin-nav-menu {
    min-width: 288px;
}

.admin-nav-group {
    position: relative;
}

.admin-nav-group-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 700;
    justify-content: space-between;
    min-height: 36px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.admin-nav-group-trigger::after {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    content: "";
    height: 6px;
    margin-left: 14px;
    transform: rotate(-45deg);
    width: 6px;
}

.admin-nav-group:hover > .admin-nav-group-trigger,
.admin-nav-group:focus-within > .admin-nav-group-trigger,
.admin-nav-group.is-open > .admin-nav-group-trigger {
    background: #f5f5f5;
}

.admin-nav-submenu {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    display: none;
    left: 100%;
    min-width: 288px;
    padding: 6px;
    position: absolute;
    top: -6px;
    z-index: 21;
}

.admin-nav-group:hover > .admin-nav-submenu,
.admin-nav-group:focus-within > .admin-nav-submenu,
.admin-nav-group.is-open > .admin-nav-submenu {
    display: grid;
}

.nav-placeholder {
    background: #f8f8f8;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #555;
    padding: 7px 10px;
}

.user-menu {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 12px;
    justify-content: flex-end;
}

.user-menu span,
.profile-link {
    display: grid;
    gap: 2px;
    text-align: right;
}

.profile-link {
    color: var(--ink);
    text-decoration: none;
}

.profile-link:hover strong {
    text-decoration: underline;
}

.user-menu small,
.profile-link small {
    color: var(--muted);
    font-size: 12px;
}

.online-user-count {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    white-space: nowrap;
}

.online-user-count i {
    background: var(--ok);
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.online-user-count:hover,
.online-user-count:focus-visible {
    color: var(--red);
    text-decoration: underline;
}

.page {
    flex: 1 0 auto;
    margin: 0;
    padding: 28px;
    width: 100%;
}

.page-head {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.page-head h1,
.login-head h1 {
    font-size: 26px;
    line-height: 1.15;
    margin: 0;
}

.page-head p,
.login-head p {
    color: var(--muted);
    margin: 6px 0 0;
}

.panel,
.login-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    min-width: 0;
    padding: 22px;
}

.panel-head {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-head h2 {
    margin: 0;
}

.panel-head p {
    color: var(--muted);
    margin: 4px 0 0;
}

.login-page {
    align-items: center;
    display: grid;
    flex: 1 0 auto;
    padding: 28px;
}

.login-box {
    margin: 0 auto;
    max-width: 460px;
    width: 100%;
}

.login-head {
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.organization-metrics {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
    overflow: hidden;
}

.organization-metrics > div {
    background: #eef2f5;
    display: grid;
    gap: 4px;
    padding: 11px 13px;
}

.organization-metrics span,
.organization-card p,
.organization-assignment-note,
.organization-child-count,
.organization-flat-list span,
.organization-flat-list small,
.organization-filter-feedback {
    color: var(--muted);
}

.organization-metrics strong { font-size: 23px; }

.organization-controls {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 280px) auto;
}

.organization-filter-feedback { margin: 10px 0 0; min-height: 20px; }

.organization-unassigned,
.organization-inconsistent { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.organization-unassigned h2,
.organization-inconsistent h2 { font-size: 19px; margin: 0 0 6px; }
.organization-unassigned h2 span,
.organization-inconsistent h2 span { color: var(--muted); font-size: 15px; font-weight: 400; }
.organization-unassigned > p,
.organization-inconsistent > p { color: var(--muted); margin: 0 0 16px; }

.organization-tree-scroll { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
.organization-tree,
.organization-children,
.organization-flat-list { list-style: none; margin: 0; padding: 0; }
.organization-tree { display: grid; gap: 10px; min-width: 0; }
.organization-tree > .organization-node { max-width: none; width: 100%; }
.organization-tree > .organization-node > .organization-card { max-width: 360px; }
.organization-children { align-items: flex-start; border-left: 2px solid #d7dee5; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0 10px; padding: 0 0 0 9px; }
.organization-children[hidden] { display: none; }
.organization-node { min-width: 0; position: relative; }
.organization-children > .organization-node { flex: 0 0 360px; max-width: 360px; width: 360px; }
.organization-children > .organization-node.organization-has-team { flex-basis: 100%; max-width: none; }
.organization-children > .organization-node.organization-has-team > .organization-card { max-width: 360px; }
.organization-card { align-items: center; background: #f8fafb; border: 1px solid #cfd7de; border-left: 3px solid var(--red); box-sizing: border-box; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; height: 118px; min-width: 0; padding: 10px 11px; width: 360px; }
.organization-card > div { display: grid; min-width: 0; }
.organization-name { -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); display: -webkit-box; font-size: 17px; font-weight: 800; line-height: 1.25; overflow: hidden; text-decoration: none; }
.organization-name:hover { color: var(--red); text-decoration: underline; }
.organization-card p { -webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box; margin: 4px 0 0; overflow: hidden; }
.organization-assignment-note { -webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box; font-size: 12px; margin-top: 3px; overflow: hidden; }
.organization-toggle { background: #fff; border: 1px solid #aebbc6; color: var(--ink); flex: 0 0 auto; font-size: 11px; min-height: 28px; padding: 3px 6px; white-space: nowrap; }
.organization-toggle:hover { border-color: var(--red); color: var(--red); }
.organization-child-count { font-size: 12px; text-align: right; }
.organization-node.is-organization-match > .organization-card { border-color: #16558c; box-shadow: 0 0 0 2px rgba(22, 85, 140, .14); }
.organization-flat-list { display: grid; gap: 8px; }
.organization-flat-list a { background: #fff8e8; border-left: 4px solid #c98500; color: var(--ink); display: grid; gap: 3px; padding: 10px 12px; text-decoration: none; }
.organization-flat-list a:hover strong { color: var(--red); }

@media (max-width: 640px) {
    .organization-metrics,
    .organization-controls { grid-template-columns: 1fr; }
    .organization-tree { display: grid; min-width: 0; }
    .organization-tree > .organization-node { max-width: none; }
    .organization-children { display: grid; }
    .organization-children > .organization-node { max-width: none; width: 100%; }
    .organization-card { align-items: flex-start; grid-template-columns: 1fr; max-width: none; width: 100%; }
    .organization-toggle,
    .organization-child-count { align-self: stretch; text-align: left; }
}

.apl-dach-qs-order-row > label {
    align-content: start;
}

.section-title {
    display: grid;
    gap: 6px;
}

.section-title h2,
.section-title p {
    margin: 0;
}

.section-title p,
.muted {
    color: var(--muted);
}

.custom-field-section {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 16px;
    padding-top: 18px;
}

.skill-batch-section {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    padding-top: 18px;
}

.training-participant-picker {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.training-participant-picker .actions {
    margin: 0;
}

.skill-catalog-picker {
    display: grid;
    gap: 12px;
}

.skill-catalog-picker-list {
    border: 1px solid var(--line);
    max-height: 360px;
    overflow: auto;
}

.skill-catalog-picker-list table {
    min-width: 620px;
}

.skill-catalog-picker-list th:first-child,
.skill-catalog-picker-list td:first-child {
    text-align: center;
    width: 72px;
}

.skill-catalog-picker-list input[type="checkbox"] {
    accent-color: var(--red);
    min-height: 18px;
    margin: 0;
    padding: 0;
    width: 18px;
}

.skill-batch-selected {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    padding-top: 16px;
}

.skill-batch-selected-head {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.skill-batch-selected-head h3,
.skill-batch-selected-head span {
    margin: 0;
}

.skill-batch-selected-head span {
    color: var(--muted);
    font-size: 13px;
}

.skill-batch-selected-list {
    display: grid;
    gap: 1px;
}

.skill-batch-selected-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(140px, .45fr) minmax(0, 1fr) auto;
    padding: 8px 0;
}

.skill-batch-list {
    display: grid;
    gap: 14px;
}

.skill-batch-row {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    padding-top: 14px;
}

.skill-batch-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.skill-batch-row-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.skill-batch-remove {
    align-items: center;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 22px;
    height: 32px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 32px;
}

.skill-batch-remove:hover {
    border-color: var(--red);
    color: var(--red);
}

@media (max-width: 640px) {
    .training-participant-picker,
    [data-training-participant-batch] .skill-batch-selected-row {
        grid-template-columns: 1fr;
    }

    .training-participant-picker .actions,
    .training-participant-picker .actions button {
        width: 100%;
    }
}

.stacked-checks {
    align-content: end;
    display: grid;
    gap: 10px;
}

.small-input {
    max-width: 96px;
}

.form-panel {
    max-width: 820px;
}

.apl-helper-import-page .panel {
    max-width: 920px;
}

.apl-helper-import-sources {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.apl-helper-import-source {
    border: 1px solid var(--line);
    border-left: 4px solid #65758a;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.apl-helper-import-source.is-ready {
    border-left-color: #16803c;
}

.apl-helper-import-source.is-missing {
    border-left-color: var(--red);
}

.apl-helper-import-source span,
.apl-helper-import-result {
    color: var(--muted);
}

.apl-helper-import-progress-bar {
    background: #e8ebee;
    height: 10px;
    margin: 4px 0 18px;
    overflow: hidden;
}

.apl-helper-import-progress-bar i {
    background: var(--red);
    display: block;
    height: 100%;
    transition: width 160ms ease;
    width: 0;
}

.apl-helper-import-progress.has-error .apl-helper-import-progress-bar i {
    background: #a40000;
}

.ticket-catalog-page .form-panel {
    max-width: none;
}

.ticket-catalog-tabs,
.vacation-planning-tabs,
.profile-tabs,
.module-tabs {
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 20px;
}

.ticket-catalog-tabs a,
.vacation-planning-tabs a,
.profile-tabs a,
.module-tabs a {
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-weight: 700;
    padding: 10px 12px 9px;
    text-decoration: none;
}

.ticket-catalog-tabs a:hover,
.ticket-catalog-tabs a.is-active,
.vacation-planning-tabs a:hover,
.vacation-planning-tabs a.is-active,
.profile-tabs a:hover,
.profile-tabs a.is-active,
.module-tabs a:hover,
.module-tabs a.is-active {
    border-bottom-color: var(--red);
    color: var(--ink);
}

.ticket-catalog-selection-list {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-catalog-selection-list a {
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 14px 16px;
    text-decoration: none;
}

.ticket-catalog-selection-list a:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--line);
}

.ticket-catalog-selection-list a:hover,
.ticket-catalog-selection-list a.is-selected {
    background: #f7f8f9;
}

.ticket-catalog-selection-list a.is-selected {
    box-shadow: inset 3px 0 0 var(--red);
}

.ticket-catalog-selection-list span {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.ticket-catalog-order-feedback {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    text-align: right;
}

.ticket-catalog-order-feedback.is-error {
    color: #a40000;
}

.ticket-catalog-tree {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ticket-catalog-tree-department,
.ticket-catalog-tree-category {
    list-style: none;
}

.ticket-catalog-tree-row {
    align-items: center;
    background: #f7f8f9;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    gap: 10px;
    min-height: 52px;
    padding: 8px 12px;
}

.ticket-catalog-tree-department-row {
    background: #eef2f5;
    border-left: 4px solid var(--red);
}

.ticket-catalog-tree-row a {
    color: var(--ink);
    display: grid;
    gap: 2px;
    text-decoration: none;
}

.ticket-catalog-tree-row a:hover strong {
    color: var(--red);
}

.ticket-catalog-tree-row small {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.ticket-catalog-drag-handle {
    color: var(--muted);
    cursor: grab;
    font-size: 22px;
    letter-spacing: 2px;
    line-height: 1;
    user-select: none;
}

.ticket-catalog-tree-children {
    border-left: 1px solid #c9d2da;
    display: grid;
    gap: 7px;
    list-style: none;
    margin: 7px 0 0 20px;
    min-height: 12px;
    padding: 0 0 0 17px;
}

.ticket-catalog-tree-category .ticket-catalog-tree-row {
    min-height: 46px;
}

.ticket-catalog-tree [data-catalog-node].is-dragging {
    opacity: .45;
}

.ticket-catalog-tree [data-catalog-node].is-drop-target > .ticket-catalog-tree-row,
.ticket-catalog-tree-children.is-drop-target {
    border-color: #2b7bbb;
    box-shadow: inset 0 0 0 1px #2b7bbb;
}

@media (max-width: 900px) {
    .ticket-catalog-selection-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-catalog-selection-list a:not(:nth-child(3n + 1)) {
        border-left: 0;
    }

    .ticket-catalog-selection-list a:not(:nth-child(2n + 1)) {
        border-left: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .ticket-catalog-selection-list {
        grid-template-columns: 1fr;
    }

    .ticket-catalog-selection-list a:not(:nth-child(2n + 1)) {
        border-left: 0;
    }

    .ticket-catalog-order-feedback {
        text-align: left;
    }
}

.apl-dach-qs-statistics-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.apl-dach-qs-statistics-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.apl-dach-qs-statistics-metrics > div {
    border-right: 1px solid var(--line);
    display: grid;
    gap: 6px;
    min-height: 96px;
    padding: 16px 18px;
}

.apl-dach-qs-statistics-metrics > div:last-child {
    border-right: 0;
}

.apl-dach-qs-statistics-metrics strong {
    font-size: 30px;
    line-height: 1;
}

.apl-dach-qs-statistics-metrics span {
    color: var(--muted);
    font-size: 14px;
}

.apl-dach-qs-statistics-metrics .is-kpi strong { color: #16558c; }
.apl-dach-qs-statistics-metrics .is-warning strong { color: #a2000b; }

.apl-dach-qs-chart-grid {
    display: grid;
    gap: 0 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apl-dach-qs-chart {
    border-top: 1px solid var(--line);
    min-width: 0;
    padding: 20px 0;
}

.apl-dach-qs-chart h3 {
    font-size: 18px;
    margin: 0 0 14px;
}

.apl-dach-qs-stat-bars {
    display: grid;
    gap: 12px;
}

.apl-dach-qs-stat-bar {
    display: grid;
    gap: 6px;
}

.apl-dach-qs-stat-bar > div {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.apl-dach-qs-stat-bar strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.apl-dach-qs-stat-bar span {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.apl-dach-qs-stat-bar i {
    background: #edf0f2;
    display: block;
    height: 10px;
    overflow: hidden;
}

.apl-dach-qs-stat-bar b {
    background: #2b7bbb;
    display: block;
    height: 100%;
    width: var(--apl-dach-qs-stat-width);
}

.apl-dach-qs-stat-bar b.is-status { background: #e30613; }
.apl-dach-qs-stat-bar b.is-company { background: #197d75; }
.apl-dach-qs-stat-bar b.is-order-type { background: #7d4800; }
.apl-dach-qs-stat-bar b.is-region { background: #5d438f; }
.apl-dach-qs-stat-bar b.is-area { background: #17683a; }
.apl-dach-qs-stat-bar b.is-trend { background: #16558c; }

@media (max-width: 900px) {
    .apl-dach-qs-statistics-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .apl-dach-qs-statistics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .apl-dach-qs-statistics-metrics > div { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
    .apl-dach-qs-statistics-metrics > div:nth-child(2n) { border-right: 0; }
    .apl-dach-qs-statistics-metrics > div:last-child { border-bottom: 0; }
}

@media (max-width: 640px) {
    .apl-dach-qs-statistics-filters,
    .apl-dach-qs-statistics-metrics,
    .apl-dach-qs-chart-grid { grid-template-columns: 1fr; }
    .apl-dach-qs-statistics-metrics > div { border-right: 0; }
}

.vacation-application-decision-panel {
    max-width: none;
}

.vacation-alternative-field[hidden] {
    display: none;
}

.vacation-representative-form {
    max-width: none;
}

.vacation-representations-toggle {
    align-self: end;
    min-height: 44px;
}

.vacation-planning-admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}

.vacation-planning-settings-overview {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vacation-planning-settings-overview a {
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 18px;
    text-decoration: none;
}

.vacation-planning-settings-overview a:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--line);
}

.vacation-planning-settings-overview a:hover,
.vacation-planning-settings-overview a:focus {
    background: #f8f8f8;
}

.vacation-planning-settings-overview strong { font-size: 17px; }
.vacation-planning-settings-overview span { color: var(--muted); font-size: 14px; line-height: 1.45; }

.planning-invitation-count {
    background: #f8f8f8;
    border-left: 4px solid var(--red);
    margin: 18px 0;
    padding: 10px 12px;
}

.vacation-application-metrics {
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 18px 0;
}

.vacation-application-metrics > div {
    display: grid;
    gap: 4px;
    min-height: 104px;
    padding: 18px 20px;
}

.vacation-application-metrics > div + div {
    border-left: 1px solid var(--line);
}

.vacation-application-metrics span,
.vacation-application-metrics small {
    color: var(--muted);
}

.vacation-application-metrics strong {
    font-size: 26px;
    line-height: 1.1;
}

.vacation-application-reference-values {
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: -18px 0 18px;
}

.vacation-application-reference-values > div {
    display: grid;
    gap: 3px;
    min-height: 76px;
    padding: 12px 20px;
}

.vacation-application-reference-values > div + div {
    border-left: 1px solid var(--line);
}

.vacation-application-reference-values span,
.vacation-application-reference-values small {
    color: var(--muted);
}

.vacation-application-reference-values strong {
    font-size: 20px;
    line-height: 1.1;
}

.vacation-application-late-shift-toggle {
    position: absolute;
    right: 32px;
    top: 28px;
}

.vacation-application-late-shift-toggle .checkbox-label {
    align-items: center;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    width: fit-content;
}

.vacation-application-late-shift-toggle .checkbox-label input[type="checkbox"] {
    height: 18px;
    margin: 0;
    min-height: 0;
    padding: 0;
    width: 18px;
}

.vacation-application-status {
    position: relative;
}

.vacation-application-status > label + .actions {
    margin-top: 12px;
}

.vacation-application-status .status-pill {
    background: #eef1f3;
    color: var(--ink);
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    padding: 3px 8px;
}

.vacation-application-status .status-pill.success {
    background: #e1f5e8;
    color: #16743a;
}

.vacation-application-progress i {
    background: #e2e6ea;
    display: block;
    height: 7px;
    margin-top: 5px;
    overflow: hidden;
}

.vacation-application-progress b {
    background: var(--red);
    display: block;
    height: 100%;
}

.required-summary-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 820px) minmax(260px, 340px);
}

.required-summary-layout .form-panel {
    max-width: none;
}

.required-summary-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    padding: 18px;
    position: sticky;
    top: 112px;
}

.required-summary-head {
    display: grid;
    gap: 4px;
}

.required-summary-head h2,
.required-summary-head p {
    margin: 0;
}

.required-summary-head h2 {
    font-size: 20px;
}

.required-summary-head p {
    color: var(--muted);
}

.required-summary-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.required-summary-list button {
    background: #fff7f7;
    border: 1px solid #f2b7b7;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.required-summary-list button:hover,
.required-summary-list button:focus {
    border-color: var(--red);
    outline: none;
}

.required-summary-complete {
    background: #effaf3;
    border: 1px solid #abd9bc;
    border-radius: 6px;
    color: #176b37;
    font-weight: 800;
    padding: 10px 12px;
}

.required-field-focus {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.16) !important;
}

.roles-create-panel {
    margin-bottom: 18px;
}

.roles-create-form {
    align-items: end;
    grid-template-columns: minmax(220px, 320px) minmax(260px, 420px) auto;
}

.roles-create-form .form-grid.two {
    display: contents;
}

label {
    display: grid;
    font-weight: 700;
    gap: 6px;
}

.field-label-title {
    align-items: baseline;
    display: inline-flex;
    gap: 0;
}

.required-marker,
.required-star {
    color: var(--red);
    display: inline;
    font-weight: 800;
    margin-left: 4px;
}

label small {
    color: var(--muted);
    font-weight: 400;
}

[data-supervisor-picker] {
    display: block;
}

.checkbox-field {
    align-items: center;
    display: flex;
    gap: 8px;
}

.checkbox-field input {
    min-height: 0;
    width: auto;
}

.checkbox-field.inline {
    justify-content: center;
}

.checkbox-field.compact-check {
    justify-content: center;
    margin: 0;
}

.checkbox-field.compact-check span {
    font-size: 13px;
}

.reminder-option {
    align-items: flex-start;
}

.reminder-option span {
    display: grid;
    gap: 2px;
}

input,
select,
textarea {
    border: 1px solid #aaa;
    border-radius: 3px;
    font: inherit;
    min-height: 40px;
    padding: 8px 10px;
    width: 100%;
}

.button,
button {
    background: var(--red);
    border: 1px solid var(--red);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    text-decoration: none;
}

.button.secondary,
button.secondary {
    background: #fff;
    border-color: #999;
    color: var(--ink);
}

.button.danger,
button.danger {
    background: #151515;
    border-color: #151515;
    color: #fff;
}

.button:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.button.compact {
    min-height: 34px;
    padding: 6px 10px;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.mfa-resend-actions {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.list-column-controls {
    display: inline-block;
    margin: 0;
    position: relative;
    vertical-align: middle;
    z-index: 1000;
}

.panel.has-list-column-controls {
    position: relative;
}

.panel .list-column-panel-control {
    position: absolute;
    right: 12px;
    top: 12px;
}

.list-column-menu {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(22, 23, 26, .14);
    display: grid;
    gap: 8px;
    max-height: 340px;
    min-width: 240px;
    overflow-y: auto;
    padding: 14px;
    position: fixed;
    z-index: 2000;
}

.list-column-menu[hidden] {
    display: none;
}

.button.secondary.list-column-toggle {
    align-items: center;
    background: transparent;
    border-color: transparent;
    color: #475569;
    height: 22px;
    min-height: 22px;
    padding: 4px;
    width: 22px;
}

.button.secondary.list-column-toggle:hover,
.button.secondary.list-column-toggle:focus-visible {
    background: #eef1f4;
    border-color: #c9d1db;
    color: var(--ink);
}

.list-column-icon {
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr;
    height: 14px;
    width: 14px;
}

.list-column-icon span {
    background: currentColor;
    border-radius: 1px;
    display: block;
    height: 2px;
    position: relative;
    width: 14px;
}

.list-column-icon span::after {
    background: #fff;
    border: 2px solid currentColor;
    border-radius: 50%;
    content: '';
    height: 4px;
    position: absolute;
    top: -3px;
    width: 4px;
}

.list-column-icon span:nth-child(1)::after {
    left: 2px;
}

.list-column-icon span:nth-child(2)::after {
    left: 8px;
}

.list-column-icon span:nth-child(3)::after {
    left: 5px;
}

.list-column-menu > strong {
    font-size: 14px;
    margin-bottom: 2px;
}

.list-column-option {
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    margin: 0;
}

.list-column-option input {
    flex: 0 0 auto;
}

.list-column-reset {
    margin-top: 4px;
    width: 100%;
}

.mfa-success {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 200px;
    padding: 18px 0 8px;
    text-align: center;
}

.mfa-success-icon {
    align-items: center;
    animation: mfa-success-pop 420ms ease-out both;
    background: #178748;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 28px;
    font-weight: 800;
    height: 58px;
    justify-content: center;
    line-height: 1;
    width: 58px;
}

.mfa-success h2 {
    margin: 14px 0 0;
}

.mfa-success p {
    color: var(--muted);
    margin: 5px 0 18px;
}

.mfa-success .button {
    margin-top: 16px;
}

.mfa-success-progress {
    background: #e5e7e9;
    border-radius: 999px;
    height: 4px;
    overflow: hidden;
    position: relative;
    width: min(220px, 100%);
}

.mfa-success-progress::after {
    animation: mfa-success-progress 1050ms linear forwards;
    background: #178748;
    content: '';
    inset: 0 auto 0 0;
    position: absolute;
    width: 0;
}

@keyframes mfa-success-pop {
    0% { opacity: 0; transform: scale(.72); }
    68% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes mfa-success-progress {
    to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .mfa-success-icon,
    .mfa-success-progress::after {
        animation: none;
    }

    .mfa-success-progress::after {
        width: 100%;
    }
}

.list-filters {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
    margin-bottom: 16px;
}

.list-filters[data-filter-preference="admin-users"] {
    grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(140px, 1fr));
}

.list-filters[data-filter-preference="admin-users"] .multi-select-filter-wrap {
    max-width: none;
    min-width: 0;
}

.list-filters[data-filter-preference="admin-users"] .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

main.page[aria-busy="true"] .list-filters,
main.page[aria-busy="true"] .table-scroll,
main.page[aria-busy="true"] .pagination {
    opacity: 0.55;
    pointer-events: none;
}

.filter-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.duplicate-confirmation {
    background: #fff8e8;
    border: 1px solid #d99a2b;
    border-left: 4px solid #d99a2b;
    display: grid;
    gap: 10px;
    margin: 4px 0;
    padding: 14px 16px;
    flex-basis: 100%;
    width: 100%;
}

.duplicate-confirmation h2,
.duplicate-confirmation p {
    margin: 0;
}

.duplicate-confirmation h2 {
    font-size: 18px;
}

.duplicate-confirmation ul {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.duplicate-confirmation li {
    background: #fff;
    border: 1px solid #ead5ab;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
}

.duplicate-confirmation li span,
.duplicate-confirmation li small {
    color: var(--muted);
}

.duplicate-confirmation li a {
    font-size: 13px;
    font-weight: 700;
    margin-top: 3px;
}

.permission-filter {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 320px) auto;
    margin-bottom: 16px;
}

.import-corrections-panel {
    margin-top: 16px;
}

.import-correction-row {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0;
    padding: 20px 0;
}

.import-correction-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.import-correction-row legend {
    font-size: 16px;
    font-weight: 800;
    padding: 0;
}

.import-correction-errors {
    color: var(--red);
    font-weight: 700;
    margin: 8px 0 16px;
}

.bulk-edit-panel {
    max-width: 980px;
}

.bulk-edit-summary {
    margin-bottom: 20px;
}

.bulk-edit-confirmation {
    align-items: center;
    margin-top: 20px;
}

.bulk-edit-select-column {
    text-align: center;
    width: 48px;
}

.ticket-detail {
    padding: 0;
}

.ticket-details-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.ticket-details-left {
    grid-column: 1;
    min-width: 0;
}

.ticket-details-right {
    grid-column: 2;
    min-width: 0;
}

.ticket-details-workflow {
    display: grid;
    gap: 20px;
    grid-row: 1 / span 2;
}

.ticket-details-activity {
    grid-row: 2;
}

.ticket-edit-panel {
    max-width: none;
}

.ticket-stat-metrics {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.ticket-stat-metrics > div {
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    gap: 4px;
    min-height: 94px;
    padding: 16px;
}

.ticket-stat-metrics strong {
    font-size: 24px;
}

.ticket-stat-metrics span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.ticket-stat-metrics .is-open {
    background: #fff8e8;
}

.ticket-stat-metrics .is-overdue,
.ticket-stat-metrics .is-escalated {
    background: #fff0f1;
}

.ticket-stat-metrics .is-overdue strong,
.ticket-stat-metrics .is-escalated strong {
    color: #a2000b;
}

.ticket-stat-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 20px;
}

.ticket-stat-panel {
    min-width: 0;
}

.ticket-stat-bars {
    display: grid;
    gap: 14px;
}

.ticket-stat-bar {
    display: grid;
    gap: 7px;
}

.ticket-stat-bar > div {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.ticket-stat-bar strong {
    overflow-wrap: anywhere;
}

.ticket-stat-bar span {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
}

.ticket-stat-bar i {
    background: #eef0f2;
    display: block;
    height: 10px;
    overflow: hidden;
}

.ticket-stat-bar b {
    background: #5f7f9f;
    display: block;
    height: 100%;
    max-width: 100%;
    min-width: 2px;
    width: var(--ticket-stat-width);
}

.ticket-stat-bar b.is-escalated { background: var(--red); }
.ticket-stat-bar b.is-completed { background: var(--ok); }
.ticket-stat-bar b.is-department { background: #2b7bbb; }
.ticket-stat-bar b.is-category { background: #197d75; }
.ticket-stat-bar b.is-assignee { background: #17683a; }

.ticket-stat-critical {
    margin-bottom: 20px;
}

.ticket-department-role-fieldset {
    border: 1px solid var(--line);
    margin: 0;
    padding: 16px;
}

.ticket-department-role-fieldset legend {
    font-weight: 800;
    padding: 0 6px;
}

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.ticket-list-subject,
.ticket-list-creator {
    display: block;
}

.ticket-list-subject {
    line-height: 1.35;
}

.ticket-list-creator {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
}

.ticket-detail-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin: 0;
    padding: 20px 24px 16px;
}

.ticket-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ticket-tag {
    background: #eef0f2;
    border: 1px solid #d7dadd;
    border-radius: 4px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    padding: 5px 8px;
    white-space: nowrap;
}

.ticket-priority-high,
.ticket-priority-critical,
.ticket-status-new,
.ticket-status-in_progress,
.ticket-status-customer_question,
.ticket-status-waiting_for_customer,
.ticket-status-waiting_for_supplier,
.ticket-status-waiting_for_approval {
    background: #fff1d8;
    border-color: #e8c980;
    color: #7d4800;
}

.ticket-priority-low {
    background: #e5f6ec;
    border-color: #a7d9ba;
    color: var(--ok);
}

.ticket-priority-normal {
    background: #eef0f2;
    border-color: #d7dadd;
    color: var(--ink);
}

.ticket-priority-critical {
    background: #fff0f1;
    border-color: #efb4b8;
    color: #a2000b;
}

.ticket-follow-up {
    background: #eaf2fb;
    border-color: #b9d4ed;
    color: #16558c;
}

.ticket-follow-up-due {
    background: #dfefff;
    border-color: #8bbce5;
    color: #0d4f87;
}

.ticket-list-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ticket-follow-up-current {
    background: #f7f8f9;
    border-left: 3px solid #2b7bbb;
    display: grid;
    gap: 4px;
    margin: 0 0 16px;
    padding: 12px 14px;
}

.ticket-follow-up-current span {
    color: var(--muted);
    font-size: 14px;
}

.ticket-unassigned {
    background: #fff0f1;
    border-color: #efb4b8;
    color: #a2000b;
}

.ticket-status-escalated {
    background: #fff0f1;
    border-color: #efb4b8;
    color: #a2000b;
}

.ticket-status-resolved,
.ticket-status-closed {
    background: #e5f6ec;
    border-color: #a7d9ba;
    color: var(--ok);
}

.ticket-facts {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 0;
}

.ticket-facts > div {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    min-width: 0;
    padding: 16px 24px;
}

.ticket-facts > div:last-child {
    border-right: 0;
}

.ticket-facts dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ticket-facts dd {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.ticket-copy {
    background: #fafafa;
    border-left: 3px solid var(--red);
    margin: 20px 24px 24px;
    padding: 16px 18px;
}

.ticket-copy h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.ticket-copy p,
.ticket-comment p {
    line-height: 1.55;
    margin: 0;
}

.ticket-comments,
.ticket-events {
    display: grid;
    gap: 12px;
}

.ticket-activity-head {
    align-items: center;
}

.ticket-tabs {
    align-items: center;
    display: flex;
    gap: 4px;
}

.ticket-tab {
    background: #eef0f2;
    border: 1px solid #d7dadd;
    border-radius: 4px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    padding: 7px 10px;
}

.ticket-tab:hover,
.ticket-tab:focus-visible {
    background: #e2e5e8;
}

.ticket-tab.is-active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.ticket-activity-events {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 16px;
}

.ticket-activity-events h3 {
    font-size: 16px;
    margin: 0 0 12px;
}

.ticket-comment,
.ticket-events > div {
    border-left: 3px solid var(--red);
    padding: 12px 16px;
    background: #f7f7f7;
}

.ticket-comment header,
.ticket-events span {
    color: var(--muted);
    display: flex;
    font-size: 14px;
    gap: 10px;
    margin-bottom: 8px;
}

.ticket-events strong,
.ticket-events span {
    display: block;
}

.kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, 300px);
    justify-content: start;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    display: grid;
    gap: 14px;
    padding: 16px;
    text-decoration: none;
}

.kpi-card.inactive {
    opacity: .68;
}

.kpi-card > strong {
    font-size: 17px;
}

.my-data-kpis {
    margin-bottom: 18px;
}

.my-data-section {
    margin-top: 18px;
}

.kpi-values {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-values span {
    background: #f8f8f8;
    border: 1px solid var(--line);
    border-radius: 4px;
    display: grid;
    font-size: 24px;
    font-weight: 800;
    gap: 2px;
    padding: 10px;
}

.kpi-values small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.kpi-values .overdue {
    background: #fff4f4;
    border-color: #f2b7b7;
    color: #a60011;
}

.module-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, 300px);
    justify-content: start;
    margin-top: 18px;
}

.module-button {
    align-items: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    display: grid;
    gap: 6px;
    height: 112px;
    padding: 16px;
    text-align: left;
    text-decoration: none;
}

.module-button strong {
    font-size: 17px;
}

.module-button span {
    color: var(--muted);
}

@media (max-width: 640px) {
    .kpi-grid,
    .module-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .module-button {
        height: auto;
        min-height: 112px;
    }
}

.export-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.export-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.export-card-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.export-card-head h3 {
    margin: 0;
}

.export-fields {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.import-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.import-steps span {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    padding: 7px 12px;
}

.import-steps span.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.table-scroll .mapping-table {
    min-width: 760px;
}

.table-scroll .import-preview-table {
    min-width: 820px;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.table-scroll table {
    min-width: 720px;
}

.table-scroll .vehicles-table {
    min-width: 1280px;
}

.table-scroll .measuring-equipment-table {
    min-width: 1180px;
}

.table-scroll .workshop-tools-table {
    min-width: 1120px;
}

.table-scroll .ladders-table {
    min-width: 1160px;
}

.table-scroll .it-devices-table {
    min-width: 1240px;
}

.table-scroll .permissions-table {
    min-width: 760px;
}

.table-scroll .roles-table {
    min-width: 860px;
}

.table-scroll .my-data-table {
    min-width: 1080px;
}

.table-scroll .global-search-table {
    min-width: 860px;
}

.training-matrix-head {
    align-items: center;
}

.year-navigation {
    align-items: center;
    display: flex;
    gap: 8px;
}

.year-navigation strong {
    font-size: 18px;
    min-width: 52px;
    text-align: center;
}

.training-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 14px;
}

.training-matrix-filter-bar {
    align-items: end;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.multi-select-filter-wrap {
    display: grid;
    gap: 5px;
    max-width: 360px;
    min-width: 260px;
    position: relative;
    z-index: 5;
}

.multi-select-filter-label {
    font-weight: 700;
}

.multi-select-filter {
    position: relative;
}

.multi-select-filter summary {
    align-items: center;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    justify-content: space-between;
    min-height: 40px;
    padding: 8px 10px;
    list-style: none;
}

.multi-select-filter summary::-webkit-details-marker {
    display: none;
}

.multi-select-filter summary::after {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    content: '';
    height: 7px;
    margin: -4px 3px 0 10px;
    transform: rotate(45deg);
    transition: transform .15s ease, margin .15s ease;
    width: 7px;
}

.multi-select-filter[open] summary {
    border-color: var(--red);
}

.multi-select-filter[open] summary::after {
    margin-top: 4px;
    transform: rotate(225deg);
}

.multi-select-filter-options {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    display: grid;
    gap: 0;
    left: 0;
    max-height: 290px;
    overflow-y: auto;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
}

.multi-select-filter-options .checkbox-field {
    border-radius: 3px;
    cursor: pointer;
    padding: 8px;
}

.multi-select-filter-options .checkbox-field:hover {
    background: #f5f5f5;
}

.multi-select-filter-options .multi-select-filter-all {
    border-bottom: 1px solid var(--line);
    font-weight: 800;
    margin-bottom: 4px;
}

.training-matrix-marker {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    gap: 7px;
}

.training-matrix-marker::before {
    background: #e8f5ed;
    border: 1px solid #8ec9a1;
    border-radius: 50%;
    content: '';
    height: 10px;
    width: 10px;
}

.training-matrix-marker.overdue::before {
    background: #fff0f0;
    border-color: #e36464;
}

.training-matrix-marker.scheduled::before {
    background: #e7f2f8;
    border-color: #5797bb;
}

.training-matrix-marker.soon::before {
    background: #fff6e5;
    border-color: #d99a2b;
}

.table-scroll .training-matrix-table {
    min-width: 1280px;
}

.training-matrix-table th:nth-child(n + 4),
.training-matrix-cell {
    min-width: 80px;
    text-align: center;
}

.training-matrix-table td:nth-child(1) {
    min-width: 190px;
}

.training-matrix-table td:nth-child(2) {
    min-width: 130px;
}

.training-matrix-table td:nth-child(3) {
    min-width: 220px;
}

.training-matrix-table td:nth-child(3) small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 3px;
}

.training-matrix-entry {
    background: #e8f5ed;
    border: 1px solid #8ec9a1;
    border-radius: 4px;
    color: #176b37;
    display: block;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 4px;
    text-decoration: none;
    white-space: nowrap;
}

.training-matrix-entry:hover {
    background: #d7efdf;
}

.training-matrix-entry.overdue {
    background: #fff0f0;
    border-color: #e36464;
    color: #b42318;
}

.training-matrix-entry.overdue:hover {
    background: #ffe2e2;
}

.training-matrix-entry.scheduled {
    background: #e7f2f8;
    border-color: #5797bb;
    color: #185a7a;
}

.training-matrix-entry.scheduled:hover {
    background: #d5eaf5;
}

.training-matrix-entry.soon {
    background: #fff6e5;
    border-color: #d99a2b;
    color: #875100;
}

.training-matrix-entry.soon:hover {
    background: #ffedc5;
}

.skill-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 14px;
}

.skill-matrix-marker {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    gap: 7px;
}

.skill-matrix-marker::before,
.skill-matrix-dot {
    background: #e8f5ed;
    border: 1px solid #8ec9a1;
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 11px;
    width: 11px;
}

.skill-matrix-marker.expiring::before,
.skill-matrix-dot.expiring {
    background: #fff6e5;
    border-color: #d99a2b;
}

.skill-matrix-marker.invalid::before,
.skill-matrix-dot.invalid {
    background: #fff0f0;
    border-color: #e36464;
}

.table-scroll .skill-matrix-table {
    min-width: 720px;
}

.skill-matrix-table th:nth-child(n + 3),
.skill-matrix-cell {
    min-width: 44px;
    text-align: center;
}

.skill-matrix-object-header {
    min-height: 96px;
    padding: 10px 8px;
    vertical-align: top;
}

.skill-matrix-object-header span {
    display: inline-block;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    writing-mode: vertical-rl;
}

.skill-matrix-description-row th {
    min-width: 210px;
    padding: 12px;
    text-align: left;
    vertical-align: top;
    white-space: normal;
}

.skill-matrix-description-row th:first-child {
    background: #f2f2f3;
    min-width: 320px;
}

.skill-matrix-description-row ul {
    display: grid;
    font-size: 13px;
    font-weight: 400;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
}

.skill-matrix-table td:nth-child(1) {
    min-width: 190px;
}

.skill-matrix-table td:nth-child(2) {
    min-width: 130px;
}

.skill-matrix-cell {
    vertical-align: middle;
}

.skill-matrix-dot {
    box-shadow: 0 0 0 4px transparent;
    transition: box-shadow .15s ease, transform .15s ease;
}

.skill-matrix-dot:hover,
.skill-matrix-dot:focus-visible {
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .16);
    outline: 0;
    transform: scale(1.16);
}

.daily-report-panel {
    overflow: hidden;
}

.daily-report-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: flex-end;
}

.daily-report-legend span,
.attendance-color-value {
    align-items: center;
    display: inline-flex;
    font-size: 13px;
    gap: 6px;
    white-space: nowrap;
}

.daily-report-legend i,
.attendance-color-value i {
    background: var(--status-color);
    border-radius: 50%;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.daily-report-legend .holiday-indicator {
    --status-color: #b45309;
}

.daily-report-legend .vacation-indicator {
    --status-color: #6b8ac9;
}

.daily-report-grid-wrap {
    margin-inline: -22px;
}

.daily-report-grid {
    min-width: max-content;
}

.weekend-service-grid {
    min-width: 620px;
    width: 100%;
}

.weekend-service-grid thead th:not(.daily-report-employee-header) {
    width: 150px;
}

.weekend-service-mail-preview {
    max-width: 900px;
}

.weekend-service-mail-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.weekend-service-mail-meta div {
    border-left: 3px solid var(--red);
    padding-left: 12px;
}

.weekend-service-mail-meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 3px;
}

.weekend-service-mail-meta dd {
    font-weight: 700;
    margin: 0;
}

.weekend-service-mail-body {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    line-height: 1.55;
    margin: 0;
    overflow-wrap: anywhere;
    padding: 18px;
    white-space: pre-wrap;
}

@media (max-width: 640px) {
    .weekend-service-mail-meta {
        grid-template-columns: 1fr;
    }
}

.daily-report-grid th,
.daily-report-grid td {
    padding: 6px;
    text-align: center;
    vertical-align: middle;
}

.daily-report-grid thead th {
    min-width: 48px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.daily-report-grid thead th strong,
.daily-report-grid thead th small {
    display: block;
}

.daily-report-grid thead th small,
.daily-report-employee small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.daily-report-employee-header,
.daily-report-employee {
    background: #fff !important;
    left: 0;
    min-width: 220px;
    position: sticky;
    text-align: left !important;
    z-index: 3;
}

.daily-report-grid thead .daily-report-employee-header {
    z-index: 10;
}

.daily-report-grid thead .daily-report-employee-header:has(.daily-report-sort[open]) {
    z-index: 20;
}

.daily-report-employee {
    font-weight: 600;
}

.daily-report-sort {
    position: relative;
}

.daily-report-sort summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    list-style: none;
}

.daily-report-sort summary::-webkit-details-marker {
    display: none;
}

.daily-report-sort summary::after {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    content: '';
    height: 6px;
    margin: -3px 3px 0 6px;
    transform: rotate(45deg);
    width: 6px;
}

.daily-report-sort[open] summary::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.daily-report-sort-options {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .15);
    display: grid;
    left: -8px;
    min-width: 190px;
    padding: 5px;
    position: absolute;
    top: calc(100% + 8px);
    z-index: 30;
}

.daily-report-sort-options a {
    color: var(--text);
    padding: 8px 10px;
    text-decoration: none;
}

.daily-report-sort-options a:hover,
.daily-report-sort-options a:focus-visible {
    background: #fff0f1;
    color: var(--red);
    outline: none;
}

.daily-report-employee small {
    display: block;
}

.daily-report-employee-name {
    align-items: center;
    display: flex;
    gap: 6px;
}

.daily-report-profile-trigger {
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.25;
    min-height: 0;
    padding: 0;
    text-align: left;
}

.daily-report-profile-trigger:hover,
.daily-report-profile-trigger:focus-visible {
    color: var(--red);
    text-decoration: underline;
}

.daily-report-phone-link,
.daily-report-email-link {
    align-items: center;
    color: var(--red);
    display: inline-flex;
    justify-content: center;
    min-height: 18px;
    min-width: 18px;
    text-decoration: none;
}

.daily-report-phone-link svg,
.daily-report-email-link svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 16px;
}

.daily-report-phone-link:hover,
.daily-report-phone-link:focus-visible,
.daily-report-email-link:hover,
.daily-report-email-link:focus-visible {
    color: #a9000b;
    text-decoration: underline;
}

.daily-report-grid .weekend {
    background: #f4f6f8;
}

.daily-report-grid td.today {
    background: #fff3f4;
    border-left: 2px solid #e30613;
    border-right: 2px solid #e30613;
}

.daily-report-grid thead th.today {
    background: #e30613;
    border-color: #e30613;
    color: #fff;
}

.daily-report-grid thead th.today small {
    color: rgba(255, 255, 255, .88);
}

.daily-report-grid td.today .daily-report-chip:not(.is-set) {
    background: #fff;
    border-color: #f1b9bf;
}

.daily-report-grid td.holiday {
    background: #fff8eb;
}

.daily-report-grid td.vacation:not(.holiday) {
    background: #eaf2ff;
}


.daily-report-chip.is-holiday {
    background: #b45309;
    border-color: #b45309;
    color: #fff;
}

.daily-report-chip {
    align-items: center;
    background: #f4f6f8;
    border: 1px solid #d9dee7;
    border-radius: 6px;
    color: #4d5968;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    min-width: 34px;
    padding: 0 5px;
}

button.daily-report-chip {
    cursor: pointer;
}

button.daily-report-chip:hover,
button.daily-report-chip:focus-visible {
    border-color: #e30613;
    outline: 2px solid rgba(227, 6, 19, .16);
    outline-offset: 1px;
}

.daily-report-chip.is-range-selecting {
    box-shadow: 0 0 0 2px #e30613, 0 0 0 4px rgba(227, 6, 19, .14);
    position: relative;
    z-index: 1;
}

.daily-report-chip.is-set,
.attendance-code {
    background: var(--status-color);
    border-color: var(--status-color);
    color: #fff;
}

.daily-report-chip.has-comment {
    overflow: hidden;
    position: relative;
}

.daily-report-chip.has-comment::after {
    border-bottom: 11px solid #e30613;
    border-left: 11px solid transparent;
    bottom: 0;
    content: '';
    height: 0;
    position: absolute;
    right: 0;
    width: 0;
}

.attendance-code {
    border-radius: 5px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    min-width: 34px;
    padding: 4px 7px;
}

.daily-report-dialog {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 56px rgba(17, 24, 39, .24);
    max-width: 540px;
    padding: 0;
    width: calc(100% - 32px);
}

.daily-report-dialog::backdrop {
    background: rgba(17, 24, 39, .45);
}

.daily-report-dialog form {
    padding: 24px;
}

.daily-report-profile-dialog {
    max-width: 680px;
}

.daily-report-profile-content {
    padding: 24px;
}

.daily-report-profile-details {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 22px 0;
}

.daily-report-profile-details div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 3px;
    padding-bottom: 10px;
}

.daily-report-profile-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.daily-report-profile-details dd {
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}

.daily-report-profile-vehicles {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.daily-report-profile-vehicles h3 {
    font-size: 17px;
    margin: 0 0 12px;
}

.daily-report-profile-vehicle {
    border: 1px solid var(--line);
    border-radius: 5px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 14px;
}

.daily-report-profile-vehicle + .daily-report-profile-vehicle {
    margin-top: 10px;
}

.daily-report-profile-vehicle span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 3px;
}

.daily-report-profile-vehicle strong {
    overflow-wrap: anywhere;
}

.daily-report-profile-empty {
    color: var(--muted);
    margin: 0;
}

@media (max-width: 620px) {
    .daily-report-profile-details,
    .daily-report-profile-vehicle {
        grid-template-columns: 1fr;
    }
}

.dialog-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.dialog-head h2,
.dialog-head p {
    margin: 0;
}

.dialog-head p {
    color: var(--muted);
    margin-top: 5px;
}

.icon-button {
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    font-size: 28px;
    height: 34px;
    line-height: 1;
    padding: 0;
    width: 34px;
}

.daily-report-status-select {
    align-items: center;
    display: flex;
    position: relative;
}

.daily-report-status-select i {
    background: var(--status-color);
    border-radius: 50%;
    height: 12px;
    left: 14px;
    pointer-events: none;
    position: absolute;
    width: 12px;
}

.daily-report-status-select select {
    padding-left: 38px;
    width: 100%;
}

.holiday-groups {
    display: grid;
    gap: 8px;
}

.holiday-state-group {
    border: 1px solid var(--line);
    border-radius: 6px;
}

.holiday-state-group summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    justify-content: space-between;
    padding: 13px 15px;
}

.holiday-state-group summary small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.holiday-state-group[open] summary {
    border-bottom: 1px solid var(--line);
}

.holiday-state-group .table-scroll {
    margin: 0;
}

.global-search-panel {
    max-width: 920px;
}

.global-search-groups {
    display: grid;
    gap: 24px;
}

.search-group {
    display: grid;
    gap: 12px;
}

.search-group-head {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.search-group-head h3 {
    margin: 0;
}

.search-group-head span,
.table-subline {
    color: var(--muted);
}

.table-subline {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-top: 3px;
}

.roles-table th,
.roles-table td {
    vertical-align: middle;
}

.roles-table input[type="text"] {
    max-width: 520px;
}

.roles-table .checkbox-field.compact-check {
    justify-content: flex-start;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8f8f8;
}

.sort-link {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.sort-link:hover {
    color: var(--red);
    text-decoration: underline;
}

.empty-state {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pagination span {
    color: var(--muted);
    font-weight: 700;
}

.disabled-link {
    opacity: .45;
    pointer-events: none;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.meta-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-grid div {
    display: grid;
    gap: 3px;
}

.meta-grid span {
    color: var(--muted);
}

.password-requirements {
    border-left: 3px solid var(--red);
    margin: 0 0 20px;
    padding: 4px 0 4px 14px;
}

.password-requirements strong {
    display: block;
    margin-bottom: 4px;
}

.password-requirements ul {
    color: var(--muted);
    margin: 0;
    padding-left: 20px;
}

.vehicle-summary {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.vehicle-summary div {
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    gap: 5px;
    min-height: 82px;
    padding: 16px;
}

.vehicle-summary span {
    color: var(--muted);
    font-weight: 700;
}

.vehicle-summary strong {
    font-size: 18px;
}

.summary-status.ok {
    color: var(--ok);
}

.summary-status.warning {
    color: var(--warn);
}

.summary-status.overdue {
    color: #b42318;
}

.summary-status.planned {
    color: #185a7a;
}

.deadline-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deadline-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.deadline-card.overdue {
    background: #fff4f4;
    border-color: #e30613;
}

.deadline-card.critical {
    background: #fff8e8;
    border-color: #d58a00;
}

.deadline-head,
.deadline-meta {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.deadline-head span,
.deadline-meta span {
    color: var(--muted);
    font-weight: 700;
}

.deadline-card.overdue .deadline-head strong,
.deadline-card.overdue .deadline-meta {
    color: #a60011;
}

.deadline-meter {
    background: #ededed;
    border: 1px solid var(--line);
    border-radius: 999px;
    height: 16px;
    overflow: hidden;
}

.deadline-meter span {
    background: var(--ok);
    display: block;
    height: 100%;
}

.deadline-card.warning .deadline-meter span,
.deadline-card.critical .deadline-meter span {
    background: var(--warn);
}

.deadline-card.overdue .deadline-meter span {
    background: var(--red);
}

.date-overdue {
    color: #a60011;
    font-weight: 800;
}

.detail-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-grid div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
}

.detail-grid span {
    color: var(--muted);
}

.detail-layout {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.detail-photo {
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    max-height: 360px;
    object-fit: contain;
    width: 100%;
}

.photo-placeholder {
    align-items: center;
    background: #f8f8f8;
    border: 1px dashed #aaa;
    border-radius: 6px;
    color: var(--muted);
    display: flex;
    font-weight: 700;
    justify-content: center;
    min-height: 220px;
}

.photo-preview {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    gap: 12px;
    padding: 10px;
}

.photo-preview img {
    border: 1px solid var(--line);
    border-radius: 4px;
    height: 76px;
    object-fit: cover;
    width: 96px;
}

.photo-preview span {
    color: var(--muted);
    font-weight: 700;
}

.inspection-checklist {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    padding-top: 18px;
}

.inspection-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.ladder-inspection-email-option {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    max-width: 100%;
    padding: 12px 14px;
    width: fit-content;
}

.signature-field {
    display: grid;
    gap: 10px;
}

.signature-field canvas {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: crosshair;
    max-width: 100%;
    touch-action: none;
}

.qr-panel {
    max-width: 720px;
}

.qr-content {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: 180px minmax(0, 1fr);
}

.qr-image {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: block;
    height: 180px;
    padding: 10px;
    width: 180px;
}

.qr-meta {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pre-line {
    white-space: pre-line;
}

.announcement-banner {
    background: #fff1f2;
    border-bottom: 1px solid #e30613;
    color: #651017;
}

.announcement-banner-inner {
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    max-width: none;
    padding: 10px 32px;
    text-align: left;
    white-space: pre-wrap;
}

.document-upload {
    align-items: end;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(280px, 1fr) auto;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.documents-table {
    min-width: 760px;
}

.empty-copy {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 0;
}

.status {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
}

.status.submitted,
.status.approved {
    background: #e5f6ec;
    color: var(--ok);
}

.status.open,
.status.reset,
.status.pending,
.status.partial {
    background: #fff1d8;
    color: var(--warn);
}

.status.rejected {
    background: #fff0f1;
    color: #a60011;
}

.status.changed {
    background: #e9f1ff;
    color: #245ea8;
}

.alert {
    background: #fff4f4;
    border: 1px solid #f2b7b7;
    border-radius: 4px;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.toast {
    animation: toast-in 180ms ease-out;
    align-items: start;
    background: #fff4f4;
    border: 1px solid #f2b7b7;
    border-radius: 8px;
    bottom: 24px;
    box-shadow: var(--shadow);
    display: flex;
    font-weight: 800;
    gap: 12px;
    justify-content: space-between;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    position: fixed;
    right: 24px;
    z-index: 50;
}

.toast.is-hiding {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 0;
    padding: 0;
    width: auto;
}

.success {
    background: #effaf3;
    border-color: #abd9bc;
}

.toast.warning {
    background: #fff8e8;
    border-color: #d99a2b;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.split-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.split-layout > * {
    min-width: 0;
}

.help-page {
    display: grid;
    gap: 18px;
}

.help-intro {
    display: grid;
    gap: 18px;
}

.help-intro h2,
.help-copy h2 {
    margin: 0 0 8px;
}

.help-intro p,
.help-copy p {
    color: var(--muted);
    margin: 0;
}

.help-intro-copy {
    max-width: 820px;
}

.help-search {
    display: grid;
    gap: 7px;
    max-width: 620px;
}

.help-search label {
    font-weight: 800;
}

.help-search p {
    font-size: 14px;
}

.help-toc {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.help-toc a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
    font-weight: 800;
    padding: 9px 10px;
    text-decoration: none;
}

.help-toc a:hover,
.help-toc a:focus-visible {
    border-color: var(--red);
    color: var(--red);
}

.help-empty {
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-weight: 800;
    margin: 0;
    padding: 18px;
}

.help-section {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    scroll-margin-top: 24px;
}

.help-copy {
    display: grid;
    gap: 10px;
}

.help-copy ul {
    color: var(--ink);
    display: grid;
    gap: 8px;
    margin: 4px 0 0;
    padding-left: 20px;
}

.help-shot {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 0;
    overflow: hidden;
}

.help-shot img {
    background: #f7f7f7;
    display: block;
    width: 100%;
}

.help-shot figcaption {
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    padding: 10px 12px;
}

.help-note {
    align-self: stretch;
    background: #f8f8f8;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 6px;
    padding: 16px;
}

.help-note span {
    color: var(--muted);
}

.app-footer {
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    flex-shrink: 0;
    gap: 24px;
    justify-content: space-between;
    margin-top: auto;
    min-height: 64px;
    padding: 0 28px;
    width: 100%;
}

.assignment-matching-panel textarea {
    min-height: 190px;
    resize: vertical;
}

.assignment-matching-panel .form-hint {
    margin: 4px 0 0;
}

.assignment-process-note {
    margin-top: 20px;
}

.assignment-process-note h2 {
    font-size: 20px;
    margin: 0 0 10px;
}

.assignment-process-note ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 22px;
}

.assignment-process-note li::marker {
    color: var(--red);
    font-weight: 700;
}

.assignment-loading {
    align-items: center;
    background: #f8f8f8;
    border: 1px solid var(--line);
    display: flex;
    gap: 14px;
    margin-top: 4px;
    padding: 14px 16px;
}

.assignment-loading[hidden] {
    display: none;
}

.assignment-loading strong,
.assignment-loading span:not(.assignment-loading-spinner) {
    display: block;
}

.assignment-loading span:not(.assignment-loading-spinner) {
    color: var(--muted);
    font-size: 14px;
    margin-top: 2px;
}

.assignment-loading-spinner {
    animation: assignment-spinner 900ms linear infinite;
    border: 3px solid #d6d8db;
    border-radius: 50%;
    border-top-color: var(--red);
    flex: 0 0 auto;
    height: 28px;
    width: 28px;
}

@keyframes assignment-spinner {
    to {
        transform: rotate(360deg);
    }
}

.assignment-result-intro {
    margin-top: 20px;
}

.assignment-requirements {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 16px;
}

.assignment-requirements strong {
    display: block;
    margin-bottom: 4px;
}

.assignment-requirements p {
    margin: 0;
}

.assignment-requirements .muted {
    margin-top: 8px;
}

.assignment-best-match {
    align-items: center;
    border-left: 5px solid var(--red);
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.assignment-best-match h2 {
    margin: 2px 0 0;
}

.assignment-best-match p:not(.eyebrow) {
    color: var(--muted);
    margin: 3px 0 0;
}

.eyebrow {
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
}

.assignment-score {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    min-width: 130px;
}

.assignment-score strong {
    color: var(--ok);
    font-size: 32px;
    line-height: 1;
}

.assignment-score span,
.assignment-score-inline {
    font-weight: 700;
}

.assignment-score span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.assignment-score-inline {
    color: var(--ok);
    white-space: nowrap;
}

.assignment-results-table td {
    vertical-align: top;
}

.assignment-asset {
    display: block;
    margin-bottom: 6px;
}

@media (max-width: 640px) {
    .assignment-best-match {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .assignment-score {
        align-items: flex-start;
    }
}

.app-footer a {
    color: var(--muted);
}

@media (max-width: 800px) {
    .announcement-banner-inner {
        padding: 10px 16px;
    }

    .topbar {
        align-items: center;
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr auto;
        min-height: 0;
        padding: 16px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topbar-menu {
        border-top: 1px solid var(--line);
        display: none;
        gap: 14px;
        grid-column: 1 / -1;
        padding-top: 12px;
    }

    .topbar.menu-open .topbar-menu {
        display: grid;
    }

    .nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .nav a,
    .nav-placeholder {
        width: 100%;
    }

    .nav-dropdown {
        display: grid;
        gap: 8px;
        width: 100%;
    }

    .nav-dropdown-trigger {
        width: 100%;
    }

    .nav-dropdown-menu {
        border: 0;
        box-shadow: none;
        display: grid;
        gap: 8px;
        min-width: 0;
        padding: 0 0 0 14px;
        position: static;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-dropdown-menu a {
        padding: 0;
    }

    .admin-nav-menu {
        gap: 4px;
        padding-left: 14px;
    }

    .admin-nav-group {
        display: grid;
        gap: 6px;
        width: 100%;
    }

    .admin-nav-group-trigger {
        padding: 2px 0;
    }

    .admin-nav-submenu {
        border: 0;
        box-shadow: none;
        display: none;
        gap: 8px;
        min-width: 0;
        padding: 0 0 0 14px;
        position: static;
    }

    .admin-nav-group:hover > .admin-nav-submenu {
        display: none;
    }

    .admin-nav-group.is-open > .admin-nav-submenu,
    .admin-nav-group:focus-within > .admin-nav-submenu {
        display: grid;
    }

    .app-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .page,
    .login-page {
        padding: 16px;
    }

    .page-head,
    .user-menu {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-menu span {
        text-align: left;
    }

    .form-grid.two,
    .form-grid.three,
    .help-intro,
    .help-section,
    .roles-create-form,
    .required-summary-layout,
    .split-layout,
    .list-filters,
    .list-filters[data-filter-preference="admin-users"],
    .document-upload,
    .qr-content,
    .meta-grid,
    .vehicle-summary,
    .deadline-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .list-filters[data-filter-preference="admin-users"] .filter-actions {
        justify-content: stretch;
    }

    .list-filters[data-filter-preference="admin-users"] .filter-actions > * {
        flex: 1 1 0;
        text-align: center;
    }

    .ticket-details-layout {
        grid-template-columns: 1fr;
    }

    .ticket-stat-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-stat-grid {
        grid-template-columns: 1fr;
    }

    .ticket-details-left,
    .ticket-details-right {
        grid-column: 1;
        grid-row: auto;
    }

    .required-summary-panel {
        position: static;
    }

    .ticket-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-tags {
        justify-content: flex-start;
    }

    .ticket-facts {
        grid-template-columns: 1fr;
    }

    .ticket-facts > div,
    .ticket-facts > div:last-child {
        border-right: 0;
    }
}

/* Structured public vacation request, aligned with the former planning form. */
.vacation-request-page { align-items: start; padding: 28px; }
.vacation-request-alert { margin: 0 auto 18px; max-width: 1180px; width: 100%; }
.vacation-request-download { display: flex; justify-content: flex-end; margin: 0 auto 14px; max-width: 1180px; width: 100%; }
.portal-vacation-form { margin: 0 auto; max-width: 1180px; width: 100%; }
.vacation-federal-state-dialog form { display: grid; gap: 22px; }
.vacation-federal-state-dialog .dialog-head p { line-height: 1.5; }
.vacation-federal-state-field { display: grid; gap: 7px; font-weight: 800; }
.vacation-federal-state-field select { width: 100%; }
.vacation-federal-state-dialog .actions { margin-top: 0; }
.vacation-form { background: var(--paper); border: 2px solid var(--ink); padding: 22px; }
.form-head { align-items: end; display: grid; gap: 20px; grid-template-columns: 1fr auto 1fr; margin-bottom: 12px; }
.deadline-box { border: 2px solid var(--ink); display: inline-block; font-size: 18px; font-weight: 800; margin-top: 6px; padding: 8px 12px; }
.apleona-mark { color: var(--red); font-size: 30px; font-weight: 900; text-align: right; }
.form-title { font-size: 24px; font-weight: 800; text-align: center; }
.form-row { border: 2px solid var(--ink); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -2px; }
.form-cell { min-height: 70px; padding: 10px 12px; }
.form-cell + .form-cell { border-left: 2px solid var(--ink); }
.employer-section { border: 2px solid var(--ink); margin-top: -2px; padding: 10px 12px 18px; }
.inline-fields { align-items: end; display: grid; gap: 16px; grid-template-columns: 1fr 140px 1fr 140px; margin-top: 14px; }
.inline-fields.supplemental { grid-template-columns: 1fr 140px; margin-top: 10px; }
.request-body { border: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); margin-top: 16px; min-height: 420px; }
.request-left, .request-right { padding: 12px; }
.request-right { border-left: 2px solid var(--ink); }
.request-left h2, .request-right h2 { font-size: 18px; margin-top: 0; }
.vacation-row { align-items: end; display: grid; gap: 8px; grid-template-columns: 34px minmax(0, 1fr) 28px minmax(0, 1fr) 72px; margin-bottom: 8px; }
.vacation-day-count { font-size: 14px; padding-bottom: 11px; text-align: right; white-space: nowrap; }
.vacation-day-summary { align-items: center; background: #f5f5f5; border-left: 4px solid var(--red); display: flex; gap: 16px; justify-content: space-between; margin: 12px 0 16px; padding: 10px 12px; }
.vacation-day-summary .muted { margin-left: 4px; }
.vacation-day-summary.exceeded { background: #fff0f1; border-left-color: #a60011; }
.vacation-day-warning { color: #a60011; font-weight: 700; margin: -6px 0 16px; }
.vacation-signature-field { border: 2px solid var(--ink); margin-top: 18px; }
.vacation-signature-heading { align-items: baseline; background: #f8f8f8; border-bottom: 1px solid var(--ink); display: flex; gap: 10px; justify-content: space-between; padding: 9px 12px; }
.vacation-signature-heading strong { font-size: 16px; }
.vacation-signature-heading span { color: var(--muted); font-size: 13px; }
.vacation-signature-pad { background: #fff; padding: 12px 12px 8px; }
.vacation-signature-pad canvas { border: 1px dashed #667085; border-radius: 0; display: block; height: 160px; max-width: 100%; touch-action: none; width: 100%; }
.vacation-signature-line { border-top: 1px solid var(--ink); display: block; font-size: 12px; margin: 4px auto 0; padding-top: 4px; text-align: center; width: min(280px, 72%); }
.employee-status-table th, .employee-status-table td { font-size: 14px; }

/* Final layout override for the automatic planning workspace. */
.planning-auto-panel { padding: 0; }
.planning-auto-head { margin: 0; }

/* Keep every planning administration panel at the page width, after the generic form limit. */
.vacation-planning-admin-timeline + main .form-panel,
.vacation-planning-admin-timeline + main .planning-auto-panel {
    max-width: none;
}

/* Keep planning tables on the same restrained header treatment as portal lists. */
.vacation-year-table thead th,
.late-shift-matrix thead th,
.employee-status-table thead th,
.vacation-planning-admin-timeline + main table thead th {
    background: #f8f8f8;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-weight: 800;
}

@media (max-width: 760px) {
    .br-vacation-statistics { grid-template-columns: 1fr; }
    .vacation-request-page { padding: 16px; }
    .vacation-form { padding: 14px; }
    .form-head, .form-row, .request-body, .inline-fields { grid-template-columns: 1fr; }
    .form-title, .apleona-mark { text-align: left; }
    .form-cell + .form-cell, .request-right { border-left: 0; border-top: 2px solid var(--ink); }
    .vacation-row { grid-template-columns: 34px minmax(0, 1fr) 28px minmax(0, 1fr); }
    .vacation-day-count { grid-column: 2 / -1; padding-bottom: 0; text-align: left; }
    .vacation-signature-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .vacation-application-metrics { grid-template-columns: 1fr 1fr; }
    .vacation-application-metrics > div { min-height: 0; padding: 14px; }
    .vacation-application-metrics > div:nth-child(odd) { border-left: 0; }
    .vacation-application-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .vacation-application-reference-values > div { min-height: 0; padding: 12px 14px; }
    .vacation-planning-admin-nav { display: grid; grid-template-columns: 1fr 1fr; }
    .vacation-planning-settings-overview { grid-template-columns: 1fr; }
    .vacation-planning-settings-overview a:not(:nth-child(3n + 1)) { border-left: 0; }
}

/* Lagerverwaltung */
.warehouse-page > .panel + .panel,
.warehouse-page > .panel + .required-summary-layout {
    margin-top: 20px;
}
.warehouse-page .warehouse-booking-row {
    align-items: start;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    padding-bottom: 16px;
}
.warehouse-page [data-stock-hint] {
    font-size: 0.85rem;
    font-weight: 400;
}
.warehouse-page .panel p,
.warehouse-page td {
    overflow-wrap: anywhere;
}

.warehouse-material-list { margin: 18px 0; }
.warehouse-material-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.warehouse-material-row[hidden] { display: none; }
.warehouse-material-label { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.warehouse-material-label > span { font-size: 0.85rem; }
.warehouse-quantity-control { display: flex; align-items: center; flex-shrink: 0; gap: 0; }
.warehouse-quantity-control button { width: 44px; height: 44px; padding: 0; font-size: 22px; }
.warehouse-quantity-control input { width: 88px; min-width: 0; height: 44px; text-align: center; border-radius: 0; appearance: textfield; -moz-appearance: textfield; }
.warehouse-quantity-control input::-webkit-inner-spin-button,
.warehouse-quantity-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.warehouse-material-row.is-selected .warehouse-material-label strong { color: var(--red, #e60012); }
.warehouse-page [data-selection-error] { color: #b91c1c; }
@media (max-width: 540px) {
    .warehouse-material-row { align-items: flex-start; flex-direction: column; gap: 12px; }
}

.warehouse-photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.warehouse-photo-gallery figure { margin: 0; min-width: 0; }
.warehouse-photo-gallery figcaption { margin-top: 8px; overflow-wrap: anywhere; font-size: 0.85rem; }
.warehouse-page .photo-preview { min-width: 0; }
.warehouse-page .photo-preview img { flex-shrink: 0; }
.warehouse-page .photo-preview span { min-width: 0; overflow-wrap: anywhere; }

.warehouse-photo-gallery .inline-form { margin-top: 10px; }
.warehouse-page .photo-preview { flex-wrap: wrap; }

/* Material details: long names remain inside their own grid cell. */
.warehouse-page .detail-grid > div { min-width: 0; align-content: start; overflow-wrap: anywhere; }
.warehouse-page > .detail-layout + .panel { margin-top: 20px; }

/* Compact stock filters and actions share one desktop row. */
.list-filters.warehouse-stock-filters {
    grid-template-columns: minmax(160px, 1.2fr) minmax(160px, 1fr) auto auto;
    gap: 12px;
}
.warehouse-stock-filters > label { min-width: 0; }
.warehouse-stock-filters input[type="search"],
.warehouse-stock-filters select {
    min-width: 0;
    font-size: 14px;
    min-height: 40px;
    padding: 9px 10px;
}
.warehouse-stock-filters > .checkbox-field {
    justify-content: flex-start;
    align-self: end;
    min-height: 40px;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
}
.warehouse-stock-filters > .actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
}
.warehouse-stock-filters > .actions > * {
    font-size: 14px;
    padding: 9px 12px;
    min-height: 40px;
    white-space: nowrap;
}
@media (max-width: 1100px) {
    .list-filters.warehouse-stock-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .warehouse-stock-filters > .actions { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    .list-filters.warehouse-stock-filters { grid-template-columns: minmax(0, 1fr); }
    .warehouse-stock-filters > .actions > * { flex: 1 1 auto; text-align: center; }
}

.warehouse-picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 20px 0; }
.warehouse-picker > section { min-width: 0; }
.warehouse-picker-results { max-height: 640px; overflow-y: auto; }
.warehouse-picker-result { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.warehouse-picker-result .warehouse-material-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.warehouse-picker-result img { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.warehouse-picker-result.is-selected { background: #f6f6f6; }
.warehouse-picker [hidden] { display: none !important; }
.warehouse-picker-selection .warehouse-material-row { flex-wrap: wrap; gap: 12px; }
.warehouse-picker-selection .warehouse-material-label { flex-basis: 100%; overflow-wrap: anywhere; }
@media (max-width: 900px) { .warehouse-picker { grid-template-columns: minmax(0, 1fr); } .warehouse-picker-results { max-height: 400px; } }

.warehouse-booking-page .form-panel { max-width: none; }
.warehouse-booking-page .required-summary-layout { max-width: none; grid-template-columns: minmax(0, 1fr) 240px; }
@media (max-width: 1100px) { .warehouse-booking-page .required-summary-layout { grid-template-columns: minmax(0, 1fr); } }

.warehouse-page tr.inventory-shortage { background: #fff1f2; }
.warehouse-page tr.inventory-surplus { background: #edf8f1; }
.warehouse-page .inventory-shortage .inventory-delta { color: #9f1239; font-weight: 700; }
.warehouse-page .inventory-surplus .inventory-delta { color: #166534; font-weight: 700; }
.warehouse-page [data-inventory-difference][hidden],
.warehouse-page [data-no-differences][hidden] { display: none; }

.warehouse-scanner { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.warehouse-scanner summary { cursor: pointer; font-weight: 700; }
.warehouse-scanner label { margin-top: 12px; }
.warehouse-scanner video { width: 100%; max-height: 320px; margin-top: 12px; background: #111; }
.warehouse-scanner input { min-width: 0; max-width: 100%; }
.warehouse-scanner [hidden] { display: none !important; }


/* Operating instruction editor: isolate checkbox sizing from full-width fields. */
.ba-editor form { display: grid; gap: 20px; }
.ba-editor form > label { gap: 8px; }
.ba-editor textarea, .ba-editor input:not([type="checkbox"]) { box-sizing: border-box; font-weight: 400; }
.ba-editor form > p { margin: 0; }
.ba-editor form > button { justify-self: start; }
.ba-symbol-picker { border: 1px solid #d5dce5; border-radius: 10px; background: #f7f9fc; margin: 4px 0 0; padding: 18px; min-width: 0; }
.ba-symbol-picker legend { padding: 0 8px; font-size: 17px; font-weight: 700; }
.ba-symbol-picker-hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.ba-symbol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 12px; }
.ba-symbol-card { display: grid; grid-template-columns: 20px 48px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0; padding: 14px; min-height: 86px; box-sizing: border-box; border: 1px solid #d5dce5; border-radius: 8px; background: #fff; cursor: pointer; font-weight: 400; }
.ba-symbol-card:hover { border-color: #8ba4c3; background: #f1f6fc; }
.ba-symbol-card:has(input:checked) { border-color: #3266a4; background: #edf4ff; box-shadow: inset 0 0 0 1px #3266a4; }
.ba-symbol-card:has(input:focus-visible) { outline: 3px solid #3266a4; outline-offset: 2px; }
.ba-symbol-card:has(input:disabled) { cursor: default; }
.ba-symbol-card input[type="checkbox"] { appearance: auto; width: 18px; height: 18px; min-width: 18px; min-height: 18px; max-width: 18px; max-height: 18px; padding: 0; margin: 0; border-radius: 3px; accent-color: #3266a4; box-sizing: border-box; }
.ba-symbol-card img { display: block; width: 48px; height: 48px; object-fit: contain; }
.ba-symbol-copy { display: grid; gap: 4px; min-width: 0; font-size: 14px; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
.ba-symbol-copy strong { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 600px) {
    .ba-symbol-picker { padding: 12px; }
    .ba-symbol-card { padding: 12px; gap: 10px; }
}
.ba-approval-form { margin: 0; display: inline-flex; }
.ba-approval-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }

.list-filters.measuring-equipment-filters,
.list-filters.ladders-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
}

.measuring-equipment-filters > label,
.ladders-filters > label {
    flex: 1 1 170px;
    min-width: 0;
}

.measuring-equipment-filters > label:first-child,
.ladders-filters > label:first-child {
    flex: 1.4 1 240px;
}

.measuring-equipment-filters > .measuring-equipment-status-filter,
.ladders-filters > .ladders-status-filter {
    flex: 0 0 130px;
}

.measuring-equipment-filters > .multi-select-filter-wrap,
.ladders-filters > .multi-select-filter-wrap {
    flex: 1 1 170px;
    min-width: 0;
    max-width: none;
}

.measuring-equipment-filters > .filter-actions,
.ladders-filters > .filter-actions {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .measuring-equipment-filters > label,
    .measuring-equipment-filters > label:first-child,
    .measuring-equipment-filters > .measuring-equipment-status-filter,
    .measuring-equipment-filters > .multi-select-filter-wrap,
    .ladders-filters > label,
    .ladders-filters > label:first-child,
    .ladders-filters > .ladders-status-filter,
    .ladders-filters > .multi-select-filter-wrap {
        flex: 1 1 100%;
    }
}

/* Winterdienst follows the existing panel, form and button spacing. */
.winter-weather-page > .panel,
.winter-weather-page > .weather-area-grid,
.winter-weather-page > .actions { margin-top: 20px; }
.winter-weather-page .panel > h2:first-child { margin-top: 0; margin-bottom: 16px; }
.winter-weather-page .panel > p:last-child { margin-bottom: 0; }
.winter-weather-page .panel > form { margin-top: 18px; }
.winter-weather-page .weather-form-actions { grid-column: 1 / -1; margin-top: 4px; }
.winter-weather-page .form-grid fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: grid; gap: 10px; }
.winter-weather-page .form-grid details { border: 1px solid var(--line); border-radius: 6px; padding: 14px; max-height: 320px; overflow: auto; }
.winter-weather-page .form-grid summary { cursor: pointer; font-weight: 700; }
.winter-weather-page .form-grid details[open] summary { margin-bottom: 14px; }
.winter-weather-page .form-grid details .checkbox-field + .checkbox-field { margin-top: 10px; }
.winter-weather-page .table-scroll + .actions { margin-top: 18px; }
.winter-weather-page td .button { margin: 3px 6px 3px 0; }
.weather-area-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px}.weather-area-card{display:flex;align-items:center;gap:18px;padding:20px;border:1px solid var(--line);border-radius:6px;color:var(--ink);text-decoration:none;background:#fff}.weather-area-card:hover{border-color:#7a8794}.weather-signal{display:flex;flex-direction:column;gap:5px;background:#303840;border-radius:9px;padding:8px}.weather-signal i{width:19px;height:19px;border-radius:50%;background:#626970}.weather-area-card strong{display:block;font-size:1.15rem}.weather-area-card small{display:block;margin-top:5px}
.weather-area-card:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.weather-signal { flex: 0 0 auto; }
@media (max-width: 640px) {
 .winter-weather-page .actions > .button { width: 100%; }
 .winter-weather-page .panel { padding: 16px; }
}

.weather-heatmap-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
.weather-heatmap-canvas { background: #f5f7f8; border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.weather-heatmap { display: block; width: 100%; max-height: 1000px; }
.weather-heatmap path { stroke: #fff; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.weather-map-level-0 { fill: #a6adb5; background: #a6adb5; }
.weather-map-level-1 { fill: #78b58d; background: #78b58d; }
.weather-map-level-2 { fill: #f2c34b; background: #f2c34b; }
.weather-map-level-3 { fill: #dd6670; background: #dd6670; }
.weather-heatmap-region:hover path, .weather-heatmap-region:focus-visible path { stroke: #172330; stroke-width: 2.5; filter: brightness(.93); }
.weather-heatmap-region:focus-visible { outline: none; }
.weather-heatmap-labels { pointer-events: none; font-size: 12px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; fill: #172330; stroke: #fff; stroke-width: 2.5px; paint-order: stroke; }
.weather-heatmap-key { position: sticky; top: 20px; }
.weather-heatmap-key h3 { margin-top: 0; }
.weather-heatmap-key p { line-height: 1.5; }
.weather-map-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; margin-right: 10px; vertical-align: middle; }
@media (max-width: 850px) { .weather-heatmap-layout { grid-template-columns: 1fr; } .weather-heatmap-key { position: static; } }

.weather-detail-map { display: block; width: 100%; height: min(75vh, 800px); min-height: 340px; }
.weather-detail-boundary { fill: #e8edf0; stroke: #7e8b95; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.weather-detail-point circle { stroke: white; stroke-width: 1; vector-effect: non-scaling-stroke; }
.weather-detail-point:hover circle, .weather-detail-point:focus-visible circle { stroke: #172330; stroke-width: 3; }
.weather-detail-label { fill: #172330; stroke: white; paint-order: stroke; font-weight: 700; pointer-events: none; }
.weather-detail-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 18px; }
.winter-weather-page tr[id^="weather-place-"]:target { background: #fff0c4; scroll-margin-top: 30px; }

.weather-city-labels { pointer-events: none; }
.weather-city text { font-size: 12px; font-weight: 600; fill: #172330; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; paint-order: stroke; }
.weather-city circle { fill: #172330; stroke: #fff; stroke-width: 1px; }
.weather-city line { stroke: #62717e; stroke-width: .7px; }
