:root {
    color-scheme: light;
    --background: #f3f6fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #607086;
    --border: #d5dee9;
    --border-strong: #acbacc;
    --day-divider: #b8c9da;
    --primary: #126cad;
    --primary-dark: #0b4f82;
    --primary-soft: #eaf4fb;
    --soft-blue: #e9f3fb;
    --soft-green: #eaf7ef;
    --soft-yellow: #fff6d7;
    --soft-red: #fdecec;
    --soft-saved: #edf8f1;
    --saved-border: #68aa7d;
    --error: #a61b1b;
    --success: #176a35;
    --radius: 0.85rem;
    --radius-small: 0.55rem;
    --shadow-small: 0 0.15rem 0.45rem rgb(31 50 73 / 7%);
    --shadow-medium: 0 0.75rem 2rem rgb(31 50 73 / 9%);
    --shadow-raised: 0 0.5rem 1.1rem rgb(31 50 73 / 12%);
    --focus-ring: 0 0 0 0.23rem rgb(18 108 173 / 20%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 8% 0%, rgb(219 237 250 / 55%), transparent 27rem),
        linear-gradient(180deg, #f7f9fc 0, var(--background) 24rem);
    color: var(--text);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-dark);
    text-underline-offset: 0.16em;
}

button,
input,
select {
    font: inherit;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    padding: 0.7rem;
    background: var(--surface);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-raised);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem clamp(1rem, 4vw, 3rem);
    background: rgb(255 255 255 / 90%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 0.2rem 0.8rem rgb(31 50 73 / 5%);
    backdrop-filter: blur(0.8rem);
    -webkit-backdrop-filter: blur(0.8rem);
}

.brand {
    max-width: min(70vw, 64rem);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    text-decoration: none;
    transition: color 150ms ease;
    overflow-wrap: anywhere;
}

.brand:hover {
    color: var(--primary);
}

.account-menu {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.94rem;
}

.account-menu form {
    margin: 0;
}

.link-button {
    padding: 0.3rem 0.1rem;
    color: var(--primary-dark);
    background: none;
    border: 0;
    border-radius: 0.3rem;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: color 150ms ease, background 150ms ease;
}

.link-button:hover {
    color: var(--primary);
    text-decoration: underline;
}

.page-shell {
    flex: 1 0 auto;
    width: min(100% - 2rem, 100rem);
    margin: clamp(1.4rem, 3vw, 2.5rem) auto 3rem;
}

.site-footer {
    flex: 0 0 auto;
    padding: 1rem max(1rem, env(safe-area-inset-right))
        calc(1rem + env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
    color: var(--muted);
    background: rgb(255 255 255 / 62%);
    border-top: 1px solid rgb(213 222 233 / 75%);
    font-size: 0.84rem;
    text-align: center;
}

.site-footer p {
    max-width: 64rem;
    margin: 0 auto;
    overflow-wrap: anywhere;
}

.login-page .page-shell {
    flex-grow: 0;
}

.login-page .site-footer {
    padding-top: 0;
    background: transparent;
    border-top: 0;
}

.auth-card,
.content-card {
    width: min(100%, 28rem);
    margin: 5vh auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
}

.compact-card {
    width: min(100%, 40rem);
}

h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.muted,
.help-text {
    color: var(--muted);
}

.help-text {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.stacked-form,
.field-group {
    display: grid;
    gap: 0.5rem;
}

.stacked-form {
    gap: 1.2rem;
}

.field-group input,
.meal-cell input,
.control-field select {
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: var(--surface);
    box-shadow: inset 0 1px 1px rgb(31 50 73 / 4%);
    transition: border-color 150ms ease, box-shadow 150ms ease,
        background 150ms ease;
}

.field-group input:hover,
.meal-cell input:hover,
.control-field select:hover {
    border-color: #7f91a7;
}

.field-group input:focus,
.meal-cell input:focus,
.control-field select:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
    outline: 0;
}

input:focus-visible,
button:focus-visible,
a:focus-visible,
.table-scroll:focus-visible {
    outline: 3px solid #70afe0;
    outline-offset: 2px;
}

.primary-button,
.secondary-button,
.save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-small);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease,
        border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.primary-button {
    color: white;
    background: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0.3rem 0.7rem rgb(18 108 173 / 20%);
}

.primary-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 0.45rem 0.9rem rgb(11 79 130 / 25%);
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-small);
}

.secondary-button:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-color: #aac9df;
    box-shadow: 0 0.35rem 0.8rem rgb(31 50 73 / 10%);
    transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.save-button:active {
    transform: translateY(0);
}

.primary-button:disabled,
.secondary-button:disabled,
.save-button:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.message-stack {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

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

.message-error,
.form-errors,
.errorlist,
.field-error {
    color: var(--error);
}

.message-error {
    background: var(--soft-red);
    border-color: #e7a9a9;
}

.errorlist {
    margin: 0;
    padding-left: 1.2rem;
}

.dashboard-heading,
.week-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-heading {
    margin-bottom: 0.25rem;
}

.dashboard-heading .muted {
    margin: 0.75rem 0 0;
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.week-range {
    padding: 0.72rem 1.05rem;
    background: linear-gradient(135deg, #edf7fd, #e3f0fa);
    border: 1px solid #d4e7f5;
    border-radius: 999px;
    box-shadow: var(--shadow-small);
    font-weight: 800;
    white-space: nowrap;
}

.week-heading-meta {
    display: grid;
    justify-items: end;
    gap: 0.45rem;
}

.week-kind {
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.week-toolbar {
    margin: 1.25rem 0 1rem;
}

.deadline-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    text-align: center;
}

.table-scroll {
    position: relative;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
    isolation: isolate;
}

.reservation-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
    table-layout: fixed;
}

.reservation-table th,
.reservation-table td {
    padding: 0.5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    transition: background 150ms ease, box-shadow 150ms ease,
        filter 150ms ease;
}

.reservation-table thead th {
    background: linear-gradient(180deg, #edf6fc, #e5f1f9);
    text-align: center;
}

.reservation-table thead tr:first-child th:not(:last-child) {
    border-right-color: var(--day-divider);
}

.reservation-table thead tr:last-child th:nth-child(even) {
    border-right-color: var(--day-divider);
}

.reservation-table thead small,
.reservation-table thead strong {
    display: block;
    margin-top: 0.2rem;
}

.reservation-table tr:last-child > * {
    border-bottom: 0;
}

.reservation-table tr > *:last-child {
    border-right: 0;
}

.student-cell {
    background: var(--surface-soft);
    font-weight: 800;
    text-align: center;
    vertical-align: middle !important;
}

.meal-cell {
    background: var(--surface);
}

.meal-cell.has-reservation,
.student-day-cell.has-reservation {
    background: linear-gradient(180deg, #f2fbf5, var(--soft-saved));
    box-shadow: inset 0 3px 0 var(--saved-border);
}

.pv-cell {
    display: grid;
    gap: 0.45rem;
}

.readonly-cell span,
.readonly-cell small {
    display: block;
}

.readonly-cell small {
    margin-top: 0.3rem;
    color: var(--muted);
}

.state-cell {
    background: #f1f4f7;
    color: var(--muted);
    text-align: center;
    vertical-align: middle !important;
}

.holiday-cell,
.holiday-label {
    color: #765500;
}

.holiday-cell {
    background:
        linear-gradient(135deg, rgb(255 255 255 / 15%) 25%, transparent 25%) 0 0 / 0.8rem 0.8rem,
        var(--soft-yellow);
}

.holiday-cell small {
    display: block;
    margin-top: 0.25rem;
}

.holiday-name {
    color: #765500;
    font-weight: 500;
}

.field-error {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
}

.save-button {
    width: 100%;
    min-height: 2.2rem;
    padding: 0.4rem;
    color: var(--primary-dark);
    background: #edf5fb;
    border: 1px solid #b7d3e7;
    font-size: 0.85rem;
    box-shadow: none;
}

.save-button:hover {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0.3rem 0.7rem rgb(18 108 173 / 18%);
    transform: translateY(-1px);
}

.price-field {
    position: relative;
    display: block;
}

.price-field > input {
    padding-right: 1.75rem;
}

.price-field > span {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.price-field > input {
    font-variant-numeric: tabular-nums;
}

.choice-field {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
}

.meal-choice-option,
.meal-choice-clear {
    position: relative;
    display: flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--surface);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    transition: color 150ms ease, background 150ms ease,
        border-color 150ms ease, box-shadow 150ms ease;
}

.meal-choice-option:hover {
    background: #f6f9fc;
    border-color: var(--border-strong);
}

.meal-choice-option-yes:has(input:checked) {
    color: #185c32;
    background: #e6f6eb;
    border-color: #6aae7d;
    box-shadow: inset 0 0 0 1px #6aae7d;
}

.meal-choice-option-no:has(input:checked) {
    color: #8c2830;
    background: #fff0f1;
    border-color: #d5898f;
    box-shadow: inset 0 0 0 1px #d5898f;
}

.meal-choice-clear {
    grid-column: 1 / -1;
    min-height: 1.7rem;
    padding: 0.1rem 0.25rem;
    color: var(--muted);
    background: transparent;
    border-color: transparent;
    font-size: 0.68rem;
    font-weight: 600;
}

.meal-choice-clear:not(:has(input:checked)):hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.meal-choice-clear:has(input:checked) {
    cursor: default;
}

.meal-choice-option input[type="radio"],
.meal-choice-clear input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.meal-choice-option:has(input:focus-visible),
.meal-choice-clear:has(input:focus-visible) {
    outline: 3px solid #70afe0;
    outline-offset: 2px;
}

.cell-feedback {
    display: none;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 750;
    text-align: center;
}

.meal-cell:target,
.student-day-cell:target,
.manager-choice-cell:has(+ .pv-cell:target) {
    scroll-margin-top: 1rem;
    background: var(--soft-green);
    box-shadow: inset 0 0 0 3px var(--saved-border),
        0 0 0 0.2rem rgb(104 170 125 / 15%);
}

.meal-cell:target .cell-feedback,
.student-day-cell:target .cell-feedback {
    display: block;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.5rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.student-week-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.student-week-actions p {
    margin: 0;
    flex: 1 1 16rem;
}

.student-week-actions .primary-button {
    flex: 1 1 16rem;
}

.student-email-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-small);
}

.student-email-panel h2 {
    margin: 0;
    font-size: 1rem;
}

.student-email-panel p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.student-email-panel form {
    flex: 0 0 auto;
    margin: 0;
}

.manager-controls {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(24rem, 1.5fr) auto;
    align-items: end;
    gap: 0.75rem 1rem;
    margin: 1.35rem 0;
    padding: 1rem 1.1rem;
    background: rgb(255 255 255 / 94%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
}

.manager-controls fieldset {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
    margin: 0;
    padding: 0.22rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-small) + 0.15rem);
    background: #f1f5f9;
}

.manager-controls fieldset legend {
    padding: 0 0.3rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.manager-controls fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.15rem;
    padding: 0.38rem 0.62rem;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 150ms ease, background 150ms ease,
        border-color 150ms ease, box-shadow 150ms ease;
}

.manager-controls fieldset label:hover {
    background: rgb(255 255 255 / 70%);
}

.manager-controls fieldset label:has(input:checked) {
    color: var(--primary-dark);
    background: var(--surface);
    border-color: #cfdae5;
    box-shadow: 0 0.12rem 0.35rem rgb(31 50 73 / 12%);
}

.manager-controls fieldset label:has(input:focus-visible) {
    outline: 3px solid #70afe0;
    outline-offset: 1px;
}

.manager-controls fieldset input {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    accent-color: var(--primary);
}

.control-field {
    display: grid;
    gap: 0.4rem;
    font-weight: 700;
}

.control-field > span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.control-field select {
    min-height: 2.5rem;
    padding: 0.5rem 0.7rem;
    background: var(--surface);
}

.manager-table {
    min-width: 58rem;
}

.reservation-table .student-column {
    width: 8rem;
}

.manager-table .breakfast-column,
.manager-table .afternoon-column {
    width: 5rem;
}

.reservation-table:not(.manager-table) .breakfast-column,
.reservation-table:not(.manager-table) .afternoon-column {
    width: 8rem;
}

.manager-table-scroll {
    max-height: min(70vh, 48rem);
    overflow: auto;
    box-shadow: var(--shadow-medium);
}

.manager-table thead {
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 0.2rem 0.5rem rgb(31 50 73 / 9%);
}

.manager-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 6;
}

.manager-table .student-cell {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 0.2rem 0 0.45rem rgb(31 50 73 / 5%);
}

.manager-table tbody tr:nth-child(even) > .meal-cell:not(.has-reservation) {
    background: #fbfcfe;
}

.manager-table tbody tr:hover > .meal-cell:not(.has-reservation) {
    background: #f2f8fc;
}

.manager-table tbody tr:hover > .has-reservation {
    filter: saturate(1.06) brightness(0.985);
}

.manager-table tbody tr:hover > .student-cell {
    color: var(--primary-dark);
    background: #edf4fa;
}

.manager-table .manager-price-cell,
.manager-table .pv-cell {
    padding: 0.4rem;
}

.manager-table .price-field > input {
    padding-left: 1.75rem;
    text-align: center;
}

.manager-table .manager-choice-cell {
    padding: 0.4rem;
    text-align: center;
    vertical-align: middle;
}

.manager-table .manager-choice-cell select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.35rem;
    border: 1px solid var(--border-strong);
    border-radius: 0.65rem;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    text-align: center;
    text-align-last: center;
}

.manager-table .manager-choice-select:has(option[value=""]:checked) {
    color: var(--muted);
}

.manager-table .manager-choice-select option:not([value=""]) {
    color: var(--text);
}

.manager-table .manager-choice-select option[value=""] {
    color: var(--muted);
}

.manager-table .pv-cell {
    gap: 0.35rem;
}

.weekly-overview {
    margin: 1rem 0;
    padding: 1rem;
    background: rgb(255 255 255 / 94%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
}

.weekly-overview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.weekly-overview-heading h2,
.weekly-overview-heading p {
    margin: 0;
}

.weekly-overview-heading h2 {
    font-size: 1.05rem;
    letter-spacing: -0.015em;
}

.weekly-overview-heading p,
.report-note {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.weekly-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.65rem;
}

.bulk-save-button,
.pdf-button {
    white-space: nowrap;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.summary-item {
    display: grid;
    justify-items: stretch;
    gap: 0.12rem;
    padding: 0.65rem 0.72rem;
    background: linear-gradient(145deg, #f3fbf6, var(--soft-green));
    border: 1px solid #d7eadc;
    border-left: 3px solid var(--saved-border);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-small);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.summary-item > strong {
    font-size: 0.85rem;
}

.summary-item > strong,
.summary-item > span,
.summary-item > b {
    justify-self: center;
    text-align: center;
}

.summary-item > b {
    margin-top: 0.2rem;
}

.summary-meals {
    width: 100%;
    margin-top: 0.35rem;
    border-collapse: collapse;
    border-top: 1px solid #cfe1d4;
    table-layout: fixed;
}

.summary-meals th,
.summary-meals td {
    width: 50%;
    padding: 0.15rem 0.3rem;
    text-align: center;
    vertical-align: middle;
}

.summary-meals th {
    padding-top: 0.45rem;
    font-weight: 700;
    white-space: nowrap;
}

.summary-meals td {
    padding-bottom: 0;
    font-size: 0.78rem;
}

.summary-meals th + th,
.summary-meals td + td {
    border-left: 1px solid #cfe1d4;
}

.summary-holiday {
    color: #765500;
    background: linear-gradient(145deg, #fffaf0, var(--soft-yellow));
    border-color: #eedda9;
    border-left-color: #c69a22;
}

.table-scroll-hint {
    display: none;
    margin: 0.5rem 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.report-note {
    margin-bottom: 0;
}

.student-day-cell {
    padding: 0.4rem !important;
    vertical-align: middle !important;
}

.student-day-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.student-meal-field {
    min-width: 0;
}

.student-meal-field + .student-meal-field {
    padding-left: 0.4rem;
    border-left: 1px solid var(--day-divider);
}

.student-meal-field input {
    width: 100%;
    min-width: 0;
}

.student-meal-field.pv-field {
    display: grid;
    gap: 0.4rem;
}

.choice-display {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-weight: 750;
    text-align: center;
}

.choice-display-unanswered {
    color: var(--muted);
    font-weight: 600;
}

.choice-display-yes {
    color: #185c32;
}

.choice-display-no {
    color: #8c2830;
}

.editable-day-cell > .save-button {
    width: 100%;
    margin-top: 0.45rem;
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0.3rem 0.7rem rgb(18 108 173 / 18%);
}

.editable-day-cell > .save-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.mobile-day-heading,
.mobile-meal-label {
    display: none;
}

.empty-table-cell {
    padding: 2rem !important;
    color: var(--muted);
    text-align: center;
}

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

@media (max-width: 48rem) {
    .site-header,
    .dashboard-heading,
    .week-toolbar,
    .student-email-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .site-header {
        position: static;
        padding-block: 0.75rem;
    }

    .site-header .brand {
        max-width: 100%;
    }

    .page-shell {
        width: min(100% - 1.25rem, 100rem);
        margin-top: 1.25rem;
    }

    .account-menu,
    .week-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .deadline-note {
        order: -1;
        width: 100%;
    }

    .student-email-panel form,
    .student-email-panel .primary-button {
        width: 100%;
    }

    .week-range {
        align-self: flex-start;
    }

    .week-heading-meta {
        justify-items: start;
    }

    .manager-controls {
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }

    .manager-controls fieldset {
        align-items: stretch;
    }

    .manager-controls fieldset label {
        flex: 1 1 auto;
        justify-content: center;
    }

    .weekly-overview-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .weekly-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .weekly-actions > * {
        flex: 1 1 10rem;
    }

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

    .summary-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .table-scroll:not(.manager-table-scroll) {
        overflow: visible;
        background: transparent;
        border: 0;
    }

    .reservation-table:not(.manager-table),
    .reservation-table:not(.manager-table) tbody,
    .reservation-table:not(.manager-table) tr {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .reservation-table:not(.manager-table) colgroup,
    .reservation-table:not(.manager-table) thead {
        display: none;
    }

    .reservation-table:not(.manager-table) .student-cell {
        display: block;
        width: 100%;
        margin-bottom: 0.65rem;
        padding: 0.7rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-small);
        text-align: left;
    }

    .reservation-table:not(.manager-table) .student-day-cell {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.75rem !important;
        border: 1px solid var(--border) !important;
        border-radius: var(--radius);
        box-shadow: var(--shadow-small);
    }

    .mobile-day-heading {
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        gap: 0.15rem;
        margin-bottom: 0.65rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--day-divider);
        text-align: center;
    }

    .mobile-day-heading span {
        color: var(--muted);
        font-size: 0.82rem;
    }

    .mobile-meal-label {
        display: block;
        margin-bottom: 0.35rem;
        color: var(--text);
        font-size: 0.78rem;
        text-align: center;
    }

    .legend {
        display: none;
    }
}

@media (max-width: 80rem) {
    .table-scroll-hint {
        display: block;
    }
}

@media (min-width: 48.001rem) and (max-width: 80rem) {
    .manager-controls {
        grid-template-columns: 1fr 1fr;
    }
}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
