/* IBM Plex Sans and Mono, vendored from @fontsource 5.3.0 (latin and latin-ext only), SIL OFL 1.1: see
   fonts/OFL-IBM-Plex-*.txt. The CSP allows fonts from 'self' only. */
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Every text colour keeps at least 4.5:1 against the surfaces it is used on, in both schemes. */
:root {
    color-scheme: light dark;
    --page: #f4f2ee;
    --surface: #ffffff;
    --surface-raised: #fbfaf8;
    --surface-sunken: #f8f7f4;
    --hover: #f1efea;
    --line: #e1ddd5;
    --line-soft: #eeebe5;
    --line-strong: #cfcac0;
    --line-control: #dad6ce;
    --text: #1f2328;
    --text-soft: #3a3f44;
    --text-muted: #5c6166;
    --text-faint: #62676c;
    --accent: #0f5e63;
    --accent-hover: #0a4347;
    --accent-soft: #e3f0f0;
    --accent-soft-hover: #d2e7e7;
    --on-accent: #ffffff;
    --strong: #1f2328;
    --strong-hover: #3a3f44;
    --on-strong: #ffffff;
    --tag: #eceae4;
    --warn: #7a4b05;
    --warn-soft: #fdf3e1;
    --warn-line: #c9851b;
    --danger: #a1291f;
    --danger-soft: #fbe9e7;
    --ok: #5fb872;
    --bar: #1f2328;
    --bar-text: #c9cdd1;
    --bar-strong: #ffffff;
    --bar-hover: #2e3338;
    --bar-line: #3a3f44;
    --bar-accent: #7cc3c3;
    --bar-danger: #ff8a7a;
    --bar-warn: #f2c574;
    --focus: #0f5e63;
    --shadow-running: 0 6px 20px -12px rgb(15 94 99 / 0.45);
    --shadow-dialog: 0 20px 50px rgb(0 0 0 / 0.25);
    --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    /* Chart marks keep at least 3:1 against the surface. Customers get shades around the accent,
       internal time a muted accent and absence a neutral grey, so the two never read as a customer. */
    --chart-productive: #0f5e63;
    --chart-1: #0f5e63;
    --chart-2: #3b8f94;
    --chart-3: #3b6ea8;
    --chart-4: #5f7f26;
    --chart-5: #8f4f7f;
    --chart-internal: #6a9799;
    --chart-absent: #83888d;
    --chart-other: #8a7650;
    --chart-text: #1f2328;
    --chart-muted: #5c6166;
    --chart-grid: #e1ddd5;
    font-family: var(--font-sans);
    font-size: 100%;
    line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #121416;
        --surface: #1b1e21;
        --surface-raised: #202326;
        --surface-sunken: #24282c;
        --hover: #2a2e32;
        --line: #33383d;
        --line-soft: #2b2f33;
        --line-strong: #4a5056;
        --line-control: #41464b;
        --text: #e8e6e1;
        --text-soft: #d0d3d6;
        --text-muted: #a8aeb4;
        --text-faint: #9ca2a8;
        --accent: #7cc3c3;
        --accent-hover: #a2d6d6;
        --accent-soft: #183436;
        --accent-soft-hover: #1f4245;
        --on-accent: #0b1f20;
        --strong: #e8e6e1;
        --strong-hover: #ffffff;
        --on-strong: #1f2328;
        --tag: #2c3034;
        --warn: #f2c574;
        --warn-soft: #3a2c12;
        --warn-line: #a8741c;
        --danger: #ff9c8f;
        --danger-soft: #3b1a17;
        --bar: #0b0d0f;
        --bar-hover: #22262a;
        --bar-line: #33383d;
        --focus: #7cc3c3;
        --shadow-running: 0 6px 20px -12px rgb(0 0 0 / 0.8);
        --shadow-dialog: 0 20px 50px rgb(0 0 0 / 0.6);
        --chart-productive: #7cc3c3;
        --chart-1: #7cc3c3;
        --chart-2: #4a9fa4;
        --chart-3: #86aee6;
        --chart-4: #a5c46a;
        --chart-5: #d49cc6;
        --chart-internal: #5c8385;
        --chart-absent: #7d8287;
        --chart-other: #b39e70;
        --chart-text: #e8e6e1;
        --chart-muted: #a8aeb4;
        --chart-grid: #33383d;
    }
}

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

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    padding-bottom: 8rem;
    background: var(--page);
    color: var(--text);
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.25;
}

h1 {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

h2 {
    font-size: 1rem;
    font-weight: 600;
}

h3 {
    font-size: 0.9375rem;
    font-weight: 600;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.icon {
    flex: none;
}

.muted {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.app--locked {
    filter: grayscale(0.6);
    opacity: 0.6;
}

/* Top bar */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3rem;
    padding: 0 2rem;
    background: var(--bar);
    color: var(--bar-text);
}

.topbar :focus-visible {
    outline-color: var(--bar-accent);
}

.topbar__brand {
    display: flex;
    align-items: stretch;
    gap: 1.75rem;
    align-self: stretch;
}

.topbar__wordmark {
    align-self: center;
    color: var(--bar-strong);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.topbar__nav {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
}

.topbar__tab {
    display: flex;
    align-items: center;
    padding: 0 0.125rem;
    color: var(--bar-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.topbar__tab:hover {
    color: var(--bar-strong);
}

.topbar__tab[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--bar-accent);
    color: var(--bar-strong);
}

.topbar__tools {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.topbar__who {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

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

.topbar__divider {
    width: 1px;
    height: 1.25rem;
    background: var(--bar-line);
}

.topbar__button {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--bar-text);
    cursor: pointer;
}

.topbar__button:hover {
    background: var(--bar-hover);
    color: var(--bar-strong);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.status__dot {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: var(--ok);
}

.status[data-status="offline"] .status__dot {
    background: var(--bar-danger);
}

.status[data-status="syncing"] .status__dot {
    background: var(--bar-warn);
}

/* Page */

.main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.75rem 3rem 3rem;
}

/* The report uses the whole window width for its charts and table. */
.main.report {
    max-width: none;
}

.day {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.day__title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* The title and the day navigation share a line; on a narrow screen the navigation wraps below. */
.day__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.day-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.day-nav input[type="date"] {
    width: auto;
    min-height: 2.125rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.day-nav .button {
    margin-left: 0.25rem;
}

.day__date {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.day__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.75rem;
}

.totals {
    display: flex;
    gap: 1.5rem;
    margin: 0;
}

.totals__pair {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.totals dt {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.totals dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.banner {
    margin: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--warn-line);
    border-radius: 0.75rem;
    background: var(--warn-soft);
    color: var(--warn);
    font-size: 0.9375rem;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.section__head h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.section__aside {
    color: var(--text-muted);
    font-weight: 400;
}

.hint {
    margin: 0;
    color: var(--text-faint);
    font-size: 0.8125rem;
}

.empty {
    margin: 0;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--line-strong);
    border-radius: 0.875rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.past {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.past .rows {
    margin-top: 0.5rem;
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    border: 1px solid var(--accent);
    border-radius: 0.625rem;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.button:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}

.button--secondary {
    background: var(--surface);
    color: var(--accent);
}

.button--secondary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.button--neutral {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--text-soft);
    font-weight: 500;
}

.button--neutral:hover {
    border-color: var(--text-muted);
    background: var(--surface);
}

.button--dark {
    border-color: var(--strong);
    background: var(--strong);
    color: var(--on-strong);
}

.button--dark:hover {
    border-color: var(--strong-hover);
    background: var(--strong-hover);
}

.button--soft {
    border-color: var(--accent-soft);
    background: var(--accent-soft);
    color: var(--accent);
}

.button--soft:hover {
    border-color: var(--accent-soft-hover);
    background: var(--accent-soft-hover);
    color: var(--accent);
}

.button--compact {
    min-height: 2.125rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.button--block {
    width: 100%;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--hover);
    color: var(--text);
}

.icon-button[aria-busy="true"] .icon {
    animation: spin 1s linear infinite;
}

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

.button:disabled,
.icon-button:disabled,
.item__toggle:disabled,
.pill:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button:disabled:hover {
    border-color: var(--accent);
    background: var(--accent);
}

.button--secondary:disabled:hover,
.button--neutral:disabled:hover {
    background: var(--surface);
}

.button--neutral:disabled:hover {
    border-color: var(--line-strong);
}

.button--dark:disabled:hover {
    border-color: var(--strong);
    background: var(--strong);
}

.button--soft:disabled:hover {
    border-color: var(--accent-soft);
    background: var(--accent-soft);
}

.icon-button:disabled:hover {
    background: transparent;
    color: var(--text-muted);
}

/* On wide screens "Tag abschließen" sits in the day header; see the phone layout below. */
.button.day-close-bottom {
    display: none;
}

/* Items */

.quick-start {
    margin-bottom: 0.5rem;
}

.quick-start__start {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px dashed var(--line-strong);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.quick-start__start:hover {
    background: var(--hover);
}

.quick-start__start[hidden],
.quick-start__bar[hidden] {
    display: none;
}

.quick-start__label {
    font-weight: 600;
}

.quick-start__hint {
    color: var(--text-muted);
}

.quick-start__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.375rem 0.25rem 0.75rem;
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    background: var(--accent-soft);
    color: var(--text);
    font-size: 0.875rem;
}

.quick-start__clock {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.running,
.rows,
.templates,
.notices {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rows {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.875rem;
    background: var(--surface);
}

.rows:empty {
    display: none;
}

.item {
    display: grid;
    grid-template-columns: 9.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 0.625rem 0.75rem;
}

.rows .item + .item {
    border-top: 1px solid var(--line-soft);
}

.rows .item:hover {
    background: var(--surface-raised);
}

.item--running {
    grid-template-columns: minmax(9.25rem, max-content) minmax(0, 1fr) auto;
    padding: 0.75rem;
    border: 1.5px solid var(--accent);
    border-radius: 0.875rem;
    background: var(--surface);
    box-shadow: var(--shadow-running);
}

.item--flash {
    animation: flash 2s ease-out;
}

@keyframes flash {
    from {
        box-shadow: inset 0 0 0 3px var(--focus);
    }

    to {
        box-shadow: inset 0 0 0 0 transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .item--flash,
    .icon-button[aria-busy="true"] .icon {
        animation: none;
    }
}

.item__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-width: 0;
    height: 3rem;
    padding: 0 0.625rem;
    border: 1px solid var(--line-control);
    border-radius: 0.625rem;
    background: var(--surface-sunken);
    color: var(--text);
    cursor: pointer;
}

.item__toggle:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.item__toggle[data-icon="play"] .icon--stop,
.item__toggle[data-icon="stop"] .icon--play,
.item__toggle[data-icon="none"] .icon {
    display: none;
}

.item__clock {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.item--running .item__toggle {
    height: 4rem;
    padding: 0 1rem;
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

.item--running .item__toggle:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
}

.item--running .item__clock {
    font-size: 1.5rem;
}

/* A past-day item has no Start/Stop; its time is shown, but not as something to press. */
.item__toggle[data-locked="true"],
.item__toggle[data-locked="true"]:hover {
    border-color: var(--line-control);
    border-style: dashed;
    background: transparent;
    cursor: default;
    opacity: 1;
}

.item__body {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
    min-width: 0;
}

.item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    min-width: 0;
}

.item__job {
    font-size: 0.9375rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.item--running .item__job {
    font-size: 1rem;
}

.item__meta {
    margin: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item__meta > :not([hidden]) ~ :not([hidden])::before {
    content: "·";
    margin: 0 0.4em;
}

/* In the running card the description gets its own line, as in the design. */
.item--running .item__text {
    display: block;
    overflow: hidden;
    margin-bottom: 0.1875rem;
    color: var(--text-soft);
    font-size: 0.875rem;
    text-overflow: ellipsis;
}

.item--running .item__meta > .item__text + :not([hidden])::before {
    content: none;
}

.item__error {
    margin: 0;
    color: var(--danger);
    font-size: 0.8125rem;
}

.item__reason {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-style: italic;
}

.item__syncing {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-style: italic;
}

.item__hints-box {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    margin: 0.25rem 0 0;
    padding: 0.25rem 0.25rem 0.25rem 0;
    border-radius: 0.5rem;
    background: var(--accent-soft);
    color: var(--text);
}

.item__hints-box[hidden] {
    display: none;
}

.item__hints {
    flex: 1;
    margin: 0;
    padding: 0.25rem 0.5rem 0.25rem 1.75rem;
    font-size: 0.8125rem;
}

.hint-close {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
}

.hint-close:hover {
    background: var(--accent-soft-hover);
}

.icon-button--hint {
    color: var(--accent);
}

.icon-button--hint:hover {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.field-hints {
    margin: 0;
    padding: 0.375rem 0.625rem 0.375rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--accent-soft);
    color: var(--text);
    font-size: 0.8125rem;
}

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

.item__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.125rem 0.375rem;
}

.item--running .item__actions {
    align-self: start;
}

/* Badges */

.tag {
    display: inline-flex;
    align-items: center;
    height: 1.25rem;
    padding: 0 0.4375rem;
    border-radius: 0.3125rem;
    background: var(--tag);
    color: var(--text-soft);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    min-height: 1.375rem;
    padding: 0 0.5625rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pill--running {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill--running .icon {
    width: 0.5rem;
    height: 0.625rem;
}

.pill--warn {
    border-color: var(--warn-line);
    background: var(--warn-soft);
    color: var(--warn);
    cursor: pointer;
}

.pill--warn:hover {
    border-color: var(--warn);
}

.pill--danger {
    background: var(--danger-soft);
    color: var(--danger);
}

/* Templates */

.templates {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
}

@media (min-width: 60rem) {
    .templates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.templates__group {
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.templates__group:first-child {
    padding-top: 0;
    border-top: 0;
}

.templates__group-caption {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.templates-search {
    position: relative;
    max-width: 28rem;
}

.templates-search__icon {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    color: var(--text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.templates-search input[type="search"] {
    padding-left: 2.25rem;
}

.templates-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem 1.25rem;
}

.templates-layout__column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.templates-layout__column[hidden] {
    display: none;
}

.templates-layout__heading {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* With pins, each column is a single list: the recent templates left, the pinned ones right. */
@media (min-width: 60rem) {
    .templates-layout--pinned {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

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

/* On a phone the pinned templates come first. */
@media (max-width: 59.9375rem) {
    .templates-layout__pinned {
        order: -1;
    }
}

.template__pin[aria-pressed="true"] {
    color: var(--accent);
}

.template__pin[aria-pressed="true"] .icon {
    fill: currentColor;
}

.template {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.625rem 0.625rem 1rem;
    border: 1px solid var(--line-soft);
    border-radius: 0.75rem;
    background: var(--surface-raised);
}

.template:hover {
    border-color: var(--line-strong);
    background: var(--surface);
}

.template__body {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.template__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.template__text {
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template__meta {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template__meta > :not(:first-child)::before {
    content: "·";
    margin: 0 0.4em;
}

.template__recency {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.template__actions {
    display: flex;
    gap: 0.375rem;
}

.template__start {
    padding-left: 0.625rem;
}

.template__start .icon {
    width: 0.5625rem;
    height: 0.6875rem;
}

/* Notices */

.notices {
    display: grid;
    gap: 0.5rem;
}

.notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.625rem 0.75rem 0.625rem 1rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 0.75rem;
    background: var(--surface);
}

.notice__text,
.notice-text {
    margin: 0;
    font-size: 0.9375rem;
}

.notice__actions {
    display: flex;
    gap: 0.5rem;
}

/* Dialogs */

.dialog {
    width: min(35rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 1.75rem;
    border: 0;
    border-radius: 1rem;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-dialog);
}

.dialog--narrow {
    width: min(26rem, calc(100vw - 2rem));
}

.dialog::backdrop {
    background: rgb(31 35 40 / 0.6);
}

.dialog h2 {
    margin-bottom: 0.5rem;
    font-size: 1.375rem;
}

.dialog p {
    font-size: 0.9375rem;
}

.dialog__subtitle {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

.dialog .dialog__subtitle {
    font-size: 0.875rem;
}

.dialog .dialog__note {
    margin: 1rem 0 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.5rem;
}

.field {
    display: grid;
    gap: 0.375rem;
    margin-top: 1rem;
}

.field label {
    font-size: 0.875rem;
    font-weight: 600;
}

.duration {
    margin-inline: 0;
    padding: 0;
    border: 0;
}

.duration legend {
    margin-bottom: 0.375rem;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.duration__inputs {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.duration__inputs label {
    color: var(--text-muted);
    font-weight: 400;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9375rem;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--text-muted);
}

input:disabled,
select:disabled,
textarea:disabled {
    background: var(--surface-sunken);
    color: var(--text-muted);
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

.duration__inputs input,
.duration__inputs select {
    width: 5.5rem;
}

[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-error {
    margin: 0;
    color: var(--danger);
    font-size: 0.875rem;
    white-space: pre-line;
}

.counter {
    justify-self: end;
    color: var(--text-faint);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.75rem;
    margin-top: 0.75rem;
    font-size: 0.9375rem;
}

.checkbox input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--accent);
}

.dialog .banner {
    margin-bottom: 0.5rem;
}

.combobox {
    position: relative;
}

.combobox__list {
    position: absolute;
    z-index: 2;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 16rem;
    margin: 0;
    padding: 0.25rem;
    overflow-y: auto;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 0.625rem;
    box-shadow: var(--shadow-dialog);
}

.combobox__option {
    display: grid;
    gap: 0.125rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

.combobox__option:hover {
    background: var(--hover);
}

.combobox__option[aria-selected="true"] {
    background: var(--accent-soft);
    outline: 2px solid var(--focus);
}

.combobox__option[aria-disabled="true"] {
    color: var(--text-muted);
    cursor: default;
}

.combobox__option .badge {
    justify-self: start;
    padding: 0 0.4375rem;
    border-radius: 0.3125rem;
    background: var(--tag);
    color: var(--text-soft);
    font-size: 0.6875rem;
    font-weight: 600;
}

.combobox__parent {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* The item form's booking type switch: radio buttons drawn as a segmented control. */
.booking-type {
    margin: 0;
    padding: 0;
    border: 0;
}

.booking-type__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.125rem;
    padding: 0.1875rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.625rem;
    background: var(--surface);
}

.booking-type__option {
    position: relative;
    display: flex;
}

.booking-type__option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.booking-type__option span {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 2.125rem;
    padding: 0 0.75rem;
    border-radius: 0.4375rem;
    color: var(--text-soft);
    font-size: 0.875rem;
    font-weight: 500;
}

.booking-type__option:hover span {
    background: var(--hover);
}

.booking-type__option input:checked + span {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.booking-type__option input:focus-visible + span {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.booking-type__option input:disabled {
    cursor: not-allowed;
}

.booking-type__option input:disabled + span {
    opacity: 0.45;
}

/* Visible to assistive tech only, e.g. #job-status announcing the search result count. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.rounding__choices {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.rounding__choice,
.rounding__later {
    min-height: 5.5rem;
    border-radius: 0.75rem;
}

.rounding__later {
    border-color: var(--line-strong);
    background: var(--surface-sunken);
    font-weight: 400;
}

.rounding__later:hover {
    background: var(--surface);
}

.rounding__choice {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.rounding__value {
    font-size: 1.125rem;
    font-weight: 600;
}

@media (max-width: 30rem) {
    .rounding__choices {
        grid-auto-flow: row;
    }

    .rounding__choice,
    .rounding__later {
        min-height: 4rem;
    }
}

/* Toasts */

.toasts {
    position: fixed;
    inset: auto auto 1rem 50%;
    transform: translateX(-50%);
    width: min(32rem, calc(100vw - 2rem));
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    color: inherit;
}

.toasts__region {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.375rem 0.375rem 0.375rem 1rem;
    border-radius: 0.75rem;
    background: var(--strong);
    color: var(--on-strong);
    box-shadow: var(--shadow-dialog);
    font-size: 0.9375rem;
}

.toasts__region--alert .toast {
    background: var(--danger);
    color: var(--surface);
}

.toast p {
    flex: 1;
    margin: 0.625rem 0;
}

.toast button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
}

/* The global focus outline is tuned for the page background; against a toast (already high-contrast
   text on a solid fill, in every variant) the button's own text colour keeps at least 3:1. */
.toast button:focus-visible {
    outline-color: currentColor;
}

/* Report */

.report__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.report__periods {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.125rem;
    padding: 0.1875rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.625rem;
    background: var(--surface);
}

.segmented__button {
    min-height: 2.125rem;
    padding: 0 0.75rem;
    border: 0;
    border-radius: 0.4375rem;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.segmented__button:hover {
    background: var(--hover);
}

.segmented__button[aria-pressed="true"] {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.report__custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.report__custom input {
    width: auto;
    min-height: 2.125rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.report__custom .button[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.report__state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.report__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    transition: opacity 0.2s;
}

.report__grid--loading {
    opacity: 0.55;
}

.report__kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpi,
.card {
    border: 1px solid var(--line);
    border-radius: 0.875rem;
    background: var(--surface);
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.875rem 1rem;
}

.kpi__label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kpi__value {
    font-size: 1.375rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.kpi__note {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    padding: 1rem 1.25rem;
}

/* The chart fills its card, so the pie and the columns line up with the KPI column. */
.report__canvas {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 18rem;
}

.report__table-wrap {
    overflow-x: auto;
}

.report__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.report__table th {
    padding: 0 0.75rem;
    border-bottom: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.report__table .num {
    text-align: right;
}

.sort {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.sort:hover,
th[aria-sort] .sort {
    color: var(--text);
}

th[aria-sort="ascending"] .sort::after {
    content: "▲";
    font-size: 0.625rem;
}

th[aria-sort="descending"] .sort::after {
    content: "▼";
    font-size: 0.625rem;
}

.report__table td {
    padding: 0.625rem 0.75rem;
    border-top: 1px solid var(--line-soft);
}

.report__table td:first-child {
    overflow-wrap: anywhere;
}

.report__row:hover,
.report__row:focus-visible,
.report__row--highlight {
    background: var(--accent-soft);
}

.report__row:focus-visible {
    outline-offset: -2px;
}

.swatch {
    display: inline-block;
    flex: none;
    width: 0.625rem;
    height: 0.625rem;
    margin-right: 0.5rem;
    border-radius: 0.125rem;
    background: var(--chart-other);
}

.swatch[data-color="chart-1"] {
    background: var(--chart-1);
}

.swatch[data-color="chart-2"] {
    background: var(--chart-2);
}

.swatch[data-color="chart-3"] {
    background: var(--chart-3);
}

.swatch[data-color="chart-4"] {
    background: var(--chart-4);
}

.swatch[data-color="chart-5"] {
    background: var(--chart-5);
}

.swatch[data-color="chart-internal"] {
    background: var(--chart-internal);
}

.swatch[data-color="chart-absent"] {
    background: var(--chart-absent);
}

/* Desktop: KPIs on the left, the pie in the middle, the days on the right, the jobs below. */
@media (min-width: 64rem) {
    .report__grid {
        grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr) minmax(0, 1.4fr);
    }

    .report__kpis {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
    }

    .report__jobs {
        grid-column: 1 / -1;
    }
}

@media (min-width: 40.0625rem) and (max-width: 63.9375rem) {
    .report__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report__kpis,
    .report__jobs {
        grid-column: 1 / -1;
    }

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

/* Phone: compact bar, stacked rows, the running item as one accent card, "Tag abschließen" at the end.
   Every control keeps a touch target of at least 44 px. */
@media (max-width: 40rem) {
    .topbar {
        padding: 0 0.375rem 0 1rem;
    }

    .topbar__brand {
        gap: 0.75rem;
    }

    .topbar__wordmark {
        font-size: 0.75rem;
    }

    .topbar__nav {
        gap: 0.75rem;
    }

    .topbar__tab {
        font-size: 0.8125rem;
        font-weight: 400;
    }

    .topbar__tools {
        gap: 0;
    }

    .topbar__who {
        padding: 0 0.25rem 0 0;
    }

    .topbar__user,
    .topbar__divider {
        display: none;
    }

    /* Only the dot while connected; any other state also says so in words. */
    .status[data-status="online"] .status__text {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .topbar__button {
        width: 2.75rem;
        height: 2.75rem;
    }

    .main {
        gap: 1.25rem;
        padding: 1rem;
    }

    .day {
        gap: 0.5rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
        letter-spacing: -0.01em;
    }

    .day__date {
        font-size: 0.6875rem;
    }

    .day-nav input[type="date"] {
        min-height: 2.75rem;
    }

    .day__close {
        display: none;
    }

    .totals {
        gap: 0.375rem;
        color: var(--text-muted);
        font-size: 0.8125rem;
    }

    .totals__pair {
        flex-direction: row;
        align-items: baseline;
        gap: 0.25rem;
    }

    .totals__pair + .totals__pair::before {
        content: "·";
        margin-right: 0.125rem;
    }

    /* A past day hides "erfasst"; "gebucht" then starts the line. */
    .totals__pair[hidden] + .totals__pair::before {
        content: none;
    }

    .totals dt {
        order: 1;
        font-size: inherit;
    }

    .totals dd {
        color: var(--text);
        font-size: inherit;
    }

    .button.day-close-bottom {
        display: inline-flex;
        min-height: 3rem;
        border-radius: 0.75rem;
    }

    .section__head h2 {
        font-size: 0.9375rem;
    }

    .button--compact {
        min-height: 2.75rem;
    }

    .icon-button {
        width: 2.75rem;
        height: 2.75rem;
    }

    .pill {
        min-height: 1.75rem;
    }

    /* The tag keeps its size; an invisible margin around it makes the 44 px touch target. */
    .pill--warn {
        position: relative;
    }

    .pill--warn::after {
        content: "";
        position: absolute;
        inset: -0.5rem -0.25rem;
    }

    .item {
        grid-template-areas:
            "body toggle"
            "body actions";
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.25rem 0.75rem;
        align-items: start;
        padding: 0.5rem 0.5rem 0.5rem 1rem;
    }

    .item__body {
        grid-area: body;
        align-self: center;
    }

    .item__toggle {
        grid-area: toggle;
        height: 2.75rem;
        min-width: 5.5rem;
    }

    .item__clock {
        font-size: 1.125rem;
    }

    /* Zero width with a full-width minimum: the actions wrap under each other instead of widening
       the time column and squeezing the text. */
    .item__actions {
        grid-area: actions;
        gap: 0;
        width: 0;
        min-width: 100%;
    }

    .item__job {
        font-size: 0.875rem;
    }

    .item__meta {
        font-size: 0.75rem;
    }

    .item--running {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 0.875rem 0.5rem 0.5rem 1rem;
        border: 0;
        background: var(--accent);
        color: var(--on-accent);
    }

    .item--running .item__toggle {
        height: auto;
        min-height: 3.5rem;
        padding: 0 0.5rem;
        border-color: transparent;
        background: transparent;
    }

    .item--running .item__toggle:hover {
        border-color: var(--on-accent);
        background: transparent;
    }

    .item--running .item__clock {
        font-size: 1.5rem;
    }

    .item--running .item__job {
        font-size: 0.9375rem;
    }

    .item--running .item__text,
    .item--running .item__meta {
        color: var(--on-accent);
    }

    .item--running .item__actions {
        align-self: end;
    }

    .item--running .icon-button,
    .item--running .icon-button:hover {
        color: var(--on-accent);
    }

    .item--running .icon-button:hover {
        background: rgb(255 255 255 / 0.12);
    }

    .item--running .pill--running {
        background: var(--surface);
    }

    .item--running :focus-visible {
        outline-color: var(--on-accent);
    }

    /* Red on the accent fill falls below 4.5:1, so errors and hints sit on their own surface. */
    .item--running .item__error,
    .item--running .item__syncing,
    .item--running .item__hints-box {
        margin-top: 0.25rem;
        padding: 0.375rem 0.625rem;
        border-radius: 0.5rem;
        background: var(--surface);
        color: var(--danger);
    }

    .item--running .item__syncing {
        color: var(--text-muted);
    }

    .item--running .item__hints-box {
        color: var(--text);
    }

    .rows .item:hover {
        background: transparent;
    }

    /* The add button follows the list, as in the design; the heading stays first. */
    .section--items .section__head {
        display: contents;
    }

    .section--items > * {
        order: 2;
    }

    .section--items h2 {
        order: 0;
    }

    .section--items .section__add {
        order: 1;
        width: 100%;
        min-height: 3rem;
        border-color: var(--line);
        border-radius: 0.75rem;
    }

    .section--items .empty,
    .section--items .day-retry,
    .running,
    .section--items > .rows {
        order: 0;
    }

    .template {
        padding: 0.375rem 0.375rem 0.375rem 0.875rem;
    }

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

    .template__start {
        width: 2.75rem;
        padding: 0;
        border-radius: 0.625rem;
    }

    .template__start .icon {
        width: 0.6875rem;
        height: 0.8125rem;
    }

    .dialog {
        padding: 1.25rem;
    }

    .dialog__actions .button {
        flex: 1 1 auto;
    }

    .report__periods {
        align-items: stretch;
        width: 100%;
    }

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

    .segmented__button,
    .report__custom input {
        min-height: 2.75rem;
    }

    .report__custom input {
        flex: 1 1 8rem;
    }

    .card {
        padding: 0.875rem 1rem;
    }

    .report__canvas {
        min-height: 16rem;
    }

    /* The legend of up to eight slices goes below the pie; without the height it would page. */
    #report-pie {
        min-height: 24rem;
    }

    .kpi__value {
        font-size: 0.9375rem;
        white-space: nowrap;
    }

    /* Phone: every job is a small card; the header stays as a row of sort buttons. */
    .report__table,
    .report__table tbody,
    .report__table td {
        display: block;
    }

    .report__table thead tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0 1rem;
        border-bottom: 1px solid var(--line);
    }

    .report__table th {
        padding: 0;
        border: 0;
    }

    .report__row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.125rem 0.75rem;
        padding: 0.625rem 0.25rem;
        border-top: 1px solid var(--line-soft);
    }

    .report__table td,
    .report__table .num {
        padding: 0;
        border: 0;
        text-align: left;
    }

    .report__table td[data-part="job"] {
        grid-column: 1 / -1;
        font-weight: 600;
    }

    .report__table td[data-part="customer"] {
        grid-column: 1 / 3;
    }

    .report__table .num[data-part="hours"] {
        text-align: right;
    }

    .report__table td[data-label]:not([data-part="hours"])::before {
        content: attr(data-label) " ";
        color: var(--text-muted);
        font-family: var(--font-sans);
        font-size: 0.75rem;
    }

    .sort {
        min-height: 2.75rem;
    }
}
