:root {
    --ohc-bg: #0b111c;
    --ohc-surface: #121a28;
    --ohc-surface-2: #1a2436;
    --ohc-text: #eef2f6;
    --ohc-muted: #8b9aab;
    --ohc-accent: #d4af37;
    --ohc-accent-hover: #e4c55a;
    --ohc-accent-muted: rgba(212, 175, 55, 0.14);
    --ohc-border: rgba(255, 255, 255, 0.07);
    --ohc-radius: 0.4rem;
    --ohc-font-size: 0.9375rem;
    --ohc-scrollbar: #2a3548;
    --ohc-scrollbar-thumb: #3d4d66;
    --ohc-sidebar-width: 15.35rem;
}

* {
    box-sizing: border-box;
}

html {
    font-size: var(--ohc-font-size);
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--ohc-bg);
    color: var(--ohc-text);
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--ohc-scrollbar-thumb) var(--ohc-scrollbar);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--ohc-scrollbar);
}

*::-webkit-scrollbar-thumb {
    background: var(--ohc-scrollbar-thumb);
    border-radius: 4px;
}

a {
    color: var(--ohc-accent);
}

a:hover {
    color: var(--ohc-accent-hover);
}

h1,
.h1 {
    font-size: 1.35rem;
}

h2,
.h2 {
    font-size: 1.15rem;
}

h3,
.h3 {
    font-size: 1.05rem;
}

.text-muted {
    color: var(--ohc-muted) !important;
}

.card,
.settings-panel,
.dash-panel,
.dash-kpi-card {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    color: var(--ohc-text);
}

.form-control,
.form-select {
    --bs-form-select-bg: var(--ohc-surface-2);
    --bs-form-select-color: var(--ohc-text);
    background-color: var(--ohc-surface-2);
    border-color: var(--ohc-border);
    color: var(--ohc-text);
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
}

.form-select option,
.form-select optgroup {
    background-color: var(--ohc-surface-2);
    color: var(--ohc-text);
}

.form-label,
.form-check-label {
    color: var(--ohc-text);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--ohc-surface-2);
    border-color: var(--ohc-accent);
    box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.2);
    color: var(--ohc-text);
}

.form-control::placeholder {
    color: var(--ohc-muted);
}

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

.btn {
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

.btn-primary {
    background: var(--ohc-accent);
    border-color: var(--ohc-accent);
    color: #1a1508;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--ohc-accent-hover);
    border-color: var(--ohc-accent-hover);
    color: #1a1508;
}

.btn-outline-light {
    border-color: var(--ohc-border);
    color: var(--ohc-text);
}

.btn-outline-light:hover {
    background: var(--ohc-surface-2);
    border-color: var(--ohc-accent);
    color: var(--ohc-text);
}

.btn-outline-danger {
    border-color: rgba(220, 53, 69, 0.55);
    color: #ffb4b4;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
    background: rgba(220, 53, 69, 0.18);
    border-color: rgba(220, 53, 69, 0.8);
    color: #ffd0d0;
}

.btn-danger {
    background: #c23b4a;
    border-color: #c23b4a;
    color: #fff;
    font-weight: 600;
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: #d44858;
    border-color: #d44858;
    color: #fff;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #ffb4bc;
    font-size: 0.8125rem;
}

.alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #9dffc8;
    font-size: 0.8125rem;
}

.border-secondary-subtle {
    border-color: var(--ohc-border) !important;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.bg-secondary,
.badge.bg-primary {
    background-color: var(--ohc-surface-2) !important;
    color: var(--ohc-text) !important;
}

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-content-minimal {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--ohc-border);
    box-shadow: none !important;
}

.login-brand {
    text-align: center;
}

.login-logo {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 4px 12px rgba(0, 20, 60, 0.28));
}

.login-install-btn {
    margin-top: 0.15rem;
}

.login-install-hint {
    margin-top: 0.65rem;
}

html.pwa-installed .login-install-btn,
html.pwa-installed .login-install-hint,
html.pwa-installed #pwa-install-btn,
html.pwa-installed #pwa-install-ios,
html.pwa-installed #pwa-install-fallback,
html.pwa-installed #pwa-install-insecure,
html.pwa-installed #pwa-install-https-note {
    display: none !important;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--ohc-sidebar-width);
    flex-shrink: 0;
    align-items: stretch;
    background: var(--ohc-surface);
    border-right: 1px solid var(--ohc-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (min-width: 992px) {
    .has-sidebar .app-main {
        margin-left: var(--ohc-sidebar-width);
    }
}

.sidebar-brand {
    width: 100%;
    padding: 0.85rem 0.25rem 0.45rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: var(--ohc-text);
    line-height: 0;
}

.brand-link:hover {
    color: var(--ohc-text);
    opacity: 0.92;
}

.sidebar-logo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.sidebar-nav {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0;
}

.sidebar-nav .nav-link,
.offcanvas .nav-link {
    color: var(--ohc-text);
    border-radius: 0;
    padding: 0.48rem 0.55rem;
    margin-bottom: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    width: 100%;
    display: flex;
}

.nav-link-icon {
    align-items: center;
    gap: 0.75rem;
}

.nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ohc-text);
}

.nav-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.sidebar-nav .nav-link:hover,
.offcanvas .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ohc-text);
}

.sidebar-nav .nav-link.active,
.offcanvas .nav-link.active {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--ohc-accent);
}

.sidebar-nav .nav-link.active .nav-icon,
.offcanvas .nav-link.active .nav-icon {
    color: var(--ohc-accent);
}

.sidebar-nav .nav-link.nav-link-sub,
.offcanvas .nav-link.nav-link-sub {
    font-size: 0.875rem;
    padding-left: 1.85rem;
}

.sidebar-nav .nav-link.nav-link-sub .nav-icon,
.offcanvas .nav-link.nav-link-sub .nav-icon {
    height: 1rem;
    width: 1rem;
}

.nav-item-count {
    background: rgba(212, 175, 55, 0.22);
    border-radius: 999px;
    color: var(--ohc-accent);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    min-width: 1.25rem;
    padding: 0.15rem 0.4rem;
    text-align: center;
}

.nav-item-new {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.45);
    border-radius: 999px;
    color: #86efac;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-left: 0.35rem;
    padding: 0.18rem 0.38rem;
    text-transform: uppercase;
}

.nav-link-icon .nav-item-new + .nav-item-count {
    margin-left: auto;
}

.nav-item-count.is-flag {
    align-items: center;
    background: rgba(220, 38, 38, 0.22);
    color: #fca5a5;
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.16rem 0.42rem 0.16rem 0.32rem;
}

.nav-item-flag-icon {
    display: inline-flex;
    height: 0.78rem;
    width: 0.78rem;
}

.nav-item-flag-icon svg {
    display: block;
    height: 0.78rem;
    width: 0.78rem;
}

.rota-history-link {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.rota-history-link .nav-item-count,
.nav-item-count.is-inline {
    margin-left: 0;
}

.sidebar-footer {
    align-self: stretch;
    width: 100%;
    padding: 0.55rem;
}

.sidebar-system-tasks {
    width: 100%;
}

.profile-run-form {
    margin: 0;
}

.profile-run-select {
    margin-top: 0.15rem;
    max-width: 100%;
}

.run-report-stats {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.run-report-stat {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--ohc-border);
    border-radius: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
}

.run-report-stat strong {
    color: var(--ohc-text);
    font-size: 1.15rem;
}

.run-report-stat strong {
    color: var(--ohc-text);
    font-size: 1.15rem;
}

.client-run-cell {
    min-width: 7rem;
}

.client-run-list {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.client-run-list-item {
    color: var(--ohc-text);
    font-size: 0.84rem;
    line-height: 1.25;
}

.run-card-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.run-card {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    color: var(--ohc-text);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.run-card:hover {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--ohc-text);
}

.run-card-title {
    font-size: 1rem;
    font-weight: 600;
}

.run-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.82rem;
}

.run-card-stats strong {
    color: var(--ohc-text);
}

.run-week-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.run-week-summary-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--ohc-border);
    border-radius: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
}

.run-week-summary-item strong {
    color: var(--ohc-text);
    font-size: 1.15rem;
}

.run-staff-day-table {
    min-width: 42rem;
}

.run-staff-day-head {
    color: var(--ohc-muted, #9aa3af);
    font-weight: 700;
    min-width: 5.5rem;
    text-align: center;
    vertical-align: bottom;
    white-space: nowrap;
}

.run-staff-day-head.is-today,
.run-week-day-head.is-today {
    color: var(--ohc-accent);
}

.run-staff-day-letter,
.run-week-day-letter {
    display: inline-block;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.run-staff-day-date,
.run-week-day-num {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.25rem;
    opacity: 0.9;
}

.run-staff-day-cell {
    font-size: 0.82rem;
    line-height: 1.25;
    min-width: 5.5rem;
    vertical-align: middle;
}

.runs-overview-run-cell {
    vertical-align: top;
    white-space: nowrap;
}

.runs-overview-run-link {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.runs-overview-run-link:hover,
.runs-overview-run-link:focus-visible {
    color: var(--ohc-accent);
}

.runs-overview-period {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.runs-overview-stat-cell {
    vertical-align: top;
}

.runs-overview-table tbody tr.run-period-row:not(.is-run-start) td {
    border-top-color: transparent;
}

.runs-overview-table tbody tr.is-run-start td {
    border-top: 1px solid var(--ohc-border);
}

.run-staff-link {
    color: var(--ohc-text);
    font-weight: 600;
    text-decoration: none;
}

.run-staff-link:hover {
    color: var(--ohc-accent);
    text-decoration: underline;
}

.run-week-table th,
.run-week-table td {
    vertical-align: top;
}

.run-week-table tbody tr + tr > *,
.run-staff-day-table tbody tr + tr > * {
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55);
    padding-top: 0.9rem;
}

.run-week-day-head {
    color: var(--ohc-muted, #9aa3af);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    width: 12.5%;
}

.run-week-period-col,
.run-week-period-label {
    min-width: 5.5rem;
    white-space: nowrap;
}

.run-week-period-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.run-week-visits li + li {
    margin-top: 0.35rem;
}

.run-week-visit-row {
    align-items: baseline;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.run-week-visit-name {
    min-width: 0;
    align-items: flex-start;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.05rem 0;
}

.run-week-visit-client,
.run-week-visit-staff {
    display: block;
}

.run-week-visit-staff {
    color: var(--ohc-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.run-week-visit-staff.is-unassigned {
    color: #f0ad4e;
}

button.run-visit-link {
    align-items: flex-start;
    display: inline-flex;
    flex-direction: column;
}

.run-week-visit-minutes {
    flex-shrink: 0;
    min-width: 2.5rem;
    text-align: right;
}

.run-week-total-row th,
.run-week-total-row td,
.runs-overview-total-row th,
.runs-overview-total-row td {
    border-top: 1px solid var(--ohc-border);
    font-weight: 600;
}

.run-week-total-cell {
    color: var(--ohc-accent);
    font-size: 0.82rem;
    text-align: right;
    white-space: nowrap;
}

.run-visit-unmatched.btn-link {
    color: #f0ad4e;
    text-decoration: underline;
}

.run-visit-unmatched.btn-link:hover {
    color: #ffc766;
}

.run-alias-result {
    border-color: var(--ohc-border);
}

.run-unassigned-list {
    column-gap: 1.5rem;
    display: grid;
    gap: 0.45rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.run-unassigned-item {
    align-items: baseline;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.client-tts-panel {
    padding: 1rem;
}

.profile-hero-actions {
    flex-shrink: 0;
}

.profile-hero-kpc {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ohc-border);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 8.5rem;
    padding: 0.65rem 0.8rem;
}

.profile-hero-kpc .profile-label {
    margin-bottom: 0;
}

.profile-hero-kpc-input {
    max-width: 9.5rem;
}

.staff-rota-tts-kpc {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--ohc-text);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 1rem;
    padding-top: 0.85rem;
}

.staff-rota-client-forms-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 0.95rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
    color: #1c2430;
    display: flex;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
    min-height: 3.15rem;
    padding: 0.75rem 0.95rem;
    width: 100%;
}

.staff-rota-client-forms-btn svg {
    color: #4c3d86;
    flex-shrink: 0;
    height: 1.45rem;
    width: 1.45rem;
}

.staff-rota-client-forms-screen {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.staff-rota-client-forms-screen[hidden] {
    display: none;
}

.staff-rota-client-forms-back {
    align-items: center;
    align-self: flex-start;
    background: transparent;
    border: 0;
    color: #f4f7fb;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    gap: 0.35rem;
    padding: 0.15rem 0;
}

.staff-rota-client-forms-back svg {
    height: 1.15rem;
    width: 1.15rem;
}

.staff-rota-client-forms-title {
    color: #f4f7fb;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}

.staff-rota-client-forms-lead,
.staff-rota-client-form-drafts > p {
    color: #d5deea;
    font-size: 0.92rem;
    margin: 0;
}

.staff-rota-client-forms-menu,
.staff-rota-client-form-drafts {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.staff-rota-client-form-choice {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e8ef;
    border-radius: 0.95rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    color: #1c2430;
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0.8rem 0.85rem 0.95rem;
    text-decoration: none;
}

.staff-rota-client-form-choice-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.staff-rota-client-form-choice strong {
    color: #1c2430;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
}

.staff-rota-client-form-choice-copy span {
    color: #3f4754;
    font-size: 0.84rem;
}

.staff-rota-client-form-choice-icon {
    align-items: center;
    background: #ece8f6;
    border-radius: 0.75rem;
    color: #4c3d86;
    display: inline-flex;
    flex-shrink: 0;
    height: 2.45rem;
    justify-content: center;
    width: 2.45rem;
}

.staff-rota-client-form-choice-icon svg {
    height: 1.25rem;
    width: 1.25rem;
}

.staff-rota-client-form-draft {
    align-items: stretch;
    display: flex;
    gap: 0.35rem;
}

.staff-rota-client-form-draft .staff-rota-client-form-choice {
    flex: 1;
    min-width: 0;
}

.staff-rota-client-form-discard {
    align-self: center;
    background: #243044;
    border: 0;
    border-radius: 0.75rem;
    color: #f4f7fb;
    font-size: 1.35rem;
    line-height: 1;
    min-height: 2.6rem;
    min-width: 2.6rem;
}

.staff-client-form-done {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 70vh;
    padding: 1.5rem 1rem 2rem;
}

.staff-client-form-done-card {
    background: #15803d;
    border-radius: 1.15rem;
    box-shadow: 0 16px 36px rgba(21, 128, 61, 0.28);
    color: #fff;
    max-width: 24rem;
    padding: 1.6rem 1.25rem 1.3rem;
    text-align: center;
    width: 100%;
}

.staff-client-form-done-card h1 {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0.35rem 0 0.7rem;
}

.staff-client-form-done-card p {
    color: #ecfdf3;
    margin: 0 0 0.65rem;
}

.staff-client-form-done-card strong {
    color: #fff;
}

.staff-client-form-done-ok {
    background: #fff;
    border-radius: 0.85rem;
    color: #14532d;
    display: block;
    font-weight: 800;
    margin-top: 1rem;
    min-height: 2.9rem;
    padding: 0.7rem 1rem;
    text-decoration: none;
}

.client-tts-hero-btn {
    align-items: center;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.06));
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 0.75rem;
    color: var(--ohc-text);
    display: inline-flex;
    gap: 0.75rem;
    min-width: 10.5rem;
    padding: 0.7rem 0.95rem;
    text-align: left;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.client-tts-hero-btn:hover {
    border-color: rgba(212, 175, 55, 0.65);
    transform: translateY(-1px);
}

.client-tts-hero-btn-icon {
    align-items: center;
    background: rgba(212, 175, 55, 0.14);
    border-radius: 0.55rem;
    color: var(--ohc-accent);
    display: inline-flex;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.client-tts-hero-btn-icon svg {
    height: 1.15rem;
    width: 1.15rem;
}

.client-tts-hero-btn-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.client-tts-hero-btn-label {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.1;
}

.client-tts-hero-btn-status {
    color: var(--ohc-muted);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.1;
}

.client-tts-hero-btn-confirmed {
    border-color: rgba(25, 135, 84, 0.35);
}

.client-tts-hero-btn-confirmed .client-tts-hero-btn-icon {
    background: rgba(25, 135, 84, 0.14);
    color: #75b798;
}

.client-tts-hero-btn-confirmed .client-tts-hero-btn-status {
    color: #75b798;
}

.client-tts-hero-btn-review {
    border-color: rgba(240, 173, 78, 0.35);
}

.client-tts-hero-btn-review .client-tts-hero-btn-status {
    color: #f0ad4e;
}

.client-tts-hero-btn-failed,
.client-tts-hero-btn-missing {
    border-color: rgba(220, 53, 69, 0.28);
}

.client-tts-hero-btn-failed .client-tts-hero-btn-status,
.client-tts-hero-btn-missing .client-tts-hero-btn-status {
    color: #ea868f;
}

.client-tts-modal-dialog .modal-content {
    overflow: hidden;
}

.client-tts-modal-body {
    padding-top: 0;
}

.client-tts-tabs {
    margin-bottom: 1rem;
    padding-top: 0.25rem;
}

.client-tts-tab-content {
    min-height: 12rem;
}

.client-tts-modal-footer {
    background: var(--ohc-surface-2);
    border-top: 1px solid var(--ohc-border);
    justify-content: center;
    padding: 0.85rem 1rem;
}

.client-tts-modal-footer-confirmed {
    background: rgba(25, 135, 84, 0.12);
    border-top-color: rgba(25, 135, 84, 0.35);
}

.client-tts-confirmed-banner {
    align-items: center;
    color: #75b798;
    display: inline-flex;
    font-size: 0.92rem;
    gap: 0.55rem;
}

.client-tts-confirmed-icon {
    align-items: center;
    background: rgba(25, 135, 84, 0.18);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    height: 1.55rem;
    justify-content: center;
    width: 1.55rem;
}

.client-tts-unconfirmed-banner {
    text-align: center;
}

.client-tts-empty-state {
    padding: 1rem 0.25rem;
}

.client-tts-settings-panel {
    max-width: 42rem;
}

.client-tts-panel-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.client-tts-status-badge {
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
    white-space: nowrap;
}

.client-tts-status-confirmed {
    background: rgba(25, 135, 84, 0.15);
    color: #75b798;
}

.client-tts-status-review {
    background: rgba(240, 173, 78, 0.15);
    color: #f0ad4e;
}

.client-tts-status-failed,
.client-tts-status-missing {
    background: rgba(220, 53, 69, 0.12);
    color: #ea868f;
}

.client-tts-error {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 0.55rem;
    color: #ea868f;
    padding: 0.75rem;
}

.client-tts-pending {
    color: #f0ad4e;
    font-size: 1rem;
    font-weight: 700;
}

.client-tts-failed {
    color: #ea868f;
    font-weight: 700;
}

.client-tts-select-form {
    max-width: 42rem;
}

.client-tts-summary-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.client-tts-summary-item {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem;
}

.client-tts-table td,
.client-tts-table th {
    vertical-align: top;
}

.client-tts-table td:nth-child(2) {
    min-width: 16rem;
}

.client-tts-total-row {
    background: var(--ohc-surface-2);
}

.client-tts-notes {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.55rem;
    padding: 0.75rem;
}

.client-ref-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.client-postcode-cell,
.client-date-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.clients-filter-toolbar .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.client-hours-mismatch {
    color: #f0ad4e;
    font-weight: 600;
}

.client-post-leave-rota-row td {
    background: rgba(220, 53, 69, 0.08);
    border-top: 1px solid rgba(220, 53, 69, 0.25);
}

.client-post-leave-rota-row td:first-child {
    box-shadow: inset 3px 0 0 #dc3545;
}

.client-post-leave-rota-warning {
    color: #dc3545;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.client-starts-later-note {
    color: var(--ohc-muted);
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.client-rota-cell {
    color: var(--ohc-accent);
}

.client-rota-mismatch {
    color: #f0ad4e;
    font-weight: 600;
}

.client-rota-schedule .client-rota-week-form {
    min-width: 14rem;
}

.client-rota-panel {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    overflow: hidden;
}

.client-rota-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.client-rota-header.has-add-call {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
}

.client-rota-header.has-add-call .client-rota-toggle {
    justify-self: start;
}

.client-rota-header.has-add-call .client-rota-header-controls {
    justify-self: end;
}

.client-rota-add-call {
    background: var(--ohc-accent);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 0 0 4px var(--ohc-accent-muted);
    color: #111;
    font-size: 1.02rem;
    font-weight: 700;
    justify-self: center;
    letter-spacing: 0.01em;
    line-height: 1.1;
    padding: 0.62rem 1.55rem;
    white-space: nowrap;
}

.client-rota-add-call:hover,
.client-rota-add-call:focus-visible {
    background: var(--ohc-accent-hover);
    color: #111;
    outline: none;
}

@media (max-width: 767.98px) {
    .client-rota-header.has-add-call {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .client-rota-add-call {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(16rem, 100%);
    }
}

.client-rota-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ohc-text);
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.55rem;
    padding: 0;
}

.client-rota-toggle:hover,
.client-rota-toggle:focus-visible {
    color: var(--ohc-text);
    outline: none;
}

.client-rota-toggle-main {
    align-items: center;
    display: inline-flex;
    font-weight: 600;
    gap: 0.55rem;
}

.client-rota-toggle-icon {
    align-items: center;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 0.45rem;
    color: var(--ohc-accent);
    display: inline-flex;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.client-rota-toggle-icon svg {
    height: 1rem;
    width: 1rem;
}

.client-rota-chevron {
    border-right: 2px solid var(--ohc-muted);
    border-bottom: 2px solid var(--ohc-muted);
    display: inline-block;
    height: 0.45rem;
    margin-left: 0.15rem;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    width: 0.45rem;
}

.client-rota-toggle[aria-expanded="true"] .client-rota-chevron {
    transform: rotate(45deg);
}

.client-rota-header-controls {
    align-items: center;
    display: flex;
    flex: 1 1 18rem;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    justify-content: flex-end;
    min-width: 0;
}

.client-rota-week-form {
    min-width: 11rem;
}

.client-rota-header-stats {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    justify-content: flex-end;
    min-width: 0;
}

.client-rota-stat {
    align-items: baseline;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 0.82rem;
    gap: 0.3rem;
    max-width: 100%;
}

.client-rota-stat-label {
    color: var(--ohc-muted);
    text-transform: uppercase;
}

.client-rota-stat strong {
    color: var(--ohc-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.client-rota-stat-warn strong {
    color: #f0ad4e;
}

.client-rota-stat-runs strong {
    word-break: break-word;
}

.client-rota-body {
    border-top: 1px solid var(--ohc-border);
    padding: 0.85rem 1rem 1rem;
}

.client-rota-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.client-rota-run-names {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
}

.client-rota-table th,
.client-rota-table td {
    vertical-align: top;
}

.client-rota-grid-wrap {
    overflow-x: auto;
}

.client-rota-grid {
    background: var(--ohc-surface-2, #1b1f2a);
    border: 1px solid var(--ohc-border);
    border-radius: 0.75rem;
    display: grid;
    grid-template-columns: 5.25rem repeat(var(--client-rota-cols, 7), minmax(5.5rem, 1fr));
    min-width: 46rem;
    overflow: hidden;
}

.client-rota-corner,
.client-rota-day-head,
.client-rota-period-label,
.client-rota-grid-cell {
    border-bottom: 1px solid var(--ohc-border);
    border-right: 1px solid var(--ohc-border);
}

.client-rota-day-head {
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.2rem;
}

.client-rota-day-letter {
    color: var(--ohc-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.client-rota-day-num {
    align-items: center;
    border-radius: 999px;
    color: var(--ohc-text);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    height: 1.55rem;
    justify-content: center;
    width: 1.55rem;
}

.client-rota-day-head.is-today .client-rota-day-num {
    background: var(--ohc-accent);
    color: #111;
}

.client-rota-period-label {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ohc-muted);
    display: flex;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-height: 5.5rem;
    padding: 0.7rem 0.5rem;
    white-space: nowrap;
}

.client-rota-grid-cell {
    min-height: 5.5rem;
    padding: 0.3rem;
}

.client-rota-grid-cell.is-today {
    background: rgba(212, 175, 55, 0.06);
}

.client-rota-grid-empty {
    color: var(--ohc-muted);
    display: block;
    padding: 0.35rem 0.2rem;
}

.client-rota-call {
    background: rgba(212, 175, 55, 0.12);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    margin-bottom: 0.28rem;
    padding: 0.35rem 0.4rem;
}

.client-rota-call.is-editable {
    cursor: pointer;
}

.client-rota-call.is-editable:hover,
.client-rota-call.is-editable:focus-visible {
    background: rgba(212, 175, 55, 0.22);
    outline: none;
}

.client-rota-call.is-cancelled {
    background: rgba(224, 122, 144, 0.12);
    opacity: 0.85;
}

.client-rota-call.is-cancelled .client-rota-call-staff,
.client-rota-call.is-cancelled .client-rota-call-run,
.client-rota-call.is-cancelled .client-rota-call-mins {
    text-decoration: line-through;
}

.client-rota-call:last-child {
    margin-bottom: 0;
}

.client-rota-call-staff {
    color: var(--ohc-text);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
}

.client-rota-call-staff.is-missing {
    color: #e07a90;
    font-weight: 600;
}

.client-rota-call-run {
    color: var(--ohc-muted);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

.client-rota-call-run.is-missing {
    color: #e07a90;
}

.client-rota-call-mins {
    color: var(--ohc-muted);
    font-size: 0.68rem;
}

.client-rota-call-cancelled {
    color: #e07a90;
    font-size: 0.66rem;
    font-weight: 700;
}

.client-rota-call-note {
    color: var(--ohc-muted);
    font-size: 0.66rem;
    font-style: italic;
}

.client-rota-week-total {
    color: var(--ohc-muted);
    font-size: 0.82rem;
    margin-top: 0.75rem;
}

.client-rota-week-total strong {
    color: var(--ohc-accent);
    font-weight: 600;
}

.client-rota-total-row th {
    border-top: 1px solid var(--ohc-border);
    color: var(--ohc-accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.runs-toolbar .form-label {
    margin-bottom: 0.35rem;
}

.runs-add-run .form-control {
    max-width: 18rem;
}

.runs-overview-table th,
.runs-overview-table td {
    padding: 0.5rem 0.65rem;
}

.runs-overview-table thead th {
    color: var(--ohc-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.runs-overview-table tbody tr {
    cursor: default;
}

.run-visit-link {
    color: var(--ohc-accent);
}

.run-visit-link:hover {
    color: var(--ohc-accent-hover);
}

.run-visit-unmatched {
    color: var(--ohc-text);
}

.tooltip-inner {
    max-width: 22rem;
    text-align: left;
    white-space: pre-line;
}

.run-visit-link.is-uncovered {
    text-decoration: underline dotted;
    text-underline-offset: 0.18em;
}

.run-visit-link.is-multi-run {
    box-shadow: inset 0 -0.12em 0 rgba(212, 175, 55, 0.45);
}

.run-visit-uncovered-flag {
    align-items: center;
    background: rgba(224, 122, 144, 0.14);
    border: 1.5px solid #e07a90;
    border-radius: 50%;
    color: #e07a90;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 800;
    height: 0.95rem;
    justify-content: center;
    line-height: 1;
    margin-left: 0.28rem;
    padding: 0;
    vertical-align: middle;
    width: 0.95rem;
}

button.run-visit-uncovered-flag {
    cursor: pointer;
    font-family: inherit;
}

button.run-visit-uncovered-flag:hover,
button.run-visit-uncovered-flag:focus-visible {
    background: rgba(224, 122, 144, 0.28);
    outline: none;
}

.run-overview-missing-count {
    color: #e07a90;
    font-weight: 700;
}

.system-task-table {
    --system-task-grid-columns: 8.35rem minmax(0, 1fr) 3.25rem;
}

.system-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.system-task-list-header,
.system-task-row {
    align-items: center;
    column-gap: 0.85rem;
    display: grid;
    grid-template-columns: var(--system-task-grid-columns);
    text-align: left;
    width: 100%;
}

.system-task-list-header {
    color: var(--ohc-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    padding: 0 0.85rem;
    text-transform: uppercase;
}

.system-task-list-header-owner {
    line-height: 1.2;
    white-space: nowrap;
}

.system-task-list-header-title {
    min-width: 0;
}

.system-task-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    color: var(--ohc-text);
    padding: 0.7rem 0.85rem;
}

.system-task-row:hover {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.35);
}

.system-task-row.is-completed {
    opacity: 0.72;
}

.system-task-row.is-completed .system-task-row-title {
    text-decoration: line-through;
}

.system-task-row-owner-col {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
    width: 8.35rem;
}

.system-task-row-title {
    font-size: 0.92rem;
    font-weight: 600;
    min-width: 0;
}

.system-task-row-side {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.system-task-row-files {
    align-items: center;
    color: var(--ohc-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    gap: 0.25rem;
}

.system-task-row-files svg {
    height: 0.9rem;
    width: 0.9rem;
}

.system-task-row-owner {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    padding: 0.34rem 0.5rem;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.system-task-row-owner-developers {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

.system-task-row-owner-opus {
    background: rgba(253, 224, 71, 0.16);
    border: 1px solid rgba(253, 224, 71, 0.62);
    box-shadow: 0 0 12px rgba(253, 224, 71, 0.12);
    color: #fde68a;
}

.system-task-owner-label {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    margin: 0;
}

.system-task-owner-label-text {
    color: var(--ohc-muted);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.system-task-owner-select {
    --bs-form-select-bg: var(--ohc-surface-2);
    --bs-form-select-color: var(--ohc-text);
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23eef2f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-color: var(--ohc-surface-2);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--ohc-text);
    color-scheme: dark;
    min-width: 9rem;
    width: auto;
}

.system-task-owner-select option {
    background-color: var(--ohc-surface-2);
    color: var(--ohc-text);
}

.system-task-owner-select:focus {
    background-color: var(--ohc-surface-2);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.2);
    color: var(--ohc-text);
}

.system-task-notes-input {
    min-height: 7rem;
    resize: vertical;
}

.system-task-file-picker {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0;
}

.system-task-file-picker input[type="file"] {
    display: none;
}

.system-task-file-label {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-task-modal-header {
    align-items: center;
    gap: 0.65rem;
    justify-content: flex-start;
}

.system-task-modal-header .modal-title {
    flex: 1;
    min-width: 0;
}

.system-task-modal-title-input {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.35rem;
    color: var(--ohc-text);
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 0;
    padding: 0.2rem 0.45rem;
}

.system-task-modal-title-input:hover {
    border-color: rgba(212, 175, 55, 0.25);
}

.system-task-modal-title-input:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: none;
    outline: none;
}

.system-task-modal-header .btn-close {
    flex: 0 0 auto;
    margin-left: auto;
}

.system-task-delete-btn {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0.35rem;
    color: #f87171;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.35rem;
    justify-content: center;
    padding: 0;
    width: 2.35rem;
}

.system-task-delete-btn:hover {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.system-task-delete-btn svg {
    display: block;
    fill: currentColor;
    flex-shrink: 0;
    height: 1.35rem;
    width: 1.35rem;
}

.system-task-notes-form .system-task-notes-input {
    min-height: 8rem;
}

.system-task-modal-footer {
    align-items: center;
    border-top: 1px solid var(--ohc-border);
    display: flex;
    gap: 0.75rem;
    padding-top: 0.85rem;
}

.system-task-modal-footer-side {
    flex: 1;
    min-width: 0;
}

.system-task-modal-footer-side-end {
    display: flex;
    justify-content: flex-end;
}

.system-task-complete-form {
    margin: 0;
}

.system-task-complete-label {
    align-items: center;
    color: var(--ohc-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 0.5rem;
    margin: 0;
    user-select: none;
}

.system-task-complete-label .form-check-input {
    cursor: pointer;
    margin: 0;
}

.system-task-modal-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.system-task-files a {
    color: var(--ohc-accent);
    text-decoration: none;
}

.system-task-files a:hover {
    text-decoration: underline;
}

.system-task-upload-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-user-name {
    color: var(--ohc-text);
    font-weight: 500;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar,
.mobile-topbar {
    background: var(--ohc-surface);
}

.app-topbar {
    font-size: 0.8125rem;
    min-height: 3.25rem;
}

.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    font-size: 0.875rem;
    /* iPhone home-screen apps draw under the clock. Keep the menu below it. */
    padding-top: calc(0.5rem + env(safe-area-inset-top, 0px)) !important;
}

.mobile-topbar .sidebar-logo {
    max-width: 120px;
}

.mobile-menu-btn {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-menu-icon {
    position: relative;
    display: block;
    width: 1.05rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 1.05rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.mobile-menu-icon::before {
    top: -0.35rem;
}

.mobile-menu-icon::after {
    top: 0.35rem;
}

.app-mobile-nav.offcanvas {
    --bs-offcanvas-width: min(15.25rem, 82vw);
    width: min(15.25rem, 82vw);
    max-width: 82vw;
}

.app-mobile-nav .offcanvas-header {
    padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 0.85rem 0.5rem;
    gap: 0.5rem;
}

.app-mobile-nav .offcanvas-header .btn-close {
    margin: 0;
    padding: 0.45rem;
    box-sizing: content-box;
    flex-shrink: 0;
}

.app-mobile-nav .offcanvas-header .sidebar-logo {
    max-width: 8.5rem;
    height: auto;
}

.app-mobile-nav .offcanvas-body {
    padding: 0.5rem 0.85rem 1.25rem;
}

.topbar-heading {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ohc-text);
    line-height: 1.2;
}

.topbar-subheading {
    font-size: 0.8125rem;
    line-height: 1.3;
    margin-top: 0.1rem;
}

.topbar-user {
    text-align: right;
    line-height: 1.2;
    padding-left: 0.5rem;
    border-left: 1px solid var(--ohc-border);
}

.topbar-icon-btn {
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    opacity: 0.85;
    position: relative;
}

.topbar-messages-btn {
    text-decoration: none;
}

.topbar-icon-count {
    background: var(--ohc-accent);
    border-radius: 999px;
    color: #0b111c;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    min-width: 0.95rem;
    padding: 0.12rem 0.28rem;
    position: absolute;
    right: -0.35rem;
    top: -0.35rem;
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 1rem !important;
}

.app-footer {
    border-top: 1px solid var(--ohc-border);
    background: var(--ohc-surface);
    font-size: 0.75rem;
    margin-top: auto;
    flex-shrink: 0;
}

.page-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ohc-border);
}

.page-header .text-muted {
    font-size: 0.8125rem;
}

.content-panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--ohc-text);
}

.dash-preview-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--ohc-accent);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.dash-under-construction {
    overflow: hidden;
    padding: 0;
    text-align: center;
}

.dash-under-construction-image {
    display: block;
    height: auto;
    max-height: 18rem;
    object-fit: cover;
    width: 100%;
}

.dash-under-construction-compact {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.dash-under-construction-image-compact {
    max-height: 14.4rem;
    object-fit: contain;
}

.dash-under-construction-message {
    font-size: 0.92rem;
    padding: 0.9rem 1rem 1rem;
}

.dash-under-construction-message a {
    color: var(--ohc-accent);
    font-weight: 600;
    text-decoration: none;
}

.dash-under-construction-message a:hover {
    color: var(--ohc-accent-hover);
    text-decoration: underline;
}

.module-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.module-report-action-btn {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.module-report-action-icon {
    display: inline-flex;
    line-height: 0;
}

.module-report-action-icon svg {
    height: 1rem;
    width: 1rem;
}

.activity-report-detail {
    max-width: 28rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.call-changes-date-row th {
    background: var(--ohc-surface-2);
    border-bottom: 1px solid var(--ohc-border);
    color: var(--ohc-text);
    font-size: 0.82rem;
    font-weight: 700;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.call-changes-date-count {
    background: rgba(212, 175, 55, 0.18);
    border-radius: 999px;
    color: var(--ohc-accent);
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.45rem;
    min-width: 1.25rem;
    padding: 0.12rem 0.45rem;
    text-align: center;
}

.call-changes-kind {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
}

.call-changes-kind.is-cancel {
    background: #fee2e2;
    color: #b91c1c;
}

.call-changes-kind.is-restore {
    background: #e7f7ee;
    color: #157347;
}

.call-changes-kind.is-add {
    background: #dbeafe;
    color: #1d4ed8;
}

.call-changes-kind.is-staff {
    background: #ede9fe;
    color: #6d28d9;
}

.call-changes-kind.is-run {
    background: #ffedd5;
    color: #c2410c;
}

.call-changes-kind.is-time {
    background: #e0f2fe;
    color: #0369a1;
}

.call-changes-kind.is-warning {
    background: #fef3c7;
    color: #b45309;
}

.call-changes-kind.is-other {
    background: #e5e7eb;
    color: #4b5563;
}

.call-changes-detail {
    max-width: 36rem;
    overflow-wrap: anywhere;
}

.call-changes-reason {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 0.2rem;
}

.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dash-kpi-row.has-on-hold {
    gap: 0.6rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dash-kpi-row.has-on-hold .dash-kpi-card {
    gap: 0.5rem;
    padding: 0.7rem 0.65rem;
}

.dash-kpi-row.has-on-hold .dash-kpi-icon {
    height: 2rem;
    width: 2rem;
}

.dash-kpi-row.has-on-hold .dash-kpi-icon svg {
    height: 1rem;
    width: 1rem;
}

.dash-kpi-row.has-on-hold .dash-kpi-value {
    font-size: 1.25rem;
}

.dash-kpi-card {
    border-radius: 0.55rem;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

a.dash-kpi-link,
button.dash-kpi-link {
    appearance: none;
    background: var(--ohc-surface);
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
    width: 100%;
}

a.dash-kpi-link:hover,
button.dash-kpi-link:hover {
    border-color: var(--ohc-accent);
    transform: translateY(-1px);
}

.dash-attention-modal .modal-dialog {
    max-width: 26rem;
}

.dash-attention-modal .modal-header {
    align-items: flex-start;
}

.dash-attention-modal-intro {
    color: var(--ohc-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.dash-attention-choices {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dash-attention-choice {
    align-items: center;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.55rem;
    color: inherit;
    display: flex;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dash-attention-choice:hover {
    background: var(--ohc-accent-muted);
    border-color: var(--ohc-accent);
    color: inherit;
}

.dash-attention-choice-icon {
    align-items: center;
    background: rgba(220, 38, 38, 0.14);
    border-radius: 0.45rem;
    color: #fca5a5;
    display: inline-flex;
    flex-shrink: 0;
    height: 2.1rem;
    justify-content: center;
    width: 2.1rem;
}

.dash-attention-choice-icon svg {
    display: block;
    height: 1.1rem;
    width: 1.1rem;
}

.dash-attention-choice-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.dash-attention-choice-copy strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 650;
}

.dash-attention-choice-go {
    color: var(--ohc-accent);
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dash-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-kpi-icon-hold {
    background: rgba(240, 195, 90, 0.16);
    color: #f0d78c;
}

.dash-on-hold-card {
    border-color: rgba(240, 195, 90, 0.4);
}

.dash-on-hold-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(220%);
    opacity: 1;
}

.dash-on-hold-modal .modal-header {
    align-items: flex-start;
}

.dash-on-hold-list {
    display: grid;
    gap: 0.65rem;
}

.dash-on-hold-row {
    align-items: center;
    background: rgba(240, 195, 90, 0.06);
    border: 1px solid rgba(240, 195, 90, 0.18);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
}

.dash-on-hold-name {
    color: var(--ohc-text);
    font-weight: 700;
    text-decoration: none;
}

.dash-on-hold-name:hover {
    color: var(--ohc-accent);
}

.dash-on-hold-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dash-import-alert {
    align-items: center;
    background: rgba(220, 53, 69, 0.14);
    border: 1px solid rgba(220, 53, 69, 0.38);
    border-radius: 0.7rem;
    color: #ffb4bc;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.dash-import-alert strong {
    color: #ffd2d6;
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.dash-import-alert p {
    color: #ffb4bc;
    font-size: 0.84rem;
}

.dash-import-alert .btn {
    flex-shrink: 0;
}

.dash-list-meta {
    font-size: 0.78rem;
}

.dash-progress-bar-muted span {
    background: var(--ohc-border);
}

.dash-kpi-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-kpi-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.dash-kpi-icon-alert {
    background: rgba(196, 92, 92, 0.15);
    color: #e8a0a0;
}

.dash-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ohc-muted);
    margin-bottom: 0.15rem;
}

.dash-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ohc-text);
    line-height: 1.1;
}

.dash-kpi-value-alert {
    color: #ff8a96;
}

.dash-kpi-sub,
.dash-kpi-trend {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.dash-trend-up {
    color: #6fcf97;
}

.dash-trend-danger {
    color: #ff8a96;
}

.dash-trend-gold {
    color: var(--ohc-accent);
}

.dash-grid-2,
.dash-grid-3 {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

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

.dash-grid-2 > .dash-panel:only-child,
.dash-grid-3 > .dash-panel:only-child {
    grid-column: 1 / -1;
}

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

.dash-panel {
    border-radius: 0.55rem;
    padding: 1rem;
    min-height: 180px;
}

.dash-panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--ohc-text);
}

.dash-chart-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-donut {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(#4a90c4 0 42%, #5cb87a 42% 77%, #d4a04a 77% 100%);
    position: relative;
    flex-shrink: 0;
}

.dash-donut-hole {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: var(--ohc-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-donut-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ohc-text);
}

.dash-legend li,
.dash-status-list li,
.dash-list li,
.dash-todo li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--ohc-text);
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--ohc-border);
}

.dash-legend strong,
.dash-status-list .ms-auto {
    color: var(--ohc-muted);
    margin-left: auto;
}

.dash-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    display: inline-block;
}

.dash-dot-morning {
    background: #4a90c4;
}

.dash-dot-afternoon {
    background: #5cb87a;
}

.dash-dot-tea {
    background: #c47a6a;
}

.dash-dot-evening {
    background: #d4a04a;
}

.dash-progress-bar {
    height: 0.45rem;
    border-radius: 999px;
    background: var(--ohc-surface-2);
    overflow: hidden;
}

.dash-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ohc-accent);
}

.dash-panel-run-staff {
    min-height: 0;
    overflow: hidden;
    padding: 1.05rem 1rem 0.7rem;
}

.dash-run-staff-head {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    margin-bottom: 0.85rem;
}

.dash-run-staff-title {
    align-items: center;
    display: flex;
    gap: 0.7rem;
    justify-self: start;
    min-width: 0;
}

.dash-run-staff-title .dash-panel-title {
    margin-bottom: 0;
    white-space: nowrap;
}

.dash-run-staff-mark {
    align-items: center;
    background: rgba(66, 165, 245, 0.16);
    border-radius: 0.7rem;
    color: #7ec4f8;
    display: inline-flex;
    flex-shrink: 0;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.dash-run-staff-mark svg {
    height: 1.2rem;
    width: 1.2rem;
}

.dash-run-staff-day-nav {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    justify-self: center;
    min-width: 0;
}

.dash-run-staff-date {
    color: var(--ohc-text);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    min-width: 10.5rem;
    text-align: center;
    white-space: nowrap;
}

.dash-run-staff-day-btn {
    align-items: center;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-text);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 700;
    height: 1.7rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1.7rem;
}

.dash-run-staff-day-btn:hover,
.dash-run-staff-day-btn:focus-visible {
    background: var(--ohc-accent-muted);
    border-color: var(--ohc-accent);
    color: var(--ohc-accent-hover);
}

.dash-run-staff-day-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.dash-panel-run-staff.is-loading {
    cursor: wait;
}

.dash-panel-run-staff.is-loading .dash-run-staff-day-btn:disabled {
    cursor: wait;
}

.dash-panel-run-staff.is-loading [data-dash-run-staff-body] {
    opacity: 0.55;
    pointer-events: none;
}

.dash-run-staff-wall {
    align-items: center;
    border: 1px solid var(--ohc-accent);
    border-radius: 999px;
    color: var(--ohc-accent);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.35rem;
    justify-self: end;
    padding: 0.32rem 0.75rem 0.32rem 0.55rem;
    text-decoration: none;
}

.dash-run-staff-wall svg {
    height: 0.95rem;
    width: 0.95rem;
}

.dash-run-staff-wall:hover {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent-hover);
}

.dash-run-staff-wrap {
    margin: 0 -0.2rem;
    overflow-x: auto;
}

.dash-run-staff {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: 100%;
}

.dash-run-staff-col-run {
    width: 12.5rem;
}

.dash-run-staff-col-period {
    width: auto;
}

.dash-run-staff th,
.dash-run-staff td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
    padding: 0.5rem 0.65rem;
    vertical-align: middle;
}

.dash-run-staff tbody tr:last-child th,
.dash-run-staff tbody tr:last-child td {
    border-bottom: 0;
}

.dash-run-staff thead th {
    color: var(--ohc-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding-bottom: 0.42rem;
    padding-top: 0.35rem;
    text-transform: uppercase;
    vertical-align: bottom;
    white-space: nowrap;
}

.dash-run-staff thead th:first-child {
    background: var(--ohc-surface);
    left: 0;
    position: sticky;
    z-index: 2;
}

.dash-run-staff tbody th,
.dash-run-staff tbody td {
    font-size: 0.82rem;
}

.dash-run-staff .dash-run-name {
    background: var(--ohc-surface);
    font-weight: 700;
    left: 0;
    overflow: hidden;
    position: sticky;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 1;
}

.dash-run-staff .dash-run-name a {
    color: inherit;
    text-decoration: none;
}

.dash-run-staff .dash-run-name a:hover {
    color: var(--ohc-accent);
}

.dash-run-staff-period {
    align-items: center;
    display: inline-flex;
    gap: 0.38rem;
}

.dash-run-staff-period-icon {
    display: inline-flex;
    height: 0.95rem;
    width: 0.95rem;
}

.dash-run-staff-period-icon svg {
    display: block;
    height: 100%;
    width: 100%;
}

.dash-run-staff th.is-am,
.dash-run-staff td.is-am,
.runs-overview-table .is-am,
.run-staff-day-table .is-am,
.run-week-table .is-am {
    background: rgba(66, 165, 245, 0.03);
}

.dash-run-staff th.is-lunch,
.dash-run-staff td.is-lunch,
.runs-overview-table .is-lunch,
.run-staff-day-table .is-lunch,
.run-week-table .is-lunch {
    background: rgba(132, 158, 138, 0.03);
}

.dash-run-staff th.is-tea,
.dash-run-staff td.is-tea,
.runs-overview-table .is-tea,
.run-staff-day-table .is-tea,
.run-week-table .is-tea {
    background: rgba(232, 168, 70, 0.03);
}

.dash-run-staff th.is-pm,
.dash-run-staff td.is-pm,
.runs-overview-table .is-pm,
.run-staff-day-table .is-pm,
.run-week-table .is-pm {
    background: rgba(168, 122, 186, 0.03);
}

.dash-run-staff thead th.is-am,
.runs-overview-period.is-am,
.run-week-period-label.is-am {
    color: #6eb8f5;
}

.dash-run-staff thead th.is-lunch,
.runs-overview-period.is-lunch,
.run-week-period-label.is-lunch {
    color: #8fb59a;
}

.dash-run-staff thead th.is-tea,
.runs-overview-period.is-tea,
.run-week-period-label.is-tea {
    color: #ffb74d;
}

.dash-run-staff thead th.is-pm,
.runs-overview-period.is-pm,
.run-week-period-label.is-pm {
    color: #c77ad4;
}

.dash-run-staff-names {
    align-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    min-width: 0;
    width: 100%;
}

.dash-run-staff-open {
    align-items: center;
    background: rgba(8, 12, 20, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    color: #e8eef6;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    gap: 0.38rem;
    line-height: 1.2;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0.28rem 0.62rem 0.28rem 0.42rem;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

td.is-am .dash-run-staff-open {
    border-color: rgba(66, 165, 245, 0.28);
}

td.is-lunch .dash-run-staff-open {
    border-color: rgba(143, 181, 154, 0.28);
}

td.is-tea .dash-run-staff-open {
    border-color: rgba(255, 167, 38, 0.28);
}

td.is-pm .dash-run-staff-open {
    border-color: rgba(171, 71, 188, 0.28);
}

.dash-run-staff-open:hover,
.dash-run-staff-open:focus-visible {
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    outline: none;
}

.dash-run-staff-open.is-static {
    cursor: default;
}

.dash-run-staff-open.is-static:hover,
.dash-run-staff-open.is-static:focus-visible {
    border-color: inherit;
    color: #e8eef6;
}

.dash-run-staff-dot {
    background: currentColor;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    height: 0.42rem;
    width: 0.42rem;
}

td.is-am .dash-run-staff-dot {
    background: #42a5f5;
}

td.is-lunch .dash-run-staff-dot {
    background: #81a88a;
}

td.is-tea .dash-run-staff-dot {
    background: #ffa726;
}

td.is-pm .dash-run-staff-dot {
    background: #ab47bc;
}

.runs-overview-table .dash-run-staff-names,
.run-staff-day-table .dash-run-staff-names {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
}

.runs-overview-table .dash-run-staff-open,
.run-staff-day-table .dash-run-staff-open {
    max-width: 100%;
}

.dash-run-staff-empty {
    color: rgba(139, 154, 171, 0.7);
}

@media (max-width: 991.98px) {
    .dash-run-staff-head {
        align-items: center;
        gap: 0.55rem;
        grid-template-areas:
            "title wall"
            "nav nav";
        grid-template-columns: minmax(0, 1fr) auto;
        margin-bottom: 0.7rem;
    }

    .dash-run-staff-title {
        grid-area: title;
    }

    .dash-run-staff-day-nav {
        grid-area: nav;
        justify-self: stretch;
        width: 100%;
    }

    .dash-run-staff-date {
        font-size: 0.86rem;
        min-width: 0;
    }

    .dash-run-staff-wall {
        grid-area: wall;
    }

    .dash-panel-run-staff {
        overflow: visible;
    }

    .dash-run-staff-mark {
        height: 2rem;
        width: 2rem;
    }

    .dash-run-staff-wrap {
        margin: 0;
        overflow: visible;
    }

    .dash-run-staff {
        display: block;
        width: 100%;
    }

    .dash-run-staff colgroup,
    .dash-run-staff thead {
        display: none;
    }

    .dash-run-staff tbody {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
    }

    .dash-run-staff tbody tr {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--ohc-border);
        border-radius: 0.75rem;
        display: grid;
        gap: 0.15rem;
        overflow: hidden;
        padding: 0.65rem 0.75rem 0.5rem;
    }

    .dash-run-staff tbody tr:last-child th,
    .dash-run-staff tbody tr:last-child td {
        border-bottom: 0;
    }

    .dash-run-staff .dash-run-name,
    .dash-run-staff tbody td {
        background: transparent;
        border: 0;
        left: auto;
        min-width: 0;
        overflow: visible;
        padding: 0.28rem 0;
        position: static;
        width: auto;
        white-space: normal;
    }

    .dash-run-staff .dash-run-name {
        display: block;
        font-size: 0.92rem;
        grid-column: 1 / -1;
        padding-bottom: 0.45rem;
    }

    .dash-run-staff th.is-am,
    .dash-run-staff td.is-am,
    .dash-run-staff th.is-lunch,
    .dash-run-staff td.is-lunch,
    .dash-run-staff th.is-tea,
    .dash-run-staff td.is-tea,
    .dash-run-staff th.is-pm,
    .dash-run-staff td.is-pm {
        background: transparent;
    }

    .dash-run-staff tbody td {
        align-items: start;
        display: grid;
        gap: 0.45rem 0.6rem;
        grid-template-columns: 3.5rem minmax(0, 1fr);
    }

    .dash-run-staff tbody td.is-empty {
        display: none;
    }

    .dash-run-staff tbody td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        padding-top: 0.32rem;
        text-transform: uppercase;
    }

    .dash-run-staff td.is-am::before {
        color: #6eb8f5;
    }

    .dash-run-staff td.is-lunch::before {
        color: #8fb59a;
    }

    .dash-run-staff td.is-tea::before {
        color: #ffb74d;
    }

    .dash-run-staff td.is-pm::before {
        color: #c77ad4;
    }
}

.dash-staff-day-modal .modal-dialog {
    max-width: 28.5rem;
}

.dash-staff-day-modal .modal-content {
    background: #f4f5f7;
    border: 0;
    border-radius: 1.1rem;
    color: #1f2430;
    color-scheme: light;
    overflow: hidden;
}

.dash-staff-day-modal .modal-header {
    align-items: flex-start;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.95rem 1rem 0.8rem;
}

.dash-staff-day-modal .modal-title {
    color: #111827;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.2;
}

.dash-staff-day-date {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.18rem;
}

.dash-staff-day-reallocate {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    gap: 0.4rem;
    padding: 0.7rem 1rem 0.85rem;
}

.dash-staff-day-reallocate-label {
    color: #374151;
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0;
}

.dash-staff-day-reallocate-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dash-staff-day-reallocate-controls .form-select {
    flex: 1 1 12rem;
    min-width: 10rem;
}

.dash-staff-day-reallocate-hint {
    color: #6b7280;
    font-size: 0.72rem;
}

.dash-staff-day-modal .modal-body {
    background: #f4f5f7;
    padding: 0.85rem 0.9rem 0.4rem;
}

.dash-staff-day-modal .modal-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    gap: 0.85rem;
    justify-content: flex-start;
    padding: 0.7rem 1rem 0.85rem;
}

.dash-staff-day-link {
    color: #6d5aa8;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.dash-staff-day-link:hover {
    color: #4c3d7a;
}

#dashStaffPeriodModal {
    z-index: 1075;
}

#dashStaffMoveConfirmModal {
    z-index: 1085;
}

.dash-move-completed-flag {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 0.55rem;
    color: #9a3412;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    padding: 0.55rem 0.7rem;
}

.dash-move-scope {
    display: grid;
    gap: 0.4rem;
}

.dash-move-scope-option {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.55rem;
    color: #1f2430;
    display: flex;
    font-size: 0.84rem;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0.65rem;
}

#dashStaffMoveConfirmModal .modal-body {
    display: grid;
    gap: 0.55rem;
}

#dashStaffPeriodModal .modal-body {
    display: grid;
    gap: 0.55rem;
}

.staff-rota-day-section-bar {
    align-items: stretch;
    display: flex;
    margin-bottom: 0.65rem;
}

.staff-rota-day-section-bar .staff-rota-day-section-toggle {
    border-bottom-right-radius: 0;
    border-right: 0;
    border-top-right-radius: 0;
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.staff-rota-period-reallocate {
    align-items: center;
    background: #f4f0fb;
    border: 1px solid #ddd4f0;
    border-left: 0;
    border-radius: 0 0.85rem 0.85rem 0;
    color: #4c3d7a;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.staff-rota-period-reallocate svg {
    display: block;
    height: 0.95rem;
    width: 0.95rem;
}

.staff-rota-period-reallocate:hover,
.staff-rota-period-reallocate:focus-visible {
    filter: brightness(0.96);
    outline: none;
}

.staff-rota-day-section.is-am .staff-rota-period-reallocate {
    background: rgba(66, 165, 245, 0.1);
    border-color: rgba(66, 165, 245, 0.28);
    color: #1565c0;
}

.staff-rota-day-section.is-lunch .staff-rota-period-reallocate {
    background: rgba(132, 158, 138, 0.12);
    border-color: rgba(143, 181, 154, 0.32);
    color: #3f6a4a;
}

.staff-rota-day-section.is-tea .staff-rota-period-reallocate {
    background: rgba(255, 167, 38, 0.12);
    border-color: rgba(255, 167, 38, 0.34);
    color: #b36b00;
}

.staff-rota-day-section.is-pm .staff-rota-period-reallocate {
    background: rgba(171, 71, 188, 0.1);
    border-color: rgba(171, 71, 188, 0.28);
    color: #7b1fa2;
}

#client_profile_edit_call_modal {
    z-index: 1075;
}

.modal-backdrop.dash-edit-call-backdrop {
    z-index: 1070;
}

a.staff-rota-day-card-name {
    text-decoration: none;
}

a.staff-rota-day-card-name:hover,
a.staff-rota-day-card-name:focus-visible {
    color: #6d5aa8;
    outline: none;
}

.settings-tabs .nav-link {
    color: var(--ohc-muted);
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--ohc-radius);
}

.settings-tabs .nav-link:hover {
    color: var(--ohc-text);
    background: rgba(255, 255, 255, 0.04);
}

.settings-tabs .nav-link.active {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
    font-weight: 600;
}

.settings-panel {
    padding: 1rem 1.1rem;
}

.records-procedure-carer-form .form-check-input {
    cursor: pointer;
}

.records-procedure-carer-form .form-switch .form-check-input {
    height: 1.25rem;
    width: 2.4rem;
}

.settings-flag-emails {
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow: inset 3px 0 0 var(--ohc-accent);
}

.settings-flag-emails-controls {
    min-width: 11rem;
}

.settings-flag-emails .form-check-input {
    cursor: pointer;
}

.settings-flag-emails .form-switch .form-check-input {
    width: 2.4rem;
    height: 1.25rem;
}

.settings-logo-preview {
    max-height: 48px;
    max-width: 180px;
    border-radius: var(--ohc-radius);
    border: 1px solid var(--ohc-border);
    background: var(--ohc-surface-2);
    padding: 0.25rem;
}

.settings-logins-table .form-control-sm,
.settings-logins-table .form-select-sm {
    min-width: 10rem;
}

.settings-logins-table .settings-login-last-login {
    min-width: 7.5rem;
}

.settings-logins-table td {
    vertical-align: middle;
}

.settings-login-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    white-space: nowrap;
}

.settings-login-menu-btn {
    width: 2rem;
    padding-left: 0;
    padding-right: 0;
    line-height: 1;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
}

.settings-login-menu {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    min-width: 13.5rem;
    padding: 0.3rem;
}

.settings-login-menu .dropdown-item {
    color: var(--ohc-text);
    border-radius: 0.3rem;
    font-size: 0.85rem;
}

.settings-login-menu .dropdown-item:hover,
.settings-login-menu .dropdown-item:focus {
    background: var(--ohc-accent-muted);
    color: var(--ohc-text);
}

.settings-login-menu .dropdown-item.disabled,
.settings-login-menu .dropdown-item:disabled {
    color: var(--ohc-muted);
}

.settings-login-menu .dropdown-divider {
    border-color: var(--ohc-border);
    margin: 0.3rem 0;
}

.page-access-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 1.25rem;
}

.page-access-item {
    margin: 0;
    min-height: 1.6rem;
}

.page-access-item.is-wide {
    grid-column: 1 / -1;
}

.page-access-heading {
    color: var(--ohc-muted);
    font-size: 0.72rem;
    font-weight: 600;
    grid-column: 1 / -1;
    letter-spacing: 0.04em;
    margin: 0.45rem 0 0;
    text-transform: uppercase;
}

.page-access-hint {
    display: block;
    color: var(--ohc-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

@media (max-width: 575.98px) {
    .page-access-list {
        grid-template-columns: 1fr;
    }
}

.settings-logins-wrap,
.settings-panel > .table-responsive:has(.settings-logins-table) {
    overflow: visible;
}

.email-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 24rem;
    overflow: auto;
}

.email-log-line code {
    color: var(--ohc-muted);
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ohc-text);
    --bs-table-border-color: var(--ohc-border);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: var(--ohc-accent-muted);
    font-size: 0.875rem;
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ohc-muted);
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: var(--ohc-accent-muted);
}

.staff-left-row td {
    background: rgba(220, 53, 69, 0.08);
}

.staff-left-date {
    color: #ff9aa5;
    font-weight: 600;
}

.staff-type-badge {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
}

.staff-type-bank {
    background: rgba(255, 192, 0, 0.16);
    border-color: rgba(255, 192, 0, 0.42);
    color: #ffd56a;
}

.record-count {
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    font-size: 0.78rem;
    padding: 0.28rem 0.7rem;
}

.trust-summary-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.trust-summary-card {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 0.85rem;
}

.trust-summary-total {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.35);
}

.trust-summary-hours-row {
    align-items: flex-end;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trust-summary-hours-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.trust-summary-hours-block-end {
    align-items: flex-end;
    text-align: right;
}

.trust-summary-hours-label {
    color: var(--ohc-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trust-summary-hours {
    color: var(--ohc-accent);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.trust-summary-rota-hours {
    color: #5b9bd5;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.trust-summary-tts-hours {
    color: #7ec699;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.trust-summary-billed-hours {
    color: #d4af37;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.client-billed-cell {
    color: var(--ohc-text);
}

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

.profile-hero {
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.16), transparent 30%),
        linear-gradient(135deg, var(--ohc-surface), #0f1725);
    border: 1px solid var(--ohc-border);
    border-radius: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 1.25rem;
}

.profile-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--ohc-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.profile-hero-title {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}

.profile-hero-holidays {
    flex: 0 0 auto;
    margin-left: auto;
}

.profile-holidays-chip {
    align-items: center;
    appearance: none;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 0.85rem;
    color: var(--ohc-accent);
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.profile-holidays-chip:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.55);
    transform: translateY(-1px);
}

.profile-holidays-icon {
    flex-shrink: 0;
    height: 1.35rem;
    width: 1.35rem;
}

.profile-holidays-value {
    color: var(--ohc-text);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.profile-holidays-unit {
    color: var(--ohc-muted);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.1;
    text-align: left;
}

@media (max-width: 767.98px) {
    .profile-hero-holidays {
        margin-left: 0;
        width: 100%;
    }

    .profile-holidays-chip {
        justify-content: center;
        width: 100%;
    }
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.profile-pill {
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    font-size: 0.78rem;
    gap: 0.35rem;
    padding: 0.22rem 0.62rem;
}

.profile-pill strong {
    color: var(--ohc-text);
    font-weight: 600;
}

.profile-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.profile-summary-card {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 0.9rem;
}

.profile-summary-danger,
.profile-section-danger {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.45);
}

.profile-pill-danger {
    border-color: rgba(220, 53, 69, 0.45);
    color: #ffb4bc;
}

.profile-summary-card .profile-value {
    font-size: 1rem;
    font-weight: 600;
}

.profile-summary-value-row {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    min-height: 1.5rem;
}

.profile-summary-input {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: inherit;
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    min-width: 0;
    padding: 0;
}

.profile-summary-input:focus {
    box-shadow: none;
    outline: none;
}

.profile-summary-input:disabled {
    opacity: 0.65;
}

.profile-summary-select {
    appearance: none;
    background-color: var(--ohc-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8b8b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-position: right 0 center;
    background-repeat: no-repeat;
    color: var(--ohc-text);
    color-scheme: dark;
    cursor: pointer;
    overflow: hidden;
    padding-right: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-summary-select option,
.profile-summary-select optgroup {
    background-color: var(--ohc-surface-2);
    color: var(--ohc-text);
}

.profile-field-saved {
    color: #7ec699;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-field-saved.is-visible {
    opacity: 1;
}

.profile-summary-note {
    margin-top: 0.4rem;
}

.profile-summary-status .form-text {
    color: var(--ohc-muted);
    font-size: 0.72rem;
    margin-top: 0.45rem;
}

.profile-status-dropdown {
    display: block;
}

.profile-status-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    gap: 0.45rem;
    padding: 0;
    text-align: left;
    width: 100%;
}

.profile-status-trigger::after {
    display: none !important;
}

.profile-status-trigger .profile-value {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.profile-status-chevron {
    border-right: 2px solid var(--ohc-muted);
    border-bottom: 2px solid var(--ohc-muted);
    flex: 0 0 auto;
    height: 0.4rem;
    margin-top: 0.12rem;
    transform: rotate(45deg);
    width: 0.4rem;
}

.profile-summary-danger .profile-status-trigger .profile-value {
    color: #ffb4bc;
}

.profile-summary-danger .profile-status-chevron {
    border-color: #ffb4bc;
}

.profile-status-menu {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    box-shadow: 0 0.65rem 1.5rem rgba(0, 0, 0, 0.28);
    min-width: 100%;
    padding: 0.3rem;
}

.profile-status-menu .dropdown-item {
    border: 0;
    border-radius: 0.4rem;
    color: var(--ohc-text);
    font-size: 0.88rem;
    padding: 0.5rem 0.65rem;
    text-align: left;
    width: 100%;
}

.profile-status-menu .dropdown-item:hover,
.profile-status-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ohc-text);
}

.profile-status-menu .dropdown-item.is-selected {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
}

.profile-status-date {
    margin-top: 0.35rem;
}

.profile-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.profile-section {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 1rem;
}

.profile-section-wide {
    grid-column: 1 / -1;
}

.profile-section-title {
    color: var(--ohc-text);
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.profile-activity-notes {
    align-items: stretch;
}

.profile-activity-notes > .profile-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 12rem;
}

.profile-activity-head,
.profile-activity-toolbar,
.profile-activity-notes .admin-notes-form {
    flex-shrink: 0;
}

.profile-activity-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.profile-activity-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.profile-activity-head .profile-section-title {
    margin-bottom: 0;
}

.profile-activity-toolbar .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.profile-activity-table-wrap {
    max-height: 22rem;
    overflow: auto;
}

.profile-activity-table-wrap.is-paged {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
}

.profile-activity-table {
    font-size: 0.84rem;
}

.profile-activity-table thead th {
    background: var(--ohc-surface);
    position: sticky;
    top: 0;
    z-index: 1;
}

.profile-activity-table-wrap.is-paged thead th {
    position: static;
}

.profile-activity-table th,
.profile-activity-table td {
    white-space: normal;
}

.profile-table-pager {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 0.55rem;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
}

.profile-table-pager .btn:disabled {
    opacity: 0.45;
}

.profile-table-pager-status {
    color: var(--ohc-muted);
    font-size: 0.78rem;
    min-width: 3.5rem;
    text-align: center;
}

.admin-notes-form .admin-notes-input {
    font-size: 0.9rem;
    resize: vertical;
}

.admin-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    max-height: 24rem;
    overflow-y: auto;
    padding: 0;
}

.admin-notes-item {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    padding: 0.75rem;
}

.admin-notes-meta {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.admin-notes-body {
    color: var(--ohc-text);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.profile-activity-head-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.profile-notes-calls-body {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    white-space: pre-wrap;
}

#profile_call_details_modal .rota-history-photo img,
[data-call-details-modal] .rota-history-photo img {
    max-width: 100%;
}

.profile-notes-calls-extra {
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.profile-field {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    padding: 0.75rem;
}

.profile-label {
    color: var(--ohc-muted);
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.profile-value {
    color: var(--ohc-text);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.modal-content {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    color: var(--ohc-text);
}

.offcanvas.text-bg-dark {
    background: var(--ohc-surface) !important;
}

@media (max-width: 1199.98px) {
    .dash-kpi-row,
    .dash-kpi-row.has-on-hold,
    .dash-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-kpi-row .dash-on-hold-card {
        grid-column: 1 / -1;
    }

    .dash-grid-3 > .dash-panel:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 991.98px) {
    .mobile-topbar-title .text-muted {
        display: none;
    }

    .dash-preview {
        gap: 0.75rem;
    }

    .dash-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 0;
    }

    .dash-grid-2,
    .dash-grid-3 {
        grid-template-columns: 1fr;
        margin-bottom: 0;
    }

    .dash-grid-3 > .dash-panel:last-child {
        grid-column: auto;
    }

    .dash-panel {
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    .app-content {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.85rem !important;
        padding-bottom: 1.1rem !important;
    }

    .mobile-topbar {
        min-height: 3.1rem;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .mobile-topbar-title .text-muted {
        display: none;
    }

    .dash-preview {
        gap: 0.7rem;
    }

    .dash-kpi-row,
    .dash-grid-2,
    .dash-grid-3 {
        margin-bottom: 0;
    }

    .dash-kpi-card {
        min-height: 0;
        padding: 0.75rem 0.7rem;
    }

    .dash-kpi-value {
        font-size: 1.25rem;
    }

    .dash-kpi-trend {
        font-size: 0.7rem;
        overflow-wrap: anywhere;
    }

    .dash-grid-2,
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }

    .dash-panel {
        min-height: 0;
        padding: 0.85rem 0.85rem 0.75rem;
    }

    .dash-panel-title {
        margin-bottom: 0.55rem;
    }

    .dash-chart-row {
        gap: 0.75rem;
    }

    .dash-donut {
        height: 5.6rem;
        width: 5.6rem;
    }

    .dash-donut-hole {
        inset: 1.05rem;
    }

    .dash-import-alert {
        align-items: flex-start;
        flex-direction: column;
    }

    .dash-import-alert .btn {
        width: 100%;
    }

    .dash-staff-day-modal .modal-dialog {
        margin: 0.6rem;
        max-width: none;
    }

    .profile-section-grid {
        grid-template-columns: 1fr;
    }

    .docs-browser-layout {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .docs-browser-explorer {
        height: 20rem;
    }

    .docs-browser-preview-panel {
        height: 14rem;
    }

    .docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-layout {
        height: calc(100dvh - 8.5rem);
        max-height: calc(100dvh - 8.5rem);
    }

    .docs-browser-profile .docs-browser-layout {
        height: auto;
        max-height: none;
    }

    .docs-browser-profile .docs-browser-explorer {
        height: 22rem;
    }

    .docs-browser-profile.is-file-selected .docs-browser-explorer {
        display: none;
    }

    .docs-browser-profile.is-file-selected .docs-browser-preview-panel {
        height: min(34rem, 72vh);
    }
}

.docs-browser {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    overflow: hidden;
}

.docs-browser-toggle {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border: 0;
    color: var(--ohc-text);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    text-align: left;
    width: 100%;
}

.docs-browser-toggle:hover,
.docs-browser-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ohc-text);
    outline: none;
}

.docs-browser-toggle-main {
    align-items: center;
    display: inline-flex;
    font-weight: 600;
    gap: 0.55rem;
}

.docs-browser-toggle-icon {
    align-items: center;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 0.45rem;
    color: var(--ohc-accent);
    display: inline-flex;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.docs-browser-toggle-icon svg {
    height: 1rem;
    width: 1rem;
}

.docs-browser-toggle-hint {
    font-size: 0.82rem;
}

.docs-browser-chevron {
    border-right: 2px solid var(--ohc-muted);
    border-bottom: 2px solid var(--ohc-muted);
    display: inline-block;
    height: 0.45rem;
    margin-left: 0.15rem;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    width: 0.45rem;
}

.docs-browser-toggle[aria-expanded="true"] .docs-browser-chevron {
    transform: rotate(45deg);
}

.docs-browser-body {
    border-top: 1px solid var(--ohc-border);
    padding: 0.85rem;
}

.docs-browser-layout {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
    height: 26rem;
    max-height: 26rem;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected {
    margin-bottom: 0;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-layout {
    height: calc(100dvh - 11rem);
    max-height: calc(100dvh - 11rem);
    min-height: 20rem;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-panel-title {
    display: none;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-preview {
    padding: 0.45rem 0.55rem 0.55rem;
}

.docs-browser-profile .docs-browser-layout {
    height: 36rem;
    max-height: 36rem;
}

.docs-browser-profile.is-file-selected .docs-browser-layout {
    height: 42rem;
    max-height: min(42rem, 78vh);
}

.docs-browser.is-file-selected .docs-browser-layout {
    grid-template-columns: minmax(0, 1fr);
}

.docs-browser.is-file-selected .docs-browser-explorer {
    display: none;
}

.docs-browser.is-file-selected .docs-browser-preview-panel {
    grid-column: 1 / -1;
}

.docs-browser-explorer,
.docs-browser-preview-panel {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.docs-browser-toolbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ohc-border);
    display: flex;
    flex: 0 0 auto;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.65rem;
}

.docs-browser-up {
    align-items: center;
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.4rem;
    color: var(--ohc-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    width: 2rem;
}

.docs-browser-up svg {
    height: 1rem;
    width: 1rem;
}

.docs-browser-up:not(:disabled):hover,
.docs-browser-up:not(:disabled):focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--ohc-accent);
    outline: none;
}

.docs-browser-up:disabled {
    cursor: default;
    opacity: 0.35;
}

.docs-browser-breadcrumb {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 0;
}

.docs-browser-mkdir,
.docs-browser-download-folder {
    align-items: center;
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.4rem;
    color: var(--ohc-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    width: 2rem;
}

.docs-browser-mkdir svg,
.docs-browser-download-folder svg {
    height: 1rem;
    width: 1rem;
}

.docs-browser-mkdir:hover,
.docs-browser-mkdir:focus-visible,
.docs-browser-download-folder:hover,
.docs-browser-download-folder:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--ohc-accent);
    outline: none;
}

.docs-browser-upload {
    flex: 0 0 auto;
    margin: 0;
}

.docs-browser-upload-btn {
    align-items: center;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 0.4rem;
    color: var(--ohc-accent);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.docs-browser-upload:hover .docs-browser-upload-btn,
.docs-browser-upload:focus-within .docs-browser-upload-btn {
    background: rgba(212, 175, 55, 0.22);
    border-color: rgba(212, 175, 55, 0.55);
    color: var(--ohc-accent-hover);
}

.docs-browser-status {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem 0;
}

.docs-browser-status.is-error {
    color: #ff9aa5;
}

.docs-browser-status.is-success {
    color: #8fd9a8;
}

.docs-breadcrumb-link {
    background: transparent;
    border: 0;
    border-radius: 0.3rem;
    color: var(--ohc-accent);
    font-size: 0.82rem;
    max-width: 12rem;
    overflow: hidden;
    padding: 0.15rem 0.35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-breadcrumb-link:hover,
.docs-breadcrumb-link:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ohc-accent-hover);
    outline: none;
}

.docs-breadcrumb-current {
    color: var(--ohc-text);
    font-size: 0.82rem;
    font-weight: 600;
    max-width: 14rem;
    overflow: hidden;
    padding: 0.15rem 0.35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-breadcrumb-sep {
    color: var(--ohc-muted);
    font-size: 0.75rem;
    user-select: none;
}

.docs-browser-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
    position: relative;
}

.docs-browser-drop-overlay {
    align-items: center;
    background: rgba(11, 17, 28, 0.82);
    border: 2px dashed rgba(212, 175, 55, 0.55);
    border-radius: var(--ohc-radius);
    color: var(--ohc-accent);
    display: none;
    inset: 0.65rem;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.docs-browser-drop-overlay span {
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
}

.docs-browser-grid-wrap.is-dragover .docs-browser-drop-overlay {
    display: flex;
}

.docs-browser-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
}

.docs-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid transparent;
    border-radius: 0.65rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 7.5rem;
    padding: 0.75rem 0.55rem 0.65rem;
    position: relative;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.docs-item:hover,
.docs-item:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.docs-item.is-selected {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.35);
}

.docs-item.is-dragging {
    opacity: 0.45;
}

.docs-item-dir.is-drop-target {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.55);
    transform: translateY(-1px);
}

.docs-item-icon {
    align-items: center;
    border-radius: 0.55rem;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.docs-item-icon svg {
    height: 1.75rem;
    width: 1.75rem;
}

.docs-item-icon img {
    border-radius: 0.45rem;
    height: 3rem;
    object-fit: cover;
    width: 3rem;
}

.docs-item-icon-folder {
    background: rgba(212, 175, 55, 0.14);
    color: #e4c55a;
}

.docs-item-icon-image {
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.docs-item-icon-pdf {
    background: rgba(220, 76, 76, 0.14);
    color: #ff8f8f;
}

.docs-item-icon-word {
    background: rgba(66, 133, 244, 0.14);
    color: #8ab4ff;
}

.docs-item-icon-excel {
    background: rgba(52, 168, 83, 0.14);
    color: #8fd9a8;
}

.docs-item-icon-text {
    background: rgba(139, 154, 171, 0.14);
    color: #b8c4d3;
}

.docs-item-icon-file {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ohc-muted);
}

.docs-item-name {
    align-items: flex-start;
    display: flex;
    font-size: 0.78rem;
    font-weight: 500;
    gap: 0.3rem;
    line-height: 1.25;
    max-width: 100%;
    min-width: 0;
}

.docs-item-name-text {
    display: -webkit-box;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
}

.docs-item-lock {
    align-items: center;
    color: var(--ohc-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 0.95rem;
    margin-top: 0.05rem;
    width: 0.95rem;
}

.docs-item-lock svg {
    height: 0.8rem;
    width: 0.8rem;
}

.docs-item.is-selected .docs-item-lock {
    color: var(--ohc-accent);
}

.docs-item-meta {
    color: var(--ohc-muted);
    font-size: 0.68rem;
    margin-top: auto;
}

.docs-item-actions {
    display: inline-flex;
    gap: 0.2rem;
    opacity: 0;
    position: absolute;
    right: 0.35rem;
    top: 0.35rem;
    transition: opacity 0.15s ease;
}

.docs-item-action {
    align-items: center;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    height: 1.5rem;
    justify-content: center;
    padding: 0;
    transition: color 0.15s ease, border-color 0.15s ease;
    width: 1.5rem;
}

.docs-item-action svg {
    height: 0.85rem;
    width: 0.85rem;
}

.docs-item:hover .docs-item-actions,
.docs-item:focus-within .docs-item-actions {
    opacity: 1;
}

.docs-item-action:hover,
.docs-item-action:focus-visible {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--ohc-accent);
    outline: none;
}

.docs-browser-panel-title {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ohc-border);
    color: var(--ohc-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.75rem;
    text-transform: uppercase;
}

.docs-browser-preview {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
}

.docs-browser.is-file-selected .docs-browser-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
    padding: 0.55rem 0.65rem 0.65rem;
}

.docs-preview-topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
}

.docs-preview-back-btn {
    flex: 0 0 auto;
    font-weight: 600;
}

.docs-preview-topbar-title {
    color: var(--ohc-text);
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-preview-topbar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.docs-preview-actions-secondary {
    margin-top: 0;
}

.docs-preview-viewer {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.docs-preview-loading {
    inset: 0;
    padding: 1rem;
    position: absolute;
    z-index: 1;
}

.docs-preview-generated-note {
    margin: 0.35rem 0 0.65rem;
}

.docs-preview-password-form {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    margin-top: 0.5rem;
    padding: 1rem;
}

.docs-preview-password-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    border-radius: var(--ohc-radius);
    color: #ffb4bc;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
}

.docs-browser-loading,
.docs-browser-error,
.docs-browser-empty,
.docs-browser-preview-empty {
    align-items: center;
    color: var(--ohc-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    gap: 0.65rem;
    justify-content: center;
    min-height: 12rem;
    padding: 1rem;
    text-align: center;
}

.docs-browser-empty svg,
.docs-browser-preview-empty svg {
    color: rgba(255, 255, 255, 0.18);
    height: 2.5rem;
    width: 2.5rem;
}

.docs-preview-meta {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.docs-preview-meta-icon {
    flex: 0 0 auto;
}

.docs-preview-meta-icon img {
    height: 2.5rem;
    width: 2.5rem;
}

.docs-preview-image-btn {
    background: transparent;
    border: 0;
    display: block;
    padding: 0;
    width: 100%;
}

.docs-preview-image,
.docs-modal-image {
    background: #0a1018;
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: block;
    max-height: 420px;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.docs-browser.is-file-selected .docs-preview-image {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    object-fit: contain;
}

.docs-browser.is-file-selected .docs-preview-image-btn {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.docs-preview-frame,
.docs-modal-frame {
    background: #fff;
    border: 0;
    border-radius: var(--ohc-radius);
    min-height: 420px;
    width: 100%;
}

.docs-browser.is-file-selected .docs-preview-frame {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.docs-preview-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.docs-preview-actions .btn-outline-danger {
    border-color: rgba(255, 154, 165, 0.45);
    color: #ff9aa5;
}

.docs-preview-actions .btn-outline-danger:hover,
.docs-preview-actions .btn-outline-danger:focus-visible {
    background: rgba(255, 154, 165, 0.12);
    border-color: rgba(255, 154, 165, 0.65);
    color: #ffb8c0;
}

.docs-file-modal .modal-content {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    color: var(--ohc-text);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
}

.docs-file-modal-dialog {
    height: 90vh;
    margin: 5vh auto;
    max-height: 90vh;
    max-width: min(96vw, 96rem);
    width: min(96vw, 96rem);
}

.docs-file-modal .modal-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.docs-modal-viewer {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.docs-modal-frame {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.docs-modal-image {
    flex: 1 1 auto;
    height: 100%;
    max-height: none;
    min-height: 0;
    object-fit: contain;
}

.docs-file-modal .modal-header,
.docs-file-modal .modal-footer {
    border-color: var(--ohc-border);
}

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

.invoice-settings-cog {
    align-items: center;
    display: inline-flex;
    height: 2.15rem;
    justify-content: center;
    padding: 0;
    width: 2.15rem;
}

.invoice-settings-cog svg {
    height: 1.05rem;
    width: 1.05rem;
}

#invoiceRatesModal .input-group-text {
    background: var(--ohc-surface-2);
    border-color: var(--ohc-border);
    color: var(--ohc-muted);
}

.invoice-source-bar {
    align-items: center;
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.invoice-source-bar-side {
    align-items: center;
    display: flex;
    min-width: 0;
}

.invoice-source-bar-left {
    justify-content: flex-start;
}

.invoice-source-bar-right {
    justify-content: flex-end;
}

.invoice-source-bar-center {
    align-items: center;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.invoice-export-btn {
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 2.45rem;
    min-width: 7.25rem;
    padding: 0.45rem 1.15rem;
}

.invoice-source-control {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    min-height: 2.15rem;
}

.invoice-source-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    display: inline-flex;
    overflow: hidden;
    padding: 0.15rem;
}

.invoice-source-option {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--ohc-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-width: 3.6rem;
    padding: 0.35rem 0.85rem;
    text-transform: uppercase;
}

.invoice-source-option:hover,
.invoice-source-option:focus-visible {
    color: var(--ohc-text);
    outline: none;
}

.invoice-source-option.is-active {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
}

.invoice-source-mismatch {
    align-items: center;
    color: #ff6b6b;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.35rem;
    justify-content: center;
    width: 1.35rem;
}

.invoice-source-mismatch svg {
    display: block;
    fill: currentColor;
    height: 1.2rem;
    width: 1.2rem;
}

.invoice-rota-hours-cell {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.invoice-rota-change {
    align-items: center;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.75);
    border-radius: 999px;
    color: #ff6b6b;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-style: normal;
    font-weight: 700;
    height: 0.95rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    text-transform: none;
    width: 0.95rem;
}

.invoice-rota-change:hover,
.invoice-rota-change:focus-visible {
    background: rgba(255, 107, 107, 0.22);
    border-color: #ff8a8a;
    color: #ff8a8a;
    outline: none;
}

.invoice-rota-change-item {
    border-bottom: 1px solid var(--ohc-border);
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
}

.invoice-rota-change-item:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.invoice-rota-change-item h3 {
    font-size: 0.92rem;
    font-weight: 650;
    margin: 0 0 0.2rem;
}

.invoice-rota-change-meta {
    color: var(--ohc-muted);
    font-size: 0.82rem;
    margin: 0 0 0.2rem;
}

.invoice-rota-change-effect {
    font-size: 0.78rem;
    font-weight: 650;
    margin: 0 0 0.25rem;
}

.invoice-rota-change-item.is-added .invoice-rota-change-effect {
    color: var(--ohc-accent);
}

.invoice-rota-change-item.is-cancelled_chargeable .invoice-rota-change-effect {
    color: #c9a0ff;
}

.invoice-rota-change-item.is-cancelled .invoice-rota-change-effect {
    color: #ff6b6b;
}

.invoice-rota-change-item.is-started .invoice-rota-change-effect,
.invoice-rota-change-item.is-ceased .invoice-rota-change-effect {
    color: #f0b429;
}

.invoice-rota-change-item.is-post_leave .invoice-rota-change-effect {
    color: #ff6b6b;
}

.invoice-rota-change-note {
    margin: 0;
    white-space: pre-wrap;
}

.dash-hours-discrepancy .form-label {
    color: var(--ohc-muted);
}

.dash-hours-head {
    align-items: center;
    display: grid;
    gap: 0.5rem 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.dash-hours-head .dash-panel-title {
    justify-self: start;
}

.dash-hours-week {
    justify-self: center;
    max-width: 16rem;
    min-width: 11rem;
    width: min(100%, 16rem);
}

.dash-hours-head-end {
    justify-self: end;
}

@media (max-width: 575.98px) {
    .dash-hours-head {
        grid-template-columns: 1fr;
        justify-items: stretch;
        text-align: center;
    }

    .dash-hours-head .dash-panel-title,
    .dash-hours-week,
    .dash-hours-head-end {
        justify-self: stretch;
    }

    .dash-hours-week {
        max-width: none;
        width: 100%;
    }

    .dash-hours-head-end {
        display: none;
    }
}

.dash-hours-discrepancy-detail {
    border: 1px solid var(--ohc-border);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
}

.dash-hours-discrepancy-notes .invoice-rota-change-item {
    margin-top: 0.55rem;
}

.dash-hours-discrepancy-notes .invoice-rota-change-item:first-child {
    margin-top: 0;
}

.dash-hours-discrepancy-notes .invoice-rota-change-item h3 {
    font-size: 0.85rem;
}

.invoice-source-active-col {
    color: var(--ohc-accent);
    font-weight: 700;
}

.invoice-period-bar {
    max-width: 22rem;
}

.invoice-period-bar-inline {
    flex: 1 1 14rem;
    max-width: 18rem;
}

.invoice-period-bar-center {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    max-width: none;
    text-align: left;
    width: auto;
}

.invoice-period-bar .form-label {
    margin-bottom: 0.35rem;
}

.invoice-period-bar-center .form-label {
    flex: 0 0 auto;
    margin-bottom: 0;
    white-space: nowrap;
    width: auto;
}

.invoice-period-bar-center .form-select {
    flex: 0 1 auto;
    min-width: 12rem;
    text-align: left;
    width: auto;
}

@media (max-width: 767.98px) {
    .invoice-source-bar {
        grid-template-columns: 1fr;
    }

    .invoice-source-bar-side,
    .invoice-source-bar-center {
        justify-content: center;
        width: 100%;
    }

    .invoice-source-bar-right {
        order: 3;
    }

    .invoice-export-btn {
        width: 100%;
    }

    .invoice-period-bar {
        max-width: none;
        width: 100%;
    }

    .invoice-period-bar-center {
        justify-content: center;
        width: 100%;
    }

    .invoice-period-bar-center .form-select {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }
}

.invoice-summary-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.invoice-charts {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.invoice-charts-top {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}

@media (max-width: 991.98px) {
    .invoice-charts-top {
        grid-template-columns: 1fr;
    }
}

.invoice-chart-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0.85rem 1rem;
}

.invoice-chart-canvas-wrap {
    height: 14rem;
    max-width: 100%;
    min-width: 0;
    position: relative;
    width: 100%;
}

.invoice-pie {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
}

.invoice-pie-canvas-wrap {
    flex: 0 0 11rem;
    height: 11rem;
    position: relative;
    width: 11rem;
}

.invoice-pie-legend {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.invoice-pie-legend-item {
    align-items: flex-start;
    display: flex;
    gap: 0.45rem;
    line-height: 1.3;
}

.invoice-pie-legend-swatch {
    border-radius: 0.15rem;
    flex: 0 0 auto;
    height: 0.7rem;
    margin-top: 0.2rem;
    width: 0.7rem;
}

.invoice-pie-legend-text {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    min-width: 0;
}

.invoice-week-chart-scroll {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding-bottom: 0.35rem;
    touch-action: pan-x;
    width: 100%;
}

.invoice-week-chart-inner {
    height: 18rem;
    min-width: 100%;
    position: relative;
}

@media (max-width: 767.98px) {
    .invoice-chart-card {
        padding: 0.7rem 0.75rem;
    }

    .invoice-pie {
        flex-direction: column;
        gap: 0.65rem;
    }

    .invoice-pie-canvas-wrap {
        flex: 0 0 9.5rem;
        height: 9.5rem;
        margin-inline: auto;
        width: 9.5rem;
    }

    .invoice-pie-legend {
        width: 100%;
    }

    .invoice-week-chart-inner {
        height: 16.5rem;
    }
}

.invoice-summary-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
}

.invoice-summary-label {
    align-items: center;
    color: var(--ohc-muted);
    display: flex;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.35rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.invoice-period-info {
    align-items: center;
    background: rgba(240, 201, 135, 0.12);
    border: 1px solid rgba(240, 201, 135, 0.65);
    border-radius: 999px;
    color: #f0c987;
    cursor: help;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-style: normal;
    font-weight: 700;
    height: 0.95rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    text-transform: none;
    vertical-align: middle;
    width: 0.95rem;
}

.invoice-period-info:hover,
.invoice-period-info:focus-visible {
    background: rgba(240, 201, 135, 0.22);
    border-color: #f0c987;
    color: #ffd9a0;
    outline: none;
}

.invoice-billed-cell {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.invoice-hide-matching-check {
    margin-bottom: 0.15rem;
    min-height: 2rem;
    padding-top: 0.35rem;
}

.invoice-hours-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
}

.invoice-hours-toggles .invoice-hide-matching-check {
    min-height: 0;
}

.invoice-export-dept-list {
    display: grid;
    gap: 0.45rem;
}

.invoice-export-dept-list .form-check-label {
    color: var(--ohc-text, inherit);
}

.invoice-department-alert {
    align-items: center;
    background: rgba(240, 201, 135, 0.12);
    border: 1px solid rgba(240, 201, 135, 0.45);
    border-radius: 0.7rem;
    color: #f0c987;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.invoice-department-alert strong {
    color: #ffd9a0;
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.invoice-department-alert p {
    color: #f0c987;
    font-size: 0.84rem;
}

.invoice-hours-mismatch {
    color: #f0c987;
    font-weight: 600;
}

.invoice-notes-edit {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    height: 1.7rem;
    justify-content: center;
    padding: 0;
    width: 1.7rem;
}

.invoice-notes-edit svg {
    display: block;
    fill: currentColor;
    height: 0.95rem;
    width: 0.95rem;
}

.invoice-notes-edit:hover,
.invoice-notes-edit:focus-visible {
    color: var(--ohc-text);
    outline: none;
}

.invoice-notes-edit.is-overridden {
    background: rgba(240, 195, 90, 0.18);
    border-color: rgba(240, 195, 90, 0.55);
    color: #f0c35a;
    box-shadow: 0 0 0 2px rgba(240, 195, 90, 0.12);
}

.invoice-notes-edit.is-empty {
    opacity: 0.55;
}

.invoice-row-overridden > td {
    background: rgba(240, 195, 90, 0.04);
}

.invoice-override-value {
    border-radius: 0.35rem;
    display: inline-block;
    padding: 0.1rem 0.35rem;
}

.invoice-override-value.is-overridden {
    background: rgba(240, 195, 90, 0.2);
    border: 1px solid rgba(240, 195, 90, 0.55);
    color: #f6d98a;
    font-weight: 700;
}

.invoice-override-badge {
    background: rgba(240, 195, 90, 0.22);
    border: 1px solid rgba(240, 195, 90, 0.45);
    border-radius: 999px;
    color: #f0c35a;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-left: 0.35rem;
    padding: 0.12rem 0.4rem;
    text-transform: uppercase;
}

.invoice-override-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.6rem;
    padding: 0.75rem 0.85rem;
}

.invoice-hours-warn {
    align-items: center;
    color: #f0c987;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1rem;
    justify-content: center;
    width: 1rem;
}

.invoice-hours-warn svg {
    display: block;
    fill: currentColor;
    height: 0.95rem;
    width: 0.95rem;
}

.invoice-summary-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.invoice-summary-value-text {
    font-size: 1rem;
    font-weight: 600;
}

.docs-root-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.docs-root-tab {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    text-decoration: none;
}

.docs-root-tab:hover,
.docs-root-tab:focus-visible {
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--ohc-text);
}

.docs-root-tab.is-active {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--ohc-accent);
}

.docs-browser-expanded .docs-browser-body {
    border-top: 0;
    padding-top: 0;
}

.docs-browser-expanded-body .docs-browser-body {
    padding: 0;
}

.docs-restore-modal .modal-content,
.docs-restore-modal .modal-header,
.docs-restore-modal .modal-footer {
    background: var(--ohc-surface);
    border-color: var(--ohc-border);
    color: var(--ohc-text);
}

.docs-restore-item {
    align-items: center;
    border-top: 1px solid var(--ohc-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.docs-restore-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.client-files-tick {
    color: #8fd9a8;
    font-size: 1rem;
    font-weight: 700;
}

.client-files-missing {
    display: inline-block;
    font-size: 0.72rem;
    line-height: 1.2;
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-files-missing-wrap {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 7.5rem;
}

.client-files-missing-wrap .docs-folder-match-rename {
    font-size: 0.68rem;
    line-height: 1.1;
    padding: 0.1rem 0.4rem;
}

.client-files-hint .docs-folder-match-rename {
    margin-left: 0.35rem;
}

.client-files-hint {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: var(--ohc-radius);
    color: var(--ohc-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.85rem 1rem;
}

.client-files-hint strong {
    color: var(--ohc-text);
}

.folder-setup-panel {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: var(--ohc-radius);
    color: var(--ohc-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.85rem 1rem;
}

.folder-setup-intro {
    margin-bottom: 0.75rem;
}

.folder-setup-intro:last-child {
    margin-bottom: 0;
}

.folder-setup-panel strong {
    color: var(--ohc-text);
}

.holidays-allowances-table .holidays-allowance-input {
    max-width: 5.5rem;
}

.holidays-allowance-editor {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.holidays-allowance-save-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    color: var(--ohc-text);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
    line-height: 1;
    min-width: 2rem;
    padding: 0;
}

.holidays-allowance-save-btn:hover,
.holidays-allowance-save-btn:focus-visible {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--ohc-accent);
}

.holidays-allowance-save-btn:disabled {
    opacity: 0.6;
}

.holidays-allowance-saved {
    color: #7ec699;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.holidays-allowance-saved.is-visible {
    display: inline;
}

.holidays-allowance-error {
    color: #ff8f98;
    font-size: 0.72rem;
    line-height: 1.2;
    max-width: 8rem;
    white-space: normal;
}

.holidays-remaining-value {
    color: var(--ohc-accent);
}

.holidays-remaining-value.is-negative {
    color: #f0a0a0;
}

.holidays-date-picker {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    padding: 0.85rem;
}

.holidays-date-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 1.5rem;
}

.holidays-date-chip {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem 0.2rem 0.75rem;
    font-size: 0.8125rem;
}

.holidays-date-chip-remove {
    background: transparent;
    border: 0;
    color: var(--ohc-muted);
    line-height: 1;
    padding: 0;
}

.holidays-date-chip-remove:hover {
    color: var(--ohc-text);
}

.holiday-status-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
}

.holiday-status-pending {
    background: rgba(212, 175, 55, 0.18);
    color: #d4af37;
}

.holiday-status-approved {
    background: rgba(46, 160, 67, 0.18);
    color: #7ec699;
}

.holiday-status-denied {
    background: rgba(220, 53, 69, 0.18);
    color: #ff8f98;
}

.holiday-pending-count {
    background: rgba(212, 175, 55, 0.22);
    border-radius: 999px;
    color: var(--ohc-accent);
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
}

.holidays-date-list {
    max-width: 18rem;
}

.holidays-profile-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.holidays-profile-stat {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem;
}

/* Staff portal: fixed bottom nav (always on screen). Height is measured in JS. */
body.staff-rota-page {
    --staff-nav-height: calc(3.8rem + env(safe-area-inset-bottom, 0px));
    --staff-compose-height: 0px;
    background: #f4f5f7;
    color: #1f2430;
    color-scheme: light;
}

body.staff-rota-page .app-footer {
    display: none;
}

.staff-rota-app {
    margin: 0 auto;
    max-width: 42rem;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 0.85rem calc(0.9rem + var(--staff-nav-height));
    width: 100%;
}

.staff-rota-app.is-week {
    max-width: 72rem;
}

.staff-rota-bottomnav {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.06);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    left: 0;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    position: fixed;
    right: 0;
    width: 100%;
    z-index: 50;
}

.staff-rota-bottomnav-link {
    align-items: center;
    border-radius: 0.85rem;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    font-size: 0.68rem;
    font-weight: 700;
    gap: 0.12rem;
    justify-content: center;
    padding: 0.35rem 0.4rem 0.28rem;
    text-decoration: none;
}

.staff-rota-bottomnav-icon {
    display: inline-flex;
    height: 1.25rem;
    position: relative;
    width: 1.25rem;
}

.staff-rota-bottomnav-icon svg {
    display: block;
    height: 100%;
    width: 100%;
}

.staff-rota-bottomnav-dot {
    background: #dc2626;
    border: 2px solid #fff;
    border-radius: 999px;
    height: 0.55rem;
    position: absolute;
    right: -0.12rem;
    top: -0.12rem;
    width: 0.55rem;
}

.staff-rota-bottomnav-link.is-active {
    background: #ece8f6;
    color: #6d5aa8;
}

.staff-rota-rotate {
    align-items: flex-end;
    background: rgba(17, 24, 39, 0.45);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 1rem 1rem calc(1rem + var(--staff-nav-height));
    position: fixed;
    right: 0;
    top: 0;
    z-index: 80;
}

.staff-rota-rotate[hidden] {
    display: none;
}

.staff-rota-rotate-card {
    background: #fff;
    border-radius: 1.15rem;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
    max-width: 22rem;
    padding: 1.2rem 1.15rem 1rem;
    text-align: center;
    width: 100%;
}

.staff-rota-rotate-icon {
    color: #6d5aa8;
    display: inline-flex;
    height: 2.2rem;
    margin-bottom: 0.55rem;
    width: 2.2rem;
}

.staff-rota-rotate-icon svg {
    display: block;
    height: 100%;
    width: 100%;
}

.staff-rota-rotate-card h2 {
    color: #152033;
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

.staff-rota-rotate-card p {
    color: #6b7280;
    font-size: 0.92rem;
    margin: 0 0 1rem;
}

.staff-rota-rotate-actions {
    display: grid;
    gap: 0.45rem;
}

.staff-rota-rotate-continue,
.staff-rota-rotate-cancel {
    border: 0;
    border-radius: 0.8rem;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0.7rem 0.8rem;
}

.staff-rota-rotate-continue {
    background: #6d5aa8;
    color: #fff;
}

.staff-rota-rotate-cancel {
    background: #f3f4f6;
    color: #374151;
}

.staff-rota-rotate-hint {
    background: #ece8f6;
    border: 1px solid #ddd4f0;
    border-radius: 0.8rem;
    color: #4c3d7a;
    display: none;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.8rem;
    text-align: center;
}

@media (orientation: portrait) and (max-width: 900px) {
    .staff-rota-app.is-week .staff-rota-rotate-hint {
        display: block;
    }
}

.staff-rota-subhead {
    align-items: center;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: auto 1fr auto;
    margin-bottom: 0.55rem;
}

.staff-rota-date-label {
    color: #152033;
    font-size: 1.05rem;
    font-weight: 800;
    justify-self: center;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
}

.staff-rota-view-tabs {
    background: #ece8f6;
    border-radius: 999px;
    display: inline-flex;
    justify-self: center;
    padding: 0.16rem;
}

.staff-rota-view-tab {
    border-radius: 999px;
    color: #6d5aa8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.32rem 0.8rem;
    text-decoration: none;
    text-transform: uppercase;
}

.staff-rota-view-tab.is-active {
    background: #6d5aa8;
    border: 0;
    color: #fff;
}

.staff-rota-tools {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.staff-rota-tool {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    color: #374151;
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 700;
    height: 2.55rem;
    justify-content: center;
    text-decoration: none;
    width: 2.55rem;
}

.staff-rota-meta {
    align-items: center;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.86rem;
    gap: 0.65rem;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.staff-rota-meta-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.staff-rota-export {
    display: inline-flex;
    gap: 0.4rem;
}

.staff-rota-export-btn {
    background: #fff;
    border: 1px solid #c5cad3;
    border-radius: 0.4rem;
    color: #1f2430;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.28rem 0.7rem;
    text-decoration: none;
}

.staff-rota-export-btn:hover,
.staff-rota-export-btn:focus-visible {
    background: #6d5aa8;
    border-color: #6d5aa8;
    color: #fff;
}

.staff-rota-person {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.staff-rota-avatar-menu {
    position: relative;
}

.staff-rota-avatar {
    align-items: center;
    background: #6d5aa8;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    height: 2.2rem;
    justify-content: center;
    letter-spacing: 0.02em;
    width: 2.2rem;
}

button.staff-rota-avatar {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.staff-rota-avatar-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
    left: 0;
    min-width: 10rem;
    padding: 0.35rem;
    position: absolute;
    top: calc(100% + 0.4rem);
    z-index: 70;
}

.staff-rota-avatar-panel[hidden] {
    display: none;
}

.staff-rota-avatar-action {
    border-radius: 0.6rem;
    color: #152033;
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
}

.staff-rota-avatar-action:hover,
.staff-rota-avatar-action:focus-visible {
    background: #ece8f6;
    color: #6d5aa8;
}

.staff-rota-person-name {
    color: #374151;
    font-weight: 600;
}

.staff-rota-week-ending {
    color: #9ca3af;
}

.staff-rota-run-pill {
    background: #6d5aa8;
    border-radius: 999px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.55rem;
    text-transform: uppercase;
}

.staff-rota-grid {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    display: grid;
    grid-template-columns: 5.5rem repeat(7, minmax(0, 1fr));
    overflow: hidden;
}

.staff-rota-corner,
.staff-rota-day-head,
.staff-rota-section-label,
.staff-rota-cell {
    border-bottom: 1px solid #eef0f3;
    border-right: 1px solid #eef0f3;
}

.staff-rota-day-head {
    align-items: center;
    background: #fafbfc;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem 0.25rem;
    text-decoration: none;
}

.staff-rota-day-letter {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.staff-rota-day-num {
    align-items: center;
    border-radius: 999px;
    color: #111827;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 700;
    height: 1.7rem;
    justify-content: center;
    width: 1.7rem;
}

.staff-rota-day-head.is-today .staff-rota-day-num {
    background: #5b3ea6;
    color: #fff;
}

.staff-rota-day-head.is-day-off {
    background: #fbf6e8;
}

.staff-rota-day-head.is-day-off.has-calls {
    padding-bottom: 0.5rem;
}

.staff-rota-day-off {
    color: #8a6a12;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.staff-rota-day-head.has-calls .staff-rota-day-off {
    background: rgba(212, 175, 55, 0.22);
    border-radius: 999px;
    padding: 0.08rem 0.35rem;
}

.staff-rota-section-label {
    align-items: flex-start;
    background: #fafbfc;
    color: #6b7280;
    display: flex;
    font-size: 0.78rem;
    font-weight: 700;
    min-height: 7rem;
    padding: 0.75rem 0.55rem;
}

.staff-rota-section-period {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.32rem;
}

.staff-rota-section-period-icon {
    display: inline-flex;
    flex-shrink: 0;
    height: 0.9rem;
    width: 0.9rem;
}

.staff-rota-section-period-icon svg {
    display: block;
    height: 100%;
    width: 100%;
}

.staff-rota-section-label.is-am {
    background: rgba(66, 165, 245, 0.06);
    color: #3b8fd6;
}

.staff-rota-section-label.is-lunch {
    background: rgba(132, 158, 138, 0.08);
    color: #6a9074;
}

.staff-rota-section-label.is-tea {
    background: rgba(232, 168, 70, 0.08);
    color: #d4922e;
}

.staff-rota-section-label.is-pm {
    background: rgba(168, 122, 186, 0.08);
    color: #a56bb4;
}

.staff-rota-cell {
    min-height: 7rem;
    padding: 0.35rem;
}

.staff-rota-cell.is-am {
    background: rgba(66, 165, 245, 0.035);
}

.staff-rota-cell.is-lunch {
    background: rgba(132, 158, 138, 0.045);
}

.staff-rota-cell.is-tea {
    background: rgba(232, 168, 70, 0.045);
}

.staff-rota-cell.is-pm {
    background: rgba(168, 122, 186, 0.045);
}

.staff-rota-cell.is-today {
    background: rgba(91, 62, 166, 0.04);
}

.staff-rota-cell.is-day-off {
    background: rgba(212, 175, 55, 0.08);
}

.staff-rota-cell.is-day-off.is-today {
    background: rgba(212, 175, 55, 0.14);
}

.staff-rota-cell.is-day-off.has-calls {
    background: inherit;
}

.staff-rota-cell.is-am.is-day-off.has-calls {
    background: rgba(66, 165, 245, 0.035);
}

.staff-rota-cell.is-lunch.is-day-off.has-calls {
    background: rgba(132, 158, 138, 0.045);
}

.staff-rota-cell.is-tea.is-day-off.has-calls {
    background: rgba(232, 168, 70, 0.045);
}

.staff-rota-cell.is-pm.is-day-off.has-calls {
    background: rgba(168, 122, 186, 0.045);
}

.staff-rota-cell.is-today.is-day-off.has-calls {
    background: rgba(91, 62, 166, 0.04);
}

.staff-rota-cell.is-am.is-today:not(.is-day-off) {
    background: rgba(66, 165, 245, 0.08);
}

.staff-rota-cell.is-lunch.is-today:not(.is-day-off) {
    background: rgba(132, 158, 138, 0.1);
}

.staff-rota-cell.is-tea.is-today:not(.is-day-off) {
    background: rgba(232, 168, 70, 0.1);
}

.staff-rota-cell.is-pm.is-today:not(.is-day-off) {
    background: rgba(168, 122, 186, 0.1);
}

.staff-rota-block {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 0.75rem;
    box-shadow: 0 3px 10px rgba(28, 36, 48, 0.05);
    color: #152033;
    cursor: default;
    display: grid;
    gap: 0.4rem;
    grid-template-columns: auto minmax(0, 1fr);
    margin-bottom: 0.32rem;
    min-height: 0;
    overflow: hidden;
    padding: 0.38rem 0.42rem 0.38rem 0.32rem;
}

.staff-rota-block.is-leave {
    background: #fff6f7;
    border-color: #f4d0d4;
    color: #8a2f3a;
}

.staff-rota-block.is-day-off {
    background: #fbf6e8;
    border-color: rgba(212, 175, 55, 0.45);
    color: #8a6a12;
}

.staff-rota-block.is-day-off.is-compact {
    align-items: center;
    gap: 0.28rem;
    margin-bottom: 0.28rem;
    min-height: 0;
    padding: 0.18rem 0.38rem 0.18rem 0.22rem;
}

.staff-rota-block.is-day-off.is-compact .staff-rota-block-duration {
    font-size: 0.58rem;
    height: 1.55rem;
    width: 1.55rem;
}

.staff-rota-block.is-day-off.is-compact .staff-rota-block-name {
    font-size: 0.72rem;
    font-weight: 800;
}

.staff-rota-block-side {
    align-items: center;
    display: flex;
}

.staff-rota-block-duration {
    align-items: center;
    background: #eef0f3;
    border-radius: 50%;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    font-size: 0.52rem;
    font-weight: 700;
    height: 2.15rem;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1.05;
    text-align: center;
    width: 2.15rem;
}

.staff-rota-block-duration strong {
    font-size: 0.78rem;
    font-weight: 800;
}

.staff-rota-block.is-am:not(.is-leave) {
    background: rgba(66, 165, 245, 0.12);
    border-color: rgba(66, 165, 245, 0.35);
}

.staff-rota-block.is-lunch:not(.is-leave) {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.35);
}

.staff-rota-block.is-tea:not(.is-leave) {
    background: rgba(255, 167, 38, 0.14);
    border-color: rgba(255, 167, 38, 0.4);
}

.staff-rota-block.is-pm:not(.is-leave) {
    background: rgba(171, 71, 188, 0.12);
    border-color: rgba(171, 71, 188, 0.35);
}

.staff-rota-block.is-am:not(.is-leave) .staff-rota-block-duration {
    background: rgba(66, 165, 245, 0.32);
    color: #0d47a1;
}

.staff-rota-block.is-lunch:not(.is-leave) .staff-rota-block-duration {
    background: rgba(76, 175, 80, 0.3);
    color: #1b5e20;
}

.staff-rota-block.is-tea:not(.is-leave) .staff-rota-block-duration {
    background: rgba(255, 167, 38, 0.32);
    color: #e65100;
}

.staff-rota-block.is-pm:not(.is-leave) .staff-rota-block-duration {
    background: rgba(171, 71, 188, 0.26);
    color: #6a1b9a;
}

.staff-rota-block.is-leave .staff-rota-block-duration {
    background: #fde8ea;
    color: #8a2f3a;
}

.staff-rota-block.is-day-off .staff-rota-block-duration {
    background: rgba(212, 175, 55, 0.28);
    color: #8a6a12;
}

.staff-rota-block.is-flagged .staff-rota-block-duration {
    background: #fde8d2;
}

.staff-rota-block.is-completed .staff-rota-block-duration {
    background: #dcfce7;
}

.staff-rota-block.is-cancelled {
    opacity: 0.88;
}

.staff-rota-block.is-cancelled .staff-rota-block-name {
    text-decoration: line-through;
}

.staff-rota-block-cancelled,
.staff-rota-day-card-cancelled {
    color: #be5670;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}

.staff-rota-block-main {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    justify-content: center;
    min-width: 0;
}

.staff-rota-block-name {
    align-items: baseline;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.22rem;
    line-height: 1.2;
}

.staff-rota-block-name-unmatched {
    align-items: baseline;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.staff-rota-unmatched-flag {
    background: rgba(196, 92, 46, 0.16);
    border-radius: 999px;
    color: #c45c2e;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 800;
    height: 0.95rem;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 0.95rem;
    padding: 0 0.18rem;
}

button.staff-rota-client-btn {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: block;
    font: inherit;
    padding: 0;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

button.staff-rota-client-btn:hover,
button.staff-rota-client-btn:focus-visible {
    color: var(--ohc-accent, #1f6f5b);
    outline: none;
}

.staff-rota-block.is-linked {
    cursor: pointer;
}

.staff-rota-block[data-wall-call]:hover,
.staff-rota-block[data-wall-call]:focus-visible {
    border-color: #c9d2de;
    box-shadow: 0 4px 14px rgba(28, 36, 48, 0.08);
    outline: none;
}

.staff-rota-tts-modal-header {
    align-items: center;
    flex-shrink: 0;
    gap: 0.65rem;
}

.staff-rota-modal-tabs {
    background: #ece8f6;
    border-radius: 1rem;
    display: grid;
    flex: 1;
    gap: 0.22rem;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    padding: 0.22rem;
}

.staff-rota-modal-tab {
    background: transparent;
    border: 0;
    border-radius: 0.82rem;
    color: #6d5aa8;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 800;
    min-height: 2.85rem;
    padding: 0.45rem 0.75rem;
}

.staff-rota-modal-tab.is-active {
    background: #6d5aa8;
    box-shadow: 0 1px 3px rgba(61, 47, 107, 0.22);
    color: #fff;
}

.staff-rota-modal-tab:hover,
.staff-rota-modal-tab:focus-visible {
    outline: none;
}

.staff-rota-modal-tab:not(.is-active):hover,
.staff-rota-modal-tab:not(.is-active):focus-visible {
    background: rgba(109, 90, 168, 0.12);
}

.staff-rota-history-intro {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.staff-rota-history-empty {
    padding: 0.35rem 0.1rem 0.2rem;
}

.staff-rota-tts-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    justify-content: stretch;
    max-height: min(72vh, 38rem);
    overflow: auto;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

body.staff-rota-page #staffRotaTtsModal {
    --bs-modal-margin: 0.4rem;
    padding: 0;
}

body.staff-rota-page #staffRotaTtsModal .client-tts-modal-dialog {
    height: calc(100dvh - 0.8rem);
    margin: 0.4rem;
    max-width: none;
    width: auto;
}

body.staff-rota-page #staffRotaTtsModal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

body.staff-rota-page #staffRotaTtsModal .client-tts-modal-body {
    flex: 1 1 auto;
    min-height: 0;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-modal-tabs,
body.staff-rota-page #staffRotaTtsModal.is-client-forms .staff-rota-modal-tabs {
    display: none;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-tts-modal-header {
    justify-content: flex-end;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .client-tts-modal-body {
    display: none;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-tts-modal-footer {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-outcome-confirm {
    flex: 1 1 auto;
    min-height: 0;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-outcome-field textarea {
    min-height: 5.5rem;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-outcome-sign {
    flex: 1 1 auto;
    min-height: 9rem;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-outcome-signature {
    flex: 1 1 auto;
    height: clamp(9rem, 26dvh, 16rem);
    min-height: 9rem;
}

body.staff-rota-page #staffRotaTtsModal.is-completing .staff-rota-outcome-confirm-actions {
    background: var(--ohc-surface);
    bottom: calc(-0.15rem + env(safe-area-inset-bottom, 0px));
    margin-top: auto;
    padding-bottom: 0.2rem;
    padding-top: 0.65rem;
    position: sticky;
    z-index: 2;
}

.staff-rota-tts-x {
    margin: 0;
    opacity: 1;
}

.staff-rota-tts-x:hover,
.staff-rota-tts-x:focus-visible {
    opacity: 1;
}

.staff-rota-tts-modal-header + .client-tts-modal-body {
    padding-top: 1rem;
}

.staff-rota-outcome-actions {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
    width: 100%;
}

.staff-rota-outcome-confirm-actions {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
    width: 100%;
}

.staff-rota-outcome-btn {
    align-items: center;
    border: 0;
    border-radius: 0.85rem;
    display: inline-flex;
    font-weight: 800;
    gap: 0.35rem;
    justify-content: center;
    min-height: 2.7rem;
    padding: 0.55rem 0.8rem;
}

.staff-rota-outcome-btn svg {
    display: block;
    height: 1.15rem;
    width: 1.15rem;
}

.staff-rota-outcome-btn.is-flag {
    background: #dc2626;
    color: #fff;
}

.staff-rota-outcome-btn.is-complete {
    background: #22c55e;
    color: #fff;
}

.staff-rota-outcome-btn.is-submit.is-flag-submit {
    background: #dc2626;
    color: #fff;
}

.staff-rota-outcome-btn.is-cancel {
    background: #ece8f6;
    color: #3d2f6b;
}

.staff-rota-outcome-btn.is-submit,
.staff-rota-outcome-btn.is-submit.is-complete {
    background: #22c55e;
    color: #fff;
}

.staff-rota-outcome-confirm {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
}

.staff-rota-outcome-confirm strong {
    color: #f4f7fb;
    font-size: 0.95rem;
}

.staff-rota-outcome-help,
.staff-rota-outcome-locked {
    color: #d5deea;
    font-size: 0.82rem;
    margin: 0;
}

.staff-rota-outcome-photo[hidden],
.staff-rota-outcome-photo-trigger[hidden],
.staff-rota-outcome-photo-preview[hidden],
.staff-rota-photo-sheet[hidden] {
    display: none !important;
}

.staff-rota-outcome-photo {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.staff-rota-outcome-photo-trigger {
    align-items: center;
    appearance: none;
    background: #243044;
    border: 1px dashed #8b9aab;
    border-radius: 0.95rem;
    color: #f4f7fb;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    gap: 0.5rem;
    justify-content: center;
    min-height: 3.1rem;
    padding: 0.7rem 0.9rem;
    width: 100%;
}

.staff-rota-outcome-photo-trigger svg {
    display: block;
    height: 1.35rem;
    width: 1.35rem;
}

.staff-rota-outcome-photo-trigger:hover,
.staff-rota-outcome-photo-trigger:focus-visible {
    background: #2d3d55;
    border-color: #c4b5fd;
    outline: none;
}

.staff-rota-photo-sheet {
    inset: 0;
    position: fixed;
    z-index: 1080;
}

.staff-rota-photo-sheet-backdrop {
    background: rgba(15, 23, 42, 0.45);
    border: 0;
    inset: 0;
    position: absolute;
}

.staff-rota-photo-sheet-card {
    background: #fff;
    border-radius: 1.1rem 1.1rem 0 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    left: 0;
    padding: 0.7rem 0.7rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    position: absolute;
    right: 0;
}

.staff-rota-photo-sheet-option,
.staff-rota-photo-sheet-cancel {
    align-items: center;
    appearance: none;
    background: #f6f3fb;
    border: 0;
    border-radius: 0.85rem;
    color: #3d2f6b;
    cursor: pointer;
    display: flex;
    font-weight: 800;
    gap: 0.55rem;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.7rem 0.9rem;
    width: 100%;
}

.staff-rota-photo-sheet-option svg {
    display: block;
    height: 1.25rem;
    width: 1.25rem;
}

.staff-rota-photo-sheet-cancel {
    background: #eef0f3;
    color: #4b5563;
    margin-top: 0.15rem;
}

.staff-rota-outcome-photo-preview {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 0.95rem;
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem;
}

.staff-rota-outcome-photo-preview img {
    border-radius: 0.7rem;
    height: 4.2rem;
    object-fit: cover;
    width: 4.2rem;
}

.staff-rota-outcome-photo-preview-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.staff-rota-outcome-photo-preview-copy strong {
    color: #152033;
    font-size: 0.88rem;
}

.staff-rota-outcome-photo-preview-copy span {
    color: #6b7280;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-rota-outcome-photo-preview-actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.25rem;
}

.staff-rota-outcome-photo-preview-actions button {
    background: none;
    border: 0;
    color: #6d5aa8;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0;
}

.staff-rota-outcome-photo-preview-actions button:hover,
.staff-rota-outcome-photo-preview-actions button:focus-visible {
    color: #3d2f6b;
    outline: none;
}

.staff-rota-outcome-error {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.55);
    border-radius: 0.75rem;
    color: #fecaca;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    padding: 0.7rem 0.8rem;
}

.staff-rota-outcome-field.is-missing .form-control,
.staff-rota-outcome-fieldset.is-missing .staff-rota-outcome-choice,
.staff-rota-outcome-sign.is-missing .staff-rota-outcome-signature {
    border-color: #f87171;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45);
}

.staff-rota-outcome-field,
.staff-rota-outcome-fieldset {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
}

.staff-rota-outcome-field span,
.staff-rota-outcome-field-label,
.staff-rota-outcome-fieldset legend {
    color: #f4f7fb;
    float: none;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0;
    width: auto;
}

.staff-rota-outcome-field-label span {
    color: #c5d0dc;
    font-weight: 600;
}

.staff-rota-outcome-times {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 1fr 1fr;
}

.staff-rota-outcome-choice {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr 1fr;
}

.staff-rota-outcome-choice button {
    appearance: none;
    background: #243044;
    border: 1px solid #4b5d75;
    border-radius: 0.85rem;
    color: #f4f7fb;
    font-weight: 800;
    min-height: 2.55rem;
}

.staff-rota-outcome-choice button.is-active {
    background: #7c6bb8;
    border-color: #7c6bb8;
    color: #fff;
}

.staff-rota-outcome-choice button.is-flag-yes.is-active {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.staff-rota-outcome-med-extra {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.staff-rota-outcome-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-rota-outcome-file-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 0.85rem;
    display: flex;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem;
}

.staff-rota-outcome-file-item img {
    border-radius: 0.5rem;
    height: 2.4rem;
    object-fit: cover;
    width: 2.4rem;
}

.staff-rota-outcome-file-item span {
    color: #152033;
    flex: 1;
    font-size: 0.8rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-rota-outcome-file-item button {
    background: none;
    border: 0;
    color: #6d5aa8;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0;
}

.staff-rota-outcome-sign {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.staff-rota-outcome-signature {
    background: #fff;
    border: 1px dashed #c4b7e0;
    border-radius: 0.95rem;
    display: block;
    height: 140px;
    touch-action: none;
    width: 100%;
}

.staff-rota-outcome-sign-clear {
    align-self: flex-end;
    background: none;
    border: 0;
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0;
}

.staff-rota-outcome-photo-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.staff-rota-outcome-flag {
    color: #dc2626;
    display: inline-flex;
    margin-left: 0.35rem;
    vertical-align: -0.15rem;
}

.staff-rota-outcome-flag svg {
    height: 1rem;
    width: 1rem;
}

.staff-rota-day-card.is-flagged,
.staff-rota-block.is-flagged {
    border-color: #ef4444;
}

.staff-rota-day-card.is-flagged {
    border-left: 0.42rem solid #dc2626;
}

.staff-rota-day-card.is-completed {
    border-left: 0.42rem solid #22c55e;
}

.staff-rota-day-card.is-cancelled {
    opacity: 0.9;
}

.staff-rota-day-card.is-cancelled .staff-rota-day-card-name {
    text-decoration: line-through;
}

.staff-rota-day-card.is-completed.is-flagged,
.staff-rota-day-card.is-flagged {
    border-left: 0.42rem solid #dc2626;
}

.staff-rota-day-card-outcome {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    justify-content: center;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.staff-rota-day-card-outcome svg {
    display: block;
}

.staff-rota-day-card-outcome.is-complete {
    background: #22c55e;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.38);
    color: #fff;
    height: 1.85rem;
    width: 1.85rem;
}

.staff-rota-day-card-outcome.is-complete svg {
    height: 1.2rem;
    width: 1.2rem;
}

.staff-rota-day-card-outcome.is-flagged {
    background: #ef4444;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.38);
    color: #fff;
    height: 1.85rem;
    width: 1.85rem;
}

.staff-rota-day-card-outcome.is-flagged svg {
    height: 1.1rem;
    width: 1.1rem;
}

.staff-rota-outcome-current-notes {
    background: #243044;
    border-radius: 0.7rem;
    color: #f4f7fb;
    font-size: 0.9rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    white-space: pre-wrap;
}

.staff-rota-outcome-edit {
    background: #ece8f6;
    border: 0;
    border-radius: 0.85rem;
    color: #3d2f6b;
    font: inherit;
    font-weight: 800;
    min-height: 2.5rem;
    width: 100%;
}

.staff-rota-outcome-edit:hover,
.staff-rota-outcome-edit:focus-visible {
    background: #6d5aa8;
    color: #fff;
}

.staff-rota-tts-close {
    background: #ece8f6;
    border: 0;
    border-radius: 0.7rem;
    color: #3d2f6b;
    font-weight: 700;
    min-width: 4.5rem;
    padding: 0.45rem 0.85rem;
}

.staff-rota-tts-close:hover,
.staff-rota-tts-close:focus-visible {
    background: #6d5aa8;
    color: #fff;
}

.staff-rota-tts-summary {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.staff-rota-tts-client {
    color: #f4f7fb;
    font-size: 1.15rem;
    font-weight: 700;
}

.staff-rota-tts-summary .text-muted {
    color: #d5deea !important;
}

.staff-rota-tts-hours strong {
    color: #f4f7fb;
}

.staff-rota-tts-hours {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: right;
}

.staff-rota-tts-file {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.staff-rota-tts-file-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.staff-rota-tts-file-name,
.staff-rota-tts-file-date {
    color: inherit;
    font-size: 0.88rem;
    opacity: 0.88;
}

.staff-rota-tts-file-status {
    align-items: center;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.28rem;
    line-height: 1;
}

.staff-rota-tts-file-status svg {
    display: block;
    height: 1.1rem;
    width: 1.1rem;
}

.staff-rota-tts-file-status.is-confirmed {
    color: #22c55e;
}

.staff-rota-tts-file-status.is-unconfirmed {
    color: #ef4444;
}

.staff-rota-tts-confirm-btn {
    align-self: flex-start;
    background: #22c55e;
    border: 0;
    border-radius: 0.7rem;
    color: #052e16;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    min-height: 2.35rem;
    padding: 0.4rem 0.85rem;
}

.staff-rota-tts-confirm-btn:hover,
.staff-rota-tts-confirm-btn:focus-visible {
    background: #16a34a;
    color: #fff;
    outline: none;
}

.staff-rota-tts-confirm-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.staff-rota-tts-confirm-hint {
    color: inherit;
    font-size: 0.78rem;
    margin: 0;
    opacity: 0.78;
}

.staff-rota-block-mins {
    display: none;
}

.staff-rota-block-run {
    color: #6b7280;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.staff-rota-block-run.is-missing {
    color: #c45c2e;
}

.staff-rota-block-run-link {
    color: inherit;
    text-decoration: none;
}

.staff-rota-block-run-link:hover {
    text-decoration: underline;
}

.staff-rota-block-run-sep {
    opacity: 0.55;
}

.staff-rota-empty {
    color: #c4CAD4;
    font-size: 0.85rem;
    padding: 0.35rem 0.15rem;
}

.staff-rota-day-count {
    align-items: center;
    color: #059669;
    display: flex;
    flex-direction: column;
    font-size: 0.65rem;
    font-weight: 700;
    gap: 0.05rem;
    line-height: 1.1;
}

.staff-rota-day-mins {
    color: #6b7280;
    font-size: 0.58rem;
    font-weight: 600;
    white-space: nowrap;
}

.staff-rota-week-mins {
    color: #374151;
    font-weight: 700;
    margin-left: 0.35rem;
}

.staff-rota-admin-panel {
    overflow: auto;
}

.staff-rota-admin-wrap {
    background: #f4f5f7;
    border-radius: 0.85rem;
    color: #1f2430;
    padding: 0.85rem;
}

.staff-rota-admin-wrap .staff-rota-meta {
    margin-bottom: 0.75rem;
}

.staff-rota-admin-wrap .staff-rota-day-head {
    cursor: default;
}

.staff-rota-admin-wrap .staff-rota-block-name {
    color: inherit;
}

.staff-rota-admin-wrap button.staff-rota-client-btn:hover,
.staff-rota-admin-wrap button.staff-rota-client-btn:focus-visible,
.staff-rota-admin-wrap .staff-rota-block[data-wall-call]:hover .staff-rota-block-name {
    color: #5b3ea6;
}

.staff-rota-day-view {
    padding: 0;
}

.staff-rota-day-view-head {
    color: #111827;
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
    text-align: center;
}

.staff-rota-day-section {
    margin-bottom: 0.85rem;
}

.staff-rota-day-section-toggle {
    align-items: center;
    background: #f4f0fb;
    border: 1px solid #ddd4f0;
    border-radius: 0.85rem;
    color: #4c3d7a;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 0.45rem;
    grid-template-columns: auto 1fr auto auto;
    margin-bottom: 0.65rem;
    padding: 0.7rem 0.8rem;
    text-align: left;
    width: 100%;
}

.staff-rota-day-section.is-am .staff-rota-day-section-toggle {
    background: rgba(66, 165, 245, 0.1);
    border-color: rgba(66, 165, 245, 0.28);
    color: #1565c0;
}

.staff-rota-day-section.is-lunch .staff-rota-day-section-toggle {
    background: rgba(132, 158, 138, 0.12);
    border-color: rgba(143, 181, 154, 0.32);
    color: #3f6a4a;
}

.staff-rota-day-section.is-tea .staff-rota-day-section-toggle {
    background: rgba(255, 167, 38, 0.12);
    border-color: rgba(255, 167, 38, 0.34);
    color: #b36b00;
}

.staff-rota-day-section.is-pm .staff-rota-day-section-toggle {
    background: rgba(171, 71, 188, 0.1);
    border-color: rgba(171, 71, 188, 0.28);
    color: #7b1fa2;
}

.staff-rota-day-section.is-am .staff-rota-day-section-stats {
    color: #5a9bd4;
}

.staff-rota-day-section.is-lunch .staff-rota-day-section-stats {
    color: #6a9074;
}

.staff-rota-day-section.is-tea .staff-rota-day-section-stats {
    color: #d4922e;
}

.staff-rota-day-section.is-pm .staff-rota-day-section-stats {
    color: #a56bb4;
}

.staff-rota-day-section-icon,
.staff-rota-day-section-chevron {
    display: inline-flex;
    height: 1.15rem;
    width: 1.15rem;
}

.staff-rota-day-section-icon svg,
.staff-rota-day-section-chevron svg {
    display: block;
    height: 100%;
    width: 100%;
}

.staff-rota-day-section-label {
    font-size: 0.95rem;
    font-weight: 700;
}

.staff-rota-day-section-stats {
    color: #7c6fa3;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.staff-rota-day-section-chevron {
    color: #6d5aa8;
    transition: transform 0.15s ease;
}

.staff-rota-day-section.is-collapsed .staff-rota-day-section-chevron {
    transform: rotate(180deg);
}

.staff-rota-day-section.is-collapsed .staff-rota-day-section-body {
    display: none;
}

.staff-rota-day-card {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(28, 36, 48, 0.05);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 0.7rem;
    overflow: hidden;
    padding: 0.85rem 0.85rem 0.85rem 0.7rem;
    width: 100%;
}

.staff-rota-day-card.is-attention {
    border-left: 0.42rem solid #f0b37a;
}

.staff-rota-day-card-side {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.staff-rota-day-card-duration {
    align-items: center;
    background: #eef0f3;
    border-radius: 0.7rem;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    font-size: 0.68rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1.05;
    min-height: 3.1rem;
    min-width: 3.1rem;
    padding: 0.35rem 0.3rem;
    text-align: center;
}

.staff-rota-day-card.is-attention .staff-rota-day-card-duration {
    background: #fde8d2;
}

.staff-rota-day-card.is-am:not(.is-leave):not(.is-attention) .staff-rota-day-card-duration {
    background: rgba(66, 165, 245, 0.32);
    color: #0d47a1;
}

.staff-rota-day-card.is-lunch:not(.is-leave):not(.is-attention) .staff-rota-day-card-duration {
    background: rgba(76, 175, 80, 0.28);
    color: #1b5e20;
}

.staff-rota-day-card.is-tea:not(.is-leave):not(.is-attention) .staff-rota-day-card-duration {
    background: rgba(255, 167, 38, 0.32);
    color: #e65100;
}

.staff-rota-day-card.is-pm:not(.is-leave):not(.is-attention) .staff-rota-day-card-duration {
    background: rgba(171, 71, 188, 0.26);
    color: #6a1b9a;
}

.staff-rota-day-card-duration strong {
    font-size: 1.02rem;
    font-weight: 800;
}

.staff-rota-day-card-main {
    min-width: 0;
    padding-top: 0.1rem;
}

.staff-rota-day-card-name {
    background: transparent;
    border: 0;
    color: #152033;
    display: block;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    padding: 0;
    text-align: left;
    width: 100%;
}

button.staff-rota-day-card-name {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    flex-wrap: wrap;
}

button.staff-rota-day-card-name:hover,
button.staff-rota-day-card-name:focus-visible {
    color: #6d5aa8;
    outline: none;
}

.staff-rota-day-card-address {
    color: #6b7280;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.35;
    margin-top: 0.22rem;
}

.staff-rota-day-card-warning {
    align-items: center;
    color: #d97706;
    display: flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.staff-rota-day-card-warning svg {
    flex-shrink: 0;
    height: 0.95rem;
    width: 0.95rem;
}

.staff-rota-day-card-colleagues {
    align-items: center;
    color: #6d5aa8;
    display: flex;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 0.4rem;
    line-height: 1.3;
    margin-top: 0.45rem;
}

.staff-rota-day-card-colleagues svg {
    flex-shrink: 0;
    height: 1.1rem;
    width: 1.1rem;
}

.staff-rota-day-card-action {
    align-items: center;
    display: flex;
    padding-right: 0.1rem;
}

.staff-rota-day-card-action .staff-rota-day-card-outcome.is-complete {
    height: 2.6rem;
    margin-left: 0;
    width: 2.6rem;
}

.staff-rota-day-card-action .staff-rota-day-card-outcome.is-complete svg {
    height: 1.45rem;
    width: 1.45rem;
}

.staff-rota-day-card-map {
    align-items: center;
    background: #ece8f6;
    border-radius: 999px;
    color: #6d5aa8;
    display: inline-flex;
    height: 2.6rem;
    justify-content: center;
    text-decoration: none;
    width: 2.6rem;
}

.staff-rota-day-card-map svg {
    display: block;
    height: 1.25rem;
    width: 1.25rem;
}

.staff-rota-day-card-map-missing {
    color: #d97706;
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.2rem;
    max-width: 5.4rem;
    text-align: right;
}

.staff-rota-day-card-map-missing span {
    align-items: center;
    color: #9ca3af;
    display: inline-flex;
    font-weight: 600;
    gap: 0.2rem;
    justify-content: flex-end;
}

.staff-rota-day-card-map-missing svg {
    height: 0.85rem;
    width: 0.85rem;
}

.staff-rota-day-empty {
    color: #6b7280;
    margin: 0 0 0.75rem;
}

.staff-rota-day-off-banner {
    align-items: flex-start;
    background: #fbf6e8;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 0.75rem;
    color: #8a6a12;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.85rem;
}

.staff-rota-day-off-banner strong {
    font-size: 0.92rem;
    font-weight: 800;
}

.staff-rota-day-off-banner span {
    color: #6b5a2a;
    font-size: 0.82rem;
}

.staff-rota-day-off-banner.has-calls {
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.75rem;
}

@media (max-width: 760px) {
    .staff-rota-view-tab {
        padding: 0.3rem 0.62rem;
    }

    .staff-rota-day-card {
        gap: 0.55rem;
        padding: 0.75rem 0.7rem 0.75rem 0.55rem;
    }

    .staff-rota-day-section-toggle {
        grid-template-columns: auto 1fr auto;
    }

    .staff-rota-day-section-stats {
        grid-column: 2;
    }

    .staff-rota-grid {
        grid-template-columns: 4.2rem repeat(7, minmax(3.2rem, 1fr));
        overflow-x: auto;
    }

    .staff-rota-section-label,
    .staff-rota-cell {
        min-height: 4.6rem;
    }

    .staff-rota-block {
        padding: 0.32rem 0.36rem 0.32rem 0.28rem;
    }

    .staff-rota-block-duration {
        height: 1.95rem;
        width: 1.95rem;
    }
}

/* Wall board (office TV) */
body.wall-board-page {
    --wall-bg: #eef1f6;
    --wall-text: #1c2430;
    --wall-muted: #6a7585;
    --wall-title: #152033;
    --wall-surface: #ffffff;
    --wall-surface-2: #f7f9fc;
    --wall-border: #dbe3ee;
    --wall-shadow: 0 1px 2px rgba(21, 32, 51, 0.04);
    --wall-kpi-unassigned: #c2410c;
    --wall-kpi-unlinked: #b45309;
    --wall-kpi-covered: #0f766e;
    --wall-action-hover: #f7f9fc;
    --wall-column-alert: #fdba74;
    --wall-count-bg: #e8eef7;
    --wall-count-text: #3b4a60;
    --wall-period: #7b8798;
    --wall-period-current: #0f766e;
    --wall-period-am: #4a90c4;
    --wall-period-lunch: #5cb87a;
    --wall-period-tea: #c47a6a;
    --wall-period-pm: #d4a04a;
    --wall-card-unassigned-border: #fdba74;
    --wall-card-unassigned-bar: #f97316;
    --wall-card-unlinked-border: #fcd34d;
    --wall-card-unlinked-bar: #d97706;
    --wall-card-cancelled-border: #f0a8b6;
    --wall-card-cancelled-bar: #e07a90;
    --wall-flag-bg: #fff7ed;
    --wall-flag-text: #c2410c;
    --wall-status-covered-bg: #ccfbf1;
    --wall-status-covered-text: #0f766e;
    --wall-status-unassigned-bg: #ffedd5;
    --wall-status-unassigned-text: #c2410c;
    --wall-status-unlinked-bg: #fef3c7;
    --wall-status-unlinked-text: #b45309;
    --wall-status-cancelled-bg: #fde8ee;
    --wall-status-cancelled-text: #b4234a;
    --wall-staff-bg: #eef2ff;
    --wall-staff-text: #3730a3;
    --wall-scheme: light;
    background: var(--wall-bg);
    color: var(--wall-text);
    color-scheme: var(--wall-scheme);
    min-height: 100vh;
    overflow: hidden;
}

body.wall-board-page[data-wall-theme="dark"] {
    --wall-bg: #0b111c;
    --wall-text: #e8eef6;
    --wall-muted: #93a0b3;
    --wall-title: #f4f7fb;
    --wall-surface: #151d2c;
    --wall-surface-2: #101826;
    --wall-border: rgba(255, 255, 255, 0.08);
    --wall-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    --wall-kpi-unassigned: #fb923c;
    --wall-kpi-unlinked: #fbbf24;
    --wall-kpi-covered: #5eead4;
    --wall-action-hover: #1c2738;
    --wall-column-alert: #c2410c;
    --wall-count-bg: #243044;
    --wall-count-text: #d5deea;
    --wall-period: #8b9aab;
    --wall-period-current: #5eead4;
    --wall-card-unassigned-border: #c2410c;
    --wall-card-unassigned-bar: #f97316;
    --wall-card-unlinked-border: #b45309;
    --wall-card-unlinked-bar: #fbbf24;
    --wall-card-cancelled-border: #be5670;
    --wall-card-cancelled-bar: #e07a90;
    --wall-flag-bg: rgba(249, 115, 22, 0.16);
    --wall-flag-text: #fdba74;
    --wall-status-covered-bg: rgba(45, 212, 191, 0.16);
    --wall-status-covered-text: #5eead4;
    --wall-status-unassigned-bg: rgba(249, 115, 22, 0.18);
    --wall-status-unassigned-text: #fdba74;
    --wall-status-unlinked-bg: rgba(251, 191, 36, 0.16);
    --wall-status-unlinked-text: #fbbf24;
    --wall-status-cancelled-bg: rgba(224, 122, 144, 0.18);
    --wall-status-cancelled-text: #f4b4c2;
    --wall-staff-bg: rgba(129, 140, 248, 0.16);
    --wall-staff-text: #c7d2fe;
    --wall-scheme: dark;
}

body.wall-board-page[data-wall-theme="blue"] {
    --wall-bg: #0b1f3a;
    --wall-text: #e7f0ff;
    --wall-muted: #9bb3d3;
    --wall-title: #f3f8ff;
    --wall-surface: #143056;
    --wall-surface-2: #102848;
    --wall-border: rgba(147, 197, 253, 0.16);
    --wall-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    --wall-kpi-unassigned: #fb923c;
    --wall-kpi-unlinked: #fde68a;
    --wall-kpi-covered: #7dd3fc;
    --wall-action-hover: #1a3c68;
    --wall-column-alert: #ea580c;
    --wall-count-bg: #1d4e89;
    --wall-count-text: #dbeafe;
    --wall-period: #93c5fd;
    --wall-period-current: #7dd3fc;
    --wall-card-unassigned-border: #ea580c;
    --wall-card-unassigned-bar: #fb923c;
    --wall-card-unlinked-border: #ca8a04;
    --wall-card-unlinked-bar: #facc15;
    --wall-card-cancelled-border: #e07a90;
    --wall-card-cancelled-bar: #f0a8b6;
    --wall-flag-bg: rgba(251, 146, 60, 0.18);
    --wall-flag-text: #fdba74;
    --wall-status-covered-bg: rgba(125, 211, 252, 0.16);
    --wall-status-covered-text: #bae6fd;
    --wall-status-unassigned-bg: rgba(251, 146, 60, 0.18);
    --wall-status-unassigned-text: #fdba74;
    --wall-status-unlinked-bg: rgba(250, 204, 21, 0.16);
    --wall-status-unlinked-text: #fde68a;
    --wall-status-cancelled-bg: rgba(224, 122, 144, 0.2);
    --wall-status-cancelled-text: #f9c6d1;
    --wall-staff-bg: rgba(96, 165, 250, 0.18);
    --wall-staff-text: #bfdbfe;
    --wall-scheme: dark;
}

body.wall-board-page[data-wall-theme="navy"] {
    --wall-bg: #07111f;
    --wall-text: #e6edf7;
    --wall-muted: #8fa0b8;
    --wall-title: #f6f8fc;
    --wall-surface: #121c2e;
    --wall-surface-2: #0c1524;
    --wall-border: rgba(212, 175, 55, 0.18);
    --wall-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --wall-kpi-unassigned: #fb923c;
    --wall-kpi-unlinked: #e4c55a;
    --wall-kpi-covered: #d4af37;
    --wall-action-hover: #1a2436;
    --wall-column-alert: #d4af37;
    --wall-count-bg: #1a2436;
    --wall-count-text: #e4c55a;
    --wall-period: #8b9aab;
    --wall-period-current: #d4af37;
    --wall-card-unassigned-border: #c2410c;
    --wall-card-unassigned-bar: #f97316;
    --wall-card-unlinked-border: #d4af37;
    --wall-card-unlinked-bar: #e4c55a;
    --wall-card-cancelled-border: #be5670;
    --wall-card-cancelled-bar: #e07a90;
    --wall-flag-bg: rgba(212, 175, 55, 0.14);
    --wall-flag-text: #e4c55a;
    --wall-status-covered-bg: rgba(212, 175, 55, 0.16);
    --wall-status-covered-text: #e4c55a;
    --wall-status-unassigned-bg: rgba(249, 115, 22, 0.18);
    --wall-status-unassigned-text: #fdba74;
    --wall-status-unlinked-bg: rgba(212, 175, 55, 0.14);
    --wall-status-unlinked-text: #e4c55a;
    --wall-status-cancelled-bg: rgba(224, 122, 144, 0.16);
    --wall-status-cancelled-text: #f4b4c2;
    --wall-staff-bg: rgba(212, 175, 55, 0.12);
    --wall-staff-text: #e4c55a;
    --wall-scheme: dark;
}

body.wall-board-page .app-content-minimal {
    flex: 1;
    min-height: 100vh;
    padding: 0;
}

.wall-board {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    padding: 0.85rem 1rem 0.75rem;
}

.wall-board-top {
    align-items: center;
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr) minmax(11rem, auto);
    grid-template-areas: 'brand kpis meta';
    margin-bottom: 0.75rem;
}

.wall-board-brand {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    grid-area: brand;
    min-width: 0;
}

.wall-board-home {
    align-items: center;
    border-radius: 0.55rem;
    display: inline-flex;
    flex-shrink: 0;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.wall-board-home:hover {
    background: var(--wall-action-hover);
    opacity: 0.92;
}

.wall-board-logo {
    display: block;
    height: 2.2rem;
    width: auto;
}

.wall-board-title {
    color: var(--wall-title);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.wall-board-date-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.wall-board-date {
    color: var(--wall-muted);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    min-width: 9.5rem;
    text-align: center;
}

.wall-board-date-btn,
.wall-board-date-today {
    background: var(--wall-surface);
    border: 1px solid var(--wall-border);
    border-radius: 999px;
    color: var(--wall-text);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.18rem 0.5rem;
    text-decoration: none;
}

.wall-board-date-btn {
    font-size: 1rem;
    min-width: 1.65rem;
    padding: 0.12rem 0.45rem;
    text-align: center;
}

.wall-board-date-btn:hover,
.wall-board-date-today:hover {
    background: var(--wall-action-hover);
    color: var(--wall-title);
}

.wall-board-date-today {
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    margin-left: 0.15rem;
    text-transform: uppercase;
}

.wall-board-kpis {
    display: grid;
    gap: 0.55rem;
    grid-area: kpis;
    grid-template-columns: repeat(var(--wall-kpi-count, 4), minmax(0, 1fr));
    justify-self: start;
    max-width: 100%;
    width: 100%;
}

.wall-board-kpi {
    background: var(--wall-surface);
    border: 1px solid var(--wall-border);
    border-radius: 0.7rem;
    box-shadow: var(--wall-shadow);
    padding: 0.55rem 0.7rem;
}

.wall-board-kpi.is-alert {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), var(--wall-shadow);
}

.wall-board-kpi strong {
    color: var(--wall-title);
    display: block;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
}

.wall-board-kpi span {
    color: var(--wall-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.wall-board-kpi-unassigned strong {
    color: var(--wall-kpi-unassigned);
}

.wall-board-kpi-unlinked strong {
    color: var(--wall-kpi-unlinked);
}

.wall-board-kpi-covered strong {
    color: var(--wall-kpi-covered);
}

.wall-board-meta {
    grid-area: meta;
    justify-self: end;
    text-align: right;
}

.wall-board-clock {
    color: var(--wall-title);
    font-size: 1.7rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.wall-board-updated {
    color: var(--wall-muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.wall-board-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    margin-top: 0.45rem;
}

.wall-board-action {
    background: var(--wall-surface);
    border: 1px solid var(--wall-border);
    border-radius: 999px;
    color: var(--wall-text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.22rem 0.7rem;
    text-decoration: none;
}

.wall-board-action:hover,
.wall-board-action.is-active {
    background: var(--wall-action-hover);
    color: var(--wall-title);
}

.wall-view-toggle {
    display: flex;
    overflow: hidden;
}

.wall-view-toggle .wall-board-action {
    border-radius: 0;
}

.wall-view-toggle .wall-board-action:first-child {
    border-bottom-left-radius: 999px;
    border-top-left-radius: 999px;
}

.wall-view-toggle .wall-board-action:last-child {
    border-bottom-right-radius: 999px;
    border-left: 0;
    border-top-right-radius: 999px;
}

.wall-board-period-filter {
    display: inline-flex;
    margin: 0;
}

.wall-board-period-select {
    appearance: auto;
    cursor: pointer;
    max-width: 9.5rem;
    padding-right: 1.6rem;
}

.wall-board-tts-toggle {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 0.35rem;
    user-select: none;
}

.wall-board-tts-toggle input {
    accent-color: #ef4444;
    cursor: pointer;
    height: 0.9rem;
    margin: 0;
    width: 0.9rem;
}

.wall-board[data-wall-show-tts-warnings="1"] .wall-board-tts-toggle {
    background: var(--wall-action-hover);
    color: var(--wall-title);
}

.wall-theme-menu {
    position: relative;
}

.wall-refresh-menu {
    position: relative;
}

.wall-refresh-panel {
    background: var(--wall-surface);
    border: 1px solid var(--wall-border);
    border-radius: 0.7rem;
    box-shadow: var(--wall-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 7rem;
    padding: 0.4rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 20;
}

.wall-refresh-panel button {
    background: transparent;
    border: 0;
    border-radius: 0.45rem;
    color: var(--wall-text);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.45rem;
    text-align: left;
}

.wall-refresh-panel button:hover,
.wall-refresh-panel button.is-active {
    background: var(--wall-action-hover);
}

.wall-theme-menu > summary {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 0.3rem;
    list-style: none;
}

.wall-theme-menu > summary::-webkit-details-marker {
    display: none;
}

.wall-theme-panel {
    background: var(--wall-surface);
    border: 1px solid var(--wall-border);
    border-radius: 0.7rem;
    box-shadow: var(--wall-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 8.5rem;
    padding: 0.4rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 20;
}

.wall-theme-panel button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0.45rem;
    color: var(--wall-text);
    display: flex;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.45rem;
    padding: 0.35rem 0.45rem;
    text-align: left;
}

.wall-theme-panel button:hover,
.wall-theme-panel button.is-active {
    background: var(--wall-action-hover);
}

.wall-theme-swatch {
    border: 1px solid var(--wall-border);
    border-radius: 999px;
    display: inline-block;
    height: 0.85rem;
    width: 0.85rem;
}

.wall-theme-swatch.is-light {
    background: #eef1f6;
}

.wall-theme-swatch.is-dark {
    background: #0b111c;
}

.wall-theme-swatch.is-blue {
    background: #1d4e89;
}

.wall-theme-swatch.is-navy {
    background: linear-gradient(135deg, #0b111c 50%, #d4af37 50%);
}

.wall-board-columns {
    display: none;
    flex: 1;
    gap: 0.65rem;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

body[data-wall-view="runs"] .wall-board-columns[data-wall-view-panel="runs"],
body:not([data-wall-view]) .wall-board-columns[data-wall-view-panel="runs"],
body[data-wall-view="staff"] .wall-board-columns[data-wall-view-panel="staff"] {
    display: flex;
}

.wall-board-columns > .wall-board-empty {
    flex: 1;
}

.wall-board-column {
    background: var(--wall-surface-2);
    border: 1px solid var(--wall-border);
    border-radius: 0.85rem;
    display: flex;
    flex: 1 0 17rem;
    flex-direction: column;
    min-width: 16.5rem;
    overflow: hidden;
}

.wall-board-column-head {
    align-items: center;
    background: var(--wall-surface);
    border-bottom: 1px solid var(--wall-border);
    cursor: grab;
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    padding: 0.7rem 0.6rem;
    text-align: center;
    user-select: none;
}

.wall-board-column-head:active {
    cursor: grabbing;
}

.wall-board-column-grip {
    color: var(--wall-muted);
    flex-shrink: 0;
    font-size: 0.72rem;
    letter-spacing: -0.12em;
    line-height: 1;
    opacity: 0.65;
}

.wall-board-column.is-column-dragging {
    opacity: 0.55;
}

.wall-board-column.is-column-drop-target .wall-board-column-head {
    box-shadow: inset 0 -3px 0 var(--wall-period-current);
}

.wall-board-column-head h2 {
    color: var(--wall-title);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.wall-board-column-count {
    background: var(--wall-count-bg);
    border-radius: 999px;
    color: var(--wall-count-text);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 1.5rem;
    padding: 0.1rem 0.45rem;
    text-align: center;
}

.wall-board-column-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.55rem;
}

.wall-board-period + .wall-board-period {
    margin-top: 0.7rem;
}

.wall-board-period-label {
    background: var(--wall-period);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin: 0 -0.55rem 0.5rem;
    padding: 0.4rem 0.55rem;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
    text-transform: uppercase;
}

.wall-board-period:first-child .wall-board-period-label {
    margin-top: -0.55rem;
}

.wall-board-period[data-wall-period="am"] .wall-board-period-label {
    background: var(--wall-period-am);
}

.wall-board-period[data-wall-period="lunch"] .wall-board-period-label {
    background: var(--wall-period-lunch);
}

.wall-board-period[data-wall-period="tea"] .wall-board-period-label {
    background: var(--wall-period-tea);
}

.wall-board-period[data-wall-period="pm"] .wall-board-period-label {
    background: var(--wall-period-pm);
}

.wall-board-period.is-current .wall-board-period-label {
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.55);
}

.wall-board-column-empty,
.wall-board-empty {
    color: var(--wall-muted);
    font-size: 0.9rem;
    padding: 1.5rem 0.5rem;
    text-align: center;
}

.wall-board-column.is-drop-target {
    box-shadow: 0 0 0 2px var(--wall-period-current);
}

.wall-card {
    background: var(--wall-surface);
    border: 1px solid var(--wall-border);
    border-radius: 0.7rem;
    box-shadow: var(--wall-shadow);
    cursor: grab;
    margin-bottom: 0.45rem;
    padding: 0.6rem 0.65rem 0.55rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.wall-card.is-flagged {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px #ef4444, var(--wall-shadow);
}

.wall-card.is-flagged:hover {
    box-shadow: 0 0 0 2px #ef4444, var(--wall-shadow);
}

.wall-card:hover {
    box-shadow: 0 0 0 1px var(--wall-border), var(--wall-shadow);
}

.wall-card.is-dragging {
    cursor: grabbing;
    opacity: 0.55;
    transform: scale(0.98);
}

.wall-card-unassigned {
    border-color: var(--wall-card-unassigned-border);
    box-shadow: inset 3px 0 0 var(--wall-card-unassigned-bar);
}

.wall-card-unlinked {
    border-color: var(--wall-card-unlinked-border);
    box-shadow: inset 3px 0 0 var(--wall-card-unlinked-bar);
}

.wall-card-cancelled {
    border-color: var(--wall-card-cancelled-border);
    box-shadow: inset 3px 0 0 var(--wall-card-cancelled-bar);
    cursor: pointer;
    opacity: 0.88;
}

.wall-card-cancelled .wall-card-name {
    text-decoration: line-through;
}

.wall-card-top {
    align-items: flex-start;
    display: flex;
    gap: 0.4rem;
    justify-content: space-between;
}

.wall-card-main {
    flex: 1;
    min-width: 0;
}

.wall-card-name {
    color: var(--wall-title);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.wall-card-badges {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0.18rem;
}

.wall-card-mins {
    color: var(--wall-muted);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.wall-card-flag {
    background: var(--wall-flag-bg);
    border-radius: 999px;
    color: var(--wall-flag-text);
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 800;
    height: 0.95rem;
    justify-content: center;
    margin-left: 0.2rem;
    min-width: 0.95rem;
    vertical-align: middle;
}

.wall-card-tts-warning {
    color: #ef4444;
    display: none;
    height: 1rem;
    margin-left: 0.28rem;
    vertical-align: -0.12rem;
    width: 1rem;
}

.wall-card-tts-warning svg {
    display: block;
    height: 100%;
    width: 100%;
}

.wall-board[data-wall-show-tts-warnings="1"] .wall-card-tts-warning {
    display: inline-block;
}

.wall-card-outcomes {
    align-items: center;
    display: flex;
    gap: 0.2rem;
}

.wall-card-outcome {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    justify-content: center;
}

.wall-card-outcome svg {
    display: block;
    height: 0.95rem;
    width: 0.95rem;
}

.wall-card-outcome.is-complete {
    background: #22c55e;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.38);
    color: #fff;
    height: 1.4rem;
    width: 1.4rem;
}

.wall-card-outcome.is-complete svg {
    height: 0.95rem;
    width: 0.95rem;
}

.wall-card-outcome.is-flagged {
    background: #ef4444;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.38);
    color: #fff;
    height: 1.4rem;
    width: 1.4rem;
}

.wall-card-outcome.is-flagged svg {
    height: 0.88rem;
    width: 0.88rem;
}

.wall-card-status {
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.18rem 0.45rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.wall-card-status-covered {
    background: var(--wall-status-covered-bg);
    color: var(--wall-status-covered-text);
}

.wall-card-status-unassigned {
    background: var(--wall-status-unassigned-bg);
    color: var(--wall-status-unassigned-text);
}

.wall-card-status-unlinked {
    background: var(--wall-status-unlinked-bg);
    color: var(--wall-status-unlinked-text);
}

.wall-card-status-cancelled {
    background: var(--wall-status-cancelled-bg);
    color: var(--wall-status-cancelled-text);
}

.wall-card-cancel-note {
    color: var(--wall-muted);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0.4rem 0 0;
}

.wall-card-meta {
    color: var(--wall-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    gap: 0.12rem;
    margin-top: 0.35rem;
}

.wall-card-staff {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.45rem;
}

.wall-card-staff-name {
    background: var(--wall-staff-bg);
    border-radius: 999px;
    color: var(--wall-staff-text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
}

.wall-card-staff-missing {
    color: var(--wall-kpi-unassigned);
    font-size: 0.72rem;
    font-weight: 600;
}

body:not(.wall-board-page) #wallCallModal {
    --wall-text: var(--ohc-text);
    --wall-muted: var(--ohc-muted);
    --wall-title: var(--ohc-text);
    --wall-surface: var(--ohc-surface);
    --wall-surface-2: var(--ohc-surface-2);
    --wall-border: var(--ohc-border);
}

#wallCallModal .btn-close {
    opacity: 1;
}

body:not(.wall-board-page) #wallCallModal .btn-close,
body.wall-board-page[data-wall-theme="dark"] #wallCallModal .btn-close,
body.wall-board-page[data-wall-theme="blue"] #wallCallModal .btn-close,
body.wall-board-page[data-wall-theme="navy"] #wallCallModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(220%);
    opacity: 1;
}

.wall-call-modal-dialog .modal-content {
    background: var(--wall-surface);
    color: var(--wall-text);
}

.wall-call-panel {
    background: var(--wall-surface-2);
    border: 1px solid var(--wall-border);
    border-radius: 0.75rem;
    padding: 0.85rem;
}

.wall-call-panel-title {
    color: var(--wall-title);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.55rem;
    text-transform: uppercase;
}

.wall-call-alias-results {
    max-height: 12rem;
    overflow-y: auto;
}

#wallCallModal [data-wall-edit-call-actions] .btn-outline-light {
    border-color: var(--wall-border);
    color: var(--wall-text);
}

#wallCallModal [data-wall-edit-call-actions] .btn-outline-light:hover,
#wallCallModal [data-wall-edit-call-actions] .btn-outline-light:focus-visible {
    background: var(--wall-surface);
    border-color: var(--wall-title);
    color: var(--wall-title);
}

.wall-call-right-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wall-call-tabs {
    background: var(--wall-count-bg, #ece8f6);
    border-radius: 1rem;
    display: grid;
    flex-shrink: 0;
    gap: 0.22rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0.85rem;
    padding: 0.22rem;
}

.wall-call-tab {
    background: transparent;
    border: 0;
    border-radius: 0.82rem;
    color: var(--wall-title, #152033);
    font: inherit;
    font-size: 1.02rem;
    font-weight: 800;
    min-height: 2.75rem;
    padding: 0.45rem 0.75rem;
}

.wall-call-tab.is-active {
    background: #6d5aa8;
    box-shadow: 0 1px 3px rgba(61, 47, 107, 0.22);
    color: #fff;
}

.wall-call-tab:hover,
.wall-call-tab:focus-visible {
    outline: none;
}

.wall-call-tab:not(.is-active):hover,
.wall-call-tab:not(.is-active):focus-visible {
    background: rgba(109, 90, 168, 0.16);
}

.wall-call-tts-body,
.wall-call-history-body {
    flex: 1;
    max-height: 32rem;
    min-height: 12rem;
    overflow-y: auto;
}

.wall-call-history-body .staff-rota-history-intro,
.wall-call-history-body .staff-rota-history-empty,
.wall-call-history-body .text-muted {
    color: var(--wall-muted, #6b7280);
}

body:not(.wall-board-page) #wallCallModal .wall-call-tabs {
    background: var(--ohc-surface-2, #ece8f6);
}

.wall-call-complete .btn-success {
    background: #157347;
    border-color: #146c43;
}

@media (max-width: 1400px) {
    .wall-board-top {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            'brand meta'
            'kpis kpis';
    }

    .wall-board-kpis {
        grid-template-columns: repeat(var(--wall-kpi-count, 4), minmax(5.4rem, 1fr));
        max-width: 42rem;
    }

    .wall-board-kpi strong {
        font-size: 1.35rem;
    }

    .wall-board-clock {
        font-size: 1.45rem;
    }
}

@media (max-width: 1100px) {
    .wall-board-top {
        gap: 0.65rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            'brand'
            'meta'
            'kpis';
    }

    .wall-board-meta {
        justify-self: start;
        text-align: left;
    }

    .wall-board-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .wall-board-kpis {
        grid-template-columns: repeat(var(--wall-kpi-count, 4), minmax(4.8rem, 1fr));
        max-width: none;
        width: 100%;
    }

    .wall-board-kpi {
        padding: 0.45rem 0.55rem;
    }

    .wall-board-kpi strong {
        font-size: 1.2rem;
    }

    .wall-board-kpi span {
        font-size: 0.64rem;
    }
}

@media (max-width: 720px) {
    .wall-board-kpis {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .wall-board-kpi {
        flex: 1 1 calc(33.333% - 0.4rem);
        min-width: 5.5rem;
    }

    .wall-board-title {
        font-size: 1.15rem;
    }

    .wall-board-date {
        font-size: 0.8rem;
        min-width: 0;
    }
}

.schedule-import-status-btn {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    background: var(--ohc-surface-2);
    color: var(--ohc-text);
    text-align: left;
}

.schedule-import-status-btn:hover:not(:disabled),
.schedule-import-status-btn:focus-visible {
    border-color: var(--ohc-accent);
    outline: none;
}

.schedule-import-status-btn:disabled {
    opacity: 0.85;
    cursor: default;
}

.schedule-import-status-kind {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ohc-accent);
}

.schedule-import-status-btn[data-kind="pending"] .schedule-import-status-kind,
.schedule-import-status-btn[data-kind="running"] .schedule-import-status-kind {
    color: var(--ohc-accent-hover);
}

.schedule-import-status-btn[data-kind="failed"] .schedule-import-status-kind {
    color: #e07a90;
}

.schedule-import-status-label {
    flex: 1 1 12rem;
    font-weight: 600;
}

.schedule-import-status-hint {
    font-size: 0.75rem;
    color: var(--ohc-muted);
}

.schedule-import-table tbody tr.is-clickable {
    cursor: pointer;
}

.schedule-import-table tbody tr.is-clickable:hover td {
    background: rgba(91, 62, 166, 0.08);
}

.schedule-import-table tr.is-pending td:last-child {
    color: var(--ohc-accent);
    font-weight: 600;
}

.schedule-import-issue-list,
.schedule-import-log {
    margin: 0;
    padding-left: 1.1rem;
}

.schedule-import-issue-list li,
.schedule-import-log li {
    margin-bottom: 0.25rem;
}

.schedule-import-link-name {
    color: var(--ohc-accent);
    text-decoration: none;
    font-weight: 600;
}

.schedule-import-link-name:hover {
    color: var(--ohc-accent-hover);
    text-decoration: underline;
}

.schedule-import-issue-list {
    list-style: none;
    padding-left: 0;
}

.schedule-import-issue-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    margin: 0 0 0.55rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    background: var(--ohc-surface-2);
    color: inherit;
    text-align: left;
}

.schedule-import-issue-btn:hover,
.schedule-import-issue-btn:focus-visible {
    border-color: var(--ohc-accent);
    outline: none;
}

.schedule-import-issue-name {
    color: var(--ohc-accent);
    font-weight: 700;
}

.schedule-import-issue-meta {
    font-size: 0.8rem;
    color: var(--ohc-muted);
}

.schedule-import-staff-issue {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem 0.6rem;
    margin-bottom: 0.55rem;
}

.schedule-import-staff-issue .schedule-import-issue-btn {
    flex: 1 1 12rem;
    margin-bottom: 0;
    width: auto;
}

.schedule-import-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.schedule-import-tab {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
}

.schedule-import-tab.is-active {
    background: var(--ohc-accent);
    border-color: var(--ohc-accent);
    color: #fff;
}

.schedule-import-rota-day + .schedule-import-rota-day {
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--ohc-border);
}

.schedule-import-coverage-item {
    margin-bottom: 0.7rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    background: var(--ohc-surface-2);
}

.schedule-import-coverage-title {
    font-weight: 700;
}

.schedule-import-coverage-meta {
    font-size: 0.8rem;
    color: var(--ohc-muted);
    margin: 0.15rem 0 0.35rem;
}

.schedule-import-coverage-names {
    font-size: 0.82rem;
    line-height: 1.4;
}

.schedule-import-rota-preview {
    flex: 1 1 14rem;
    min-width: 12rem;
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    background: var(--ohc-surface-2);
    padding: 0.35rem 0.6rem;
}

.schedule-import-rota-preview summary {
    cursor: pointer;
    color: var(--ohc-accent);
    font-size: 0.82rem;
    font-weight: 600;
    list-style-position: inside;
}

.schedule-import-rota-preview-body {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--ohc-border);
}

.schedule-import-rota-period {
    font-size: 0.8rem;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.schedule-import-rota-period:last-child {
    margin-bottom: 0;
}

.schedule-import-rota-preview-modal {
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    background: var(--ohc-surface-2);
    padding: 0.65rem 0.75rem;
}

.workbook-import-preview {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    padding: 1rem 1.1rem;
}

.workbook-import-summary {
    color: var(--ohc-text);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.workbook-import-note {
    color: var(--ohc-muted);
    font-size: 0.86rem;
    margin: 0 0 0.85rem;
}

.workbook-import-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.workbook-import-count {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-text);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
}

.workbook-import-count.is-alert {
    border-color: rgba(220, 53, 69, 0.45);
    color: #ffb4b4;
}

.workbook-import-issues h3 {
    color: var(--ohc-text);
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0.85rem 0 0.35rem;
}

.workbook-import-issues ul {
    margin: 0;
    padding-left: 1.1rem;
}

.workbook-import-issues li {
    color: var(--ohc-muted);
    font-size: 0.86rem;
    margin-bottom: 0.2rem;
}

.workbook-import-issues a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.workbook-import-issues a:hover {
    color: var(--ohc-text);
}

.workbook-import-block {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.45);
    border-radius: var(--ohc-radius);
    color: #ffb4b4;
    margin: 0 0 0.9rem;
    padding: 0.9rem 1rem;
}

.workbook-import-block-title {
    color: #ffd0d0;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.workbook-import-block p {
    color: #ffc9c9;
    font-size: 0.92rem;
    margin: 0;
}

.workbook-import-block.is-warn {
    background: rgba(214, 158, 46, 0.12);
    border-color: rgba(214, 158, 46, 0.5);
    color: #f3d59a;
}

.workbook-import-block.is-warn .workbook-import-block-title {
    color: #ffe3a3;
}

.workbook-import-block.is-warn p {
    color: #f6dfb0;
}

.workbook-import-ack {
    align-items: flex-start;
    display: flex;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.workbook-import-ack input {
    margin-top: 0.2rem;
}

.workbook-import-ack label {
    color: inherit;
    font-size: 0.92rem;
}

.workbook-import-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 1rem;
}

.workbook-import-actions-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.workbook-import-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.workbook-import-actions-undo {
    justify-content: center;
}

.workbook-import-actions-nav {
    justify-content: flex-end;
}

.import-history-details > summary {
    cursor: pointer;
    list-style: none;
}

.import-history-details > summary::-webkit-details-marker {
    display: none;
}

.import-history-details > summary .content-panel-title::after {
    content: ' ▾';
    font-weight: 400;
    opacity: 0.65;
}

.import-history-details:not([open]) > summary .content-panel-title::after {
    content: ' ▸';
}

.import-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.import-history-card.is-undone {
    opacity: 0.72;
}

.import-history-card-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.import-history-card-meta {
    flex: 1;
    min-width: 0;
}

.import-history-week {
    color: var(--ohc-text);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .import-history-card-head {
        align-items: flex-end;
        flex-direction: column-reverse;
        gap: 0.45rem;
    }

    .import-history-week {
        font-size: 1.35rem;
    }
}

.rotas-top-row {
    align-items: stretch;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
}

.rotas-top-import,
.rotas-top-email {
    min-width: 0;
}

.rotas-top-import .import-history-list {
    max-height: 14rem;
    overflow: auto;
}

.rotas-top-import .import-history-week {
    font-size: 1.15rem;
}

.rotas-top-import .workbook-import-note,
.rotas-top-import .workbook-import-issues,
.rotas-top-import .workbook-import-counts {
    font-size: 0.78rem;
}

.rotas-top-import .workbook-import-actions .btn {
    font-size: 0.78rem;
    padding: 0.28rem 0.55rem;
}

.rota-email-list {
    display: grid;
    gap: 0.45rem;
    max-height: min(55vh, 28rem);
    overflow: auto;
}

.rota-email-preview-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rota-email-preview-row .form-control {
    flex: 1 1 14rem;
    min-width: 12rem;
}

.rota-email-row {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.65rem;
    display: flex;
    gap: 0.65rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
}

.rota-email-row input[type="checkbox"] {
    margin-top: 0.35rem;
}

.rota-email-row-main {
    display: grid;
    flex: 1 1 auto;
    gap: 0.35rem;
    min-width: 0;
}

.rota-email-row-main strong {
    font-size: 0.92rem;
}

.rota-email-row-main .form-control {
    max-width: 28rem;
}

@media (max-width: 900px) {
    .rotas-top-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .workbook-import-actions-split {
        grid-template-columns: 1fr;
    }

    .workbook-import-actions-nav {
        justify-content: flex-start;
    }
}

.workbook-last-week-runs {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.workbook-last-week-run {
    align-items: center;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.4rem 0.7rem;
}

.workbook-last-week-run-name {
    font-weight: 600;
}

.workbook-last-week-run-meta {
    color: var(--ohc-muted);
    font-size: 0.82rem;
}

.workbook-last-week-run-remove {
    background: transparent;
    border: 0;
    color: var(--ohc-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.15rem;
}

.workbook-last-week-run-remove:hover,
.workbook-last-week-run-remove:focus-visible {
    color: var(--ohc-text);
    outline: none;
}

.workbook-last-week-available {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

#run_alias_modal,
#staff_rota_alias_modal,
#runs2ClientReviewModal {
    z-index: 1075;
}

body.modal-open > .modal-backdrop ~ .modal-backdrop {
    z-index: 1070;
}

body.modal-open > .modal-backdrop ~ .modal-backdrop ~ .modal-backdrop {
    z-index: 1080;
}

.staff-portal-flash {
    margin: 0.75rem 0.85rem 0;
}

body.staff-rota-page .staff-portal-flash {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

body.staff-rota-page .staff-portal-flash.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.staff-portal-app {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.staff-rota-app.staff-portal-app {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

.staff-rota-app.staff-portal-app > .staff-portal-chrome {
    margin-bottom: 0.1rem;
}

.staff-rota-app.staff-portal-app > *:not(.staff-portal-chrome) {
    margin-left: 0.85rem;
    margin-right: 0.85rem;
}

.staff-portal-head h1 {
    color: #152033;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
}

.staff-portal-head p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.2rem 0 0;
}

.staff-portal-back {
    color: #6d5aa8;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    text-decoration: none;
}

.staff-portal-cards {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.staff-portal-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(28, 36, 48, 0.05);
    color: inherit;
    display: flex;
    gap: 0.8rem;
    padding: 0.95rem 0.9rem;
    text-decoration: none;
}

button.staff-portal-card,
.staff-portal-cards > form {
    width: 100%;
}

button.staff-portal-card {
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.staff-portal-lead {
    color: #6b7280;
    margin: 0 0 0.85rem;
}

.staff-portal-card-icon {
    align-items: center;
    background: #ece8f6;
    border-radius: 0.85rem;
    color: #6d5aa8;
    display: inline-flex;
    flex-shrink: 0;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.staff-portal-card-icon svg {
    height: 1.2rem;
    width: 1.2rem;
}

.staff-portal-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.staff-portal-card-body strong {
    color: #152033;
    font-size: 1.02rem;
    font-weight: 800;
}

.staff-portal-card-body span {
    color: #6b7280;
    font-size: 0.86rem;
}

.staff-portal-card-chevron {
    color: #c4b8e0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.staff-portal-card-count {
    background: #6d5aa8;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 1.4rem;
    padding: 0.15rem 0.45rem;
    text-align: center;
}

.staff-portal-card.is-signout {
    color: #9f1239;
}

.staff-portal-card.is-signout .staff-portal-card-icon {
    background: #fde8ea;
    color: #9f1239;
}

.staff-portal-empty,
.staff-portal-muted {
    color: #6b7280;
    margin: 0;
}

.staff-portal-panel {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(28, 36, 48, 0.05);
    padding: 0.95rem 0.9rem;
}

.staff-portal-panel h2 {
    color: #152033;
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.7rem;
}

.staff-portal-stats {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-portal-stat {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.8rem;
}

.staff-portal-stat span {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
}

.staff-portal-stat strong {
    color: #152033;
    font-size: 1.15rem;
    font-weight: 800;
}

.staff-portal-label {
    color: #374151;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0.85rem 0 0.35rem;
}

.staff-portal-help {
    color: #6b7280;
    font-size: 0.78rem;
    margin-top: 0.4rem;
}

.staff-portal-btn-primary,
.staff-portal-btn-secondary {
    border: 0;
    border-radius: 0.85rem;
    font-weight: 700;
}

.staff-portal-btn-primary {
    background: #6d5aa8;
    color: #fff;
    margin-top: 0.9rem;
    padding: 0.7rem 1rem;
    width: 100%;
}

.staff-portal-btn-secondary {
    background: #ece8f6;
    color: #6d5aa8;
    padding: 0.35rem 0.75rem;
}

body.staff-rota-page .staff-portal-date-picker {
    background: #f7f5fb;
    border-color: #ece8f6;
}

body.staff-rota-page .form-control,
body.staff-rota-page .staff-message-compose textarea {
    background: #fff;
    border-color: #d1d5db;
    color: #152033;
}

body.staff-rota-page .form-control:focus,
body.staff-rota-page .staff-message-compose textarea:focus {
    background: #fff;
    border-color: #6d5aa8;
    box-shadow: 0 0 0 0.15rem rgba(109, 90, 168, 0.18);
    color: #152033;
}

body.staff-rota-page .form-control::placeholder,
body.staff-rota-page .staff-message-compose textarea::placeholder {
    color: #9ca3af;
}

body.staff-rota-page .holidays-date-chip {
    background: #ece8f6;
    border: 0;
    color: #4c3d7a;
}

body.staff-rota-page .holidays-date-chip-remove {
    color: #6d5aa8;
}

body.staff-rota-page .holiday-status-pending {
    background: #fef3c7;
    color: #92400e;
}

body.staff-rota-page .holiday-status-approved {
    background: #dcfce7;
    color: #166534;
}

body.staff-rota-page .holiday-status-denied {
    background: #fee2e2;
    color: #991b1b;
}

.staff-portal-request-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.staff-portal-request {
    background: #f8f9fb;
    border-radius: 0.85rem;
    padding: 0.75rem 0.8rem;
}

.staff-portal-request-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.staff-portal-request-dates {
    color: #152033;
    font-weight: 700;
}

.staff-portal-request p {
    color: #6b7280;
    font-size: 0.86rem;
    margin: 0.3rem 0 0;
}

.staff-portal-placeholder {
    color: #6b7280;
    padding: 1.4rem 0.5rem;
    text-align: center;
}

.staff-portal-placeholder-icon {
    color: #6d5aa8;
    display: inline-flex;
    height: 2.2rem;
    margin-bottom: 0.55rem;
    width: 2.2rem;
}

.staff-portal-placeholder h2 {
    margin-bottom: 0.35rem;
}

.staff-portal-placeholder p {
    margin: 0;
}

.staff-portal-messages {
    min-height: 0;
}

html:has(body.staff-messages-page),
body.staff-messages-page,
body.staff-messages-page .app-content-minimal {
    height: 100%;
    overflow: hidden;
}

body.staff-messages-page {
    --staff-compose-height: 4.2rem;
    height: 100dvh;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
}

body.staff-messages-page .staff-rota-app.staff-portal-messages {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    max-width: none;
    min-height: 0;
    overflow: hidden;
    padding: 0 0 var(--staff-nav-height);
    width: 100%;
}

body.staff-messages-page [data-messages-live] {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.staff-portal-chrome,
.staff-message-chrome {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    display: flex;
    flex-shrink: 0;
    gap: 0.45rem;
    min-height: 3.45rem;
    padding: calc(0.45rem + env(safe-area-inset-top, 0px)) 0.7rem 0.45rem;
}

.staff-portal-chrome-back,
.staff-message-chrome-back {
    align-items: center;
    color: #6d5aa8;
    display: inline-flex;
    flex-shrink: 0;
    height: 2.55rem;
    justify-content: center;
    margin-left: -0.35rem;
    text-decoration: none;
    width: 2.55rem;
}

.staff-portal-chrome-back svg,
.staff-message-chrome-back svg {
    display: block;
    height: 1.7rem;
    width: 1.7rem;
}

.staff-portal-chrome strong,
.staff-message-chrome strong {
    color: #152033;
    font-size: 1.18rem;
    font-weight: 800;
}

body.staff-resource-page .staff-rota-app.staff-portal-app > .staff-portal-chrome {
    position: sticky;
    top: 0;
    z-index: 40;
}

body.staff-resource-page .staff-portal-chrome strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-resource-back {
    font-size: 0.95rem;
    font-weight: 800;
    gap: 0.05rem;
    width: auto;
}

.staff-resource-doc {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.staff-resource-doc canvas,
.staff-resource-doc img {
    background: #fff;
    border-radius: 0.35rem;
    box-shadow: 0 4px 14px rgba(28, 36, 48, 0.08);
    height: auto;
    width: 100%;
}

.staff-resource-status {
    color: #6b7280;
    font-size: 0.92rem;
    margin: 0.4rem 0 0;
}

.staff-message-inbox,
.staff-message-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.staff-message-inbox {
    position: relative;
}

.staff-message-inbox > .staff-message-list {
    padding-bottom: 4.5rem;
}

.staff-message-new {
    align-items: center;
    background: #6d5aa8;
    border: 0;
    border-radius: 999px;
    bottom: 0.9rem;
    box-shadow: 0 6px 16px rgba(45, 35, 80, 0.28);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.9rem;
    width: 3rem;
    z-index: 3;
}

.staff-message-inbox:has([data-staff-directory]:not([hidden])) .staff-message-new {
    display: none;
}

.staff-message-new svg {
    display: block;
    height: 1.35rem;
    width: 1.35rem;
}

.staff-message-directory {
    background: #f6f7fb;
    display: flex;
    flex-direction: column;
    inset: 0;
    min-height: 0;
    position: absolute;
    z-index: 4;
}

.staff-message-directory[hidden] {
    display: none !important;
}

.staff-message-directory-chrome {
    gap: 0.45rem;
}

.staff-message-directory-chrome .staff-message-chrome-back {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.staff-message-directory-search {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 999px;
    flex: 1;
    font-size: 1rem;
    min-width: 0;
    padding: 0.4rem 0.85rem;
}

.staff-message-directory-search:focus {
    border-color: #6d5aa8;
    outline: none;
}

.staff-message-unavailable {
    background: #fff;
    border-top: 1px solid #e8ecf1;
    color: #6b7280;
    flex-shrink: 0;
    font-size: 0.88rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    text-align: center;
}

.staff-message-list {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.staff-message-list::-webkit-scrollbar {
    display: none;
}

.staff-message-person {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eef1f4;
    color: inherit;
    display: flex;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    text-decoration: none;
}

.staff-message-person.is-unread .staff-message-person-name {
    color: #6d5aa8;
}

.staff-message-person-avatar {
    align-items: center;
    background: #ece8f6;
    border-radius: 999px;
    color: #6d5aa8;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 800;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.staff-message-person-avatar.is-office {
    background: #6d5aa8;
    color: #fff;
}

.staff-message-person-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.staff-message-person-name {
    color: #152033;
    font-weight: 800;
}

.staff-message-person-preview {
    color: #6b7280;
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-message-person-meta {
    align-items: flex-end;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    gap: 0.25rem;
}

.staff-message-person-unread {
    background: #6d5aa8;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    min-width: 1.2rem;
    padding: 0.05rem 0.35rem;
    text-align: center;
}

.staff-message-thread {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.65rem;
    max-height: calc(100vh - 18rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.7rem 0.75rem 0.5rem;
    scrollbar-width: none;
}

.staff-message-thread::-webkit-scrollbar {
    display: none;
}

body.staff-messages-page .staff-message-thread {
    max-height: none;
    min-height: 0;
    padding-bottom: calc(var(--staff-compose-height) + 0.5rem);
}

body.staff-messages-page .staff-message-compose,
body.staff-messages-page .staff-message-unavailable {
    bottom: var(--staff-nav-height);
    left: 0;
    position: fixed;
    right: 0;
    z-index: 45;
}

.message-day-rule {
    align-self: center;
    display: flex;
    justify-content: center;
    margin: 0.2rem 0;
    width: 100%;
}

.message-day-rule span {
    background: #ece8f6;
    border-radius: 999px;
    color: #4c3d7a;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.18rem 0.7rem;
}

.staff-message-bubble {
    border-radius: 0.95rem;
    max-width: 88%;
    padding: 0.65rem 0.8rem;
}

.staff-message-bubble.is-mine {
    align-self: flex-end;
    background: #6d5aa8;
    color: #fff;
}

.staff-message-bubble.is-office {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e8ecf1;
    color: #152033;
}

.staff-message-meta {
    align-items: center;
    display: flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    opacity: 0.8;
}

.staff-message-meta span {
    align-items: center;
    display: inline-flex;
    gap: 0.18rem;
}

.message-ticks {
    display: inline-flex;
    line-height: 0;
}

.message-ticks svg {
    display: block;
    height: 0.82rem;
    width: auto;
}

.staff-message-bubble.is-mine .message-ticks.is-sent {
    color: rgba(255, 255, 255, 0.72);
}

.staff-message-bubble.is-mine .message-ticks.is-read {
    color: #d7ecff;
}

.admin-message-bubble.is-mine .message-ticks.is-sent {
    color: var(--ohc-muted);
}

.admin-message-bubble.is-mine .message-ticks.is-read {
    color: var(--ohc-accent);
}

.staff-message-bubble p {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.staff-message-compose {
    align-items: flex-end;
    background: #fff;
    border: 0;
    border-radius: 0;
    border-top: 1px solid #e8ecf1;
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem 0.65rem;
}

.staff-message-compose textarea,
.admin-messages-compose textarea {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    flex: 1;
    min-height: 2.6rem;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    resize: none;
    width: 100%;
}

.staff-message-compose .staff-portal-btn-primary {
    margin-top: 0;
    width: auto;
}

body.admin-messages-page .app-shell,
body.admin-messages-page .app-main {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.admin-messages-page .app-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0.75rem !important;
    padding-top: 0.75rem !important;
}

.admin-messages {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.7rem;
    display: grid;
    flex: 1;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.admin-messages-list {
    border-right: 1px solid var(--ohc-border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-messages-new,
.admin-messages-search {
    padding: 0.85rem 0.85rem 0;
}

.admin-messages-search {
    padding-bottom: 0.7rem;
}

.admin-messages-people {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.admin-messages-person {
    border-top: 1px solid var(--ohc-border);
    color: inherit;
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    text-decoration: none;
}

.admin-messages-person.is-active {
    background: var(--ohc-surface-2);
}

.admin-messages-person.is-unread .admin-messages-person-name {
    color: var(--ohc-accent);
}

.admin-messages-person-name {
    font-weight: 700;
}

.admin-messages-person-preview {
    color: var(--ohc-muted);
    font-size: 0.82rem;
}

.admin-messages-person-meta {
    align-items: center;
    color: var(--ohc-muted);
    display: flex;
    font-size: 0.75rem;
    gap: 0.45rem;
    justify-content: space-between;
}

.admin-messages-unread {
    background: var(--ohc-accent);
    border-radius: 999px;
    color: #0b111c;
    font-weight: 800;
    min-width: 1.2rem;
    padding: 0.05rem 0.35rem;
    text-align: center;
}

.admin-messages-thread {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.admin-messages-thread-head {
    align-items: center;
    border-bottom: 1px solid var(--ohc-border);
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.admin-messages-back {
    color: var(--ohc-muted);
    display: none;
    font-weight: 700;
    text-decoration: none;
}

.admin-messages-placeholder {
    align-items: center;
    display: flex;
    flex: 1;
    justify-content: center;
    padding: 2rem;
}

.admin-messages-thread-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.7rem;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem;
}

body.admin-messages-page .message-day-rule span {
    background: var(--ohc-surface-2);
    color: var(--ohc-muted);
}

.admin-message-bubble {
    border-radius: 0.85rem;
    max-width: 78%;
    padding: 0.7rem 0.85rem;
}

.admin-message-bubble.is-mine {
    align-self: flex-end;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.28);
}

.admin-message-bubble.is-staff {
    align-self: flex-start;
    background: var(--ohc-surface-2);
}

.admin-message-meta {
    align-items: center;
    color: var(--ohc-muted);
    display: flex;
    font-size: 0.75rem;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.admin-message-meta span {
    align-items: center;
    display: inline-flex;
    gap: 0.18rem;
}

.admin-message-bubble p {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-messages-compose {
    border-top: 1px solid var(--ohc-border);
    display: grid;
    flex-shrink: 0;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.85rem;
}

.admin-messages-compose textarea {
    background: var(--ohc-surface-2);
    border-color: var(--ohc-border);
    color: var(--ohc-text);
}

@media (max-width: 900px) {
    .admin-messages {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .admin-messages.is-thread .admin-messages-list,
    .admin-messages:not(.is-thread) .admin-messages-thread {
        display: none;
    }

    .admin-messages-back {
        display: inline-block;
    }

    .admin-messages-compose {
        grid-template-columns: 1fr;
    }
}

.staff-history-day {
    align-items: start;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem;
    margin-bottom: 0.75rem;
}

.staff-history-day-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 0.85rem;
    color: #6d5aa8;
    display: flex;
    font-size: 1.45rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-height: 2.7rem;
    text-decoration: none;
}

.staff-history-day-btn.is-disabled {
    color: #d1d5db;
}

.staff-history-day-form {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.staff-history-day-form input[type="date"] {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 0.85rem;
    color: #152033;
    font-weight: 800;
    min-height: 2.7rem;
    padding: 0.35rem 0.6rem;
    text-align: center;
    width: 100%;
}

.staff-history-day-caption {
    color: #6d5aa8;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: center;
    text-transform: uppercase;
}

.staff-history-status {
    margin-bottom: 0.8rem;
}

.staff-history-status select {
    appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' stroke='%236d5aa8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    background-size: 1rem;
    border: 1px solid #e8ecf1;
    border-radius: 0.85rem;
    color: #152033;
    font-weight: 800;
    min-height: 2.7rem;
    padding: 0.35rem 2.2rem 0.35rem 0.8rem;
    width: 100%;
}

.staff-portal-filter-pills {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.staff-portal-filter-pill {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 999px;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    text-decoration: none;
}

.staff-portal-filter-pill.is-active {
    background: #6d5aa8;
    border-color: #6d5aa8;
    color: #fff;
}

.staff-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.staff-history-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(28, 36, 48, 0.05);
    padding: 0.9rem;
}

.staff-history-card.is-flagged {
    border-left: 0.4rem solid #dc2626;
}

.staff-history-card.is-cleared {
    border-left: 0.4rem solid #9ca3af;
}

.staff-history-card.is-completed {
    border-left: 0.4rem solid #7dcea0;
}

.staff-history-card-top {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.staff-history-card-top strong {
    align-items: center;
    color: #152033;
    display: inline-flex;
    font-size: 1rem;
    gap: 0.3rem;
}

.staff-history-flag {
    color: #dc2626;
    display: inline-flex;
    flex-shrink: 0;
    vertical-align: -0.12rem;
}

.staff-history-flag svg {
    display: block;
    height: 0.95rem;
    width: 0.95rem;
}

.staff-history-flag.is-past {
    opacity: 0.9;
}

.content-panel-title .staff-history-flag {
    margin-left: 0.35rem;
    vertical-align: -0.15rem;
}

.staff-history-status {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.55rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.staff-history-status.is-completed {
    background: #e7f7ee;
    color: #157347;
}

.staff-history-status.is-flagged {
    background: #fee2e2;
    color: #b91c1c;
}

.staff-history-status.is-cleared {
    background: #e5e7eb;
    color: #4b5563;
}

.staff-history-status.is-note {
    background: rgba(212, 175, 55, 0.18);
    color: var(--ohc-accent);
}

.staff-history-meta {
    color: #6b7280;
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.staff-history-notes {
    color: #374151;
    font-size: 0.9rem;
    margin: 0.45rem 0 0;
    white-space: pre-wrap;
}

.staff-history-clear {
    color: #4b5563;
    font-size: 0.82rem;
    margin: 0.4rem 0 0;
}

.staff-history-clear span {
    display: block;
    color: #152033;
    font-weight: 600;
    margin-top: 0.2rem;
    white-space: pre-wrap;
}

.staff-history-photo {
    color: #6d5aa8;
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.45rem;
}

.rota-history-dl {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.rota-history-dl div {
    margin: 0;
}

.rota-history-dl dt {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.rota-history-dl dd {
    margin: 0.15rem 0 0;
}

.flagged-follow-up-dl .flagged-follow-up-notes {
    grid-column: 1 / -1;
}

.flagged-follow-up-notes dd {
    white-space: pre-wrap;
}

.flagged-follow-up-actions {
    border: 0;
    margin: 1rem 0 0;
    padding: 0;
}

.flagged-follow-up-option {
    align-items: center;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    cursor: pointer;
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
    padding: 0.65rem 0.75rem;
}

.flagged-follow-up-option:hover {
    border-color: var(--ohc-accent);
}

.flagged-follow-up-option:has(input:checked) {
    background: var(--ohc-accent-muted);
    border-color: var(--ohc-accent);
}

.flagged-follow-up-option input {
    accent-color: var(--ohc-accent);
    margin: 0;
}

.flagged-follow-up-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.flagged-follow-up-actions.is-locked {
    pointer-events: none;
}

.flagged-call-status-cell {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 22rem;
}

.flagged-follow-up-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
}

.flagged-follow-up-chip {
    align-items: center;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.15rem 0.55rem 0.15rem 0.65rem;
    text-decoration: none;
}

.flagged-follow-up-chip:hover {
    border-color: var(--ohc-accent);
}

.flagged-follow-up-chip-type {
    font-size: 0.78rem;
    font-weight: 700;
}

.flagged-follow-up-chip-status {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.45rem;
    text-transform: uppercase;
}

.flagged-follow-up-chip.is-open .flagged-follow-up-chip-status {
    background: rgba(212, 175, 55, 0.18);
    color: var(--ohc-accent);
}

.flagged-follow-up-chip.is-completed .flagged-follow-up-chip-status {
    background: #e7f7ee;
    color: #157347;
}

.flagged-incident-form-path {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    font-weight: 600;
    padding: 0.75rem 0.9rem;
}

.flagged-incident-confirm {
    align-items: flex-start;
    display: flex;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}

.flagged-incident-download {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: 0.4rem;
    max-width: 18rem;
    text-decoration: none;
}

.flagged-incident-download:hover {
    color: var(--ohc-accent);
}

.flagged-incident-download svg {
    flex: 0 0 auto;
    height: 1.15rem;
    width: 1.15rem;
}

.flagged-follow-up-existing {
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: var(--ohc-radius);
    color: var(--ohc-text);
    font-size: 0.86rem;
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.85rem;
}

.flagged-incident-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.records-type-card {
    align-items: stretch;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    color: inherit;
    display: flex;
    flex-direction: row;
    gap: 0.35rem;
    min-height: 8.5rem;
    padding: 0.45rem;
}

.records-type-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.records-type-card-switch {
    margin-top: auto;
    padding: 0 0.7rem 0.45rem;
}

.records-type-card-switch .form-check-label {
    font-size: 0.78rem;
}

.records-type-card-main {
    align-items: flex-start;
    border-radius: calc(var(--ohc-radius) - 2px);
    color: inherit;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.65rem 0.7rem;
    text-decoration: none;
}

.records-type-card-main:hover,
.records-type-card-main:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
}

.records-type-card-new {
    align-self: stretch;
    display: flex;
    flex: 0 0 auto;
    margin: 0;
    position: relative;
    z-index: 1;
}

.records-type-card > .records-type-card-btn {
    align-self: stretch;
    margin-right: 0;
}

.records-type-card-btn {
    align-items: center;
    align-self: stretch;
    background: rgba(125, 168, 210, 0.12);
    border: 1px solid rgba(125, 168, 210, 0.35);
    border-radius: calc(var(--ohc-radius) - 2px);
    color: #c9dff2;
    display: inline-flex;
    flex-direction: column;
    gap: 0.12rem;
    height: 100%;
    justify-content: center;
    line-height: 1.05;
    min-width: 5.5rem;
    padding: 0.55rem 1.15rem;
    text-decoration: none;
}

.records-type-card-btn-title,
.records-type-card-btn-sub {
    color: inherit;
    font-size: 0.8rem;
    font-weight: 700;
}

.records-type-card-btn:hover,
.records-type-card-btn:focus-visible {
    background: rgba(125, 168, 210, 0.2);
    border-color: rgba(155, 190, 225, 0.55);
    color: #e8f2fa;
}

.records-section-title {
    color: var(--ohc-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.records-type-card-label {
    font-size: 1.05rem;
    font-weight: 700;
}

.records-type-card-hint {
    color: var(--ohc-muted);
    font-size: 0.86rem;
}

.records-type-card-count {
    font-size: 1.55rem;
    font-weight: 700;
    margin-top: auto;
}

.flagged-incident-office {
    padding-bottom: 1rem;
}

.feedback-paper-meta {
    align-items: flex-start;
    border-bottom: 2px solid #111;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 0 0.85rem;
    padding: 0 0 0.7rem;
}

.feedback-paper-meta-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-top: 0.2rem;
}

.feedback-paper-policy {
    border-collapse: collapse;
    flex: 0 0 auto;
    font-size: 0.68rem;
    min-width: 10.5rem;
}

.feedback-paper-policy th,
.feedback-paper-policy td {
    border: 1px solid #111;
    color: #111;
    font-family: "Times New Roman", Times, serif;
    padding: 0.14rem 0.32rem;
    text-align: left;
}

.feedback-paper-policy th {
    background: #e8e8e8;
    font-weight: 700;
    width: 48%;
}

.feedback-paper {
    background: #fff;
    border: 2px solid #111;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    color: #111;
    font-family: "Times New Roman", Times, serif;
    margin: 0 auto 0.5rem;
    max-width: 820px;
    padding: 0.95rem 1rem 0.75rem;
}

.feedback-paper-header {
    align-items: flex-start;
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: auto 1fr auto;
    margin: 0 0 0.85rem;
}

.feedback-paper-header-compliment {
    grid-template-columns: 1fr auto;
}

.feedback-paper-brand {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.feedback-paper-logo {
    display: block;
    height: auto;
    max-height: 4.4rem;
    object-fit: contain;
    width: auto;
    max-width: 9.5rem;
}

.feedback-paper-title {
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
    margin: 0.35rem 0 0;
    text-align: left;
}

.feedback-paper-header:not(.feedback-paper-header-compliment) .feedback-paper-title {
    align-self: center;
    margin-top: 0;
    text-align: center;
}

.feedback-paper-title.is-underlined {
    border-bottom: 2px solid #111;
    display: inline-block;
    padding-bottom: 0.05rem;
}

.feedback-paper-lead,
.feedback-paper-row {
    align-items: baseline;
    color: #111;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.92rem;
    gap: 0.35rem 0.45rem;
    margin: 0 0 0.75rem;
}

.feedback-paper-row.is-stack {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
}

.feedback-paper-label {
    font-weight: 700;
    white-space: nowrap;
}

.feedback-paper-label.is-inline {
    margin-left: 0.35rem;
}

.feedback-paper-box {
    border: 1px solid #111;
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.65rem 0.7rem;
}

.feedback-paper-box-title,
.feedback-paper-signoff-title {
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0 0 0.55rem;
}

.feedback-paper-roles {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 0.55rem;
}

.feedback-paper .incident-paper-choice {
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.9rem;
    gap: 0.28rem;
}

.feedback-paper .incident-paper-box {
    border: 1px solid #111;
    border-radius: 0;
    height: 0.85rem;
    width: 0.85rem;
}

.feedback-paper .incident-paper-input,
.feedback-paper .incident-paper-textarea {
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.92rem;
}

.feedback-paper .incident-paper-input.is-dots,
.feedback-paper .incident-paper-textarea.is-dots {
    border: 0;
    border-bottom: 1px dotted #333;
    border-radius: 0;
    min-width: 4rem;
    padding: 0.1rem 0.15rem;
}

.feedback-paper .incident-paper-input.is-grow,
.feedback-paper .incident-paper-textarea.is-block {
    flex: 1 1 10rem;
    min-width: 8rem;
    width: auto;
}

.feedback-paper .incident-paper-input.is-mid {
    flex: 1 1 8rem;
    max-width: 14rem;
}

.feedback-paper .incident-paper-input.is-date {
    flex: 0 0 9.5rem;
    max-width: 9.5rem;
}

.feedback-paper .incident-paper-input.is-postcode {
    flex: 0 0 7rem;
    max-width: 8rem;
}

.feedback-paper .incident-paper-input.is-other {
    flex: 1 1 8rem;
    max-width: 14rem;
}

.feedback-paper .incident-paper-textarea.is-ruled {
    background-image: repeating-linear-gradient(
        transparent,
        transparent 1.45rem,
        #bbb 1.45rem,
        #bbb calc(1.45rem + 1px)
    );
    background-position: 0 1.5rem;
    border: 0;
    border-radius: 0;
    line-height: 1.5rem;
    min-height: 7.5rem;
    padding: 0.15rem 0.2rem;
    resize: vertical;
    width: 100%;
}

.feedback-paper-signoff {
    margin: 0.35rem 0 0.5rem;
}

.feedback-paper-footer {
    color: #111;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.85rem 0 0;
}

.feedback-signature {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 12rem;
    width: 100%;
}

.feedback-signature-pad {
    background: #fff;
    border: 2px solid #222;
    border-radius: 0.2rem;
    box-shadow: inset 0 0 0 1px #f3f3f3;
    position: relative;
    width: 100%;
}

.feedback-signature-canvas {
    background: transparent;
    border: 0;
    cursor: crosshair;
    display: block;
    height: 8.5rem;
    touch-action: none;
    width: 100%;
}

.feedback-signature-hint {
    color: #888;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.95rem;
    font-style: italic;
    left: 0.75rem;
    letter-spacing: 0.01em;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
}

.feedback-signature-pad::after {
    border-bottom: 1px dotted #666;
    bottom: 1.1rem;
    content: "";
    left: 0.75rem;
    pointer-events: none;
    position: absolute;
    right: 0.75rem;
}

.feedback-signature.is-signed .feedback-signature-hint,
.feedback-signature.is-signed .feedback-signature-pad::after {
    opacity: 0;
}

.feedback-signature-pad:focus-within {
    border-color: #000;
    box-shadow: inset 0 0 0 1px #fff, 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.feedback-signature-actions {
    display: flex;
    justify-content: flex-end;
}

.feedback-signature-clear {
    background: none;
    border: 0;
    color: #333;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0;
    text-decoration: underline;
}

.feedback-signature.is-readonly {
    min-height: 4rem;
}

.feedback-signature-image {
    background: #fff;
    border: 2px solid #222;
    border-radius: 0.2rem;
    display: block;
    height: auto;
    max-height: 8.5rem;
    max-width: 100%;
    object-fit: contain;
    object-position: left bottom;
    padding: 0.35rem 0.5rem;
    width: auto;
}

.feedback-signature-text {
    border-bottom: 1px dotted #333;
    display: inline-block;
    font-size: 0.95rem;
    min-height: 1.5rem;
    min-width: 60%;
    padding: 0.2rem 0;
}

@media (max-width: 760px) {
    .feedback-paper-header {
        grid-template-columns: 1fr;
    }

    .feedback-paper-header:not(.feedback-paper-header-compliment) .feedback-paper-title {
        text-align: left;
    }

    .feedback-paper-policy {
        width: 100%;
    }
}

.incident-paper {
    background: #fff;
    color: #111;
    border: 1px solid #bbb;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto 0.5rem;
    max-width: 900px;
    padding: 1.1rem 1.15rem 1.4rem;
}

.incident-paper-letterhead {
    margin-bottom: 0.65rem;
}

.incident-paper-letterhead img {
    display: block;
    height: auto;
    max-height: 3.4rem;
    width: auto;
}

.incident-paper-letterhead-se {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.incident-paper-letterhead-se img {
    max-height: 3.8rem;
    max-width: min(100%, 22rem);
}

.incident-paper-datix {
    border: 1px solid #111;
    flex: 0 0 11rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.45rem 0.45rem;
    text-align: left;
}

.incident-paper-datix .incident-paper-input {
    border-bottom: 1px solid #111;
    display: block;
    margin-top: 0.2rem;
}

.incident-paper-title {
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0.15rem 0 0.7rem;
    text-align: center;
}

.incident-paper-subtitle {
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    margin: 1.1rem 0 0.45rem;
}

.incident-paper-subhead {
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0 0 0.7rem;
    text-align: center;
}

.incident-paper-notes-grid {
    display: grid;
    gap: 0.4rem 1.2rem;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 0.85rem;
}

.incident-paper-notes-grid ul {
    font-size: 0.72rem;
    margin: 0;
    padding-left: 1.05rem;
}

.incident-paper-notes-grid li + li {
    margin-top: 0.2rem;
}

.incident-paper-link {
    color: #0563c1;
    text-decoration: underline;
}

.incident-paper-section {
    color: #111;
    font-size: 0.92rem;
    font-weight: 800;
    margin: 0.85rem 0 0.2rem;
}

.incident-paper-table {
    border-collapse: collapse;
    margin: 0 0 0.35rem;
    width: 100%;
}

.incident-paper-table th,
.incident-paper-table td {
    border: 1px solid #111;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    padding: 0.28rem 0.4rem;
    vertical-align: top;
}

.incident-paper-table th {
    background: #fff;
    font-weight: 700;
    text-align: left;
    width: 28%;
}

.incident-paper-bt .incident-paper-table th {
    width: 32%;
}

.incident-paper-table th.is-grey,
.incident-paper-table td.is-grey {
    background: #d9d9d9;
}

.incident-paper-bar,
.incident-paper-table th.incident-paper-bar {
    background: #000;
    color: #fff;
    font-weight: 700;
    width: auto;
}

.incident-paper-caption {
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.incident-paper-small {
    font-size: 0.68rem;
    font-weight: 400;
}

.incident-paper-hint-cell {
    font-size: 0.7rem;
    line-height: 1.3;
}

.incident-paper-input,
.incident-paper-textarea {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    padding: 0.12rem 0.05rem;
    width: 100%;
}

.incident-paper-textarea {
    min-height: 3.4rem;
    resize: vertical;
}

.incident-paper-textarea.is-block,
.incident-paper-input.is-block {
    min-height: 3.6rem;
}

.incident-paper-input.is-inline {
    border-bottom: 1px solid #111;
    display: inline-block;
    min-width: 8rem;
    width: auto;
}

.incident-paper-input:focus,
.incident-paper-textarea:focus {
    box-shadow: none;
    outline: 1px dotted #333;
}

.incident-paper-input[readonly],
.incident-paper-textarea[readonly] {
    background: transparent;
    color: #111;
}

.incident-paper-yn,
.incident-paper-inline {
    white-space: normal;
}

.incident-paper-gap {
    margin: 0 0.45rem 0 0.7rem;
}

.incident-paper-prefix {
    font-weight: 700;
    margin-right: 0.3rem;
}

.incident-paper-choice {
    align-items: center;
    color: #111;
    cursor: pointer;
    display: inline-flex;
    font-family: Arial, Helvetica, sans-serif;
    gap: 0.28rem;
    margin-right: 0.7rem;
}

.incident-paper-choice input {
    position: absolute;
    opacity: 0;
}

.incident-paper-box {
    border: 1px solid #111;
    display: inline-block;
    flex: 0 0 0.78rem;
    height: 0.78rem;
    position: relative;
    width: 0.78rem;
}

.incident-paper-choice input:checked + .incident-paper-box::after {
    color: #111;
    content: "X";
    font-size: 0.68rem;
    font-weight: 800;
    left: 50%;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -54%);
}

.incident-paper-tick {
    margin-right: 0.35rem;
}

.incident-paper-trust-heading {
    font-size: 0.92rem;
    font-weight: 800;
    margin: 1rem 0 0.2rem;
    text-align: center;
}

.incident-paper-trust-only td {
    min-height: 2.4rem;
}

.incident-paper-num {
    font-weight: 700;
    width: 1.6rem;
}

.incident-paper-spacer {
    height: 3.2rem;
}

.incident-paper-footer {
    color: #333;
    font-size: 0.68rem;
    margin: 0.7rem 0 0;
}

.incident-paper-split th:nth-child(odd) {
    width: 18%;
}

.incident-paper-textarea.is-mid {
    min-height: 2.6rem;
}

.incident-paper-h-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    width: 100%;
}

.incident-paper-h-other {
    flex: 1 1 12rem;
    min-width: 12rem;
}

.incident-paper-h-other .incident-paper-input {
    min-width: 0;
    width: 100%;
}

.incident-paper-table th.incident-paper-return-label {
    width: 48%;
}

.incident-paper-split td .incident-paper-input.is-write,
.incident-paper-input.is-write {
    min-height: 2.6rem;
}

.incident-paper-write {
    background: #fff;
    min-height: 2.6rem;
}

.incident-paper-table th.incident-paper-kw-label {
    width: 24%;
}

.incident-paper-approval th.incident-paper-approval-label,
.incident-paper-table th.incident-paper-approval-label {
    width: 22%;
}

.incident-paper-notified {
    padding: 0.4rem 0.5rem 0.5rem;
}

.incident-paper-notify-line {
    align-items: baseline;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin: 0 0 0.28rem;
}

.incident-paper-notify-label {
    flex: 0 0 auto;
    font-weight: 400;
    white-space: nowrap;
}

.incident-paper-input.is-notify {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

@media (max-width: 700px) {
    .incident-paper-notes-grid,
    .incident-paper-letterhead-se {
        display: block;
    }

    .incident-paper-datix {
        margin-top: 0.6rem;
        width: 100%;
    }
}

.rota-history-note-log {
    margin: 0;
    padding-left: 1.1rem;
}

.rota-history-note-log li + li {
    margin-top: 0.35rem;
}

.rota-history-photo h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 1.2rem 0 0.6rem;
}

.rota-history-photo img {
    border-radius: 0.8rem;
    max-width: min(100%, 28rem);
}

.rota-history-photo-dot {
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.rota-history-clear h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
}

.help-guide-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.help-guide {
    align-items: stretch;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.75rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(14rem, 0.9fr) minmax(0, 1.4fr);
    overflow: hidden;
    padding: 1rem;
}

.help-guide-copy {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    justify-content: center;
    min-width: 0;
}

.help-guide-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.help-guide-summary {
    color: var(--ohc-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0;
}

.help-guide-actions {
    margin-top: 0.35rem;
}

.help-guide-download-size {
    color: var(--ohc-muted);
    font-weight: 500;
}

.help-guide-player {
    min-width: 0;
}

.help-guide-video {
    background: #000;
    border-radius: 0.55rem;
    display: block;
    max-height: 22rem;
    width: 100%;
}

@media (max-width: 767.98px) {
    .help-guide {
        grid-template-columns: 1fr;
        padding: 0.9rem;
    }

    .help-guide-video {
        max-height: 18rem;
    }
}

.help-guide-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.help-guide-admin {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
}

.help-guide-admin-meta {
    margin: 0.55rem 0 0.7rem;
}

.help-guide-admin-actions {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.help-guide-replace {
    align-items: center;
    display: flex;
    flex: 1 1 16rem;
    gap: 0.45rem;
    min-width: 0;
}

.help-guide-replace .form-control {
    min-width: 0;
}

.staff-cal-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(17rem, 21.5rem) minmax(0, 1fr);
}

.staff-cal-people,
.staff-cal-main {
    min-width: 0;
}

.staff-cal-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.staff-cal-people-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: calc(100vh - 16rem);
    overflow: auto;
}

.staff-cal-person {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    color: inherit;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.4rem 0.55rem;
    text-decoration: none;
}

.staff-cal-person:hover,
.staff-cal-person.is-active {
    background: var(--ohc-surface-2);
    border-color: var(--ohc-border);
    color: inherit;
}

.staff-cal-person.is-active {
    border-color: rgba(212, 175, 55, 0.45);
}

.staff-cal-person-name {
    min-width: 0;
}

.staff-cal-person-hours {
    color: var(--ohc-muted);
    flex-shrink: 0;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.staff-cal-toolbar {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.staff-cal-month-pick {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.staff-cal-month-pick .form-select {
    min-width: 8.5rem;
    width: auto;
}

.staff-cal-weekdays,
.staff-cal-grid {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.staff-cal-weekdays {
    color: var(--ohc-muted);
    font-size: 0.78rem;
    font-weight: 650;
    margin-bottom: 0.35rem;
    text-align: center;
}

.staff-cal-day {
    align-items: stretch;
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.5rem;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 5.8rem;
    padding: 0.3rem 0.35rem 0.4rem;
    position: relative;
    text-align: left;
}

.staff-cal-day-main {
    align-items: flex-start;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.1rem 0.1rem 0;
    text-align: left;
    width: 100%;
}

.staff-cal-day-calls {
    align-self: flex-start;
    background: var(--ohc-accent-muted);
    border: 0;
    border-radius: 999px;
    color: var(--ohc-accent);
    cursor: pointer;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1;
    margin-top: auto;
    padding: 0.22rem 0.48rem;
}

.staff-cal-day-calls:hover,
.staff-cal-day-calls:focus-visible {
    background: var(--ohc-accent);
    color: #1a1408;
}

.staff-cal-day.is-empty {
    background: transparent;
    border-color: transparent;
}

.staff-cal-day.is-weekend {
    background: rgba(255, 255, 255, 0.02);
}

.staff-cal-day.is-today {
    border-color: var(--ohc-accent);
}

.staff-cal-day.is-day-off {
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.2);
}

.staff-cal-day:not(.is-empty):hover {
    border-color: var(--ohc-accent-hover);
}

.staff-cal-day-num {
    color: var(--ohc-muted);
    font-size: 0.78rem;
}

.staff-cal-day-hours {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.staff-cal-day-flag {
    color: var(--ohc-accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.staff-cal-day-note {
    color: var(--ohc-muted);
    display: -webkit-box;
    font-size: 0.72rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (max-width: 991.98px) {
    .staff-cal-layout {
        grid-template-columns: 1fr;
    }

    .staff-cal-people-list {
        max-height: 16rem;
    }

    .staff-cal-day {
        min-height: 4.4rem;
        padding: 0.35rem;
    }

    .staff-cal-day-hours {
        font-size: 0.92rem;
    }
}

.staff-profile-with-cal {
    align-items: start;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(22rem, 0.85fr);
}

.staff-profile-cal,
.staff-profile-details {
    min-width: 0;
}

.staff-profile-cal .staff-cal-main {
    position: sticky;
    top: 1rem;
}

.staff-profile-details,
.staff-profile-details-form {
    display: grid;
    gap: 0.85rem;
}

.profile-activity-notes-stack {
    display: grid;
    gap: 0.85rem;
}

@media (max-width: 1199.98px) {
    .staff-profile-with-cal {
        grid-template-columns: 1fr;
    }

    .staff-profile-cal .staff-cal-main {
        position: static;
    }
}

.runs2-warning.is-warning {
    border-color: rgba(232, 168, 70, 0.55);
    box-shadow: inset 3px 0 0 #e8a846;
}

.runs2-warning.is-ok {
    border-color: rgba(132, 158, 138, 0.45);
}

.runs2-warning-lists {
    display: grid;
    gap: 1rem;
}

@media (min-width: 992px) {
    .runs2-warning-lists {
        grid-template-columns: 1fr 1fr;
    }
}

.runs2-warning-sub {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.runs2-warning-list {
    font-size: 0.82rem;
    list-style: none;
    margin: 0;
    max-height: 16rem;
    overflow: auto;
    padding: 0;
}

.runs2-warning-list li + li {
    margin-top: 0.28rem;
}

.runs2-warning-run-row {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.runs2-warning-make-permanent {
    flex: 0 0 auto;
    white-space: nowrap;
}

.runs2-warning-call {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    color: inherit;
    cursor: pointer;
    display: inline;
    font: inherit;
    margin: 0;
    padding: 0.05rem 0.15rem;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 0.15em;
}

.runs2-warning-call:hover,
.runs2-warning-call:focus-visible {
    color: #e8a846;
    outline: none;
    text-decoration-color: currentColor;
}

.runs2-warning-clients {
    display: grid;
    gap: 0.2rem;
    max-height: 18rem;
    overflow: auto;
}

.runs2-cancelled-clients {
    max-height: 24rem;
}

.runs2-warning-client {
    border-radius: 0.35rem;
}

.runs2-warning-client-summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    list-style: none;
    padding: 0.35rem 0.45rem;
}

.runs2-warning-client-summary::-webkit-details-marker {
    display: none;
}

.runs2-warning-client-summary::marker {
    content: '';
}

.runs2-warning-client-summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.runs2-warning-client-name {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.runs2-warning-client-count {
    color: var(--ohc-muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.runs2-warning-client-chevron {
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    color: var(--ohc-muted);
    display: inline-block;
    height: 0.42rem;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    width: 0.42rem;
}

.runs2-warning-client[open] .runs2-warning-client-chevron {
    transform: rotate(225deg);
}

.runs2-warning-client-body {
    padding: 0 0.45rem 0.65rem 0.7rem;
}

.runs2-warning-client-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.runs2-warning-issue-label {
    color: var(--ohc-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0.35rem 0 0.2rem;
    text-transform: uppercase;
}

.runs2-hours-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
}

.runs2-hours-actions-start,
.runs2-hours-actions-end {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.runs2-hours-actions-end {
    justify-content: flex-end;
    margin-left: auto;
}

.runs2-hours-week {
    flex: 1 1 12rem;
    margin: 0;
    max-width: 18rem;
    min-width: 11rem;
}

.runs2-hours-week-select {
    min-height: 2.6rem;
}

.runs2-hours-action-btn {
    align-items: center;
    display: inline-flex;
    font-size: 0.98rem;
    font-weight: 600;
    gap: 0.35rem;
    min-height: 2.6rem;
    padding: 0.55rem 1rem;
}

.runs2-hours-action-count {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    gap: 0.12rem;
    justify-content: center;
    line-height: 1;
}

.runs2-hours-action-badge {
    background: color-mix(in srgb, var(--ohc-muted, #8a97a8) 22%, transparent);
    border-radius: 999px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    min-width: 1.2rem;
    padding: 0.22rem 0.4rem;
    text-align: center;
    vertical-align: middle;
}

.runs2-hours-action-badge.is-warn {
    background: color-mix(in srgb, #c45c5c 28%, transparent);
    color: #f0c2c2;
}

.runs2-hours-action-hours {
    color: color-mix(in srgb, var(--ohc-muted, #8a97a8) 88%, #fff);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.1;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .runs2-hours-actions {
        align-items: stretch;
        display: grid;
        gap: 0.65rem;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .runs2-hours-actions-start {
        display: grid;
        gap: 0.45rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .runs2-hours-actions-start .runs2-hours-action-btn {
        flex-direction: column;
        font-size: 0.78rem;
        gap: 0.28rem;
        height: auto;
        justify-content: center;
        line-height: 1.15;
        min-height: 4.5rem;
        padding: 0.45rem 0.35rem;
        text-align: center;
        white-space: normal;
        width: 100%;
    }

    .runs2-hours-actions-start .runs2-hours-action-label {
        display: block;
    }

    .runs2-hours-actions-start .runs2-hours-action-count {
        margin: 0;
    }

    .runs2-hours-actions-start .runs2-hours-action-badge {
        margin: 0;
    }

    .runs2-hours-actions-start .runs2-hours-action-hours {
        font-size: 0.62rem;
    }

    .runs2-hours-week {
        flex: none;
        max-width: none;
        min-width: 0;
        order: 2;
        width: 100%;
    }

    .runs2-hours-actions-end {
        justify-content: stretch;
        margin-left: 0;
        order: 3;
        width: 100%;
    }

    .runs2-hours-actions-end .client-rota-add-call,
    .runs2-hours-actions-end .runs2-hours-download,
    .runs2-hours-actions-end .runs2-hours-action-btn {
        width: 100%;
    }

    .runs2-hours-desktop-only {
        display: none !important;
    }
}

.runs2-hours-table {
    --bs-table-bg: transparent;
    font-size: 0.9rem;
}

.runs2-hours-table thead th {
    background: var(--ohc-panel, #1a2332);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.runs2-hours-table tbody tr.is-mismatch td {
    background: color-mix(in srgb, #c45c5c 12%, transparent);
}

.runs2-hours-table tbody tr.is-match .runs2-hours-tick {
    color: #3d9a6a;
    font-weight: 700;
}

.runs2-hours-cross {
    color: #c45c5c;
    font-weight: 700;
}

.runs2-hours-name {
    font-weight: 600;
}

.runs2-hours-match-col {
    width: 3.5rem;
}

.runs2-hours-day-head {
    min-width: 2.6rem;
}

.runs2-hours-day-letter {
    display: block;
    font-weight: 700;
    line-height: 1.1;
}

.runs2-hours-day-num {
    color: var(--ohc-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.1;
}

.runs2-hours-day-head.is-today .runs2-hours-day-letter,
.runs2-staff-hours-table td.is-today {
    color: var(--ohc-accent, #6cb4d8);
}

.runs2-staff-hours-table tbody tr.is-zero td {
    opacity: 0.55;
}

.runs2-staff-hours-table tbody tr.is-ghost-no-charge td {
    background: color-mix(in srgb, #c45c5c 18%, transparent);
}

.runs2-staff-hours-table tbody tr.is-ghost-chargeable td {
    background: color-mix(in srgb, #8b6bb5 18%, transparent);
}

.runs2-hours-total {
    font-weight: 700;
    white-space: nowrap;
}

.runs2-hours-download {
    margin: 0;
}

.runs2-review-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.runs2-review-client {
    font-size: 1.05rem;
    font-weight: 700;
}

.runs2-review-section + .runs2-review-section {
    border-top: 1px solid var(--ohc-border);
    padding-top: 1rem;
}

.runs2-review-rota {
    border: 0;
    box-shadow: none;
    margin: 0;
}

.runs2-review-rota .client-rota-body {
    padding: 0;
}

.runs2-visit.is-tts-missing .run-week-visit-client {
    color: #e8a846;
    font-style: italic;
}

.runs2-visit.is-tts-minutes .runs2-visit-mins.is-mismatch {
    box-shadow: 0 0 0 1px rgba(232, 168, 70, 0.85);
}

.runs2-visit.is-tts-run .run-week-visit-client {
    color: #e8a846;
}

.runs2-visit.is-tts-extra .run-week-visit-client {
    color: #e8a846;
}

.runs2-visit .run-visit-link.btn-link {
    color: inherit;
}

.runs2-visit.is-unlinked .run-week-visit-client {
    color: #9aa3af;
}

.runs2-week-table .run-week-visit-row {
    align-items: flex-start;
    gap: 0.4rem;
    justify-content: flex-start;
}

.runs2-hours-action-btn.is-warn {
    border-color: color-mix(in srgb, #c45c5c 55%, var(--ohc-border, #2a3544));
    color: #f0c2c2;
}

.runs2-combined-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.runs2-hours-actions .client-rota-add-call {
    flex: 0 0 auto;
    justify-self: auto;
    margin: 0;
}

.runs2-run-col {
    min-width: 8.5rem;
}

.runs2-run-cell {
    max-width: 11rem;
}

.runs2-run-name {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
}

.runs2-run-meta {
    margin-top: 0.15rem;
}

.runs2-run-calls-details {
    margin-top: 0.45rem;
}

.runs2-run-calls-details .runs2-calls-toggle {
    justify-content: flex-start;
    padding: 0.15rem 0;
}

.runs2-run-calls-row > td {
    background: color-mix(in srgb, var(--ohc-panel, #1a2332) 70%, #000);
    padding: 0.75rem 0.65rem 1rem;
}

.runs2-run-calls-row[hidden] {
    display: none;
}

.runs2-calls-panel {
    margin-top: 0.65rem;
}

.runs2-calls-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ohc-muted, #8a97a8);
    cursor: pointer;
    display: flex;
    font-size: 0.92rem;
    font-weight: 600;
    justify-content: center;
    list-style: none;
    margin: 0 auto;
    padding: 0.35rem 0.5rem;
    text-align: center;
    user-select: none;
    width: auto;
}

.runs2-calls-toggle::-webkit-details-marker {
    display: none;
}

.runs2-calls-toggle::marker {
    content: '';
}

.runs2-calls-toggle:hover,
.runs2-calls-toggle:focus-visible {
    color: var(--ohc-text, #e8eef5);
    outline: none;
}

.runs2-calls-toggle-arrow {
    display: inline-block;
    font-size: 0.7rem;
    margin-left: 0.35rem;
    vertical-align: 0.05em;
}

.runs2-calls-toggle-label.is-hide {
    display: none;
}

.runs2-calls-panel[open] .runs2-calls-toggle-label.is-show {
    display: none;
}

.runs2-calls-panel[open] .runs2-calls-toggle-label.is-hide {
    display: inline;
}

.runs2-calls-panel[open] .runs2-calls-toggle {
    margin-bottom: 0.65rem;
}

.runs2-visit-mins {
    align-items: center;
    border-radius: 999px;
    color: #0b111c;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    height: 1.55rem;
    justify-content: center;
    letter-spacing: -0.02em;
    line-height: 1;
    min-width: 1.55rem;
    padding: 0 0.28rem;
}

.runs2-visit-mins.is-am {
    background: #6eb8f5;
}

.runs2-visit-mins.is-lunch {
    background: #8fb59a;
}

.runs2-visit-mins.is-tea {
    background: #ffb74d;
}

.runs2-visit-mins.is-pm {
    background: #c77ad4;
}

.runs2-visit-mins:not(.is-am):not(.is-lunch):not(.is-tea):not(.is-pm) {
    background: #9aa3af;
}

.runs2-run-card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.runs2-run-card-title-link {
    color: inherit;
    text-decoration: none;
}

.runs2-run-card-title-link:hover {
    color: var(--ohc-accent);
}

.runs2-run-staff {
    border-bottom: 1px solid var(--ohc-border);
    padding-bottom: 1rem;
}

#runs2ClientReviewModal .modal-dialog,
.client-tts-modal-dialog {
    max-width: min(98vw, 1760px);
}

.client-tts-call-edit-grid {
    align-items: center;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 7.5rem minmax(8.5rem, 11rem) 4.25rem 3.25rem minmax(12rem, 1fr);
}

.client-tts-call-edit-grid.is-editable {
    grid-template-columns: 2rem 7.5rem minmax(8.5rem, 11rem) 4.25rem 3.25rem minmax(12rem, 1fr) auto;
}

.client-tts-call-add-panel {
    margin-top: 0.85rem;
}

.client-tts-call-add-grid {
    align-items: center;
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 7.5rem 7.5rem minmax(8.5rem, 11rem) 4.25rem 3.25rem minmax(18rem, 1fr) 11rem;
}

.client-tts-call-add-btn {
    width: 100%;
}

.client-tts-call-task {
    min-width: 0;
    width: 100%;
}

.client-tts-call-edit-head {
    color: var(--ohc-muted, #9aa3af);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.client-tts-day-group + .client-tts-day-group {
    margin-top: 0.85rem;
}

.client-tts-day-heading {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.client-tts-call-row + .client-tts-call-row {
    margin-top: 0.35rem;
}

.client-tts-call-row.is-manual-tts-call,
.client-tts-call-edit-grid.is-manual-tts-call {
    background: rgba(232, 168, 70, 0.06);
    border-radius: 0.35rem;
    padding: 0.2rem 0.25rem;
}

.client-tts-call-delete {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    color: #d66;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.25rem;
    font-weight: 700;
    height: 1.85rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1.85rem;
}

.client-tts-call-delete:hover,
.client-tts-call-delete:focus-visible {
    background: rgba(220, 80, 80, 0.12);
    color: #f08888;
    outline: none;
}

.client-tts-call-edit-actions {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.client-tts-save-all {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.client-tts-save-all-note {
    color: var(--ohc-muted);
    flex: 1 1 12rem;
    font-size: 0.75rem;
}

.client-tts-calls-table tr.is-manual-tts-call {
    background: rgba(232, 168, 70, 0.06);
}

@media (max-width: 991.98px) {
    .client-tts-call-edit-grid,
    .client-tts-call-edit-grid.is-editable,
    .client-tts-call-add-grid {
        grid-template-columns: 1fr 1fr;
    }

    .client-tts-call-task {
        grid-column: 1 / -1;
    }

    .client-tts-call-edit-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .client-tts-call-add-btn {
        width: 100%;
    }
}



.opus-session-timeout-warning {
    align-items: center;
    background: #1f2a3a;
    border: 1px solid rgba(232, 168, 70, 0.55);
    border-radius: 0.65rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    color: #f4f7fb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    left: 50%;
    max-width: min(32rem, calc(100vw - 1.5rem));
    padding: 0.85rem 1rem;
    position: fixed;
    top: max(0.85rem, env(safe-area-inset-top));
    transform: translateX(-50%);
    z-index: 2000;
}

.opus-session-timeout-warning strong {
    font-weight: 600;
}

.opus-session-timeout-warning [data-session-timeout-copy] {
    flex: 1 1 12rem;
}

.staff-hours-table .is-num {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.staff-hours-table tfoot td {
    font-weight: 600;
}

.staff-hours-note {
    min-width: 16rem;
    white-space: normal;
}

.staff-hours-unpaid {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ohc-muted);
}

.spr-paper {
    background: #fff;
    border: 2px solid #111;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    color: #111;
    font-family: "Times New Roman", Times, serif;
    margin: 0 auto 0.5rem;
    max-width: 820px;
    padding: 0.95rem 1rem 1rem;
}

.spr-paper-header {
    background: #d9d9d9;
    border: 1px solid #111;
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.7rem 0.65rem;
}

.spr-paper-logo {
    display: block;
    height: auto;
    max-height: 3.6rem;
    max-width: 9rem;
    object-fit: contain;
    width: auto;
}

.spr-paper-title {
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.35rem 0 0;
}

.spr-paper-confidential {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.9rem;
    text-align: center;
    text-transform: uppercase;
}

.spr-paper-lead,
.spr-paper-dotted-field,
.spr-paper-metric,
.spr-paper-yesno {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.92rem;
    gap: 0.35rem 0.5rem;
    margin: 0 0 0.7rem;
}

.spr-paper-section,
.spr-paper-rate-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.9rem 0 0.55rem;
}

.spr-paper-heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1rem 0 0.65rem;
    text-decoration: underline;
}

.spr-paper-label {
    font-weight: 700;
}

.spr-paper-tick-note {
    font-size: 0.86rem;
    margin: 0 0 0.35rem;
    text-align: right;
}

.spr-paper-help {
    color: #333;
    font-size: 0.82rem;
    margin: 0 0 0.65rem;
}

.spr-paper-competency-box {
    border: 1px solid #111;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.35rem 0 0.75rem;
    padding: 0.5rem 0.6rem 0.65rem;
}

.spr-paper-competency-box .incident-paper-textarea {
    border: 0;
    min-height: 6.5rem;
}

.spr-paper-staff-pick {
    margin: 0 0 0.75rem;
}

.spr-paper-staff-pick .form-select {
    background: #fff;
    border-color: #888;
    color: #111;
    max-width: 28rem;
}

.spr-paper-box {
    border: 1px solid #111;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem 0.7rem;
}

.spr-paper-box-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

.spr-paper .incident-paper-input,
.spr-paper .incident-paper-textarea {
    background: transparent;
    border: 0;
    border-bottom: 1px dotted #444;
    border-radius: 0;
    color: #111;
    font-family: inherit;
    font-size: 0.92rem;
    padding: 0.15rem 0.2rem;
}

.spr-paper .incident-paper-textarea {
    border: 1px solid #bbb;
    min-height: 4.5rem;
    width: 100%;
}

.spr-paper .incident-paper-input.is-block,
.spr-paper .incident-paper-textarea.is-block {
    flex: 1 1 12rem;
    min-width: 12rem;
    width: 100%;
}

.spr-paper .incident-paper-input.is-mid {
    min-width: 10rem;
}

.spr-paper .incident-paper-input.is-short {
    min-width: 4rem;
    width: 5.5rem;
}

.spr-paper .incident-paper-choice {
    align-items: center;
    color: #111;
    display: inline-flex;
    gap: 0.3rem;
    margin: 0;
}

.spr-paper .incident-paper-box {
    border-color: #111;
}

.spr-paper-table-wrap {
    margin: 0 0 1rem;
    overflow-x: auto;
}

.spr-paper-rate {
    border-collapse: collapse;
    width: 100%;
}

.spr-paper-rate th,
.spr-paper-rate td {
    border: 1px solid #111;
    color: #111;
    font-size: 0.84rem;
    padding: 0.35rem 0.3rem;
    text-align: center;
    vertical-align: middle;
}

.spr-paper-rate th[scope="row"] {
    font-weight: 400;
    text-align: left;
    width: 42%;
}

.spr-paper-rate thead th {
    font-weight: 700;
}

.spr-paper-rate .incident-paper-choice span:last-child:empty {
    display: none;
}

.spr-paper-rate .incident-paper-choice {
    justify-content: center;
}

.spr-paper-sign {
    border-collapse: collapse;
    margin-top: 0.75rem;
    width: 100%;
}

.spr-paper-sign td {
    border: 1px solid #111;
    padding: 0.65rem 0.7rem 0.85rem;
    vertical-align: top;
    width: 50%;
}

@media (max-width: 767.98px) {
    .spr-paper {
        padding: 0.75rem;
    }

    .spr-paper-sign,
    .spr-paper-sign tbody,
    .spr-paper-sign tr,
    .spr-paper-sign td {
        display: block;
        width: 100%;
    }
}

.spr-paper-date {
    align-items: center;
    display: inline-flex;
    flex: 1 1 12rem;
    gap: 0.35rem;
    min-width: 12rem;
    width: 100%;
}

.spr-paper-date .incident-paper-input {
    flex: 1 1 auto;
    min-width: 0;
}

.spr-paper-date-today {
    align-items: center;
    background: #f3f3f3;
    border: 1px solid #777;
    border-radius: 6px;
    color: #222;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.85rem;
    justify-content: center;
    padding: 0;
    width: 1.85rem;
}

.spr-paper-date-today svg {
    height: 1rem;
    width: 1rem;
}

.spr-paper-date-today:hover,
.spr-paper-date-today:focus-visible {
    background: #e8e8e8;
    border-color: #111;
    color: #111;
}

body.spr-mobile-page .app-main {
    background: #f4f5f7;
    color: #1f2430;
    color-scheme: light;
}

body.spr-mobile-page .app-topbar,
body.spr-mobile-page .mobile-topbar {
    background: #fff;
    border-color: #e5e7eb !important;
    color: #1f2430;
}

body.spr-mobile-page .text-muted {
    color: #6b7280 !important;
}

body.spr-mobile-page .btn-outline-light {
    background: #fff;
    border-color: #c5cad3;
    color: #1f2430;
}

body.spr-mobile-page .btn-outline-light:hover,
body.spr-mobile-page .btn-outline-light:focus {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.spr-mobile-page .flagged-incident-shell,
.spr-mobile-page .flagged-incident-toolbar {
    margin-left: auto;
    margin-right: auto;
    max-width: 64rem;
    width: 100%;
}

.spr-mobile-hero {
    margin: 0 0 0.85rem;
}

.spr-mobile-logo {
    display: block;
    height: 2.4rem;
    object-fit: contain;
    width: auto;
}

.spr-mobile-kicker {
    color: #9a3412;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0.7rem 0 0.15rem;
    text-transform: uppercase;
}

.spr-mobile-title {
    font-size: 1.45rem;
    line-height: 1.2;
    margin: 0 0 0.35rem;
}

.spr-mobile-lead,
.spr-mobile-meta,
.spr-mobile-hint {
    color: #6b7280;
    font-size: 0.86rem;
    margin: 0 0 0.75rem;
}

.spr-mobile-meta {
    margin-top: 0;
}

.spr-mobile-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    color: #1f2430;
    margin: 0 0 0.85rem;
    padding: 1rem 0.9rem 0.25rem;
}

.spr-mobile-section {
    font-size: 1.05rem;
    margin: 0 0 0.8rem;
}

.spr-mobile-field {
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 1rem;
    min-width: 0;
    padding: 0;
}

.spr-mobile-field legend {
    float: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.spr-mobile-label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
}

.spr-mobile-field .spr-mobile-hint {
    margin: 0;
}

.spr-mobile-rule {
    border: 0;
    border-top: 2px solid #6b7280;
    height: 0;
    margin: 0.15rem 0 1rem;
    opacity: 1;
}

.spr-mobile .form-control,
.spr-mobile .form-select {
    background: #fff;
    border-color: #c5cad3;
    color: #1f2430;
    font-size: 1rem;
    min-height: 2.85rem;
}

.spr-mobile .form-select option,
.spr-mobile .form-select optgroup {
    background: #fff;
    color: #1f2430;
}

.spr-mobile .form-control:focus,
.spr-mobile .form-select:focus {
    background: #fff;
    border-color: #b45309;
    box-shadow: 0 0 0 0.15rem rgba(180, 83, 9, 0.16);
    color: #1f2430;
}

.spr-mobile textarea.form-control {
    max-height: 16rem;
    min-height: 9.75rem;
    overflow-y: auto;
    resize: vertical;
}

textarea.sic-note,
textarea.sic-note:focus,
textarea.sic-note:read-only {
    background: #fff;
    background-color: #fff;
    border: 1px solid #888;
    color: #111;
    font-size: 1.05rem;
    line-height: 1.5;
    min-height: 22rem;
}

textarea.sic-note::placeholder {
    color: #6b7280;
}

.spr-mobile textarea.sic-note {
    max-height: 70vh;
    min-height: 18rem;
}

.spr-mobile-date {
    align-items: stretch;
    display: flex;
    gap: 0.5rem;
}

.spr-mobile-date .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.spr-mobile-today {
    background: #fff;
    border: 1px solid #c5cad3;
    border-radius: 0.4rem;
    color: #1f2430;
    flex: 0 0 auto;
    font-weight: 600;
    min-height: 2.85rem;
    padding: 0 0.85rem;
}

.spr-mobile-today:hover,
.spr-mobile-today:focus-visible {
    border-color: #9ca3af;
    color: #111827;
}

.spr-mobile-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
}

.spr-mobile-choice {
    align-items: center;
    background: transparent;
    border: 0;
    color: #1f2430;
    cursor: pointer;
    display: flex;
    flex: 1 1 7.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    gap: 0.45rem;
    justify-content: flex-start;
    margin: 0;
    min-height: 2.4rem;
    padding: 0.2rem 0;
    position: relative;
    text-align: left;
}

.spr-mobile-choice input {
    height: 1px;
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.spr-mobile-tick {
    background: #fff;
    border: 1.5px solid #1f2430;
    border-radius: 0.15rem;
    flex: 0 0 1.15rem;
    height: 1.15rem;
    position: relative;
    width: 1.15rem;
}

.spr-mobile-choice:has(input:checked) .spr-mobile-tick::after {
    color: #1f2430;
    content: "✓";
    font-size: 0.95rem;
    font-weight: 700;
    left: 50%;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -56%);
}

.spr-mobile-choice:focus-within .spr-mobile-tick {
    outline: 2px solid #b45309;
    outline-offset: 2px;
}

.spr-mobile-choice:has(input:disabled) {
    cursor: default;
}

.spr-mobile .feedback-signature-clear {
    background: #fff;
    border: 1px solid #c5cad3;
    border-radius: 0.4rem;
    color: #1f2430;
    font-family: inherit;
    font-size: 0.85rem;
}

.spr-mobile-actions {
    align-items: stretch !important;
    flex-direction: column;
}

.spr-mobile-actions .btn {
    min-height: 3rem;
    width: 100%;
}

.spr-mobile-actions .text-muted {
    text-align: center;
}

.spr-paper-sign .feedback-signature {
    margin-top: 0.35rem;
}

.spr-paper-sign .feedback-signature-canvas {
    height: 6.5rem;
}

.spr-paper .feedback-signature-clear {
    background: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    color: #222;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.8rem;
    padding: 0.2rem 0.45rem;
}

.spr-paper .feedback-signature-image {
    background: #fff;
    border: 1px solid #222;
    display: block;
    max-height: 6.5rem;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.sc-paper-rate th[scope="row"] {
    width: 34%;
}

.sc-paper-rate td.sc-paper-comment-cell,
.sc-paper-comment-cell {
    min-width: 8rem;
    text-align: left;
    width: 28%;
}

.sc-paper-comment-cell .incident-paper-input {
    width: 100%;
}

/* Supervision: textareas fill their cells; signature pads align */
.rpf-supervision-table th[scope="row"] {
    width: 26%;
}

.rpf-supervision-table td {
    text-align: left;
    vertical-align: top;
    width: 24.5%;
}

.rpf-supervision-table td:last-child {
    width: 18%;
}

.rpf-supervision-table .incident-paper-textarea,
.rpf-supervision-table .incident-paper-input {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    width: 100%;
}

.rpf-supervision-table .incident-paper-textarea {
    min-height: 5.5rem;
}

.rpf-paper--supervision .spr-paper-sign .spr-paper-label {
    display: block;
    min-height: 2.75rem;
}

.rpf-paper--supervision .spr-paper-sign .feedback-signature {
    margin-top: 0.55rem;
}

/* Training Needs: wider on screen so the table rarely scrolls */
.rpf-paper--training_needs {
    max-width: min(1180px, 100%);
}

.rpf-training-needs-table th,
.rpf-training-needs-table td {
    font-size: 0.78rem;
    text-align: left;
    vertical-align: top;
}

.rpf-training-needs-table .incident-paper-textarea,
.rpf-training-needs-table .incident-paper-input {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    width: 100%;
}

.rpf-training-needs-table .incident-paper-textarea {
    min-height: 4.2rem;
}

/* Visit report: keep Call narrow so Yes/No stay on one line */
.rpf-calls-table th[scope="row"],
.rpf-calls-table thead th:first-child {
    white-space: nowrap;
    width: 5.5rem;
}

.rpf-calls-table td {
    white-space: nowrap;
    width: 12%;
}

.rpf-calls-table td:last-child {
    min-width: 8rem;
    white-space: normal;
    width: auto;
}

.rpf-calls-table .incident-paper-choice {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.rpf-calls-table .incident-paper-input {
    min-width: 0;
    width: 100%;
}

body.spr-mobile-page .incident-paper {
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 0;
}

body.spr-mobile-page .incident-paper-table,
body.spr-mobile-page .incident-paper-table tbody,
body.spr-mobile-page .incident-paper-table tr,
body.spr-mobile-page .incident-paper-table th,
body.spr-mobile-page .incident-paper-table td {
    display: block;
    width: 100%;
}

body.spr-mobile-page .incident-paper-table {
    border: 0;
    margin: 0 0 0.85rem;
}

body.spr-mobile-page .incident-paper-table th,
body.spr-mobile-page .incident-paper-table td {
    border: 0;
    padding: 0.35rem 0;
}

body.spr-mobile-page .incident-paper-table tr {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    margin: 0 0 0.75rem;
    padding: 0.85rem 0.9rem 0.35rem;
}

body.spr-mobile-page .incident-paper-input,
body.spr-mobile-page .incident-paper-textarea {
    background: #fff;
    border: 1px solid #c5cad3;
    border-radius: 0.4rem;
    box-sizing: border-box;
    color: #1f2430;
    display: block;
    font-size: 1rem;
    min-height: 2.85rem;
    width: 100%;
}

body.spr-mobile-page textarea.incident-paper-textarea,
body.spr-mobile-page textarea.incident-paper-input {
    max-height: 16rem;
    min-height: 9.75rem;
    overflow-y: auto;
    resize: vertical;
}

body.spr-mobile-page .incident-paper-box {
    background: #fff;
    border: 1.5px solid #1f2430;
    border-radius: 0.15rem;
    height: 1.15rem;
    width: 1.15rem;
}

body.spr-mobile-page .incident-paper-choice {
    color: #1f2430;
    margin: 0.2rem 0.8rem 0.2rem 0;
}
