/* Timzo shell and hand-rolled surfaces. Tokens live in css/design-tokens.css. */

html, body {
    margin: 0;
    font-family: var(--tz-font);
}

body {
    background: var(--tz-canvas);
    color: var(--tz-ink-1);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.015em;
}

/* ---------- The Timzo shell: one frame for every module ---------- */
/* A sidebar on a desktop, a top bar and a tab bar on a phone. data-module on .tz-shell picks the module's accent;
   everything below reads --tz-mod. The modules: Clock (Timzo's own violet), Swing (fairway green), Town (ocean
   blue, with Town's warm orange for what's overdue). */

.tz-shell {
    --tz-side-width: 264px;
    --tz-tabbar-height: 0px;
    --tz-mod: var(--tz-accent);
    --tz-mod-strong: var(--tz-accent-strong);
    --tz-mod-wash: var(--tz-accent-wash);
    --tz-mod-wash-strong: var(--tz-accent-wash-strong);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
}

[data-module="clock"] {
    --tz-mod: #6D4AFF;
    --tz-mod-strong: #5836E8;
    --tz-mod-wash: rgba(109, 74, 255, 0.10);
    --tz-mod-wash-strong: rgba(109, 74, 255, 0.18);
    --tz-mod-tile: linear-gradient(140deg, #6D4AFF 0%, #9B7BFF 100%);
}

[data-module="swing"] {
    --tz-mod: #16A06A;
    --tz-mod-strong: #0F7F53;
    --tz-mod-wash: rgba(22, 160, 106, 0.10);
    --tz-mod-wash-strong: rgba(22, 160, 106, 0.18);
    --tz-mod-tile: linear-gradient(140deg, #13965F 0%, #4CC38A 100%);
}

[data-module="town"] {
    --tz-mod: #2D7DD2;
    --tz-mod-strong: #1F5F8B;
    --tz-mod-wash: rgba(45, 125, 210, 0.10);
    --tz-mod-wash-strong: rgba(45, 125, 210, 0.18);
    --tz-mod-tile: linear-gradient(140deg, #1F5F8B 0%, #4C9BE6 100%);
}

[data-module="cook"] {
    --tz-mod: #C24E26;
    --tz-mod-strong: #9A3B1B;
    --tz-mod-wash: rgba(194, 78, 38, 0.10);
    --tz-mod-wash-strong: rgba(194, 78, 38, 0.18);
    --tz-mod-tile: linear-gradient(140deg, #A8401D 0%, #E8784A 100%);
}

[data-module="start"] {
    --tz-mod-tile: linear-gradient(140deg, var(--tz-accent) 0%, var(--tz-teal) 100%);
}

html.tz-dark [data-module="clock"] { --tz-mod: #8F76FF; --tz-mod-strong: #A38FFF; --tz-mod-wash: rgba(143, 118, 255, 0.14); --tz-mod-wash-strong: rgba(143, 118, 255, 0.24); }
html.tz-dark [data-module="swing"] { --tz-mod: #3BCB8E; --tz-mod-strong: #6FDDAE; --tz-mod-wash: rgba(59, 203, 142, 0.14); --tz-mod-wash-strong: rgba(59, 203, 142, 0.24); }
html.tz-dark [data-module="town"] { --tz-mod: #6CAEF0; --tz-mod-strong: #97C6F5; --tz-mod-wash: rgba(108, 174, 240, 0.14); --tz-mod-wash-strong: rgba(108, 174, 240, 0.24); }
html.tz-dark [data-module="cook"] { --tz-mod: #F08A60; --tz-mod-strong: #F5A887; --tz-mod-wash: rgba(240, 138, 96, 0.14); --tz-mod-wash-strong: rgba(240, 138, 96, 0.24); }

/* Inside a module, MudBlazor's buttons and inputs take the module's colour. Clock keeps Timzo's violet. */
.tz-shell[data-module="swing"],
.tz-shell[data-module="town"],
.tz-shell[data-module="cook"] {
    --mud-palette-primary: var(--tz-mod);
    --mud-palette-primary-darken: var(--tz-mod-strong);
    --mud-palette-primary-lighten: var(--tz-mod);
    --mud-palette-primary-hover: var(--tz-mod-wash);
}

.tz-shell[data-module="swing"] { --mud-palette-primary-rgb: 22, 160, 106; }
.tz-shell[data-module="town"] { --mud-palette-primary-rgb: 45, 125, 210; }
.tz-shell[data-module="cook"] { --mud-palette-primary-rgb: 194, 78, 38; }

/* ---------- Brand ---------- */

.tz-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--tz-ink-1);
    font-weight: 650;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
}

/* A pulse-dot mark: our own, nothing borrowed. Inside a module it takes the module's colour. */
.tz-brand__mark {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-mod-tile, linear-gradient(140deg, var(--tz-accent) 0%, var(--tz-teal) 100%));
    box-shadow: 0 4px 14px var(--tz-mod-wash-strong);
    position: relative;
}

.tz-brand__mark::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-surface-1);
}

.tz-brand__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* A module's mark: its icon, white, on its own colour — the family resemblance is the shape. */
.tz-modmark {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: var(--tz-mod-tile);
    box-shadow: 0 2px 6px var(--tz-mod-wash-strong);
}

/* ---------- Sidebar ---------- */

.tz-side {
    position: sticky;
    top: 0;
    flex: none;
    width: var(--tz-side-width);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 12px 12px;
    box-sizing: border-box;
    background: var(--tz-surface-1);
    border-right: 1px solid var(--tz-line);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 20;
    transition: width var(--tz-transition);
}

.tz-side__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px 8px;
}

.tz-switcher {
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: var(--tz-radius);
    background: var(--tz-surface-2);
}

.tz-modtile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border-radius: 12px;
    color: var(--tz-ink-1);
    text-decoration: none;
    opacity: 0.72;
    transition: opacity var(--tz-transition), background var(--tz-transition), transform var(--tz-transition);
}

.tz-modtile:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.tz-modtile[aria-current="page"] {
    opacity: 1;
    background: var(--tz-surface-1);
    box-shadow: var(--tz-shadow-1);
}

.tz-modtile__name {
    font-weight: 650;
    font-size: 0.9rem;
}

.tz-side__module {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 8px 6px;
}

.tz-side__module-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.015em;
    color: var(--tz-ink-1);
}

.tz-side__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tz-side__label {
    padding: 16px 12px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tz-ink-3);
}

.tz-shell-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--tz-ink-2);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background var(--tz-transition), color var(--tz-transition);
}

.tz-shell-link:hover {
    background: var(--tz-surface-2);
    color: var(--tz-ink-1);
}

.tz-shell-link[aria-current="page"] {
    background: var(--tz-mod-wash);
    color: var(--tz-mod);
}

.tz-shell-link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--tz-mod);
}

.tz-shell-link__icon {
    position: relative;
    display: inline-flex;
}

.tz-shell-link__count {
    position: absolute;
    top: -7px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 9px;
    background: #B4500F;
    color: #FFFFFF;
    border: 2px solid var(--tz-surface-1);
    font-size: 11px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.tz-side__bottom {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--tz-line);
}

.tz-side__credit {
    padding: 8px 12px 0;
    font-size: 0.75rem;
    color: var(--tz-ink-3);
    text-decoration: none;
}

.tz-side__credit:hover {
    color: var(--tz-ink-1);
}

/* Collapsed: icons only. shell.js toggles html.tz-side-collapsed and remembers it. */
html.tz-side-collapsed .tz-shell {
    --tz-side-width: 76px;
}

html.tz-side-collapsed .tz-brand__name,
html.tz-side-collapsed .tz-side__module-name,
html.tz-side-collapsed .tz-shell-link__label,
html.tz-side-collapsed .tz-side__label,
html.tz-side-collapsed .tz-account__names,
html.tz-side-collapsed .tz-side__credit {
    display: none;
}

html.tz-side-collapsed .tz-side__top {
    flex-direction: column;
}

html.tz-side-collapsed .tz-switcher {
    flex-direction: column;
    align-items: center;
}

/* The account menu is wider than a collapsed sidebar, which scrolls and would clip it: open it beside the sidebar,
   fixed to the window, instead. */
html.tz-side-collapsed .tz-account__menu {
    position: fixed;
    left: calc(var(--tz-side-width) + 8px);
    bottom: 12px;
}

html.tz-side-collapsed .tz-side__module,
html.tz-side-collapsed .tz-shell-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* Collapsed, the module's own buttons come first and stand out; the switcher to the other modules moves to the
   bottom, smaller and quieter, just above the account. The open sidebar keeps its order. */
html.tz-side-collapsed .tz-side__top {
    order: 0;
}

html.tz-side-collapsed .tz-side__module {
    display: none;
}

html.tz-side-collapsed .tz-side__nav {
    order: 1;
    gap: 4px;
}

html.tz-side-collapsed .tz-side__nav--admin {
    order: 2;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--tz-line);
}

html.tz-side-collapsed .tz-side__nav .tz-shell-link {
    width: 48px;
    min-height: 46px;
    margin: 0 auto;
    color: var(--tz-ink-1);
}

html.tz-side-collapsed .tz-side__nav .tz-shell-link__icon svg {
    width: 24px;
    height: 24px;
}

html.tz-side-collapsed .tz-side__nav--admin .tz-shell-link {
    min-height: 40px;
    color: var(--tz-ink-2);
}

html.tz-side-collapsed .tz-side__nav--admin .tz-shell-link__icon svg {
    width: 20px;
    height: 20px;
}

html.tz-side-collapsed .tz-side > .tz-switcher {
    order: 3;
    margin-top: auto;
    gap: 2px;
    padding: 10px 0 0;
    border-radius: 0;
    background: transparent;
    border-top: 1px solid var(--tz-line);
}

html.tz-side-collapsed .tz-side > .tz-switcher .tz-modtile {
    padding: 3px;
    opacity: 0.55;
}

html.tz-side-collapsed .tz-side > .tz-switcher .tz-modtile[aria-current="page"] {
    opacity: 1;
    background: transparent;
    box-shadow: none;
}

/* The switcher at the bottom is the icons alone, in each module's colour, so it doesn't pull the eye. */
html.tz-side-collapsed .tz-side > .tz-switcher .tz-modmark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    color: var(--tz-mod);
    box-shadow: none;
}

html.tz-side-collapsed .tz-side > .tz-switcher .tz-modmark svg {
    width: 20px;
    height: 20px;
}

/* The module's own buttons are filled tiles in its colour with the icon inside, like the module marks elsewhere in the
   app; the page you're on is the full colour with a ring around it. */
html.tz-side-collapsed .tz-side > .tz-side__nav:not(.tz-side__nav--admin) {
    gap: 8px;
}

html.tz-side-collapsed .tz-side > .tz-side__nav:not(.tz-side__nav--admin) .tz-shell-link {
    width: 42px;
    min-height: 42px;
    border-radius: 12px;
    background: var(--tz-mod-tile);
    color: #FFFFFF;
    opacity: 0.62;
    transition: opacity var(--tz-transition), box-shadow var(--tz-transition);
}

html.tz-side-collapsed .tz-side > .tz-side__nav:not(.tz-side__nav--admin) .tz-shell-link:hover {
    opacity: 0.9;
}

html.tz-side-collapsed .tz-side > .tz-side__nav:not(.tz-side__nav--admin) .tz-shell-link[aria-current="page"] {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--tz-surface-1), 0 0 0 4px var(--tz-mod);
}

html.tz-side-collapsed .tz-side > .tz-side__nav:not(.tz-side__nav--admin) .tz-shell-link[aria-current="page"]::before {
    display: none;
}

html.tz-side-collapsed .tz-side > .tz-side__nav:not(.tz-side__nav--admin) .tz-shell-link__icon svg {
    width: 22px;
    height: 22px;
}

html.tz-side-collapsed .tz-side__bottom {
    order: 4;
    margin-top: 0;
}

/* On Start (and the pages outside every module) the main buttons are the modules themselves: no second row of them
   at the bottom, and the account goes back to the bottom on its own. */
html.tz-side-collapsed .tz-side--start > .tz-switcher {
    display: none;
}

html.tz-side-collapsed .tz-side--start .tz-side__bottom {
    margin-top: auto;
}

html.tz-side-collapsed.tz-side-tight .tz-side--start .tz-side__bottom {
    margin-top: 0;
}

/* "Meer": only when the collapsed sidebar is too low for everything (shell.js sets html.tz-side-tight). The modules
   and Beheer then open beside the sidebar, and the module's own buttons keep their place. */
.tz-side-more {
    display: none;
}

.tz-side-more > summary {
    list-style: none;
    cursor: pointer;
}

.tz-side-more > summary::-webkit-details-marker {
    display: none;
}

html.tz-side-collapsed.tz-side-tight .tz-side > .tz-switcher,
html.tz-side-collapsed.tz-side-tight .tz-side__nav--admin {
    display: none;
}

html.tz-side-collapsed.tz-side-tight .tz-side-more {
    display: block;
    order: 3;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--tz-line);
}

html.tz-side-collapsed .tz-side-more > summary {
    width: 48px;
    min-height: 44px;
    margin: 0 auto;
}

html.tz-side-collapsed .tz-side-more[open] > summary {
    background: var(--tz-mod-wash);
    color: var(--tz-mod);
}

.tz-side-more__sheet {
    position: fixed;
    left: calc(var(--tz-side-width) + 8px);
    bottom: 12px;
    z-index: 40;
    width: 240px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 8px 8px 12px;
    box-sizing: border-box;
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    border-radius: 16px;
    box-shadow: var(--tz-shadow-2);
}

.tz-side-more__sheet .tz-switcher--sheet,
html.tz-side-collapsed .tz-side-more__sheet .tz-switcher--sheet {
    flex-direction: column;
    align-items: stretch;
    background: transparent;
    padding: 0;
}

.tz-side-more__sheet .tz-switcher--sheet .tz-modtile {
    opacity: 1;
    padding: 6px 8px;
}

html.tz-side-collapsed .tz-side-more__sheet .tz-side__label,
html.tz-side-collapsed .tz-side-more__sheet .tz-shell-link__label {
    display: inline;
}

html.tz-side-collapsed .tz-side-more__sheet .tz-side__label {
    display: block;
    padding: 10px 8px 4px;
}

html.tz-side-collapsed .tz-side-more__sheet .tz-shell-link {
    justify-content: flex-start;
    width: auto;
    min-height: 42px;
    margin: 0;
    padding: 0 10px;
}

html.tz-side-collapsed .tz-side-more__sheet .tz-shell-link__icon svg {
    width: 20px;
    height: 20px;
}

html.tz-side-collapsed .tz-side-more__sheet .tz-shell-link[aria-current="page"]::before {
    display: none;
}

/* ---------- Stage ---------- */

.tz-stage {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tz-main {
    flex: 1;
    width: 100%;
    max-width: var(--tz-content-width);
    box-sizing: border-box;
    margin: 0 auto;
    padding: var(--tz-space-6) var(--tz-space-5) var(--tz-space-7);
}

.tz-mobilebar,
.tz-tabbar {
    display: none;
}

/* ---------- Account ---------- */

.tz-avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: var(--tz-radius-pill);
    display: grid;
    place-items: center;
    background: var(--tz-mod-wash-strong);
    color: var(--tz-mod);
    font-weight: 650;
    font-size: 0.8125rem;
    user-select: none;
}

/* The shell is static SSR, so these are plain controls: form-post buttons and CSS-only <details> menus. */
.tz-icon-button {
    appearance: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: var(--tz-radius-pill);
    background: none;
    color: var(--tz-ink-2);
    cursor: pointer;
    transition: background var(--tz-transition), color var(--tz-transition);
}

.tz-icon-button:hover {
    background: var(--tz-surface-2);
    color: var(--tz-ink-1);
}

.tz-account {
    position: relative;
}

.tz-account > summary,
.tz-more > summary {
    list-style: none;
    cursor: pointer;
}

.tz-account > summary::-webkit-details-marker,
.tz-more > summary::-webkit-details-marker {
    display: none;
}

.tz-account__who {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 12px;
}

.tz-account__who:hover {
    background: var(--tz-surface-2);
}

.tz-account__names {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tz-account__name {
    font-weight: 650;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tz-account__mail {
    color: var(--tz-ink-3);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Opens upward: it sits at the foot of the sidebar. */
.tz-account__menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 1200;
    min-width: 232px;
    padding: 6px;
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    border-radius: var(--tz-radius);
    box-shadow: var(--tz-shadow-2);
}

.tz-account__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: var(--tz-radius-sm);
    color: var(--tz-ink-1);
    font-size: 0.875rem;
    text-align: left;
    text-decoration: none;
    transition: background var(--tz-transition);
}

.tz-account__item:hover {
    background: var(--tz-surface-2);
}

.tz-account__item--button {
    appearance: none;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
}

.tz-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Phone: top bar, tab bar and "Meer" ---------- */

@media (max-width: 900px) {
    .tz-shell {
        --tz-tabbar-height: 72px;
    }

    .tz-side {
        display: none;
    }

    .tz-mobilebar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        height: 56px;
        padding: 0 16px;
        background: color-mix(in srgb, var(--tz-surface-1) 92%, transparent);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--tz-line);
    }

    .tz-main {
        padding: var(--tz-space-5) var(--tz-space-4) calc(var(--tz-tabbar-height) + 32px + env(safe-area-inset-bottom));
    }

    .tz-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        /* Above a page's own pinned button (Swing's New session), below MudBlazor's dialogs. */
        z-index: 1100;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
        background: var(--tz-surface-1);
        border-top: 1px solid var(--tz-line);
    }

    .tz-shell-link--compact {
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        min-height: 56px;
        padding: 0 2px;
        font-size: 0.7rem;
        text-align: center;
    }

    .tz-shell-link--compact .tz-shell-link__label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tz-shell-link--compact[aria-current="page"]::before {
        display: none;
    }

    .tz-more[open] > summary {
        background: var(--tz-mod-wash);
        color: var(--tz-mod);
    }

    .tz-more__sheet {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: calc(var(--tz-tabbar-height) + 8px + env(safe-area-inset-bottom));
        max-height: 70vh;
        overflow-y: auto;
        padding: 8px 8px 12px;
        background: var(--tz-surface-1);
        border: 1px solid var(--tz-line);
        border-radius: 20px;
        box-shadow: var(--tz-shadow-2);
    }

    .tz-switcher--sheet {
        flex-direction: column;
        background: transparent;
        padding: 0;
    }

    .tz-switcher--sheet .tz-modtile {
        opacity: 1;
        padding: 6px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tz-side,
    .tz-modtile,
    .tz-shell-link {
        transition: none;
    }
}


/* ---------- Cards and page furniture ---------- */

.tz-card {
    background: var(--tz-surface-1) !important;
    border: 1px solid var(--tz-line);
    border-radius: var(--tz-radius-lg) !important;
    box-shadow: var(--tz-shadow-1) !important;
}

.tz-page {
    padding: 0 !important;
}

.tz-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--tz-space-4);
    margin-bottom: var(--tz-space-5);
    flex-wrap: wrap;
}

.tz-page-head__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 640;
    letter-spacing: -0.02em;
}

.tz-page-head__sub {
    color: var(--tz-ink-2);
    font-size: 0.9rem;
    margin-top: 2px;
}

.tz-pill {
    border-radius: var(--tz-radius-pill) !important;
}

.tz-hidden {
    display: none;
}

.tz-numeric {
    font-family: var(--tz-font-numeric);
    font-variant-numeric: tabular-nums;
}

/* ---------- Sign-in / auth screens ---------- */

.tz-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--tz-space-5);
    background:
        radial-gradient(1000px 520px at 15% -10%, var(--tz-accent-wash) 0%, transparent 60%),
        radial-gradient(760px 420px at 100% 110%, rgba(18, 181, 163, 0.12) 0%, transparent 60%),
        var(--tz-canvas);
}

.tz-auth__card {
    width: 100%;
    max-width: 404px;
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    border-radius: var(--tz-radius-lg);
    box-shadow: var(--tz-shadow-2);
    padding: var(--tz-space-6);
}

.tz-auth__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--tz-space-5);
}

.tz-auth__title {
    margin: 0 0 var(--tz-space-1);
    font-size: 1.375rem;
    font-weight: 640;
    letter-spacing: -0.02em;
}

.tz-auth__sub {
    margin: 0 0 var(--tz-space-5);
    color: var(--tz-ink-2);
    font-size: 0.9rem;
}

.tz-field {
    margin-bottom: var(--tz-space-4);
}

.tz-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tz-ink-2);
}

.tz-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    font: inherit;
    color: var(--tz-ink-1);
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line-strong);
    border-radius: var(--tz-radius);
    transition: border-color var(--tz-transition), box-shadow var(--tz-transition);
}

.tz-input:focus {
    outline: none;
    border-color: var(--tz-accent);
    box-shadow: 0 0 0 3px var(--tz-accent-wash);
}

.tz-button {
    width: 100%;
    padding: 12px 18px;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--tz-accent);
    border: none;
    border-radius: var(--tz-radius-pill);
    cursor: pointer;
    transition: background var(--tz-transition), transform var(--tz-transition), box-shadow var(--tz-transition);
}

.tz-button:hover {
    background: var(--tz-accent-strong);
    box-shadow: var(--tz-shadow-accent);
    transform: translateY(-1px);
}

.tz-button:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.tz-alert {
    padding: 11px 14px;
    border-radius: var(--tz-radius);
    font-size: 0.875rem;
    margin-bottom: var(--tz-space-4);
    border: 1px solid transparent;
}

.tz-alert--error {
    background: color-mix(in srgb, var(--tz-rose) 12%, transparent);
    border-color: color-mix(in srgb, var(--tz-rose) 34%, transparent);
    color: var(--tz-ink-1);
}

.tz-alert--info {
    background: var(--tz-accent-wash);
    border-color: var(--tz-accent-wash-strong);
    color: var(--tz-ink-1);
}

.tz-validation {
    color: var(--tz-rose);
    font-size: 0.8125rem;
    margin-top: 4px;
}

.tz-auth__foot {
    margin-top: var(--tz-space-5);
    text-align: center;
    color: var(--tz-ink-3);
    font-size: 0.8125rem;
}

/* ---------- Timer pill ---------- */

/* A single floating control rather than a full-width description bar. */
.tz-timer {
    display: flex;
    align-items: center;
    gap: var(--tz-space-3);
    padding: var(--tz-space-2) var(--tz-space-2) var(--tz-space-2) var(--tz-space-5);
    margin-bottom: var(--tz-space-6);
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    border-radius: var(--tz-radius-pill);
    box-shadow: var(--tz-shadow-2);
    transition: border-color var(--tz-transition), box-shadow var(--tz-transition);
}

.tz-timer--running {
    border-color: color-mix(in srgb, var(--tz-running) 45%, transparent);
    box-shadow: var(--tz-shadow-2), 0 0 0 4px color-mix(in srgb, var(--tz-running) 12%, transparent);
}

.tz-timer__field {
    flex: 1 1 auto;
    min-width: 0;
}

.tz-timer__description input {
    font-size: 1rem !important;
}

.tz-timer__project {
    flex: 0 0 auto;
    width: 190px;
    max-width: 34vw;
}

.tz-timer__elapsed {
    flex: 0 0 auto;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 0 var(--tz-space-2);
    color: var(--tz-ink-1);
}

.tz-timer--running .tz-timer__elapsed {
    color: var(--tz-running);
}

.tz-timer__button {
    flex: 0 0 auto;
    border-radius: var(--tz-radius-pill) !important;
    min-width: 116px;
    height: 46px;
}

.tz-timer__button--start {
    background: var(--tz-accent) !important;
    color: #fff !important;
    box-shadow: var(--tz-shadow-accent) !important;
}

.tz-timer__button--stop {
    background: var(--tz-running) !important;
    color: #08201d !important;
}

/* The running state gets a slow breath rather than a blink — visible, not nagging. */
.tz-timer--running .tz-timer__button--stop {
    animation: tz-breathe 2.6s ease-in-out infinite;
}

@keyframes tz-breathe {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tz-running) 42%, transparent); }
    50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--tz-running) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    .tz-timer--running .tz-timer__button--stop {
        animation: none;
    }
}

@media (max-width: 760px) {
    .tz-timer {
        flex-wrap: wrap;
        border-radius: var(--tz-radius-lg);
        padding: var(--tz-space-3);
    }

    .tz-timer__project {
        width: 100%;
        max-width: none;
    }
}

/* ---------- Day groups ---------- */

.tz-day {
    margin-bottom: var(--tz-space-5);
}

.tz-day__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 var(--tz-space-2) var(--tz-space-2);
}

.tz-day__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 640;
}

.tz-day__total {
    font-size: 0.9375rem;
    font-weight: 640;
    color: var(--tz-ink-2);
}

.tz-day__rows {
    overflow: hidden;
}

/* ---------- Entry rows ---------- */

.tz-row {
    display: flex;
    align-items: center;
    gap: var(--tz-space-3);
    padding: var(--tz-space-2) var(--tz-space-4);
    border-bottom: 1px solid var(--tz-line);
    transition: background var(--tz-transition);
    min-height: 52px;
}

.tz-row:last-child {
    border-bottom: none;
}

.tz-row:hover {
    background: var(--tz-surface-2);
}

.tz-row--running {
    background: color-mix(in srgb, var(--tz-running) 7%, transparent);
}

.tz-row__description {
    flex: 1 1 auto;
    min-width: 0;
}

.tz-row__project {
    flex: 0 0 auto;
    width: 176px;
    max-width: 30vw;
}

.tz-row__tags {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
    max-width: 190px;
}

.tz-row__value--tags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Untagged rows show only a faint marker, so the affordance is there without adding clutter. */
.tz-row__tag-add {
    color: var(--tz-ink-3);
    opacity: 0.45;
    transition: opacity var(--tz-transition);
}

.tz-row:hover .tz-row__tag-add {
    opacity: 1;
}

.tz-row__editor--tags input {
    width: 150px;
    font-size: 0.8125rem;
}

.tz-row__times {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--tz-ink-2);
    font-size: 0.875rem;
}

.tz-row__duration {
    flex: 0 0 auto;
    width: 86px;
    text-align: right;
    font-weight: 640;
    font-size: 0.9375rem;
}

.tz-row__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Every value is a button, because every value is editable. */
.tz-row__value {
    appearance: none;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--tz-radius-sm);
    padding: 5px 7px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: text;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background var(--tz-transition), border-color var(--tz-transition);
}

.tz-row__value:hover {
    background: var(--tz-surface-1);
    border-color: var(--tz-line-strong);
}

.tz-row__value--grow {
    width: 100%;
}

.tz-row__value--time {
    padding: 5px 4px;
}

.tz-row__value--duration {
    width: 100%;
    text-align: right;
}

.tz-row__value--live {
    color: var(--tz-running);
    cursor: default;
}

.tz-row__value--live:hover {
    background: none;
    border-color: transparent;
}

.tz-row__placeholder {
    color: var(--tz-ink-3);
}

/* The day is already the group heading, so the row only carries a way to change it. */
.tz-row__value--date {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    color: var(--tz-ink-3);
}

.tz-row__value--date:hover {
    color: var(--tz-ink-2);
}

.tz-row__editor--date {
    width: 6.5rem;
    font-size: 0.75rem;
}

.tz-row__dash {
    color: var(--tz-ink-3);
}

.tz-row__running-dash {
    color: var(--tz-running);
    cursor: default;
}

.tz-row__nextday,
.tz-row__editor--time {
    font-size: 0.75rem;
}

.tz-row__nextday {
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: var(--tz-radius-sm);
    background: var(--tz-surface-3);
    color: var(--tz-ink-2);
}

.tz-row__editor {
    margin: 0 !important;
}

.tz-row__editor--time input {
    width: 62px;
    text-align: center;
}

.tz-row__editor--duration input {
    width: 82px;
    text-align: right;
}

@media (max-width: 760px) {
    .tz-row {
        flex-wrap: wrap;
        padding: var(--tz-space-3) var(--tz-space-4);
    }

    .tz-row__project {
        width: 100%;
        max-width: none;
        order: 3;
    }
}

/* ---------- Project chips and tags ---------- */

.tz-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 0.875rem;
    color: var(--tz-ink-1);
}

.tz-chip__dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-chip-color, var(--tz-ink-3));
}

.tz-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tz-chip--muted .tz-chip__name {
    color: var(--tz-ink-3);
}

.tz-chip__tag,
.tz-tag {
    font-size: 0.6875rem;
    padding: 1px 6px;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-surface-3);
    color: var(--tz-ink-2);
}

/* ---------- Projects ---------- */

.tz-page-head__actions {
    display: flex;
    align-items: center;
    gap: var(--tz-space-4);
}

.tz-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
    gap: var(--tz-space-4);
}

.tz-project {
    display: flex;
    align-items: center;
    gap: var(--tz-space-4);
    padding: var(--tz-space-4);
    transition: transform var(--tz-transition), box-shadow var(--tz-transition);
}

.tz-project:hover {
    transform: translateY(-2px);
    box-shadow: var(--tz-shadow-2) !important;
}

.tz-project--archived {
    opacity: 0.66;
}

/* The tracker's history range: a quiet strip above the days, not a filter panel competing with the timer. */
.tz-history-range {
    display: flex;
    align-items: center;
    gap: var(--tz-space-3);
    flex-wrap: wrap;
    padding: var(--tz-space-3) var(--tz-space-4);
    margin-bottom: var(--tz-space-4);
}

.tz-history-range__label {
    font-size: 0.85rem;
    color: var(--tz-ink-2);
}

.tz-history-range__summary {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--tz-ink-2);
}

/* The card body links to the report for that customer or project. It takes the free space so the whole card
   except the action buttons is a target, and inherits colour so it doesn't read as a blue hyperlink. */
.tz-project__link {
    display: flex;
    align-items: center;
    gap: var(--tz-space-4);
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    border-radius: var(--tz-radius);
}

.tz-project__link:hover .tz-project__name {
    color: var(--tz-accent);
}

.tz-project__link:focus-visible {
    outline: 2px solid var(--tz-accent);
    outline-offset: 3px;
}

/* A generous colour block, so the project's identity is the first thing read. */
.tz-project__swatch {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: var(--tz-radius);
    background: var(--tz-chip-color);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.10);
}

.tz-project__body {
    flex: 1 1 auto;
    min-width: 0;
}

.tz-project__name {
    font-weight: 620;
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tz-project__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--tz-ink-2);
}

.tz-project__meta--empty {
    color: var(--tz-ink-3);
}

.tz-project__actions {
    flex: 0 0 auto;
    display: flex;
    gap: 2px;
}

/* ---------- Scan codes ---------- */

.tz-scan-code__blurb {
    margin: 0 0 var(--tz-space-4);
    color: var(--tz-ink-2);
    font-size: 0.875rem;
}

/* White behind the code whatever the theme is doing: a scanner needs the quiet zone light. */
.tz-scan-code__frame {
    display: flex;
    justify-content: center;
    padding: var(--tz-space-4);
    border-radius: var(--tz-radius-lg);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.10);
}

.tz-scan-code__frame img {
    display: block;
    width: 260px;
    height: 260px;
    image-rendering: pixelated;
}

.tz-scan-code__url {
    display: flex;
    align-items: baseline;
    gap: var(--tz-space-2);
    margin-top: var(--tz-space-3);
    padding: var(--tz-space-2) var(--tz-space-3);
    border-radius: var(--tz-radius);
    background: var(--tz-surface-2);
}

.tz-scan-code__url-label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tz-ink-3);
}

/* The link wraps rather than scrolls: it's here to be read aloud and to be selected, not to be scrolled. */
.tz-scan-code__url code {
    font-size: 0.8125rem;
    color: var(--tz-ink-2);
    overflow-wrap: anywhere;
}

.tz-scan-code__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tz-space-2);
    margin: var(--tz-space-4) 0 var(--tz-space-2);
}

/* The page a scan lands on. One card, one sentence, one way onward. */
.tz-scan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--tz-space-3);
    padding: var(--tz-space-6) var(--tz-space-5);
    text-align: center;
}

.tz-scan__swatch {
    width: 56px;
    height: 56px;
    border-radius: var(--tz-radius);
    background: var(--tz-chip-color);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.10);
}

.tz-scan__name {
    font-weight: 620;
    font-size: 1.25rem;
}

.tz-scan__previous {
    color: var(--tz-ink-2);
    font-size: 0.875rem;
}

.tz-scan__link {
    color: var(--tz-accent);
    font-weight: 600;
}

/* ---------- Colour swatches ---------- */

.tz-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tz-space-2);
    margin: var(--tz-space-2) 0 var(--tz-space-3);
}

.tz-swatch {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-chip-color);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transition: transform var(--tz-transition), border-color var(--tz-transition);
}

.tz-swatch:hover {
    transform: scale(1.08);
}

/* Selection is a ring plus a size change, so it isn't signalled by colour alone. */
.tz-swatch--chosen {
    border-color: var(--tz-ink-1);
    transform: scale(1.12);
}

/* ---------- Empty and loading states ---------- */

.tz-empty-state {
    text-align: center;
    padding: var(--tz-space-7) var(--tz-space-5);
    border: 1px dashed var(--tz-line-strong);
    border-radius: var(--tz-radius-lg);
    background: color-mix(in srgb, var(--tz-surface-1) 60%, transparent);
}

/* Concentric rings: a stopwatch that isn't anyone else's stopwatch. */
.tz-empty-state__mark {
    width: 76px;
    height: 76px;
    margin: 0 auto var(--tz-space-4);
    border-radius: var(--tz-radius-pill);
    background: var(--tz-accent-wash);
    box-shadow:
        inset 0 0 0 2px color-mix(in srgb, var(--tz-accent) 32%, transparent),
        inset 0 0 0 14px transparent,
        inset 0 0 0 16px color-mix(in srgb, var(--tz-teal) 26%, transparent);
}

.tz-empty-state__title {
    margin: 0 0 var(--tz-space-2);
    font-size: 1.125rem;
    font-weight: 640;
}

.tz-empty-state__body {
    margin: 0 auto;
    max-width: 42ch;
    color: var(--tz-ink-2);
    font-size: 0.9rem;
}

.tz-empty {
    padding: var(--tz-space-5);
    text-align: center;
    color: var(--tz-ink-3);
}

.tz-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tz-space-3);
    padding: var(--tz-space-6);
    color: var(--tz-ink-2);
}

.tz-manual__times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tz-space-3);
    margin-bottom: var(--tz-space-3);
}

/* ---------- Reports: filters ---------- */

.tz-filters {
    padding: var(--tz-space-4);
    margin-bottom: var(--tz-space-5);
}

.tz-filters__presets {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tz-space-2);
    margin-bottom: var(--tz-space-4);
}

.tz-preset {
    appearance: none;
    padding: 6px 14px;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 560;
    color: var(--tz-ink-2);
    background: var(--tz-surface-2);
    border: 1px solid transparent;
    border-radius: var(--tz-radius-pill);
    cursor: pointer;
    transition: background var(--tz-transition), color var(--tz-transition);
}

.tz-preset:hover {
    color: var(--tz-ink-1);
    background: var(--tz-surface-3);
}

.tz-preset--active {
    background: var(--tz-accent-wash-strong);
    border-color: color-mix(in srgb, var(--tz-accent) 40%, transparent);
    color: var(--tz-accent);
}

.tz-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tz-space-3);
    align-items: flex-start;
}

.tz-filters__date {
    width: 150px;
}

.tz-filters__select {
    width: 186px;
    min-width: 150px;
}

/* ---------- Reports: layout ---------- */

.tz-report {
    transition: opacity var(--tz-transition);
}

/* Hold the previous numbers at reduced opacity while refetching — no skeleton flash, no layout jump. */
.tz-report--refreshing {
    opacity: 0.55;
}

.tz-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
    gap: var(--tz-space-4);
    margin-bottom: var(--tz-space-4);
}

.tz-split {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: var(--tz-space-4);
    margin-bottom: var(--tz-space-4);
}

@media (max-width: 900px) {
    .tz-split {
        grid-template-columns: 1fr;
    }
}

.tz-stat {
    padding: var(--tz-space-5);
}

.tz-stat__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tz-ink-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* The hero figure: same sans as everything else, proportional figures (not tabular). */
.tz-stat__value {
    font-family: var(--tz-font-numeric);
    font-size: 2.5rem;
    font-weight: 620;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 6px 0 4px;
}

.tz-stat__foot {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--tz-ink-3);
}

.tz-chart-card {
    padding: var(--tz-space-5);
    margin-bottom: var(--tz-space-4);
}

.tz-chart-card__head {
    margin-bottom: var(--tz-space-4);
}

.tz-chart-card__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 640;
}

/* ---------- Reports: day bars ---------- */

.tz-bars {
    margin: 0;
}

.tz-bars__plot {
    position: relative;
    height: 184px;
}

.tz-bars__grid {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Solid hairlines, one shade off the surface. Never dashed. */
.tz-bars__gridline {
    position: relative;
    display: block;
    border-top: 1px solid var(--tz-line);
}

.tz-bars__gridline--base {
    border-top-color: var(--tz-line-strong);
}

.tz-bars__gridlabel {
    position: absolute;
    top: -9px;
    right: 0;
    padding-left: 6px;
    font-size: 0.6875rem;
    font-style: normal;
    color: var(--tz-ink-3);
    background: var(--tz-surface-1);
}

.tz-bars__columns {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

/* The whole column is the hit target, so a short bar is still easy to hover. */
.tz-bars__column {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    border-radius: var(--tz-radius-sm);
    cursor: default;
}

.tz-bars__column:hover,
.tz-bars__column:focus-visible {
    background: var(--tz-accent-wash);
    outline: none;
}

.tz-bars__bar {
    display: block;
    width: 100%;
    max-width: 34px;
    border-radius: 4px 4px 0 0;
    background: var(--tz-chip-color);
    transition: filter var(--tz-transition);
}

.tz-bars__column:hover .tz-bars__bar {
    filter: brightness(1.08);
}

.tz-bars__bar--empty {
    background: var(--tz-line-strong);
    border-radius: 2px;
}

.tz-bars__peak {
    position: absolute;
    top: 0;
    font-size: 0.6875rem;
    font-weight: 620;
    color: var(--tz-ink-2);
    white-space: nowrap;
}

.tz-bars__axis {
    display: flex;
    gap: 2px;
    margin-top: 6px;
}

.tz-bars__tick {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 0.6875rem;
    color: var(--tz-ink-3);
    white-space: nowrap;
    overflow: hidden;
}

/* ---------- Reports: donut ---------- */

.tz-donut {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--tz-space-4);
}

.tz-donut__plot {
    position: relative;
    width: 176px;
    height: 176px;
}

.tz-donut__svg {
    width: 100%;
    height: 100%;
}

.tz-donut__track {
    stroke: var(--tz-surface-2);
}

/* The surface-coloured seam is what separates neighbouring segments. */
.tz-donut__segment {
    stroke-linejoin: miter;
    transition: opacity var(--tz-transition);
}

.tz-donut__segment:hover {
    opacity: 0.82;
}

.tz-donut__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tz-donut__total {
    font-family: var(--tz-font-numeric);
    font-size: 1.5rem;
    font-weight: 620;
    letter-spacing: -0.02em;
}

.tz-donut__caption {
    font-size: 0.75rem;
    color: var(--tz-ink-3);
}

.tz-donut__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tz-donut__legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tz-space-3);
    min-width: 0;
}

.tz-donut__legend-value {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    color: var(--tz-ink-2);
}

/* ---------- Reports: breakdown table ---------- */

.tz-breakdown {
    width: 100%;
    border-collapse: collapse;
}

.tz-breakdown th,
.tz-breakdown td {
    padding: 7px 0;
    text-align: left;
    font-weight: inherit;
    vertical-align: middle;
}

.tz-breakdown th {
    width: 40%;
    max-width: 260px;
    overflow: hidden;
}

.tz-breakdown__bar {
    padding: 7px var(--tz-space-4) !important;
}

.tz-breakdown__fill {
    display: block;
    height: 9px;
    min-width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--tz-chip-color);
}

.tz-breakdown__share,
.tz-breakdown__total {
    text-align: right;
    white-space: nowrap;
}

.tz-breakdown__share {
    width: 62px;
    color: var(--tz-ink-2);
    font-size: 0.8125rem;
}

.tz-breakdown__total {
    width: 74px;
    font-weight: 620;
}

/* ---------- Settings ---------- */

.tz-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--tz-space-4);
    align-items: start;
}

.tz-settings__card {
    padding: var(--tz-space-5);
}

.tz-settings__hint {
    margin: var(--tz-space-2) 0 var(--tz-space-5);
    color: var(--tz-ink-2);
    font-size: 0.875rem;
}

.tz-settings__actions {
    display: flex;
    align-items: center;
    gap: var(--tz-space-3);
    margin-top: var(--tz-space-4);
}

/* ---------- Print ---------- */

@media print {
    .tz-side,
    .tz-mobilebar,
    .tz-tabbar,
    .tz-filters__row,
    .tz-page-head__actions,
    .tz-timer,
    #blazor-error-ui {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .tz-card {
        box-shadow: none !important;
        border-color: #ddd;
        break-inside: avoid;
    }

    .tz-main {
        padding: 0;
        max-width: none;
    }
}

/* ---------- Blazor error UI ---------- */

#blazor-error-ui {
    color-scheme: light only;
    background: #ffefc2;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1200;
    color: #1e1b26;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ---------- Vendor byline ---------- */

/* A one-line footer on the sign-in and public layouts; the shell carries it at the foot of its sidebar. */
.tz-auth__byline {
    text-align: center;
    color: var(--tz-ink-3);
    font-size: 0.8125rem;
    margin: var(--tz-space-4) 0 0;
}

.tz-auth__byline a {
    color: inherit;
    text-decoration: none;
}

.tz-auth__byline a:hover {
    color: var(--tz-ink-1);
}

/* A column header that also carries the action for that column ("Paid" + mark-all). */
.tz-th-action {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.tz-th-action .mud-icon-button {
    margin: -6px 0;
}

/* The entries table runs edge to edge inside its card, so its title carries its own inset — horizontally the
   same 16px MudTable gives its cells, so "Every entry" lines up with the "Person" header below it. */
.tz-detail__head {
    padding: var(--tz-space-5) var(--tz-space-4) 0;
    margin-bottom: var(--tz-space-3);
}

/* ---------- SwingCoach ---------- */

/* A link that looks like the primary button, for the static pages that can't use MudButton's handlers. */
.tz-swing-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--tz-space-2);
    padding: 8px 20px;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tz-swing-cta:hover {
    background: var(--tz-accent-strong);
}

/* The JS owns everything inside the stage: the <video>, the <canvas> laid over it, and the file input. */
.tz-swing-stage {
    position: relative;
    background: #000;
    border-radius: var(--tz-radius);
    overflow: hidden;
    margin-bottom: var(--tz-space-4);
}

.tz-swing-stage video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
}

.tz-swing-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;   /* the video's own controls stay usable underneath */
}

.tz-swing-stage--empty {
    display: none;
}

/* Hands-free recording's camera preview: the whole stage until the first swing is caught, then a corner inset
   while the stage plays that swing back. Red-rimmed while recording. */
.tz-swing-stage video.tz-swing-live {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32%;
    max-width: 200px;
    max-height: none;
    border: 2px solid #fff;
    border-radius: 8px;
}

.tz-swing-stage video.tz-swing-live--full {
    position: static;
    width: 100%;
    max-width: none;
    max-height: 70vh;
    border: 0;
    border-radius: 0;
}

.tz-swing-stage video.tz-swing-live--rec {
    border: 4px solid #FF4D5E;
}

.tz-swing-auto-state {
    font-weight: 600;
}

.tz-swing-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tz-space-3) var(--tz-space-5);
    margin-bottom: var(--tz-space-4);
}

.tz-swing-stats {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--tz-space-2) var(--tz-space-4);
    margin: 0;
}

.tz-swing-stats dt {
    color: var(--tz-ink-2);
}

.tz-swing-stats dd {
    margin: 0;
    font-family: var(--tz-font-numeric);
    font-variant-numeric: tabular-nums;
}

.tz-swing-verdict {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--tz-radius-pill);
    font-weight: 600;
}

.tz-swing-verdict--go {
    background: color-mix(in srgb, var(--tz-teal) 18%, transparent);
    color: var(--tz-ink-1);
}

.tz-swing-verdict--nogo {
    background: color-mix(in srgb, var(--tz-rose) 18%, transparent);
    color: var(--tz-ink-1);
}

/* Visually hidden but still a real, clickable control — iOS has been fussy about labels for display:none inputs. */
.tz-swing-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.tz-swing-toggle {
    min-width: 9rem;
}

.tz-swing-results__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--tz-space-4);
    margin-bottom: var(--tz-space-3);
}

.tz-swing-total {
    font-family: var(--tz-font-numeric);
    font-variant-numeric: tabular-nums;
}

.tz-swing-total__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tz-ink-1);
}

.tz-swing-total__of {
    color: var(--tz-ink-2);
    margin-left: 4px;
}

.tz-swing-keyframes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tz-space-2);
}

.tz-swing-keyframe {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 12px;
    border: 1px solid var(--tz-line-strong);
    border-radius: var(--tz-radius-sm);
    background: var(--tz-surface-1);
    color: var(--tz-ink-1);
    font: inherit;
    cursor: pointer;
}

.tz-swing-keyframe:hover {
    border-color: var(--tz-accent);
}

.tz-swing-keyframe--missing {
    cursor: default;
    opacity: 0.6;
}

.tz-swing-keyframe__name {
    font-weight: 600;
}

.tz-swing-keyframe__time {
    font-size: 0.8rem;
    color: var(--tz-ink-2);
    font-variant-numeric: tabular-nums;
}

.tz-swing-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: baseline;
}

.tz-swing-status--good { background: var(--tz-teal); }
.tz-swing-status--attention { background: var(--tz-amber); }
.tz-swing-status--off { background: var(--tz-rose); }

.tz-swing-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--tz-accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tz-swing-keyframe--active {
    border-color: var(--tz-accent);
    box-shadow: 0 0 0 2px var(--tz-accent-wash-strong);
}

.tz-swing-keyframe:disabled {
    cursor: default;
}

.tz-swing-keyframe__thumb {
    display: block;
    height: 96px;
    border-radius: 4px;
    background: #000;
    margin-bottom: 4px;
}

.tz-swing-adjust {
    padding: var(--tz-space-3) var(--tz-space-4);
    border: 1px solid var(--tz-line);
    border-radius: var(--tz-radius-sm);
}

.tz-swing-adjust__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tz-space-2);
}

.tz-swing-correction {
    font-size: 0.8rem;
    color: var(--tz-ink-2);
    white-space: normal;
}

/* While marking the ball the overlay canvas takes the tap, instead of letting it through to the video. */
.tz-swing-stage canvas.tz-swing-marking {
    pointer-events: auto;
    cursor: crosshair;
    outline: 3px solid var(--tz-accent);
    outline-offset: -3px;
}

/* The coaching library's tips for the card clicked last. */
.tz-swing-tips {
    padding: var(--tz-space-4);
    margin-bottom: var(--tz-space-4);
    border-left: 4px solid var(--tz-accent);
}

.tz-swing-tips__head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--tz-space-3);
}

.tz-swing-tips__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tz-ink-2);
}

.tz-swing-tips__title {
    margin: 0;
    font-size: 1.1rem;
}

.tz-swing-tips__lead {
    margin: var(--tz-space-2) 0 var(--tz-space-3);
}

.tz-swing-tips__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tz-space-3);
}

.tz-swing-tips h4 {
    margin: 0 0 var(--tz-space-1);
    font-size: 0.85rem;
}

.tz-swing-tips ul,
.tz-swing-tips ol {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
}

.tz-swing-tips__drill {
    margin-top: var(--tz-space-3);
}

.tz-swing-tips__sources {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tz-space-1) var(--tz-space-3);
    margin-top: var(--tz-space-3);
    font-size: 0.85rem;
}

.tz-swing-tips__source {
    color: var(--tz-accent);
}

.tz-swing-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--tz-space-3);
}

.tz-swing-check {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--tz-space-3);
    align-items: start;
    padding: var(--tz-space-3);
    border: 1px solid var(--tz-line);
    border-left-width: 4px;
    border-radius: var(--tz-radius-sm);
    background: var(--tz-surface-1);
    color: var(--tz-ink-1);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tz-swing-check:hover {
    border-color: var(--tz-accent);
}

.tz-swing-check--good { border-left-color: var(--tz-teal); }
.tz-swing-check--attention { border-left-color: var(--tz-amber); }
.tz-swing-check--off { border-left-color: var(--tz-rose); }

.tz-swing-check__thumb {
    display: block;
    height: 120px;
    border-radius: 4px;
    background: #000;
}

.tz-swing-check__name {
    font-weight: 600;
}

.tz-swing-check__at {
    font-size: 0.8rem;
    color: var(--tz-ink-2);
    margin-bottom: 6px;
}

.tz-swing-check__figures {
    font-family: var(--tz-font-numeric);
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
}

.tz-swing-check__figures strong {
    font-size: 1.1rem;
}

.tz-swing-check__score {
    font-family: var(--tz-font-numeric);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.2rem;
}

.tz-swing-ball {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tz-space-3);
    padding: var(--tz-space-3) var(--tz-space-4);
    border: 1px dashed var(--tz-line-strong);
    border-radius: var(--tz-radius-sm);
}

/* ---------- SwingCoach trend chart ---------- */

.tz-trend {
    margin: 0;
}

.tz-trend__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tz-trend__band {
    fill: var(--tz-ink-1);
    opacity: 0.06;
}

.tz-trend__bandlabel,
.tz-trend__tick {
    fill: var(--tz-ink-3);
    font-size: 11px;
    font-family: var(--tz-font-numeric);
}

.tz-trend__grid {
    stroke: var(--tz-line);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.tz-trend__line {
    fill: none;
    stroke: var(--tz-accent);
    stroke-width: 2;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.tz-trend__marker {
    fill: var(--tz-accent);
    stroke: var(--tz-surface-1);
    stroke-width: 2;
}

.tz-trend__hit {
    fill: transparent;
}

.tz-trend__label {
    fill: var(--tz-ink-1);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--tz-font-numeric);
}

.tz-trend__tip {
    display: none;
    pointer-events: none;
}

.tz-trend__point:hover .tz-trend__tip,
.tz-trend__point:focus .tz-trend__tip {
    display: inline;
}

.tz-trend__point:hover .tz-trend__marker,
.tz-trend__point:focus .tz-trend__marker {
    r: 6;
}

.tz-trend__point:focus {
    outline: none;
}

.tz-trend__tip rect {
    fill: var(--tz-ink-1);
    opacity: 0.92;
}

.tz-trend__tip text {
    fill: var(--tz-surface-1);
    font-size: 11px;
}

.tz-trend__tip .tz-trend__tipvalue {
    font-weight: 700;
    font-family: var(--tz-font-numeric);
}

.tz-trend__axis {
    display: flex;
    justify-content: space-between;
    padding-left: 6.7%;
    color: var(--tz-ink-3);
    font-size: 11px;
}

.tz-swing-metricpick {
    max-width: 240px;
}

.tz-swing-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tz-swing-list__row {
    display: flex;
    align-items: center;
    gap: var(--tz-space-3);
    padding: var(--tz-space-2) 0;
    border-bottom: 1px solid var(--tz-line);
}

.tz-swing-list__row:last-child {
    border-bottom: 0;
}

.tz-swing-list__main {
    flex: 1;
    min-width: 0;
}

.tz-swing-list__date {
    font-weight: 600;
}

.tz-swing-list__meta {
    font-size: 0.85rem;
    color: var(--tz-ink-2);
}

.tz-swing-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--tz-space-4);
    margin-bottom: var(--tz-space-4);
}

.tz-swing-compare__canvas {
    display: block;
    margin: 0 auto;
    border-radius: var(--tz-radius-sm);
}

.tz-swing-diff {
    width: 100%;
    border-collapse: collapse;
}

.tz-swing-diff th,
.tz-swing-diff td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--tz-line);
    text-align: left;
}

.tz-swing-diff th {
    font-weight: 600;
    color: var(--tz-ink-2);
    font-size: 0.85rem;
}

.tz-swing-diff .tz-num {
    text-align: right;
    font-family: var(--tz-font-numeric);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tz-swing-club {
    max-width: 160px;
}

.tz-swing-coach {
    padding: var(--tz-space-3) var(--tz-space-4);
    border-radius: var(--tz-radius-sm);
    background: var(--tz-accent-wash);
}

.tz-swing-coach__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--tz-space-2);
}

.tz-swing-coach__source {
    font-size: 0.8rem;
    color: var(--tz-ink-2);
}

.tz-swing-coach__text {
    margin: var(--tz-space-2) 0 0;
    line-height: 1.55;
    color: var(--tz-ink-1);
}

.tz-swing-coach__text--stale {
    opacity: 0.55;
}

.tz-swing-record {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border: 2px solid var(--tz-rose);
    border-radius: var(--tz-radius-pill);
    background: transparent;
    color: var(--tz-ink-1);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tz-swing-record:disabled {
    opacity: 0.5;
    cursor: default;
}

.tz-swing-record--stop {
    background: var(--tz-rose);
    color: #fff;
}

.tz-swing-height {
    max-width: 260px;
}

.tz-swing-tips__moments {
    margin-top: var(--tz-space-3);
}

.tz-swing-tips__moments li {
    margin-bottom: var(--tz-space-2);
}


.tz-swing-check__tips {
    margin-top: var(--tz-space-1);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tz-accent);
}


.tz-swing-diff__tips {
    margin-left: var(--tz-space-2);
    font-size: 0.8rem;
}


.tz-swing-tips__caution {
    margin-top: var(--tz-space-1);
    font-size: 0.85rem;
    color: var(--tz-ink-2);
    font-style: italic;
}


/* ---------- SwingCoach on the phone: the ways in, the full-screen booth, the session's swings ---------- */

.tz-swing-start {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tz-space-3);
    margin-bottom: var(--tz-space-4);
}

.tz-swing-start__main {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: var(--tz-space-4) var(--tz-space-5);
    border: 0;
    border-radius: var(--tz-radius-lg);
    background: var(--tz-accent);
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tz-swing-start__main:hover:not(:disabled) {
    background: var(--tz-accent-strong);
}

.tz-swing-start__main:disabled {
    opacity: 0.6;
    cursor: default;
}

.tz-swing-start__title {
    font-size: 1.15rem;
    font-weight: 650;
}

.tz-swing-start__sub {
    font-size: 0.875rem;
    opacity: 0.9;
}

.tz-swing-start .tz-swing-record {
    justify-content: center;
    min-height: 48px;
}

.tz-swing-record--plain {
    border-color: var(--tz-line-strong);
}

/* Not live, the booth is just the block around the stage. Live, it covers the screen — nav rail and all. */
.tz-swing-booth--live {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    background: #000;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.tz-swing-booth--live .tz-swing-stage {
    display: block;
    flex: 1;
    min-height: 0;
    margin: 0;
    border-radius: 0;
}

.tz-swing-booth--live .tz-swing-stage video,
.tz-swing-booth--live .tz-swing-stage video.tz-swing-live,
.tz-swing-booth--live .tz-swing-stage video.tz-swing-live--full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    object-fit: contain;
}

/* Hands-free: the camera's own preview is the picture; the last clip, if any, waits underneath. */
.tz-swing-booth--live .tz-swing-stage video.tz-swing-live ~ video {
    visibility: hidden;
}

.tz-swing-booth--live .tz-swing-stage video.tz-swing-live--rec {
    outline: 6px solid #FF4D5E;
    outline-offset: -6px;
}

html.tz-swing-live-open,
html.tz-swing-live-open body {
    overflow: hidden;
}

.tz-swing-hud {
    position: absolute;
    z-index: 3;   /* over the camera preview (z-index 2) */
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    pointer-events: none;
    color: #fff;
}

.tz-swing-hud__top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tz-swing-hud__state,
.tz-swing-hud__count,
.tz-swing-hud__hint {
    padding: 6px 14px;
    border-radius: var(--tz-radius-pill);
    background: rgba(0, 0, 0, 0.55);
    font-weight: 600;
    font-size: 0.95rem;
}

.tz-swing-hud__state--rec {
    background: #E5243B;
}

.tz-swing-hud__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tz-swing-hud__hint {
    font-weight: 500;
    font-size: 0.85rem;
}

.tz-swing-shots {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
}

.tz-swing-shots--page {
    flex-wrap: wrap;
    overflow: visible;
}

.tz-swing-shot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tz-swing-shot__picture {
    position: relative;
    display: block;
    width: 64px;
    height: 86px;
    border: 2px solid #fff;
    border-radius: 10px;
    overflow: hidden;
    background: #222;
}

.tz-swing-shots--page .tz-swing-shot__picture {
    width: 84px;
    height: 112px;
    border-color: var(--tz-line);
}

.tz-swing-shot--picked .tz-swing-shot__picture {
    border-color: var(--tz-accent);
    box-shadow: 0 0 0 2px var(--tz-accent);
}

.tz-swing-shot__picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tz-swing-shot__number {
    position: absolute;
    left: 4px;
    bottom: 4px;
    min-width: 20px;
    padding: 0 5px;
    border-radius: var(--tz-radius-pill);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 650;
    text-align: center;
}

.tz-swing-shot__label {
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tz-swing-more > summary {
    cursor: pointer;
    list-style-position: inside;
}

/* The history, SwingCoach's front page: swings by day, each row opens its swing. */
.tz-swing-day {
    margin: var(--tz-space-4) 0 var(--tz-space-1);
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tz-ink-2);
}

.tz-swing-day:first-child {
    margin-top: 0;
}

.tz-swing-list__open {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: var(--tz-space-3);
    min-height: 48px;
    color: inherit;
    text-decoration: none;
}

.tz-swing-list__chevron {
    color: var(--tz-ink-3);
}

.tz-swing-new {
    font-size: 1rem;
    padding: 12px 24px;
}

@media (max-width: 640px) {
    /* The one thing to do on the range: always under the thumb. */
    .tz-swing-new {
        position: fixed;
        left: 16px;
        right: 16px;
        /* Above the Timzo shell's tab bar. */
        bottom: calc(var(--tz-tabbar-height, 0px) + 12px + env(safe-area-inset-bottom));
        z-index: 1000;
        justify-content: center;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }

    .tz-swing-home {
        padding-bottom: 88px;
    }

    .tz-swing-start__main {
        padding: var(--tz-space-4);
    }
}

/* Deleting swings: from the history's selection, and at the foot of a swing's page. */
.tz-swing-select {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.tz-swing-delete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ---------- Start: the front door of every module ---------- */

.tz-start__hero {
    margin-bottom: var(--tz-space-5);
}

.tz-start__greeting {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
}

.tz-start__tagline {
    margin: 4px 0 0;
    color: var(--tz-ink-2);
}

.tz-start__today {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: var(--tz-space-4);
}

/* A module's "today": its colour on the edge, its mark at the top, one big line and one small. */
.tz-start-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 20px;
    border-radius: var(--tz-radius-lg);
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    box-shadow: var(--tz-shadow-1);
    color: var(--tz-ink-1);
    text-decoration: none;
    overflow: hidden;
    transition: transform var(--tz-transition), box-shadow var(--tz-transition);
}

.tz-start-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--tz-mod-tile);
}

.tz-start-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tz-shadow-2);
}

.tz-start-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tz-start-card__name {
    font-weight: 700;
    color: var(--tz-mod);
}

.tz-start-card__big {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.tz-start-card__big--live {
    color: var(--tz-running);
}

.tz-start-card__big--late {
    color: #B4500F;
}

html.tz-dark .tz-start-card__big--late {
    color: #F4A167;
}

.tz-start-card__sub {
    color: var(--tz-ink-2);
    font-size: 0.9rem;
}

.tz-start__section {
    margin: var(--tz-space-6) 0 var(--tz-space-3);
    font-size: 1.05rem;
    font-weight: 700;
}

.tz-start__modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--tz-space-3);
}

.tz-module-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--tz-radius-lg);
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    color: var(--tz-ink-1);
    text-decoration: none;
    transition: border-color var(--tz-transition), background var(--tz-transition);
}

.tz-module-card:hover {
    border-color: var(--tz-mod);
    background: var(--tz-mod-wash);
}

.tz-modmark--big {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.tz-module-card__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.tz-module-card__name {
    font-weight: 700;
}

.tz-module-card__tagline {
    color: var(--tz-ink-2);
    font-size: 0.875rem;
}

.tz-module-card__open {
    font-size: 1.5rem;
    color: var(--tz-mod);
}

/* Blazor focuses the page's first heading after a navigation, for screen readers. It isn't something to click,
   so it doesn't get a ring. */
h1:focus,
h1:focus-visible {
    outline: none;
}

/* Inside a module, Timzo's accent *is* the module's: every hand-rolled button, link and highlight on a Swing page
   is green and on a Town page blue, without each rule having to know which module it's in. The sidebar keeps
   Timzo's own colours. */
.tz-shell[data-module="swing"] .tz-stage,
.tz-shell[data-module="town"] .tz-stage,
.tz-shell[data-module="cook"] .tz-stage {
    --tz-accent: var(--tz-mod);
    --tz-accent-strong: var(--tz-mod-strong);
    --tz-accent-soft: var(--tz-mod);
    --tz-accent-wash: var(--tz-mod-wash);
    --tz-accent-wash-strong: var(--tz-mod-wash-strong);
    --tz-shadow-accent: 0 6px 20px var(--tz-mod-wash-strong);
}

/* ---------- Licensing: the free note and the module gate ---------- */
/* The free note names what the free tier leaves out, in the module's colour, where it matters. Quiet, never a
   nag: one line, no close button needed. */
.tz-free-note {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 var(--tz-space-3);
    padding: 10px 14px;
    border-radius: var(--tz-radius-lg);
    background: var(--tz-mod-wash);
    color: var(--tz-ink-1);
    font-size: 0.875rem;
    line-height: 1.45;
}

.tz-free-note__badge {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--tz-mod);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* The gate in front of a module someone can't use: the module's mark, why, and who can change it. */
.tz-gate {
    max-width: 520px;
    margin: var(--tz-space-5) auto;
    padding: var(--tz-space-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--tz-space-2);
    text-align: center;
}

.tz-gate__title {
    margin: var(--tz-space-2) 0 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.tz-gate__text {
    margin: 0;
    color: var(--tz-ink-2);
}

.tz-gate__back {
    margin-top: var(--tz-space-2);
    color: var(--tz-mod);
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Gebruikers and Timzo beheer ---------- */
/* BucketClub's member list: one row per person that opens in place. Seats are counted per module in the module's
   own colour, so a glance tells what the workspace has and how full it is. */
.tz-plan-strip {
    padding: var(--tz-space-4);
    margin-bottom: var(--tz-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--tz-space-3);
}

.tz-plan-strip__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tz-plan-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 650;
    background: var(--tz-accent-wash);
    color: var(--tz-accent-strong);
    white-space: nowrap;
}

.tz-plan-chip--free {
    background: var(--tz-surface-2, rgba(0, 0, 0, 0.05));
    color: var(--tz-ink-2);
}

.tz-plan-chip--unlimited {
    background: rgba(22, 160, 106, 0.12);
    color: #0E7A50;
}

html.tz-dark .tz-plan-chip--unlimited {
    color: #6FDDAE;
}

.tz-ws__modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 8px;
}

.tz-seat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--tz-radius-lg);
    background: var(--tz-mod-wash);
}

.tz-seat--off {
    background: transparent;
    border: 1px dashed var(--tz-line);
    opacity: 0.6;
}

.tz-seat__name {
    flex: 1;
    font-weight: 600;
    font-size: 0.875rem;
}

.tz-seat__count {
    font-size: 0.8125rem;
    color: var(--tz-ink-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tz-people__count {
    margin: 0 0 var(--tz-space-2);
    color: var(--tz-ink-2);
    font-size: 0.875rem;
}

.tz-people,
.tz-ws-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tz-person {
    background: var(--tz-surface-1);
    border: 1px solid var(--tz-line);
    border-radius: var(--tz-radius-lg);
    overflow: hidden;
}

.tz-person.is-open {
    border-color: var(--tz-accent);
}

.tz-person__row {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tz-person__row:hover {
    background: var(--tz-accent-wash);
}

.tz-person.is-inactive .tz-person__row {
    opacity: 0.6;
}

.tz-person__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tz-person__name {
    font-weight: 650;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tz-person__meta {
    color: var(--tz-ink-2);
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tz-person__modules {
    display: flex;
    gap: 4px;
}

.tz-modmark--tiny {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    box-shadow: none;
}

.tz-modmark--tiny .mud-icon-root {
    font-size: 15px;
}

.tz-person__chevron {
    color: var(--tz-ink-2);
}

.tz-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.tz-badge--role {
    background: var(--tz-accent-wash);
    color: var(--tz-accent-strong);
}

.tz-badge--off {
    border: 1px dashed var(--tz-line);
    color: var(--tz-ink-2);
}

.tz-person__details {
    padding: 4px 16px 16px;
    border-top: 1px solid var(--tz-line);
}

.tz-person__section {
    margin: var(--tz-space-4) 0 var(--tz-space-2);
    font-size: 0.8125rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tz-ink-2);
}

.tz-person__switches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 8px;
}

.tz-module-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px 6px 10px;
    border-radius: var(--tz-radius-lg);
    background: var(--tz-mod-wash);
    --mud-palette-primary: var(--tz-mod);
}

.tz-module-switch__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tz-module-switch__name {
    font-weight: 600;
    font-size: 0.875rem;
}

.tz-module-switch__hint {
    font-size: 0.75rem;
    color: var(--tz-ink-2);
}

.tz-person__facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 16px;
    margin: 0;
    font-size: 0.875rem;
}

.tz-person__facts dt {
    color: var(--tz-ink-2);
}

.tz-person__facts dd {
    margin: 0;
}

.tz-person__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tz-ws {
    padding: var(--tz-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--tz-space-3);
}

.tz-ws__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tz-ws__who {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tz-ws__name {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
}

.tz-ws__meta {
    color: var(--tz-ink-2);
    font-size: 0.8125rem;
}

.tz-ws__note {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--tz-ink-2);
    font-style: italic;
}

.tz-ws__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tz-bundle-module {
    display: flex;
    align-items: center;
    gap: 12px;
    --mud-palette-primary: var(--tz-mod);
}

.tz-bundle-module .mud-checkbox {
    flex: 1;
}

.tz-bundle-module__seats {
    max-width: 150px;
}

/* ---------- Module sub-styles ---------- */
/* Each module wears its own colour inside the one Timzo frame, the way Google Photos and Maps are each themselves
   and still plainly Google: a soft wash of the module's colour across the top of the stage, and the module's
   tile beside every page title. Town adds its own world on top (stad.css); Clock and Swing stay this quiet. */
.tz-shell:not([data-module="start"]) .tz-stage {
    background-image: radial-gradient(1100px 280px at 88% -140px, var(--tz-mod-wash-strong), transparent 70%);
    background-repeat: no-repeat;
}

.tz-shell:not([data-module="start"]) .tz-page-head__title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tz-shell:not([data-module="start"]) .tz-page-head__title::before {
    content: "";
    flex: none;
    width: 6px;
    height: 1.05em;
    border-radius: 3px;
    background: var(--tz-mod-tile);
}

/* Timzo Swing is a range, not an office: rounder cards and a little more air. */
.tz-shell[data-module="swing"] .tz-card {
    border-radius: calc(var(--tz-radius-lg) + 4px);
}

/* Timzo Clock counts: its numbers line up. */
.tz-shell[data-module="clock"] .tz-main {
    font-variant-numeric: tabular-nums;
}

@media print {
    .tz-shell .tz-stage {
        background-image: none;
    }

    .tz-shell .tz-page-head__title::before {
        display: none;
    }
}

/* What's on the town's calendar right now, or soon — "Vakantie t/m zo 14 jul" — under the Town card's summary. */
.tz-start-card__note {
    margin-top: 2px;
    color: var(--tz-mod);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* A tester (flagged by a Timzo administrator): everything, free — marked so nobody mistakes them for a paid seat. */
.tz-badge--tester {
    background: rgba(201, 133, 0, 0.14);
    color: #9A6400;
}

html.tz-dark .tz-badge--tester {
    color: #F2C46B;
}

/* The people of a community in Timzo beheer, each with the tester switch. */
.tz-ws__people {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--tz-line);
    padding-top: var(--tz-space-3);
}

.tz-ws__person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tz-ws__person.is-inactive {
    opacity: 0.6;
}

/* ---------- Theme choice and two-step sign-in (as BucketClub) ---------- */
/* Three choices with a picture each — system, light, dark — in Settings and in the account menu. */
.tz-theme-picker {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border-radius: var(--tz-radius-pill);
    background: var(--tz-surface-2);
}

.tz-theme-option {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--tz-radius-pill);
    background: transparent;
    color: var(--tz-ink-2);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tz-theme-option[aria-checked="true"] {
    background: var(--tz-surface-1);
    color: var(--tz-accent-strong);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tz-account__themes {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}

.tz-account__theme {
    appearance: none;
    flex: 1;
    display: grid;
    place-items: center;
    padding: 7px 0;
    border: 0;
    border-radius: var(--tz-radius-sm);
    background: var(--tz-surface-2);
    color: var(--tz-ink-2);
    cursor: pointer;
}

.tz-account__theme[aria-pressed="true"] {
    background: var(--tz-accent-wash-strong);
    color: var(--tz-accent-strong);
}

.tz-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 18px;
    font-size: 0.9rem;
    cursor: pointer;
}

.tz-input--code {
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.tz-twofactor__steps {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tz-twofactor__qr {
    width: 180px;
    margin: 10px 0;
    padding: 8px;
    border-radius: var(--tz-radius-sm);
    background: #FFFFFF;
}

.tz-twofactor__qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.tz-twofactor__secret {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    word-break: break-all;
}

.tz-twofactor__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.tz-twofactor__code {
    max-width: 180px;
}

.tz-badge--on {
    background: rgba(22, 160, 106, 0.14);
    color: #0E7A50;
    margin-right: 6px;
}

html.tz-dark .tz-badge--on {
    color: #6FDDAE;
}
