:root {
    color-scheme: light;
    --app-primary: #31c7f9;
    --app-secondary: #1a273b;
    --app-tertiary: #ffffff;
    --app-error: #f44336;
    --app-input-line: #9e9e9e;
    --app-disabled: #757575;
    --app-background: #f4f6f8;
    --app-text: var(--app-secondary);
    --app-muted: #596475;
    --app-border: #dce1e7;
    --app-hover: #edf9fe;
    --app-disabled-background: #eceef1;
    --app-error-text: #a52b22;
    --meal-yes-bg: #31c7f9;
    --meal-yes-text: #1a273b;
    --meal-no-bg: #fff0ee;
    --meal-no-text: #a52b22;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'Segoe UI', Arial, sans-serif; color: var(--app-text); background: var(--app-background); }
@media (any-pointer: coarse) {
    /* Allow scrolling while disabling pinch and double-tap zoom, including in nested lists. */
    html, body, body * { touch-action: pan-x pan-y; }
    /* Prevent iOS from zooming automatically when a small input receives focus. */
    input, textarea, select, .mud-input-root { font-size: 16px !important; }
}
button, input, select { font: inherit; }
a { color: var(--app-secondary); }
:focus-visible { outline: 3px solid var(--app-primary); outline-offset: 3px; }
:is(h1, h2, h3, h4, h5, h6):focus-visible { outline: none; }
.account-name { margin-left: 12px; max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-heading { align-items: center; }
.drawer-footer { margin-top: auto; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.logout-button { justify-content: flex-start; min-height: 48px; }
.main-content { min-height: 100dvh; }
.pull-to-refresh {
    position: fixed;
    top: calc(var(--mud-appbar-height, 56px) + env(safe-area-inset-top) + 8px);
    left: 50%;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 32px);
    padding: 8px 16px;
    border: 1px solid var(--app-border);
    border-radius: 24px;
    background: white;
    color: var(--app-text);
    font-size: 13px;
    pointer-events: none;
    visibility: hidden;
    transform: translate(-50%, calc(var(--pull-distance, 0px) * .25));
}
.pull-to-refresh.is-visible { visibility: visible; }
.pull-to-refresh-icon { color: var(--app-secondary); font-size: 20px; transition: transform .15s; }
.pull-to-refresh.is-ready .pull-to-refresh-icon { transform: rotate(180deg); }
.pull-to-refresh.is-refreshing .pull-to-refresh-icon { animation: pull-refresh-spin .8s linear infinite; }
@keyframes pull-refresh-spin { to { transform: rotate(360deg); } }
@media (any-pointer: coarse) {
    html:has(.main-content) { overscroll-behavior-y: none; }
}
.page-container { padding-top: 32px; padding-bottom: 32px; }
.settings-page.management-page { max-width: 800px; height: auto; min-height: 0; gap: 20px; padding-bottom: env(safe-area-inset-bottom); }
.settings-section { min-width: 0; padding: 20px; border: 1px solid var(--app-border); border-radius: 8px; background: var(--app-tertiary); }
.settings-section h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; }
.settings-start-page-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; margin-top: 16px; }
.settings-start-page-row > .mud-input-control { min-width: 0; margin-top: 0; }
.settings-save.mud-button-root { min-height: 44px; white-space: nowrap; }
.settings-help { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--app-muted); }
.settings-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 4px; }
.settings-page .settings-switch { margin: 0; min-height: 44px; }
.settings-rule { padding-block: 16px; min-width: 0; }
.settings-rule + .settings-rule { border-top: 1px solid var(--app-border); }
.settings-rule:last-child { padding-bottom: 0; }
.settings-rule h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.settings-rule-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-month-rule { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px 24px; }
.settings-deadline-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 16px; }
.settings-deadline-fields > * { min-width: 0; }
.settings-month-range.mud-input-control { width: 100%; min-width: 0; margin-top: 0; }
.settings-example { margin-top: 20px; overflow-wrap: anywhere; }
@media (min-width: 600px) {
    .settings-month-rule { grid-template-columns: minmax(0, 1fr) 220px; }
    .settings-deadline-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .settings-page .settings-section { padding: 16px; }
    .settings-section h2 { font-size: 17px; }
    .settings-section-heading { align-items: flex-start; }
    .settings-section-heading h2 { flex: 1 1 160px; }
    .settings-start-page-row { gap: 8px; }
}
.login-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; padding: 32px; background: white; border: 1px solid var(--app-border); border-radius: 12px; }
.login-mark { width: 48px; height: 48px; display: grid; place-items: center; background: var(--app-primary); color: var(--app-secondary); font-weight: 700; font-size: 24px; border-radius: 50%; margin-bottom: 24px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--app-secondary); margin: 0 0 8px; }
.login-card h1 { font-size: 28px; line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
.login-intro { margin: 0 0 28px; color: var(--app-muted); line-height: 1.5; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.form-field input, .form-field select { width: 100%; min-height: 48px; border: 1px solid var(--app-input-line); border-radius: 6px; padding: 12px; background: white; color: var(--app-text); font-size: 16px; }
.login-submit { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 6px; background: var(--app-primary); color: var(--app-secondary); font-weight: 600; cursor: pointer; }
.login-submit:hover { background: var(--app-secondary); color: var(--app-tertiary); }
.validation-message { color: var(--app-error-text); font-size: 14px; line-height: 1.5; }
.validation-message ul { padding-left: 20px; }
#blazor-error-ui { background: #fff3cd; color: #332b00; bottom: 0; display: none; left: 0; padding: 16px 48px 16px 16px; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { position: absolute; right: 12px; top: 8px; padding: 8px; border: 0; background: transparent; cursor: pointer; }
@media (max-width: 600px) { .page-container { padding: 24px 16px; } .login-shell { padding: 16px; } .login-card { padding: 24px; } .account-name { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Essensanmeldung */
.page-container:has(.lunch-page) { padding-top: 16px; padding-bottom: 16px; }
.lunch-page { max-width: 1080px; height: calc(100dvh - 96px); min-height: 540px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.lunch-title { flex-shrink: 0; }
.lunch-management-heading { display: flex; align-items: center; gap: .5rem; }
.lunch-management-heading h1 { min-width: 0; overflow-wrap: anywhere; }
.lunch-title h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; line-height: 1.25; }
.lunch-title p { margin: 0; color: var(--app-muted); font-size: 14px; }
.lunch-date-navigation { flex-shrink: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; width: 100%; max-width: 560px; margin: 0 auto; gap: 8px; }
.lunch-period-button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 4px 8px; border: 1px solid var(--app-border); border-radius: 8px; color: var(--app-text); background: white; cursor: pointer; }
.lunch-period-button:hover { background: var(--app-hover); }
.lunch-period-title, .lunch-period-description { display: block; }
.lunch-period-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.lunch-period-description { margin-top: 2px; color: var(--app-muted); font-size: 12px; }
.lunch-view-tools { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px; font-size: 12px; color: var(--app-muted); }
.two-week-hint { display: none; }
.lunch-weeks, .lunch-months { flex: 1; min-height: 296px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* Reserve horizontal touch gestures for calendar navigation; keep vertical scrolling. */
.lunch-registration :is(.lunch-weeks, .lunch-months) { touch-action: pan-y; }
.lunch-weeks > .lunch-week:nth-child(2) { display: none; }
.lunch-week, .lunch-month { min-width: 0; background: white; border: 1px solid var(--app-border); border-radius: 8px; overflow: hidden; }
.lunch-week { display: grid; grid-template-rows: 32px repeat(5, minmax(min-content, 1fr)); }
.lunch-week-heading { display: flex; align-items: center; gap: 4px 12px; padding: 6px 12px; border-bottom: 1px solid var(--app-border); background: var(--app-hover); }
.lunch-week-heading h2, .lunch-month h2 { margin: 0; font-size: 16px; font-weight: 600; }
.lunch-week-heading span { font-size: 12px; color: var(--app-muted); }
.lunch-day { display: grid; min-height: 76px; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--app-border); }
.lunch-day:last-child { border-bottom: 0; }
.lunch-day.is-today { box-shadow: inset 0 0 0 3px var(--app-primary); }
.lunch-day-name { display: block; font-size: 14px; font-weight: 600; }
.lunch-day-date time { color: var(--app-muted); font-size: 12px; }
.meal-switch { margin: 0 !important; min-height: 44px; }
.meal-switch .mud-typography { font-size: 13px; line-height: 1.3; }
.meal-yes .mud-typography { color: var(--meal-yes-text); }
.meal-no .mud-typography { color: var(--meal-no-text); }
.lunch-months { min-height: 220px; }
.lunch-months > .lunch-month:nth-child(2), .following-month-title { display: none; }
.lunch-month { display: flex; flex-direction: column; padding: 12px; }
.lunch-month h2 { margin-bottom: 8px; text-transform: capitalize; }
.month-grid { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: 20px repeat(6, minmax(24px, 1fr)); gap: 4px; }
.month-weekday { text-align: center; font-size: 12px; color: var(--app-muted); }
.month-day { min-height: 24px; padding: 0; border: 1px solid transparent; border-radius: 4px; font-weight: 600; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@media (hover: hover) and (pointer: fine) {
    .month-day:hover { border-color: currentColor; }
}
.day-yes { background: var(--meal-yes-bg); color: var(--meal-yes-text); }
.day-no { background: var(--meal-no-bg); color: var(--meal-no-text); }
.month-day.is-today, .month-day.is-today[aria-disabled="true"] { box-shadow: inset 0 0 0 3px var(--app-primary); text-decoration: underline; text-underline-offset: 3px; }
.lunch-day { position: relative; }
.day-guest-icon { position: absolute; left: .25rem; top: .25rem; width: .875rem; height: .875rem; font-size: .875rem; color: var(--app-secondary); pointer-events: none; }
.lunch-day.has-guests { padding-left: 24px; }
.month-instruction { flex-shrink: 0; color: var(--app-muted); font-size: 12px; margin: 0; }
.lunch-legend { display: flex; gap: 12px; }
.lunch-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid currentColor; }
.lunch-actions { flex-shrink: 0; background: var(--app-background); border-top: 1px solid var(--app-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; padding-bottom: env(safe-area-inset-bottom); }
.lunch-save-status { font-size: 12px; line-height: 16px; color: var(--app-muted); }
.lunch-action-buttons { display: flex; gap: 8px; }
.lunch-action-buttons .mud-button-root { min-height: 44px; }
@media (min-width: 1000px) {
    .lunch-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lunch-months > .lunch-month:nth-child(2) { display: flex; }
    .following-month-title { display: inline; }
    .lunch-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lunch-weeks > .lunch-week:nth-child(2) { display: grid; }
    .single-week-hint { display: none; }
    .two-week-hint { display: inline; }
}
@media (max-width: 600px) {
    .page-container:has(.lunch-page) { padding: 12px; }
    .lunch-page { height: calc(100dvh - 88px); min-height: 528px; gap: 6px; }
    .lunch-title h1 { font-size: 22px; margin: 0; }
    .lunch-title p { display: none; }
    .lunch-date-navigation { gap: 0; }
    .lunch-period-title { font-size: 16px; }
    .lunch-view-tools .mud-button-root { font-size: 12px; }
    .lunch-day { gap: 4px 8px; padding: 8px 12px; }
    .meal-switch .mud-typography { font-size: 12px; }
    .meal-switch .mud-switch-span { padding-left: 4px; padding-right: 4px; }
    .lunch-actions { flex-direction: column; align-items: stretch; gap: 4px; }
    .lunch-action-buttons > * { flex: 1; }
    .lunch-months { gap: 8px; }
    .lunch-month { padding: 6px; }
    .lunch-month h2 { font-size: 13px; min-height: 34px; margin-bottom: 4px; }
    .month-grid { gap: 2px; }
    .month-weekday, .month-day { font-size: 11px; }
}
@media (max-height: 740px) {
    .lunch-title p { display: none; }
    .lunch-page { min-height: 508px; gap: 4px; }
}

/* Zentrale Tagesplanung */
.day-disabled { background: var(--app-disabled-background); color: var(--app-disabled); }
.month-day.day-disabled:disabled { cursor: not-allowed; opacity: 1; }
.lunch-day.day-disabled .lunch-day-actions { filter: grayscale(1); }
.lunch-day.day-disabled .meal-switch .mud-typography { color: var(--app-disabled); }
.lunch-day-reason { display: block; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; max-height: 3.9em; overflow: auto; }
.month-day.day-selected { outline: 3px solid var(--app-secondary); outline-offset: -3px; }
/* Admin-Info */
.lunch-info-page { min-height: 0; gap: 12px; height: auto; }
.info-summary { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 16px; background: white; border: 1px solid var(--app-border); border-radius: 8px; }
.info-summary strong { font-size: 24px; margin-right: 4px; }
.info-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.info-day { display: flex; flex-direction: column; gap: 12px; padding: 16px 8px; border: 1px solid var(--app-border); border-radius: 8px; background: white; color: var(--app-text); cursor: pointer; }
.info-day.day-disabled { background: var(--app-disabled-background); }
.info-day:hover { border-color: var(--app-primary); }
.info-day-selected { box-shadow: inset 0 0 0 2px var(--app-primary); border-color: var(--app-primary); }
.info-day strong { font-size: 28px; }
.info-day small { display: block; font-size: 12px; font-weight: 400; color: var(--app-muted); }
.info-day-counts, .info-locked { font-size: 12px; }
.info-locked { font-weight: 600; }
.info-detail { padding: 24px; background: white; border: 1px solid var(--app-border); border-radius: 8px; }
.info-detail h2 { font-size: 18px; margin: 0 0 16px; font-weight: 600; }
.info-detail-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.info-detail-counts dt { font-size: 13px; color: var(--app-muted); }
.info-detail-counts dd { margin: 4px 0 0; font-size: 32px; font-weight: 600; }
.info-detail-counts > div { min-width: 0; overflow-wrap: anywhere; }
.info-joining-button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: -6px 0; padding: 4px 0; border: 0; background: transparent; color: var(--app-primary); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.info-joining-button:focus-visible, .info-joining-scroll:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 2px; }
.info-joining-scroll { max-height: min(50dvh, 360px); overflow-y: auto; overscroll-behavior: contain; }
.info-joining-list { list-style: none; margin: 0; padding: 0; }
.info-joining-list li { padding: 12px 0; border-top: 1px solid var(--app-border); overflow-wrap: anywhere; }
.info-joining-time { display: block; margin-top: 4px; color: var(--mud-palette-text-secondary); font-size: .875rem; }
.info-joining-hint { margin: 0 0 12px; color: var(--mud-palette-text-secondary); font-size: .875rem; }
.info-guests { margin-top: 24px; }
.info-guests h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.info-guest-list { list-style: none; padding: 0; margin: 0; }
.info-guest-list li { padding: 12px 0; border-top: 1px solid var(--app-border); }
.info-guest-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; overflow-wrap: anywhere; }
.info-guest-note { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.info-change-log { flex-shrink: 0; margin-top: 16px; padding: 16px; border: 1px solid var(--app-border); border-radius: 8px; background: white; }
.info-change-log h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.info-change-description, .info-change-admin { color: var(--app-muted); font-size: 13px; }
.info-change-description { margin: 0 0 16px; }
.info-change-scroll { max-height: 480px; overflow-y: auto; overscroll-behavior: contain; }
.info-change-scroll:focus-visible { outline: 2px solid var(--app-secondary); outline-offset: 2px; }
.info-change-scroll h3 { margin: 16px 0 8px; font-size: 15px; font-weight: 600; }
.info-change-scroll h3:first-child { margin-top: 0; }
.info-change-list { list-style: none; margin: 0; padding: 0; }
.info-change-list li { padding: 12px 0; border-top: 1px solid var(--app-border); overflow-wrap: anywhere; }
.info-change-list p { margin: 4px 0 0; }
.info-change-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.info-change-heading time { font-variant-numeric: tabular-nums; }
.info-change-heading strong { font-size: 20px; }
@media (max-width: 600px) {
    .info-days { grid-template-columns: minmax(0, 1fr); }
    .info-day { display: grid; grid-template-columns: minmax(0, 1fr) auto; text-align: left; align-items: center; padding: 12px 16px; gap: 4px 16px; }
    .info-day strong { text-align: right; grid-column: 2; grid-row: 1 / span 2; }
    .info-day strong small { display: inline; }
    .info-detail { padding: 16px; }
    .info-detail-counts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .info-detail-counts dt { font-size: 12px; }
    .info-summary { flex-direction: column; gap: 12px; overflow-wrap: anywhere; }
}

/* Employee selection and administration reuse the calendar's surface and spacing. */
.management-page { max-width: 760px; margin-inline: auto; }
.employee-list { display: grid; gap: .75rem; }
.employee-choice, .employee-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem; border: 1px solid var(--app-border); border-radius: .5rem; background: #fff; color: var(--app-text); text-align: left; font: inherit; overflow-wrap: anywhere; }
.employee-choice { cursor: pointer; min-height: 52px; }
.employee-choice:hover { background: var(--app-hover); border-color: var(--app-primary); }
.employee-choice:focus-visible, .employee-avatar-link:focus-visible { outline: 3px solid var(--app-primary); outline-offset: 3px; }
.employee-avatar-link { display: inline-flex; margin-right: .75rem; border-radius: 50%; text-decoration: none; }
.employee-add-form { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.employee-add-form > :first-child { flex: 1; }
.employee-delete-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.employee-row:has(.employee-delete-confirm) { flex-wrap: wrap; }
.account-role { font-size: .75rem; color: #dce1e7; }
.deadline-note { grid-column: 1 / -1; font-size: .75rem; color: var(--app-muted); }
.month-day[aria-disabled="true"] { box-shadow: inset 0 0 0 2px var(--app-disabled); }
.month-day .month-day-lock { position: absolute; right: .2rem; top: .15rem; width: .75rem; height: .75rem; font-size: .75rem; pointer-events: none; }
@media (max-width: 480px) { .employee-add-form { flex-direction: column; align-items: stretch; } }
.month-day { position: relative; }
.employee-row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 480px) { .employee-row:has(.employee-row-actions) { align-items: stretch; flex-direction: column; } }
.management-page { height: auto; min-height: 0; gap: 1rem; }
.management-page > .mud-input-control, .management-page > .mud-picker { flex: none; }
.account-name { margin-left: 0; }
.appbar-account { min-width: 0; }
.appbar-account .account-name { max-width: 100%; }
.appbar-clock { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; margin-inline: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5; }
.appbar-date { font-size: .75rem; color: #dce1e7; }
.appbar-time { font-size: 1rem; font-weight: 600; }
@media (max-width: 600px) { .appbar-clock { margin-inline: 8px; } .appbar-time { font-size: .875rem; } }
.management-page .lunch-title p, .lunch-registration .lunch-title p { display: block; }
.employee-month-picker { min-width: 0; }
.employee-summary-note { margin: 0; font-size: .875rem; color: var(--app-muted); }
.employee-summary-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.employee-summary-name span { font-size: .75rem; color: var(--app-muted); }
.employee-commitment-count { white-space: nowrap; color: #205331; }
.employee-commitment-count strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .employee-row:has(.employee-commitment-count) { flex-wrap: wrap; gap: .5rem; } .employee-summary-name { flex-basis: 100%; } }
.employee-card { border: 1px solid var(--app-border); border-radius: .5rem; background: white; min-width: 0; }
.employee-card > .employee-row { border: 0; padding: .5rem; gap: .25rem; }
.employee-summary-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 1rem; flex: 1; min-width: 0; min-height: 60px; border: 0; border-radius: .25rem; padding: .5rem; background: transparent; color: var(--app-text); text-align: left; cursor: pointer; }
.employee-summary-toggle:hover { background: var(--app-hover); }
.employee-summary-toggle[aria-expanded="true"] { background: var(--app-hover); }
.employee-card-actions { display: flex; flex-shrink: 0; }
.employee-mobile-expand { display: none; }
.employee-card-detail, .employee-edit-form { padding: 1rem; border-top: 1px solid var(--app-border); }
.employee-edit-form { display: grid; gap: .75rem; }
.employee-month-statistics h2 { margin: 0 0 .75rem; font-size: 1rem; font-weight: 600; }
.employee-statistic-totals, .employee-statistic-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .75rem; margin-bottom: .75rem; }
.employee-mini-calendar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; max-width: 300px; margin-bottom: .75rem; }
.employee-mini-day { display: flex; align-items: center; justify-content: center; gap: .25rem; min-height: 28px; border-radius: .25rem; font-size: .75rem; font-weight: 600; }
.employee-mini-day small { font-size: .65rem; }
.employee-mini-day.day-disabled { background: var(--app-disabled-background); color: var(--app-muted); }
@media (max-width: 600px) {
    .employee-summary-toggle { grid-template-columns: minmax(0, 1fr); justify-items: start; align-content: center; gap: .25rem; min-height: 0; padding: .375rem; }
    .employee-summary-toggle .employee-summary-name { grid-column: auto; flex: initial; gap: .125rem; }
    .employee-summary-name strong { line-height: 1.25; }
    .employee-summary-name .employee-summary-period, .employee-desktop-expand { display: none; }
    .employee-card > .employee-row { flex-wrap: nowrap; align-items: stretch; padding: .25rem .375rem; }
    .employee-card-actions { flex: 0 0 44px; width: auto; flex-direction: column; flex-wrap: nowrap; justify-content: center; }
    .employee-card-actions .mud-icon-button { width: 44px; height: 44px; padding: 10px; }
    .employee-card-actions .employee-mobile-expand { display: inline-flex; }
    .employee-commitment-count strong { font-size: 1.25rem; }
}

/* Let the five weekdays share the available screen height. Content can still
   grow on very small screens or with enlarged text instead of being clipped. */
.lunch-week-view { height: calc(100dvh - 96px); min-height: 0; }
.lunch-week-view .lunch-weeks { min-height: min-content; }
.lunch-day-heading { display: flex; align-items: center; gap: .25rem; }
.lunch-day-heading .day-info-button { width: 36px; height: 36px; flex-shrink: 0; }
.lunch-day-actions { min-width: 148px; display: flex; flex-direction: column; align-items: flex-end; }
.lunch-day-controls { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; }
.lunch-day-controls > .mud-icon-button { width: 44px; height: 44px; }
.lunch-day-controls .meal-switch .mud-switch-span { padding: 10px 8px; }
.meal-label { display: block; font-size: .75rem; line-height: 1.4; text-align: right; }
.meal-label.meal-yes { color: var(--meal-yes-text); }
.meal-label.meal-no { color: var(--meal-no-text); }
.lunch-day.day-disabled .meal-label { color: var(--app-disabled); }
.day-info-content { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
@media (max-width: 999px) {
    .lunch-week-view .lunch-week-heading { display: none; }
    .lunch-week-view .lunch-week { grid-template-rows: repeat(5, minmax(min-content, 1fr)); }
}
@media (max-width: 600px), (max-height: 740px) {
    .lunch-week-view, .lunch-info-page { gap: 4px; }
    .lunch-week-view .lunch-title p, .lunch-info-page .lunch-title p { display: none; }
    .lunch-week-view .lunch-title h1, .lunch-info-page .lunch-title h1 { font-size: 20px; line-height: 24px; margin: 0; }
    :is(.lunch-week-view, .lunch-info-page) .lunch-period-button { min-height: 44px; padding-block: 2px; }
    :is(.lunch-week-view, .lunch-info-page) .lunch-period-title { font-size: 16px; line-height: 20px; }
    :is(.lunch-week-view, .lunch-info-page) .lunch-period-description { line-height: 16px; margin-top: 0; }
    .lunch-week-view .lunch-day { padding-block: 2px; gap: 0 8px; }
    .lunch-week-view .lunch-day-heading .day-info-button { width: 28px; height: 28px; padding: 4px; }
    .lunch-week-view .lunch-day-date time { display: block; line-height: 14px; }
    .lunch-week-view .lunch-day-reason { line-height: 12px; }
    .lunch-week-view .meal-label { font-size: 11px; line-height: 14px; }
    .lunch-week-view .deadline-note { font-size: 11px; line-height: 14px; }
    .lunch-week-view .lunch-actions { flex-direction: row; align-items: center; }
    .lunch-week-view .lunch-save-status { flex: 1; min-width: 0; }
    .lunch-week-view .lunch-action-buttons { flex-shrink: 0; gap: 4px; }
    .lunch-week-view .lunch-action-buttons .mud-button-root { padding-inline: 12px; }
}
@media (max-width: 600px) {
    .lunch-week-view { height: calc(100dvh - 88px); gap: 2px; }
    .lunch-week-view .lunch-actions { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 4px; }
    .lunch-week-view .lunch-save-status { font-size: 11px; line-height: 14px; }
    .lunch-info-page { min-height: 0; height: auto; }
    .lunch-info-page .month-instruction { display: none; }
    .info-summary { flex-shrink: 0; padding: 8px 12px; gap: 0; font-size: 13px; }
    .info-summary > span { line-height: 24px; }
    .info-summary strong { font-size: 20px; }
    .info-days { flex: 1; gap: 4px; grid-template-rows: repeat(5, minmax(min-content, 1fr)); }
    .info-day { min-height: 60px; padding: 6px 12px; gap: 0 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .info-day > span:first-child { font-size: 14px; line-height: 18px; }
    .info-day strong { grid-row: 1; font-size: 24px; line-height: 28px; overflow-wrap: anywhere; min-width: 0; }
    .info-day-counts { grid-column: 1 / -1; line-height: 16px; overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
    .lunch-day { padding-inline: 8px; gap: 4px; }
    .lunch-day-actions { min-width: 136px; }
    .lunch-day-heading { gap: 0; }
}
.employee-import-label { display: block; margin-bottom: .5rem; font-size: .875rem; font-weight: 600; }
.employee-import-file { display: block; max-width: 100%; width: 100%; padding: .75rem; border: 1px solid var(--app-input-line); border-radius: .375rem; font-size: .875rem; }
.employee-import-table td { max-width: 18rem; white-space: normal; overflow-wrap: anywhere; }
.employee-import .mud-alert { overflow-wrap: anywhere; }
.employee-create-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.employee-transfer-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .75rem; }
.employee-create-tools .employee-add-form { min-width: 0; margin-bottom: 0; }
.employee-create-tools .employee-import { display: contents; }
.employee-transfer-tools .employee-import > .mud-button-root { grid-column: 1; grid-row: 1; }
.employee-transfer-tools > .employee-export-button { grid-column: 2; grid-row: 1; }
.employee-transfer-tools .employee-import > .mud-alert { grid-column: 1 / -1; grid-row: 2; }
.employee-create-tools .employee-add-form > .mud-button-root,
.employee-transfer-tools .mud-button-root { min-height: 44px; }
/* Cyan marks actions and participation; navy keeps text readable on light surfaces. */
.mud-appbar { border-bottom: 3px solid var(--app-primary); }
.mud-appbar :focus-visible { outline-color: var(--app-tertiary); }
.drawer-heading { border-bottom: 1px solid var(--app-border); }
.mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) {
    color: var(--app-secondary);
    background: var(--app-hover);
    box-shadow: inset 4px 0 var(--app-primary);
}
.mud-button-text-primary, .mud-button-outlined-primary, .mud-icon-button-color-primary {
    color: var(--app-secondary);
}
.mud-input-label.mud-input-label-inputcontrol.mud-input-label-shrink.mud-primary-text {
    color: var(--app-secondary) !important;
}
.lunch-month h2 { padding: 4px 0 12px; border-bottom: 2px solid var(--app-primary); }
.lunch-month.is-current-month h2 { border-bottom-width: 5px; padding-bottom: 9px; font-weight: 700; }
.month-day { border-color: var(--app-border); font-variant-numeric: tabular-nums; }
.month-day.day-yes { border-color: var(--app-primary); }
.month-day.day-no { border-bottom: 2px solid var(--app-error); }
.month-day.day-disabled { border-color: var(--app-border); }
.month-day:focus-visible { outline: 3px solid var(--app-secondary); outline-offset: 1px; z-index: 1; }
.lunch-week-heading { border-top: 2px solid var(--app-primary); }
.meal-label.meal-yes { font-weight: 600; }
.lunch-actions { border-top: 2px solid var(--app-border); }
.employee-commitment-count strong { border-bottom: 2px solid #205331; }
/* Preserve the familiar participation colors in registration and employee details. */
.lunch-registration, .lunch-week, .employee-month-statistics {
    --meal-yes-bg: #e0f0e5;
    --meal-yes-text: #205331;
    --meal-no-bg: #fbe5e5;
    --meal-no-text: #9b2525;
}
.lunch-registration .month-day:is(.day-yes, .day-no) { border: 1px solid transparent; }
@media (hover: hover) and (pointer: fine) {
    .lunch-registration .month-day:hover { border-color: currentColor; }
}
.employee-import-file::file-selector-button {
    padding: .5rem .75rem;
    margin-right: .75rem;
    border: 0;
    border-radius: .25rem;
    background: var(--app-primary);
    color: var(--app-secondary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
@media (max-width: 600px) {
    .employee-transfer-tools { grid-template-columns: minmax(0, 1fr); }
    .employee-transfer-tools > .employee-export-button { grid-column: 1; grid-row: 2; }
    .employee-transfer-tools .employee-import > .mud-alert { grid-row: 3; }
    .employee-create-tools .employee-add-form { flex-direction: column; align-items: stretch; }
    .employee-create-tools .employee-add-form > .mud-button-root,
    .employee-create-tools .employee-import > .mud-button-root { width: 100%; }
}
