:root {
    --brand: #127a46;
    --brand-hover: #0d6439;
    --brand-ink: #ffffff;
    --brand-soft: #e5f4ec;
    --brand-strong: #0b5d35;
    --paper: #f1f4f2;
    --surface: #ffffff;
    --surface-sunken: #e8eeea;
    --ink: #18231e;
    --ink-2: #4d5a53;
    --ink-3: #6b776f;
    --line: #dde4df;
    --line-strong: #c4cec8;
    --onair: #c8341f;
    --onair-band: #18231e;
    --onair-text: #f1f4f2;
    --onair-muted: #9fb0a7;
    --amber: #a35f00;
    --amber-soft: #fbefd9;
    --over: #b4512a;
    --over-soft: #fbe9e1;
    --red: #b3261e;
    --red-soft: #fbe7e5;
    --green: #1f7a43;
    --green-soft: #e3f3e8;

    --font: "Archivo", "Segoe UI", system-ui, sans-serif;
    --step--1: 0.8125rem;
    --step-0: 0.9375rem;
    --step-1: 1.125rem;
    --step-2: 1.5rem;
    --step-3: 2.125rem;

    --radius-control: 6px;
    --radius-panel: 10px;
    --gutter: clamp(16px, 3vw, 36px);
    --content: 1180px;
    --sidebar-width: 272px;
    --sidebar-collapsed-width: 96px;

    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

h1,
h2,
p,
figure,
ul {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

h1 {
    font-size: var(--step-3);
    font-weight: 650;
    font-stretch: 88%;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

h2 {
    font-size: var(--step-1);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 10;
    padding: 8px 12px;
    background: var(--brand);
    color: var(--brand-ink);
    border-radius: var(--radius-control);
}

.skip-link:focus {
    top: 8px;
}

.wordmark {
    font-weight: 700;
    font-stretch: 72%;
    font-size: var(--step-1);
    letter-spacing: 0.01em;
    text-decoration: none;
}

.wordmark-large {
    font-size: var(--step-2);
}

.shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 32px);
    margin: 16px 0 16px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    flex: none;
    width: 40px;
    height: 40px;
    place-items: center;
    background: var(--brand);
    border-radius: 50%;
    color: var(--brand-ink);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand .wordmark {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidenav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 22px;
    padding: 18px 14px;
}

.sidenav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidenav-heading {
    padding: 0 14px 4px;
    color: var(--ink-3);
    font-size: var(--step--1);
    white-space: nowrap;
}

.sidenav a,
.sidebar-action {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    background: none;
    border: 0;
    border-radius: 10px;
    color: var(--ink-2);
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.sidenav a svg,
.sidebar-action svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidenav a:hover,
.sidebar-action:hover {
    background: var(--surface-sunken);
    color: var(--ink);
}

.sidenav a.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 600;
}

.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--line);
}

.sidebar-foot form {
    margin: 0;
}

.sidebar-toggle svg {
    transition: transform 160ms ease;
}

.sidebar-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 10px;
}

.avatar {
    display: grid;
    flex: none;
    width: 34px;
    height: 34px;
    place-items: center;
    background: var(--brand-soft);
    border-radius: 50%;
    color: var(--brand-strong);
    font-size: var(--step--1);
    font-weight: 700;
}

.sidebar-person-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.sidebar-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-role {
    color: var(--ink-3);
    font-size: var(--step--1);
}

.shell-main {
    min-width: 0;
    padding-bottom: 64px;
}

@media (min-width: 901px) {
    .shell {
        transition: grid-template-columns 180ms ease;
    }

    :root[data-sidebar-collapsed] .shell {
        grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
    }

    :root[data-sidebar-collapsed] .sidebar-head {
        justify-content: center;
        padding: 0;
    }

    :root[data-sidebar-collapsed] .brand .wordmark,
    :root[data-sidebar-collapsed] .sidenav-label,
    :root[data-sidebar-collapsed] .sidebar-person-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    :root[data-sidebar-collapsed] .sidenav {
        padding-inline: 12px;
    }

    :root[data-sidebar-collapsed] .sidenav-heading {
        height: 1px;
        margin: 0 12px 6px;
        padding: 0;
        overflow: hidden;
        background: var(--line);
        color: transparent;
    }

    :root[data-sidebar-collapsed] .sidenav a,
    :root[data-sidebar-collapsed] .sidebar-action {
        justify-content: center;
        gap: 0;
        padding: 0;
    }

    :root[data-sidebar-collapsed] .sidebar-foot {
        padding-inline: 12px;
    }

    :root[data-sidebar-collapsed] .sidebar-person {
        justify-content: center;
        padding: 0;
    }

    :root[data-sidebar-collapsed] .sidebar-toggle svg {
        transform: rotate(180deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shell,
    .sidebar-toggle svg {
        transition: none;
    }
}

.onair {
    width: calc(min(100%, var(--content)) - 2 * var(--gutter));
    margin: 16px auto 0;
    background: var(--onair-band);
    border-radius: 14px;
    color: var(--onair-text);
}

.onair-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 24px;
    padding: 16px 20px 16px 24px;
}

.onair-signal {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--onair);
    animation: onair-pulse 1.6s ease-in-out infinite;
}

.onair-signal.is-off {
    background: var(--ink-3);
    animation: none;
}

.onair-task {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.onair-caption {
    color: var(--onair-muted);
    font-size: var(--step--1);
}

.onair-title {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.onair-id {
    color: var(--onair-muted);
    font-weight: 500;
}

.onair-clock {
    font-size: 2.25rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-stretch: 70%;
    line-height: 1;
    letter-spacing: 0.02em;
}

.onair-idle {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.onair-idle .onair-inner {
    grid-template-columns: auto 1fr;
    padding-block: 12px;
}

.onair-idle strong {
    color: var(--ink);
    font-weight: 600;
}

@keyframes onair-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(200, 52, 31, 0.35);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(200, 52, 31, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .onair-signal {
        animation: none;
        box-shadow: 0 0 0 3px rgba(200, 52, 31, 0.35);
    }
}

.page {
    max-width: var(--content);
    margin: 0 auto;
    padding: 32px var(--gutter) 0;
}

.page-narrow {
    max-width: 820px;
}

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

.page-summary {
    margin-top: 6px;
    color: var(--ink-2);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--brand);
    color: var(--brand-ink);
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-hover);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand);
}

.btn-quiet {
    min-height: 32px;
    padding: 0 8px;
    background: none;
    color: var(--brand);
}

.btn-quiet:hover:not(:disabled) {
    background: var(--brand-soft);
}

.btn-onair {
    background: transparent;
    border-color: rgba(243, 245, 246, 0.4);
    color: var(--onair-text);
}

.btn-onair:hover:not(:disabled) {
    background: var(--onair-text);
    color: var(--onair-band);
}

.btn-small {
    min-height: 32px;
    padding: 0 12px;
    font-size: var(--step--1);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 34px;
    min-height: 34px;
    padding: 0;
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink-2);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-icon:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    padding: 3px;
    background: var(--surface-sunken);
    border-radius: var(--radius-control);
}

.segmented button {
    min-height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.segmented button.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 0 0 1px var(--line);
}

input,
select,
textarea {
    min-height: 38px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    color: var(--ink);
    font: inherit;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--ink-3);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 0;
    border-color: var(--brand);
}

input[type="checkbox"] {
    min-height: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.search input {
    width: min(280px, 100%);
}

.select-compact {
    min-height: 32px;
    padding: 0 8px;
}

.period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 24px;
}

.period-sprint {
    display: flex;
    align-items: center;
    gap: 10px;
}

.period-label {
    display: flex;
    flex-direction: column;
    min-width: 128px;
    line-height: 1.25;
}

.period-name {
    font-weight: 650;
}

.period-range {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 20px;
}

.stat + .stat {
    border-left: 1px solid var(--line);
}

.stat-label {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.stat-value {
    font-size: var(--step-2);
    font-weight: 650;
    font-stretch: 85%;
}

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

.charts-report {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
}

.card {
    container-type: inline-size;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
}

.card-flush {
    padding: 0;
    overflow: hidden;
}

.card-title-padded {
    padding: 18px 20px 12px;
}

.card-hint {
    max-width: 60ch;
    margin: 4px 0 18px;
    color: var(--ink-2);
    font-size: var(--step--1);
}

.donut {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}

.donut-plot {
    position: relative;
    width: 168px;
    height: 168px;
}

.donut svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.donut-track {
    fill: none;
    stroke: var(--surface-sunken);
    stroke-width: 16;
}

.donut-seg {
    fill: none;
    stroke-width: 16;
    cursor: default;
}

.donut-seg:hover {
    stroke-width: 19;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.donut-center-value {
    font-size: var(--step-2);
    font-weight: 650;
    font-stretch: 80%;
    line-height: 1.1;
}

.donut-center-caption {
    color: var(--ink-2);
    font-size: var(--step--1);
}

@container (max-width: 460px) {
    .donut {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .donut .legend {
        width: 100%;
    }
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 40px;
    align-items: center;
    gap: 10px;
    font-size: var(--step--1);
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-label {
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-marker {
    margin-right: 4px;
    color: var(--ink-2);
}

.legend-value {
    color: var(--ink);
    font-weight: 600;
}

.legend-percent {
    color: var(--ink-3);
    text-align: right;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: var(--step--1);
    font-weight: 600;
    white-space: nowrap;
}

.status-tag.is-within {
    background: var(--green-soft);
    color: var(--green);
}

.status-tag.is-over {
    background: var(--over-soft);
    color: var(--over);
}

.status-tag.is-none {
    background: var(--surface-sunken);
    color: var(--ink-2);
}

.bar {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.bar-value {
    font-weight: 600;
}

.bar-track {
    height: 6px;
    overflow: hidden;
    background: var(--surface-sunken);
    border-radius: 3px;
}

.bar-fill {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: 3px;
}

.text-over {
    color: var(--over);
    font-weight: 600;
}

.strong {
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
}

.table-wrap-bare {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
}

.worktable {
    width: 100%;
    border-collapse: collapse;
}

.worktable th {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.worktable th.num {
    text-align: right;
}

.worktable td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.worktable tbody tr:last-child td {
    border-bottom: 0;
}

.worktable tbody tr:hover {
    background: #f7f9fa;
}

.worktable tr.is-running,
.worktable tr.is-running:hover {
    background: var(--brand-soft);
    box-shadow: inset 3px 0 0 var(--onair);
}

.worktable tr.is-done .task-title {
    color: var(--ink-2);
}

.num {
    text-align: right;
}

.col-meter {
    width: 220px;
}

.col-action {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.task {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.task-title {
    max-width: 60ch;
    font-weight: 600;
    text-decoration: none;
}

a.task-title:hover {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.task-id {
    margin-right: 4px;
    color: var(--ink-3);
    font-weight: 500;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    color: var(--ink-2);
    font-size: var(--step--1);
}

.state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink-3);
}

.state.tone-active::before {
    background: var(--brand);
}

.state.tone-done::before {
    background: var(--green);
}

.state.tone-removed::before {
    background: var(--red);
}

.meter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meter-figures {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.meter-tracked {
    font-weight: 600;
}

.meter-effort {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.meter-over {
    margin-left: auto;
    color: var(--over);
    font-size: var(--step--1);
    font-weight: 600;
}

.meter-track {
    height: 4px;
    overflow: hidden;
    background: var(--surface-sunken);
    border-radius: 2px;
}

.meter-fill {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: 2px;
}

.meter.is-over .meter-tracked {
    color: var(--over);
}

.meter.is-over .meter-fill {
    background: var(--over);
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--onair);
    font-size: var(--step--1);
    font-weight: 600;
}

.live-tag::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--surface-sunken);
    border-radius: 4px;
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 500;
}

.badge-warning {
    background: var(--amber-soft);
    color: var(--amber);
}

.row-actions {
    display: inline-flex;
    gap: 4px;
}

.empty {
    padding: 56px 24px;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-panel);
    color: var(--ink-2);
    text-align: center;
}

.empty h2 {
    margin-bottom: 6px;
    color: var(--ink);
}

.empty p {
    max-width: 52ch;
    margin: 0 auto;
}

.empty a {
    color: var(--brand);
    font-weight: 600;
}

.alert {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-control);
    border-left: 3px solid currentColor;
}

.alert-error {
    background: var(--red-soft);
    color: var(--red);
}

.alert-warning {
    background: var(--amber-soft);
    color: var(--amber);
}

.alert-success {
    background: var(--green-soft);
    color: var(--green);
}

.panel {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-panel);
}

.panel-hint {
    max-width: 70ch;
    margin: 4px 0 16px;
    color: var(--ink-2);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: start;
}

.form-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field label {
    font-weight: 600;
    font-size: var(--step--1);
}

.field-hint {
    color: var(--ink-3);
    font-size: var(--step--1);
}

.preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    grid-column: 1 / -1;
    padding: 12px 14px;
    background: var(--brand-soft);
    border-radius: var(--radius-control);
}

.preview-label {
    color: var(--ink-2);
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    cursor: pointer;
}

.auth {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px 16px;
}

.auth-panel {
    width: min(400px, 100%);
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
}

.auth-brand {
    margin-bottom: 28px;
}

.auth-title {
    font-size: var(--step-2);
}

.auth-hint {
    margin: 6px 0 24px;
    color: var(--ink-2);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.section {
    margin-bottom: 28px;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-bottom: 12px;
}

.section-hint {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.filterbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
}

.filterbar .period {
    margin-bottom: 0;
}

.filterbar .alert {
    margin-bottom: 0;
}

.filters {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 12px 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 3px 4px 3px 10px;
    background: var(--brand-soft);
    border-radius: 999px;
    color: var(--brand-hover);
    font-size: var(--step--1);
    font-weight: 600;
}

.chip button {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.chip button:hover {
    background: rgba(18, 122, 70, 0.15);
}

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

.card-notice {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 3px solid var(--amber);
    color: var(--ink-2);
}

.card-notice strong {
    color: var(--ink);
}

.card-notice a,
.card-empty a {
    color: var(--brand);
    font-weight: 600;
}

.card-empty {
    padding: 0 20px 20px;
    color: var(--ink-2);
}

.stats-flat {
    margin-bottom: 18px;
    background: none;
    border: 0;
    border-radius: 0;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stats-flat .stat {
    padding: 0 20px 0 0;
}

.stats-flat .stat + .stat {
    padding-left: 20px;
}

.stats:not(.stats-flat) {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-value small {
    color: var(--ink-3);
    font-size: var(--step-0);
    font-weight: 500;
}

.charts-wide {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
}

.scopebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scopebar-track {
    display: flex;
    gap: 2px;
    height: 14px;
    overflow: hidden;
    background: var(--surface-sunken);
    border-radius: 4px;
}

.scopebar-seg {
    min-width: 4px;
}

.legend-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.legend-inline li {
    grid-template-columns: 10px auto auto auto;
}

.scope-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--ink-2);
    font-size: var(--step--1);
}

.daily-body {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: 160px auto;
    column-gap: 8px;
}

.daily-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--ink-3);
    font-size: 0.75rem;
    text-align: right;
    transform: translateY(-0.5em);
}

.daily-scale span:last-child {
    transform: translateY(0.5em);
}

.daily-plot {
    display: grid;
    grid-template-columns: repeat(var(--days), minmax(0, 1fr));
    gap: 2px;
    align-items: end;
    background:
        linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat,
        linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
    border-bottom: 1px solid var(--line-strong);
}

.daily-col {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
}

.daily-col.is-weekend {
    background: rgba(234, 238, 240, 0.6);
}

.daily-bar {
    width: min(70%, 28px);
    background: var(--brand);
    border-radius: 4px 4px 0 0;
}

.daily-col:hover .daily-bar {
    background: var(--brand-hover);
}

.daily-col:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 2;
    padding: 4px 8px;
    background: var(--ink);
    border-radius: 4px;
    color: var(--surface);
    font-size: 0.75rem;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
}

.daily-axis {
    display: grid;
    grid-column: 2;
    grid-template-columns: repeat(var(--days), minmax(0, 1fr));
    gap: 2px;
    padding-top: 6px;
    color: var(--ink-3);
    font-size: 0.6875rem;
    text-align: center;
    white-space: nowrap;
}

@container (max-width: 560px) {
    .daily-axis .is-minor {
        visibility: hidden;
    }
}

.daily-axis .is-today {
    color: var(--ink);
    font-weight: 700;
}

.link-cell {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.link-cell:hover {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.detail {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.detail-title {
    font-size: var(--step-2);
    font-stretch: 90%;
}

.detail .stats-flat {
    margin-bottom: 0;
}

.detail .meter {
    max-width: 520px;
}

.detail .meter-track {
    height: 8px;
    border-radius: 4px;
}

textarea {
    min-height: 0;
    padding: 8px 12px;
    resize: vertical;
}

.btn-danger {
    background: var(--red);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background: #8f1e18;
}

.page-wide {
    max-width: 1440px;
}

.nowrap {
    white-space: nowrap;
}

.table-sub {
    display: block;
    color: var(--ink-3);
    font-size: var(--step--1);
}

.year-label {
    min-width: 52px;
    font-size: var(--step-1);
    text-align: center;
}

.field-inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

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

.sidenav-icon {
    position: relative;
    display: inline-flex;
    flex: none;
}

.nav-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 5px;
    background: var(--onair);
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
}

.type-icon {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.type-icon.type-vacation,
.cal-chip.type-vacation .type-icon {
    color: #2a78d6;
}

.type-icon.type-dayoff,
.cal-chip.type-dayoff .type-icon {
    color: #c8541f;
}

.type-icon.type-medical,
.cal-chip.type-medical .type-icon {
    color: #13895f;
}

.absence-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 20px;
}

.absence-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cal-card {
    padding: 16px;
}

.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cal-title {
    min-width: 170px;
    font-size: var(--step-1);
    text-align: center;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 14px;
    font-size: var(--step--1);
}

.cal-legend .cal-chip {
    padding-right: 8px;
}

.cal-legend-holiday {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7a4a00;
    font-weight: 600;
}

.cal-legend-holiday::before {
    content: "";
    width: 14px;
    height: 14px;
    background: #fbecc9;
    border-radius: 3px;
}

.cal {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    overflow: hidden;
}

.cal-head,
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-head span {
    padding: 8px 10px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    font-size: var(--step--1);
    font-weight: 600;
}

.cal-day {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 112px;
    padding: 6px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cal-day:nth-child(7n) {
    border-right: 0;
}

.cal-day.is-weekend {
    background: #f6f8f7;
}

.cal-day.is-holiday {
    background: #fdf8ee;
}

.cal-day.is-outside {
    background: var(--paper);
}

.cal-day.is-outside .cal-date {
    color: var(--ink-3);
}

.cal-day-head {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cal-date {
    display: inline-grid;
    flex: none;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 600;
}

button.cal-date {
    cursor: pointer;
}

button.cal-date:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.cal-day.is-today .cal-date {
    background: var(--brand);
    color: var(--brand-ink);
}

.cal-holiday {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 2px 6px;
    background: #fbecc9;
    border-radius: 4px;
    color: #7a4a00;
    font-size: 0.75rem;
    font-weight: 600;
}

.cal-holiday svg {
    width: 12px;
    height: 12px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cal-holiday span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-entries {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cal-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: 4px;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.cal-chip .type-icon {
    width: 13px;
    height: 13px;
}

.cal-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-chip-time {
    margin-left: auto;
    color: var(--ink-2);
    font-weight: 500;
}

.cal-chip.type-vacation {
    background: #e8f1fc;
    border-left-color: #2a78d6;
}

.cal-chip.type-dayoff {
    background: #fdeee6;
    border-left-color: #eb6834;
}

.cal-chip.type-medical {
    background: #e3f5ee;
    border-left-color: #1baf7a;
}

.cal-chip.is-pending {
    background: var(--surface);
    border-style: dashed;
    border-color: var(--line-strong);
    color: var(--ink-2);
}

.cal-chip.is-pending.type-vacation {
    border-left: 3px dashed #2a78d6;
}

.cal-chip.is-pending.type-dayoff {
    border-left: 3px dashed #eb6834;
}

.cal-chip.is-pending.type-medical {
    border-left: 3px dashed #1baf7a;
}

.cal-chip.is-own {
    box-shadow: inset 0 0 0 1px rgba(18, 122, 70, 0.35);
}

.cal-more {
    padding: 0 6px;
    color: var(--ink-2);
    font-size: 0.75rem;
    font-weight: 600;
}

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

.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 64px;
    padding: 8px 6px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    color: var(--ink-2);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.type-option .type-icon {
    width: 20px;
    height: 20px;
}

.type-option:hover {
    border-color: var(--ink-3);
    color: var(--ink);
}

.type-option.is-active {
    background: var(--brand-soft);
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
    color: var(--brand-strong);
}

.request-list {
    display: flex;
    flex-direction: column;
}

.request-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
}

.request-item > .type-icon {
    margin-top: 3px;
}

.request-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.request-title {
    font-weight: 600;
}

.request-period,
.request-note {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.request-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.absence-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.absence-status.is-pending {
    background: var(--amber-soft);
    color: var(--amber);
}

.absence-status.is-approved {
    background: var(--green-soft);
    color: var(--green);
}

.absence-status.is-rejected {
    background: var(--red-soft);
    color: var(--red);
}

.absence-status.is-cancelled {
    background: var(--surface-sunken);
    color: var(--ink-2);
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.approval {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 24px;
    border-left-width: 4px;
}

.approval.type-vacation {
    border-left-color: #2a78d6;
}

.approval.type-dayoff {
    border-left-color: #eb6834;
}

.approval.type-medical {
    border-left-color: #1baf7a;
}

.approval-main {
    display: flex;
    gap: 14px;
    min-width: 0;
}

.approval-icon {
    display: grid;
    flex: none;
    width: 40px;
    height: 40px;
    place-items: center;
    background: var(--paper);
    border-radius: 50%;
}

.approval-icon .type-icon {
    width: 20px;
    height: 20px;
}

.approval-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.approval-title {
    font-size: var(--step-1);
    font-weight: 650;
}

.approval-type {
    color: var(--ink-2);
    font-weight: 500;
}

.approval-period {
    font-weight: 600;
}

.approval-note {
    color: var(--ink-2);
}

.approval-meta {
    color: var(--ink-3);
    font-size: var(--step--1);
}

.approval-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 260px;
}

.approval-actions textarea {
    width: 100%;
}

.approval-buttons {
    display: flex;
    gap: 8px;
}

.approval-own {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.check-list .check {
    padding: 6px 4px;
    border-radius: 4px;
    color: var(--ink);
}

.check-list .check:hover {
    background: var(--paper);
}

.check.is-disabled {
    color: var(--ink-3);
    cursor: default;
}

.check-date {
    min-width: 92px;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
}

.holiday-list {
    display: flex;
    flex-direction: column;
}

.holiday-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    border-top: 1px solid var(--line);
}

.holiday-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 46px;
    padding: 4px 0;
    background: #fbecc9;
    border-radius: 6px;
    color: #7a4a00;
    font-weight: 700;
    line-height: 1.2;
}

.holiday-date small {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: lowercase;
}

.holiday-name {
    font-weight: 500;
}

.badge-national {
    background: #fbecc9;
    color: #7a4a00;
}

.check-strong {
    margin: 8px 0 4px;
    color: var(--ink);
    font-weight: 600;
}

.org-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 20px;
}

.org-side {
    position: sticky;
    top: 16px;
}

.org-card {
    padding: 20px 0;
}

.org-scroll {
    overflow-x: auto;
    padding: 0 20px 4px;
}

.org {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: max-content;
    margin: 0 auto;
}

.org-top {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-bottom: 24px;
}

.org-top::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 24px;
    background: var(--line-strong);
}

.org-level {
    color: var(--ink-3);
    font-size: var(--step--1);
}

.org-managers {
    display: flex;
    gap: 12px;
}

.org-teams {
    display: flex;
    justify-content: center;
}

.org-team {
    position: relative;
    padding: 24px 10px 0;
}

.org-team::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line-strong);
}

.org-team:first-child::before {
    left: 50%;
}

.org-team:last-child::before {
    right: 50%;
}

.org-team:only-child::before {
    display: none;
}

.org-team::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 24px;
    background: var(--line-strong);
}

.org-team-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 300px;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.org-team-box.is-selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.org-team-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.org-team-name {
    display: block;
    font-weight: 700;
}

.org-team-desc {
    display: block;
    color: var(--ink-2);
    font-size: var(--step--1);
}

.org-members {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 2px solid var(--line-strong);
}

.org-members li {
    position: relative;
}

.org-team-box .org-person {
    min-width: 0;
}

.org-members li::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -14px;
    width: 12px;
    height: 2px;
    background: var(--line-strong);
}

.org-missing {
    color: var(--ink-3);
    font-size: var(--step--1);
    font-style: italic;
}

.org-person {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 220px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.org-person:hover {
    border-color: var(--ink-3);
}

.org-person.is-selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.org-person.is-manager {
    border-top: 3px solid var(--brand);
}

.org-person.is-coordinator {
    background: var(--brand-soft);
    border-color: #bfe0cd;
}

.org-person-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.org-person-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-person-title {
    overflow: hidden;
    color: var(--ink-2);
    font-size: var(--step--1);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-role {
    flex: none;
    padding: 1px 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--brand-strong);
    font-size: 0.6875rem;
    font-weight: 700;
}

.org-empty {
    padding: 24px 20px 4px;
    text-align: center;
    color: var(--ink-2);
}

.org-empty h2 {
    margin-bottom: 4px;
    color: var(--ink);
}

.org-unassigned {
    margin-top: 24px;
    padding: 18px 20px 0;
    border-top: 1px solid var(--line);
}

.org-unassigned h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: var(--step-0);
}

.org-unassigned .count {
    padding: 0 8px;
    background: var(--surface-sunken);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: var(--step--1);
}

.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.avatar-large {
    width: 52px;
    height: 52px;
    font-size: var(--step-1);
}

.profile {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.profile-meta,
.profile-line {
    color: var(--ink-2);
    font-size: var(--step--1);
}

.profile-details {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
}

.profile-details dt {
    margin-top: 8px;
    color: var(--ink-3);
    font-size: var(--step--1);
    font-weight: 600;
}

.profile-details dd {
    margin: 0;
}

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

.profile .field-hint a {
    color: var(--brand);
    font-weight: 600;
}

.danger-zone {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink-2);
}

.danger-zone p {
    margin-bottom: 10px;
}

@media (max-width: 1180px) {
    .absence-layout,
    .org-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .org-side {
        position: static;
    }
}

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

    .approval-actions {
        align-items: stretch;
        min-width: 0;
    }

    .charts,
    .charts-report,
    .charts-wide {
        grid-template-columns: minmax(0, 1fr);
    }
}

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

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        height: auto;
        margin: 12px 12px 0;
        overflow: visible;
    }

    .sidebar-head {
        min-height: 60px;
        padding: 0 14px;
        border-bottom: 0;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .sidenav {
        flex-direction: row;
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 4px;
        padding: 8px 10px 10px;
        overflow-x: auto;
        border-top: 1px solid var(--line);
    }

    .sidenav-group {
        flex-direction: row;
    }

    .sidenav-heading,
    .sidebar-role,
    .sidebar-toggle {
        display: none;
    }

    .sidenav a {
        min-height: 40px;
        gap: 8px;
        padding: 0 12px;
    }

    .sidebar-foot {
        flex-direction: row;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        padding: 0 10px;
        border: 0;
    }

    .sidebar-person {
        min-height: 0;
        padding: 0;
    }

    .sidebar-foot .sidebar-action {
        width: auto;
        min-height: 40px;
    }

    .col-assignee,
    .col-actual {
        display: none;
    }

    .col-meter {
        width: 160px;
    }
}

@media (max-width: 640px) {
    .sidebar-name {
        display: none;
    }

    .cal-day {
        min-height: 72px;
        padding: 4px;
    }

    .cal-chip {
        justify-content: center;
        padding: 2px;
    }

    .cal-chip-name,
    .cal-chip-time,
    .cal-holiday span {
        display: none;
    }

    .cal-holiday {
        justify-content: center;
        padding: 2px;
    }

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

    .sidebar-foot .sidenav-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .sidebar-foot {
        gap: 0;
    }

    .onair-inner {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 14px;
    }

    .onair-clock {
        grid-column: 1 / -1;
        font-size: 2rem;
    }

    .btn-onair {
        grid-column: 1 / -1;
    }

    .page {
        padding-top: 24px;
    }

    .toolbar,
    .search,
    .search input {
        width: 100%;
    }

    .stat {
        padding: 12px;
    }

    .filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .stats-flat .stat,
    .stats-flat .stat + .stat {
        padding: 8px 0;
        border-left: 0;
    }

    .daily-body {
        grid-template-rows: 120px auto;
    }

    .stat-value {
        font-size: var(--step-1);
    }

    .donut {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .legend {
        width: 100%;
    }

    .table-wrap {
        overflow-x: visible;
    }

    .worktable,
    .worktable tbody,
    .worktable td {
        display: block;
    }

    .worktable thead {
        display: none;
    }

    .worktable tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
    }

    .worktable tbody tr:last-child {
        border-bottom: 0;
    }

    .worktable td {
        padding: 0;
        border: 0;
    }

    .worktable td:first-child {
        grid-column: 1 / -1;
    }

    .worktable .col-assignee,
    .worktable .col-actual {
        display: none;
    }

    .col-meter {
        width: auto;
    }
}

.field-wide {
    grid-column: 1 / -1;
}

.field-label {
    font-weight: 600;
    font-size: var(--step--1);
}

.badge-success {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.onair-adjust {
    width: fit-content;
    margin-top: 2px;
    color: var(--onair-muted);
    font-size: var(--step--1);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.onair-adjust:hover {
    color: var(--onair-text);
}

.entrytable .col-time {
    width: 120px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.entrytable .col-duration {
    width: 110px;
    white-space: nowrap;
}

.entrytable tr.is-editing,
.entrytable tr.is-editing:hover {
    background: var(--brand-soft);
}

.entry-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(180px, 220px)) auto;
    align-items: end;
    gap: 12px 16px;
}

.entry-form-task {
    align-self: center;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry-form .form-actions {
    grid-column: auto;
}

.entry-form-running {
    display: flex;
    align-items: center;
    min-height: 38px;
    color: var(--ink-2);
}

.entry-form-hint {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .entry-form {
        grid-template-columns: 1fr;
    }

    .entrytable .col-time {
        width: auto;
    }
}

#blazor-error-ui {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 16px;
    max-width: min(480px, calc(100vw - 48px));
    padding: 14px 18px;
    background: var(--red-soft);
    border: 1px solid var(--red);
    border-radius: var(--radius-control);
    color: var(--red);
    box-shadow: 0 8px 24px rgba(24, 35, 30, 0.12);
}

#blazor-error-ui .reload {
    color: var(--red);
    font-weight: 600;
    white-space: nowrap;
}

.page-narrow .card-hint {
    max-width: none;
}

.import-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.import-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.import-row input {
    width: 200px;
}

.import-row .btn {
    min-width: 200px;
}

.import-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 412px;
    margin-top: 10px;
}

.import-progress-bar {
    height: 6px;
    overflow: hidden;
    background: var(--surface-sunken);
    border-radius: 999px;
}

.import-progress-bar span {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: inherit;
    transition: width 0.4s ease;
}

.import-progress-text {
    color: var(--ink-2);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation-duration: 2s;
    }
}

.removed-users {
    margin-top: 40px;
}

.org-top.is-alone::after {
    display: none;
}

.org-areas {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.org-area {
    position: relative;
    padding: 24px 12px 0;
}

.org-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line-strong);
}

.org-area:first-child::before {
    left: 50%;
}

.org-area:last-child::before {
    right: 50%;
}

.org-area:only-child::before {
    display: none;
}

.org-area::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 24px;
    background: var(--line-strong);
}

.org-areas.is-root > .org-area {
    padding-top: 0;
}

.org-areas.is-root > .org-area::before,
.org-areas.is-root > .org-area::after {
    display: none;
}

.org-area-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: 16px;
}

.org-area-box.is-selected {
    border-style: solid;
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.org-area-box.is-loose {
    background: transparent;
}

.org-area-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.org-area-name {
    display: block;
    font-size: var(--step-1, 1.125rem);
    font-weight: 700;
}

.org-area-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-area-leads {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.org-area-leads.has-teams {
    padding-bottom: 24px;
}

.org-area-leads.has-teams::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 24px;
    background: var(--line-strong);
}

.org-teams.is-flat {
    gap: 20px;
}

.org-teams.is-flat > .org-team {
    padding: 0;
}

.org-teams.is-flat > .org-team::before,
.org-teams.is-flat > .org-team::after {
    display: none;
}

.area-managers {
    margin: 0;
    padding: 0;
    border: 0;
}

.area-managers .check {
    padding: 4px 0;
}

.sidebar-version {
    padding: 4px 12px 0;
    color: var(--ink-3);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

