:root {
    --felt-dark: #062a18;
    --felt: #0b4d2a;
    --felt-light: #146b3a;
    --felt-bright: #1a8f4c;
    --wood: #6b4423;
    --wood-light: #8B5A2B;
    --chalk: #f5f0e1;
    --chalk-muted: #c8bfaa;
    --card: #0a3822;
    --card-elevated: #0f4529;
    --text: #f5f0e1;
    --text-muted: #a8c4b0;
    --primary: #1a8f4c;
    --primary-light: #3ecf7a;
    --primary-dark: #0b4d2a;
    --accent-red: #cc0000;
    --accent-yellow: #ffd700;
    --accent-blue: #0066cc;
    --border: #1a5c38;
    --border-soft: #134d30;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --touch: 44px;
    --font: 'DM Sans', system-ui, -apple-system, sans-serif;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f1c40f;
    --sidebar-width: 260px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(26, 143, 76, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(107, 68, 35, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, var(--felt-dark) 0%, var(--felt) 45%, #083d22 100%);
    /* Do not use background-attachment:fixed — breaks fixed bottom nav on iOS PWAs */
}

a {
    color: var(--primary-light);
    font-weight: 600;
}

.app-shell {
    min-height: 100vh;
}

.app-main {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1rem 1.25rem;
    box-sizing: border-box;
}

.has-bottom-nav .app-main {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

.login-page .app-main,
.install-page .app-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 2rem);
    padding: 1.5rem 1rem;
    max-width: 520px;
}

.app-sidebar {
    display: none;
}

.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    gap: 0.25rem;
    background: rgba(6, 42, 24, 0.98);
    border-top: 2px solid var(--wood);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-height: 52px;
    padding: 0.35rem 0.2rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.68rem;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}

.bottom-nav-btn:hover,
.bottom-nav-btn:focus-visible,
.bottom-nav-btn.is-active {
    background: rgba(26, 143, 76, 0.2);
    color: var(--chalk);
    outline: none;
}

.bottom-nav-btn--muted {
    flex: 0.75;
    font-weight: 600;
}

.bottom-nav-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

@media (min-width: 960px) {
    .app-shell {
        display: flex;
    }

    .app-sidebar {
        display: flex;
        flex-direction: column;
        width: var(--sidebar-width);
        min-height: 100vh;
        padding: 1.25rem 1rem;
        background: rgba(6, 42, 24, 0.92);
        border-right: 3px solid var(--wood);
        position: sticky;
        top: 0;
        flex-shrink: 0;
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-brand strong {
        display: block;
        font-size: 1.05rem;
        color: var(--chalk);
    }

    .sidebar-tagline {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .sidebar-ball {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #ff6666, var(--accent-red));
        border: 2px solid rgba(255, 255, 255, 0.3);
        flex-shrink: 0;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        flex: 1;
    }

    .sidebar-link {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.65rem 0.85rem;
        border-radius: 12px;
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 0.92rem;
        position: relative;
    }

    .sidebar-link:hover,
    .sidebar-link.is-active {
        background: rgba(26, 143, 76, 0.22);
        color: var(--chalk);
    }

    .sidebar-link--muted {
        margin-top: auto;
        opacity: 0.85;
    }

    .sidebar-badge {
        margin-left: auto;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 999px;
        background: var(--accent-red);
        color: #fff;
        font-size: 0.7rem;
        font-weight: 800;
        line-height: 20px;
        text-align: center;
    }

    .sidebar-user {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .sidebar-user-name {
        display: block;
        font-weight: 700;
        color: var(--chalk);
    }

    .sidebar-user-role {
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    .app-main {
        flex: 1;
        max-width: none;
        padding: 1.5rem 2rem 2rem;
    }

    .has-bottom-nav .app-main {
        padding-bottom: 2rem;
    }

    .app-bottom-nav {
        display: none;
    }
}

.login-card,
.install-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem 1.5rem;
    border: 2px solid var(--wood);
}

.brand-snooker {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ball {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.ball-red {
    background: radial-gradient(circle at 35% 35%, #ff6666, var(--accent-red));
}

.ball-yellow {
    background: radial-gradient(circle at 35% 35%, #ffe566, var(--accent-yellow));
}

.ball-green {
    background: radial-gradient(circle at 35% 35%, #3ecf7a, var(--felt-bright));
}

.login-title,
.page-title {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--chalk);
}

.login-title {
    text-align: center;
}

.login-lead,
.page-lead {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.login-title + .login-lead {
    text-align: center;
}

.page-header {
    margin-bottom: 1.25rem;
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.field-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--chalk-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-input,
.field-textarea {
    width: 100%;
    min-height: var(--touch);
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: rgba(6, 42, 24, 0.6);
    color: var(--chalk);
    font: inherit;
    font-size: 1rem;
}

.field-textarea {
    min-height: 80px;
    resize: vertical;
}

.field-input:focus,
.field-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(62, 207, 122, 0.2);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.field-row--3 {
    grid-template-columns: 1fr;
}

@media (min-width: 700px) {
    .field-row--3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.settings-top-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.page-header--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.history-filters {
    margin-bottom: 1.25rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.history-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.history-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.history-card-type {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-light);
}

.history-card-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.history-card-summary {
    margin: 0;
    color: var(--chalk);
    font-weight: 600;
    line-height: 1.35;
}

.history-card-actor {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.time-picker-12 {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.time-picker-12 select {
    min-height: var(--touch);
    padding: 0.5rem 0.55rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: rgba(6, 42, 24, 0.6);
    color: var(--chalk);
    color-scheme: dark;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.time-picker-12 select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(62, 207, 122, 0.2);
}

.time-picker-12 select option {
    background-color: var(--card-elevated);
    color: var(--chalk);
}

.time-picker-hour {
    min-width: 3.25rem;
}

.time-picker-minute {
    min-width: 3.75rem;
}

.time-picker-ampm {
    min-width: 4rem;
}

.time-picker-sep {
    font-weight: 700;
    color: var(--text-muted);
}

.settings-subtitle {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.settings-section .settings-subtitle:first-of-type {
    margin-top: 0.75rem;
}

.field-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch);
    padding: 0.65rem 1.1rem;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--felt-light), var(--felt-bright));
    color: var(--chalk);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: rgba(107, 68, 35, 0.5);
    color: var(--chalk);
    border: 2px solid var(--wood-light);
}

.btn-ghost {
    background: transparent;
    color: var(--chalk);
    border: 2px solid var(--border);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-compact {
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    font-size: 0.88rem;
    white-space: nowrap;
}

.btn-icon {
    width: 44px;
    padding: 0;
    font-size: 1.4rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger);
    color: #ffb4ab;
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success);
    color: #9cf0b8;
}

.login-foot {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.88rem;
}

.login-install {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.login-install-lead {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}

.install-ios,
.install-android {
    margin: 1rem 0;
}

.install-ios-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: var(--chalk-muted);
}

.install-ios-steps {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.rota-page .app-main {
    padding-top: 0.75rem;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0;
    width: 100%;
}

.rota-calendar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.rota-calendar-title {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--chalk);
    line-height: 1.15;
}

.rota-calendar-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.rota-calendar-toolbar .calendar-toolbar {
    max-width: 300px;
}

.rota-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.rota-toolbar-actions .field-input--compact {
    flex: 1 1 140px;
    max-width: 200px;
    min-width: 120px;
}

.rota-calendar-column .calendar-grid {
    width: 100%;
}

.field-input--compact {
    min-height: 40px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.rota-app {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 960px) {
    .rota-page .app-main {
        padding-top: 1rem;
    }

    .rota-calendar-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 0.35rem;
    }

    .rota-calendar-toolbar .calendar-toolbar {
        flex: 1 1 auto;
        max-width: none;
        justify-content: flex-start;
    }

    .rota-toolbar-actions {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-end;
    }

    .rota-toolbar-actions .field-input--compact {
        flex: 0 0 160px;
        max-width: 160px;
    }

    .rota-app {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .rota-calendar-column {
        flex: 0 0 540px;
        max-width: 540px;
    }

    .rota-app .day-detail {
        flex: 1;
        min-width: 0;
    }
}

.calendar-month {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--chalk);
    text-align: center;
    flex: 1;
}

.filter-bar {
    margin-bottom: 1rem;
}

.filter-bar--tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.45rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.tab-btn.is-active {
    background: rgba(26, 143, 76, 0.25);
    border-color: var(--primary-light);
    color: var(--chalk);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1rem;
}

.cal-head {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    padding: 0.35rem 0;
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.2rem 0.1rem 0.15rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(6, 42, 24, 0.45);
    cursor: pointer;
    font: inherit;
    color: var(--chalk);
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
    user-select: none;
    overflow: hidden;
}

.cal-day-top {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    position: relative;
    min-height: 1.1rem;
}

.cal-day-info {
    position: absolute;
    top: -2px;
    right: 0;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.cal-day-info:hover,
.cal-day-info:focus-visible {
    background: #ff3333;
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 1px;
}

.cal-day.has-day-note .cal-day-num {
    padding-right: 10px;
}

.cal-day:hover,
.cal-day.is-selected {
    border-color: var(--primary-light);
    background: rgba(26, 143, 76, 0.2);
}

.cal-day.is-other-month {
    opacity: 0.35;
}

.cal-day.is-today {
    box-shadow: inset 0 0 0 2px var(--accent-yellow);
}

.cal-day-num {
    font-size: 0.82rem;
    font-weight: 700;
}

.cal-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    width: calc(100% - 2px);
    max-width: 42px;
    margin: 2px auto 0;
    justify-items: center;
    align-content: start;
    flex: 1;
    min-height: 0;
}

.cal-dots--dense {
    max-width: 46px;
    gap: 2px;
}

.cal-dots--dense .cal-dot {
    width: 7px;
    height: 7px;
}

.cal-dots--overflow {
    max-width: 50px;
}

.cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.cal-dots-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
    height: 12px;
    padding: 0 2px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--chalk-muted);
    font-size: 0.55rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cal-dot--day {
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.cal-dot--night {
    background: #111111;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.cal-dot--holiday {
    background: var(--accent-yellow);
}

.day-detail {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.day-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.day-detail-title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--chalk);
}

.day-note-preview {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: rgba(204, 0, 0, 0.1);
    border: 1px solid rgba(204, 0, 0, 0.45);
    cursor: pointer;
}

.day-note-preview-label {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ff8a8a;
}

.day-note-preview-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--chalk);
    white-space: pre-wrap;
}

.day-note-modal-date {
    margin: -0.5rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.day-note-readonly-text {
    margin: 0;
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(6, 42, 24, 0.5);
    line-height: 1.5;
    white-space: pre-wrap;
}

.shift-card,
.request-card,
.staff-card {
    background: var(--card-elevated);
    border: 2px solid var(--border-soft);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.65rem;
}

.shift-card:last-child,
.request-card:last-child,
.staff-card:last-child {
    margin-bottom: 0;
}

.shift-card-head,
.request-card-head,
.staff-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    min-width: 0;
}

.request-card-title {
    min-width: 0;
    flex: 1;
}

.shift-card-name,
.request-card-name,
.staff-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--chalk);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.shift-card-meta,
.request-card-meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.shift-card-station {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(107, 68, 35, 0.45);
    border: 1px solid var(--wood-light);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--chalk-muted);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-pending {
    background: rgba(241, 196, 15, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-approved {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-declined {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.badge-admin {
    background: rgba(0, 102, 204, 0.25);
    color: #7eb8ff;
    border: 1px solid var(--accent-blue);
}

.badge-day {
    background: rgba(255, 255, 255, 0.15);
    color: var(--chalk);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.badge-night {
    background: rgba(0, 0, 0, 0.35);
    color: var(--chalk-muted);
    border: 1px solid rgba(0, 0, 0, 0.8);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.holiday-summaries {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 1.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.holiday-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
}

@media (min-width: 600px) {
    .holiday-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 0.85rem 0.5rem;
    text-align: center;
    min-width: 0;
}

.stat-card-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--chalk);
    line-height: 1.1;
}

.stat-card-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card--remaining .stat-card-value {
    color: var(--primary-light);
}

.stat-card--pending .stat-card-value {
    color: var(--warning);
}

.section-block {
    margin-top: 1.5rem;
}

.section-title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: var(--chalk-muted);
}

.staff-card-sub {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card);
    border: 2px solid var(--wood);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow);
}

@media (min-width: 600px) {
    .modal-backdrop {
        align-items: center;
        padding: 1rem;
    }

    .modal-card {
        border-radius: var(--radius);
    }
}

.modal-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--chalk);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.modal-actions .btn {
    flex: 1;
    min-width: 100px;
}

.review-details {
    margin-bottom: 1rem;
    padding: 0.85rem;
    background: rgba(6, 42, 24, 0.5);
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.review-details p {
    margin: 0 0 0.35rem;
}

.holiday-staff-block {
    width: 100%;
    min-width: 0;
}

.holiday-staff-name {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--chalk);
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 960px) {
    .rota-page .calendar-grid {
        gap: 6px;
    }

    .rota-page .cal-day {
        aspect-ratio: auto;
        min-height: 62px;
        padding-bottom: 0.2rem;
    }

    .rota-page .cal-day-num {
        font-size: 0.9rem;
    }

    .rota-page .cal-dots {
        max-width: 52px;
        gap: 3px;
    }

    .rota-page .cal-dots--dense {
        max-width: 56px;
    }

    .rota-page .cal-dots--dense .cal-dot {
        width: 8px;
        height: 8px;
    }

    .rota-page .cal-dot {
        width: 9px;
        height: 9px;
    }

    .rota-page .cal-dots-more {
        min-width: 14px;
        height: 14px;
        font-size: 0.6rem;
    }

    .rota-page .cal-day-info {
        width: 18px;
        height: 18px;
        font-size: 0.68rem;
        line-height: 18px;
    }

    .request-list,
    .staff-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 0.75rem;
    }

    .request-card,
    .staff-card {
        margin-bottom: 0;
    }
}

@media (min-width: 1200px) {
    .app-main {
        padding: 2rem 3rem;
    }
}

.settings-form {
    max-width: 640px;
}

.settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-soft);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-actions {
    margin-top: 0.5rem;
}

.is-admin .app-bottom-nav {
    max-width: 100%;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.is-admin .bottom-nav-btn {
    font-size: 0.62rem;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.is-admin .bottom-nav-icon {
    font-size: 1rem;
}

.shift-type-picker {
    border: none;
    margin: 0 0 0.25rem;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.65rem;
}

.shift-type-option--custom .shift-type-card {
    min-height: 72px;
}

.shift-custom-times {
    margin-bottom: 0.25rem;
}

.badge-custom {
    background: rgba(107, 68, 35, 0.45);
    color: var(--chalk-muted);
    border: 1px solid var(--wood-light);
}

@media (max-width: 480px) {
    .shift-type-picker {
        grid-template-columns: 1fr;
    }
}

.shift-type-picker legend {
    margin-bottom: 0.5rem;
}

.shift-type-option {
    cursor: pointer;
}

.shift-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shift-type-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.65rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: rgba(6, 42, 24, 0.45);
    min-height: 72px;
    position: relative;
}

.shift-type-name {
    font-weight: 800;
    color: var(--chalk);
    font-size: 0.92rem;
}

.shift-type-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.shift-type-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.shift-type-dot--day {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.shift-type-dot--night {
    background: #111;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.shift-type-option input:checked + .shift-type-card {
    border-color: var(--primary-light);
    background: rgba(26, 143, 76, 0.22);
    box-shadow: 0 0 0 2px rgba(62, 207, 122, 0.15);
}

.shift-type-option input:focus-visible + .shift-type-card {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.staff-ball {
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin-right: 0.4em;
    border-radius: 50%;
    vertical-align: 0.05em;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.cal-dot--mine {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(62, 207, 122, 0.9);
}

.shift-card--mine {
    border-color: var(--primary-light);
    background: rgba(26, 143, 76, 0.12);
}

.shift-you-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(62, 207, 122, 0.2);
    color: var(--primary-light);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.staff-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.staff-color-input {
    width: 3.25rem;
    min-height: 2.5rem;
    padding: 0.2rem;
    cursor: pointer;
}

.staff-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.staff-color-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    padding: 0;
}

.staff-color-swatch.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Dashboard / to-dos — snooker table */
.dashboard-page .app-main {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    box-sizing: border-box;
}

.dashboard-app {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.85rem;
    width: 100%;
    max-width: none;
    margin: 0;
}

.todo-day-bar {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    flex: 0 0 auto;
}

.todo-day-picker {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.todo-shift-line {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.snooker-table {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.snooker-table-rail {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
    border-radius: 22px;
    background:
        linear-gradient(145deg, #9a6534 0%, var(--wood-light) 18%, var(--wood) 52%, #4a2d14 100%);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 220, 170, 0.35),
        inset 0 -2px 4px rgba(0, 0, 0, 0.35);
}

.snooker-pocket {
    position: absolute;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 35%, #2a2a2a 0%, #0a0a0a 55%, #000 100%);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        0 0 0 3px rgba(40, 24, 10, 0.85),
        0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.snooker-pocket--tl { top: 0.35rem; left: 0.35rem; }
.snooker-pocket--tr { top: 0.35rem; right: 0.35rem; }
.snooker-pocket--bl { bottom: 0.35rem; left: 0.35rem; }
.snooker-pocket--br { bottom: 0.35rem; right: 0.35rem; }
.snooker-pocket--ml { top: 50%; left: 0.2rem; transform: translateY(-50%); }
.snooker-pocket--mr { top: 50%; right: 0.2rem; transform: translateY(-50%); }

.snooker-baize {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem 0.85rem 1.1rem;
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(62, 207, 122, 0.18), transparent 45%),
        radial-gradient(ellipse at 75% 80%, rgba(0, 0, 0, 0.22), transparent 50%),
        linear-gradient(165deg, #0f5c32 0%, #0a4726 40%, #083820 100%);
    box-shadow:
        inset 0 0 0 2px rgba(8, 40, 22, 0.65),
        inset 0 8px 24px rgba(0, 0, 0, 0.28);
}

.snooker-baize-sheen {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 11px,
            rgba(255, 255, 255, 0.015) 11px,
            rgba(255, 255, 255, 0.015) 12px
        ),
        linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 40%, rgba(0, 0, 0, 0.08) 100%);
    opacity: 0.85;
}

.snooker-spots {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(245, 240, 225, 0.28) 0 2px, transparent 2.5px),
        radial-gradient(circle, rgba(245, 240, 225, 0.18) 0 1.5px, transparent 2px),
        radial-gradient(circle, rgba(245, 240, 225, 0.18) 0 1.5px, transparent 2px);
    background-size: 12px 12px, 10px 10px, 10px 10px;
    background-position:
        18% 72%,
        50% 50%,
        78% 28%;
    background-repeat: no-repeat;
    opacity: 0.55;
}

.todo-add-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 0.15rem 0 0.85rem;
}

.todo-add-btn {
    width: 3.1rem;
    height: 3.1rem;
    border: 2px solid rgba(245, 240, 225, 0.55);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #fffdf6 0%, #f0e6c8 42%, #d4c49a 100%);
    color: #3a2a12;
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.25),
        inset 0 2px 3px rgba(255, 255, 255, 0.65);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.todo-add-btn:hover,
.todo-add-btn:focus-visible {
    filter: brightness(1.05);
    outline: none;
    box-shadow:
        0 5px 0 rgba(0, 0, 0, 0.28),
        0 0 0 3px rgba(62, 207, 122, 0.35),
        inset 0 2px 3px rgba(255, 255, 255, 0.65);
}

.todo-add-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.25),
        inset 0 2px 3px rgba(255, 255, 255, 0.65);
}

.todo-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.55rem;
    width: 100%;
    flex: 1 0 auto;
    align-content: start;
}

.todo-list:has(.todo-empty) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.todo-empty {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.65rem;
    flex: 1 1 auto;
    width: 100%;
    min-height: 12rem;
    padding: 1.5rem 1rem 1.75rem;
    text-align: center;
}

.todo-empty-ball {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, #fffdf8 0%, #f2e8cc 45%, #c9b888 100%);
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.28),
        inset 0 2px 3px rgba(255, 255, 255, 0.7);
}

.todo-empty-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--chalk);
}

.todo-empty-copy {
    margin: 0;
    max-width: 18rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(200, 220, 205, 0.9);
}

.todo-empty-copy strong {
    color: var(--chalk);
    font-weight: 700;
}

.todo-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(245, 240, 225, 0.14);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(10, 42, 26, 0.72), rgba(6, 30, 18, 0.78));
    color: var(--chalk);
    cursor: pointer;
    font: inherit;
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(2px);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.todo-row:hover,
.todo-row:focus-visible {
    border-color: rgba(62, 207, 122, 0.55);
    outline: none;
    transform: translateY(-1px);
    box-shadow:
        0 5px 0 rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(62, 207, 122, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.todo-row:active {
    transform: translateY(1px);
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.todo-row.is-done {
    opacity: 0.72;
}

.todo-row.is-done .todo-row-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-row-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    flex-shrink: 0;
    width: 1.55rem;
    padding-top: 0.05rem;
}

.todo-row-check {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 800;
    color: transparent;
    background: var(--staff-color, rgba(245, 240, 225, 0.45));
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.25);
}

.todo-row.is-done .todo-row-check {
    border-color: rgba(0, 0, 0, 0.28);
    background: var(--staff-color, #ffd100);
    color: var(--staff-ink, #fff);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 0 0 2px rgba(245, 240, 225, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.25);
}

.todo-row-body {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.todo-row-title-line {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
}

.todo-row-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
    flex: 1;
}

.todo-row-note-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    color: #1a1200;
    background: linear-gradient(180deg, #ffd86a, #e6a817);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.todo-row.is-done .todo-row-note-flag {
    opacity: 0.9;
}

.todo-row-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.todo-row-extra {
    display: none;
}

.todo-row-note-preview {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--chalk-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.todo-row-note-preview--manager {
    color: #e6c35c;
}

@media (min-width: 800px) {
    .dashboard-app {
        gap: 1rem;
    }

    .todo-day-bar {
        grid-template-columns: minmax(12rem, 16rem) 1fr;
        align-items: center;
        gap: 0.75rem 1rem;
    }

    .todo-day-picker {
        width: 100%;
    }

    .todo-shift-line {
        font-size: 0.86rem;
    }

    .snooker-table-rail {
        padding: 1.1rem;
        border-radius: 28px;
    }

    .snooker-pocket {
        width: 1.55rem;
        height: 1.55rem;
    }

    .snooker-baize {
        padding: 1.25rem 1.2rem 1.35rem;
        border-radius: 16px;
    }

    .todo-list {
        gap: 0.7rem;
    }

    .todo-empty {
        min-height: 16rem;
    }

    .todo-row {
        padding: 1rem 1.15rem;
        gap: 1rem;
    }

    .todo-row-title {
        font-size: 0.95rem;
    }

    .todo-row-extra {
        display: grid;
        gap: 0.35rem;
        margin-top: 0.35rem;
    }

    .todo-row-note-preview {
        white-space: pre-wrap;
        overflow: visible;
        text-overflow: unset;
        display: block;
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
    }
}

.staff-pick {
    position: relative;
    margin: 0 0 0.85rem;
}

.staff-pick-trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: var(--touch);
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: rgba(6, 42, 24, 0.6);
    color: var(--chalk);
    font: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.staff-pick-trigger:focus-visible {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(62, 207, 122, 0.2);
}

.staff-pick-trigger .staff-ball,
.staff-pick-option .staff-ball {
    width: 0.85rem;
    height: 0.85rem;
    margin-right: 0;
    flex-shrink: 0;
}

.staff-pick-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    line-height: 1.2;
    color: var(--chalk);
}

.staff-pick-caret {
    width: 0.45rem;
    height: 0.45rem;
    margin-left: auto;
    border-right: 2px solid var(--chalk-muted);
    border-bottom: 2px solid var(--chalk-muted);
    transform: rotate(45deg) translateY(-0.1rem);
    flex-shrink: 0;
}

.staff-pick.is-open .staff-pick-caret {
    transform: rotate(-135deg) translateY(-0.05rem);
}

.staff-pick-menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: none;
    gap: 0.2rem;
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #0a2f1c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.staff-pick.is-open .staff-pick-menu,
.staff-pick-menu:not([hidden]) {
    display: grid;
}

.staff-pick-menu[hidden] {
    display: none !important;
}

.staff-pick-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--chalk);
    font: inherit;
    cursor: pointer;
}

.staff-pick-option:hover,
.staff-pick-option:focus-visible {
    background: rgba(62, 207, 122, 0.14);
    outline: none;
}

.staff-pick-option.is-selected {
    border-color: rgba(62, 207, 122, 0.45);
    background: rgba(26, 143, 76, 0.28);
}

.todo-detail-complete {
    margin-bottom: 0.35rem;
}

.todo-detail-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--chalk);
}

.todo-detail-meta {
    margin: 0.15rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.todo-admin-note,
.todo-staff-notes {
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
}

.todo-admin-note {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.28);
}

.todo-staff-notes {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-soft);
}

.todo-note-label {
    margin: 0 0 0.2rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--chalk-muted);
}

.todo-note-text {
    margin: 0;
    color: var(--chalk);
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.field-textarea--auto {
    overflow: hidden;
    resize: none;
    min-height: 3rem;
    line-height: 1.4;
    transition: height 0.08s ease;
}

#todo-detail-modal .modal-card,
#todo-create-modal .modal-card {
    max-height: min(92vh, 720px);
    overflow: auto;
}

.todo-modal-top {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    gap: 0.5rem;
    margin: -0.15rem 0 1rem;
}

.todo-modal-heading {
    margin: 0;
    text-align: center;
    font-size: 1.15rem;
}

.todo-modal-top-spacer {
    width: 2.5rem;
    height: 2.5rem;
}

.todo-modal-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--chalk);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.55rem;
    line-height: 1;
    padding: 0;
}

.todo-modal-icon-btn:hover,
.todo-modal-icon-btn:focus-visible {
    background: rgba(62, 207, 122, 0.22);
    outline: none;
}

.todo-modal-icon-btn--danger {
    color: #ffb4ab;
}

.todo-modal-icon-btn--danger:hover,
.todo-modal-icon-btn--danger:focus-visible {
    background: rgba(231, 76, 60, 0.22);
}

.todo-modal-footer {
    margin-top: 0.75rem;
}

.todo-modal-footer .btn-block {
    width: 100%;
}

.modal-card--intro {
    text-align: left;
}

.todo-intro-copy {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--text, #1a1a1a);
}

.todo-intro-color {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 1.15rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: rgba(11, 77, 42, 0.08);
    border: 1px solid rgba(11, 77, 42, 0.14);
}

.todo-intro-ball {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.2),
        inset 0 2px 3px rgba(255, 255, 255, 0.45),
        0 0 0 1px rgba(0, 0, 0, 0.2);
}

.todo-intro-color-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

@media (min-width: 600px) {
    #todo-detail-modal .modal-card,
    #todo-create-modal .modal-card,
    #todo-intro-modal .modal-card {
        max-width: 560px;
    }
}


