:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --line: #d9e1ea;
    --text: #172033;
    --muted: #66758a;
    --accent: #0d6b63;
    --accent-dark: #084c46;
    --danger: #9f2f2f;
}

/* Sunshine glass theme */
:root {
    --bg: #fffaf0;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --line: rgba(144, 119, 78, 0.18);
    --text: #171a2f;
    --muted: #657085;
    --accent: #3f7c43;
    --accent-dark: #276136;
    --sunshine: #ffd20a;
    --sunshine-soft: #fff3c5;
    --wine: #a51434;
    --wine-dark: #841027;
    --green-soft: #eaf6ec;
    --blue-soft: #eef6ff;
    --glass-shadow: 0 22px 60px rgba(49, 35, 16, 0.10);
    --soft-shadow: 0 10px 28px rgba(31, 41, 65, 0.08);
}

html,
body {
    background:
        radial-gradient(circle at 7% 4%, rgba(255, 210, 10, 0.22), transparent 280px),
        radial-gradient(circle at 92% 8%, rgba(63, 124, 67, 0.10), transparent 340px),
        linear-gradient(135deg, #fffdf8 0%, #fff8de 44%, #f7fbf7 100%);
    color: var(--text);
}

.app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 14px;
    min-height: 100vh;
    padding: 10px;
}

.app-nav {
    min-height: calc(100vh - 20px);
    padding: 16px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 252, 239, 0.72));
    box-shadow: var(--glass-shadow);
    color: var(--text);
    backdrop-filter: blur(18px);
}

.side-nav {
    min-height: calc(100vh - 52px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand {
    position: relative;
    min-height: 104px;
    display: grid;
    place-items: center;
    gap: 0;
    margin: 0 0 8px;
    text-align: center;
}

.brand::before {
    content: "";
    position: absolute;
    top: 0;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--sunshine);
    box-shadow: 0 10px 20px rgba(255, 210, 10, 0.25);
}

.sunshine-mark {
    position: relative;
    z-index: 1;
    margin-top: 28px;
    color: #a41476 !important;
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: 2rem;
    font-weight: 800 !important;
    line-height: 1;
    text-shadow: 0 2px 0 #ffd20a;
}

.brand small {
    position: relative;
    z-index: 1;
    margin-top: -8px;
    color: #2b2633;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.28em;
}

.nav-links {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #20243a;
    font-weight: 650;
}

.nav-link.active {
    border-color: rgba(165, 20, 52, 0.16);
    background: linear-gradient(135deg, var(--wine), #b51c45);
    color: white;
    box-shadow: 0 10px 22px rgba(165, 20, 52, 0.20);
}

.nav-link:hover {
    background: rgba(165, 20, 52, 0.08);
    color: var(--wine);
}

.nav-link.active:hover {
    color: white;
}

.secondary-nav {
    color: #6a7284;
}

.nav-icon {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.nav-spacer {
    flex: 1;
    border-bottom: 1px solid rgba(144, 119, 78, 0.22);
}

.nav-language {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
}

.nav-language select {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
}

.nav-user {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.user-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: rgba(23, 26, 47, 0.08);
    color: var(--text);
}

.nav-user small,
.nav-user strong,
.nav-user a {
    display: block;
}

.nav-user small {
    color: var(--muted);
    font-size: 0.72rem;
}

.nav-user strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user a {
    margin-top: 4px;
    color: var(--wine);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.app-main {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.50);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
}

.workspace {
    gap: 14px;
    padding: 22px 28px;
}

.workspace-header {
    align-items: end;
}

.workspace-header h1 {
    margin: 0;
    color: #171a2f;
    font-size: 2rem;
    letter-spacing: 0;
}

.eyebrow {
    display: none;
}

.muted {
    color: #5d6d83;
}

.header-actions:empty {
    display: none;
}

.toolbar,
.week-grid-shell,
.overview-panel,
.legend-panel,
.admin-panel,
.admin-list,
.admin-drawer {
    border: 1px solid rgba(124, 142, 164, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.toolbar {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.week-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
}

.week-nav-group {
    min-height: 48px;
    padding: 4px;
    border: 1px solid rgba(124, 142, 164, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 24px rgba(31, 41, 65, 0.05);
}

.week-option-group {
    justify-content: end;
}

.icon-nav-button {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #0f172a;
    border-radius: 7px;
}

.icon-nav-button:hover {
    background: rgba(165, 20, 52, 0.08);
    color: var(--wine);
}

.week-picker {
    min-height: 38px;
    border: 0;
    background: transparent;
}

.week-picker span {
    color: #171a2f;
}

.week-picker input {
    color: #344256;
}

button,
.logout-link,
.secondary-button {
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--wine);
    color: white;
    font-weight: 700;
}

button:hover,
.logout-link:hover,
.secondary-button:hover {
    background: var(--wine-dark);
}

.secondary-button {
    border-color: rgba(165, 20, 52, 0.38);
    background: rgba(255, 255, 255, 0.82);
    color: var(--wine);
}

.secondary-button:hover {
    color: white;
}

input,
select {
    border-color: rgba(124, 142, 164, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.switch-row {
    display: flex !important;
    grid-template-columns: none;
    gap: 10px !important;
    align-items: center;
    color: #39465a !important;
}

.switch-row input {
    width: 42px;
    height: 22px;
    accent-color: var(--accent);
}

.compact-action {
    border-color: rgba(165, 20, 52, 0.32);
    color: var(--wine);
}

.week-grid-shell {
    overflow: auto;
}

.meal-matrix {
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
}

.meal-matrix th,
.meal-matrix td {
    border-right: 1px solid rgba(124, 142, 164, 0.18);
    border-bottom: 1px solid rgba(124, 142, 164, 0.18);
}

.meal-matrix thead th {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.70);
    color: #171a2f;
    font-size: 0.92rem;
}

.meal-matrix thead strong {
    color: var(--accent-dark);
}

.line-column {
    width: 94px;
    background: rgba(255, 255, 255, 0.78);
    color: #171a2f;
}

.meal-cell {
    height: 226px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.52);
}

.meal-cell-content {
    padding: 30px 0 42px;
}

.matrix-components {
    color: #111827;
    font-size: 0.84rem;
}

.matrix-components p {
    margin-bottom: 5px;
}

.menu-icons span {
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(63, 124, 67, 0.18);
    background: #eef8ef;
    color: var(--accent-dark);
    font-size: 0.88rem;
    line-height: 1;
}

.info-button {
    width: 24px;
    height: 24px;
    border-color: rgba(165, 20, 52, 0.38);
    background: rgba(255, 255, 255, 0.88);
    color: var(--wine);
    font-family: Georgia, serif;
}

.info-button:hover {
    background: var(--wine);
    color: white;
}

.quantity-box {
    color: #4f5c72;
}

.quantity-box input {
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.88);
}

.meal-bio {
    color: #166534;
    font-size: 1em;
}

.meal-note {
    color: #64748b;
}

.legend-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 4px;
}

.legend-panel h2 {
    color: #171a2f;
}

.legend-item {
    border-color: rgba(124, 142, 164, 0.22);
    background: rgba(255, 255, 255, 0.72);
}

.legend-item strong,
.info-chip,
.allergen-list strong {
    border-color: rgba(63, 124, 67, 0.24);
    background: #eef8ef;
    color: var(--accent-dark);
}

.allergen-modal,
.menu-info-modal {
    border: 1px solid rgba(124, 142, 164, 0.24);
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 24px 70px rgba(31, 41, 65, 0.18);
    backdrop-filter: blur(18px);
}

.month-card.available {
    border-color: rgba(63, 124, 67, 0.24);
    background: linear-gradient(180deg, rgba(234, 246, 236, 0.92), rgba(255, 255, 255, 0.72));
}

.progress-track span {
    background: #2db56f;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-nav {
        min-height: auto;
    }

    .side-nav {
        min-height: auto;
    }

    .nav-spacer,
    .nav-user {
        display: none;
    }

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

    .week-toolbar {
        grid-template-columns: 1fr;
    }

    .week-option-group {
        justify-content: start;
    }
}

/* Ultimate responsive navigation and mobile day view */
.mobile-day-panel {
    display: none;
}

@media (min-width: 981px) {
    html,
    body {
        height: 100%;
        overflow: hidden !important;
    }

    .app-shell {
        height: 100vh !important;
        overflow: hidden !important;
    }

    .app-nav {
        position: sticky !important;
        top: 10px !important;
        height: calc(100vh - 20px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .side-nav {
        height: 100% !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .app-main {
        height: calc(100vh - 20px) !important;
        overflow: auto !important;
    }

    .mobile-menu-button,
    .nav-scrim {
        display: none !important;
    }
}

@media (max-width: 980px) {
    html,
    body {
        height: auto !important;
        min-height: 100vh !important;
        overflow: auto !important;
    }

    .app-shell {
        display: block !important;
        min-height: 100vh !important;
        height: auto !important;
        padding: 70px 10px 10px !important;
        overflow: visible !important;
    }

    .app-nav {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        z-index: 2000 !important;
        width: 52px !important;
        height: 52px !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .mobile-menu-button {
        display: inline-grid !important;
        width: 52px !important;
        height: 52px !important;
        place-items: center !important;
        gap: 4px !important;
        padding: 0 !important;
        border: 1px solid rgba(124, 142, 164, 0.24) !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.92) !important;
        box-shadow: 0 10px 28px rgba(31, 41, 65, 0.16) !important;
        color: #171a2f !important;
    }

    .mobile-menu-button span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        border-radius: 999px !important;
        background: #171a2f !important;
    }

    .nav-scrim {
        display: none !important;
    }

    .nav-scrim.open {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 2001 !important;
        width: auto !important;
        height: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: rgba(15, 23, 42, 0.26) !important;
        backdrop-filter: blur(2px) !important;
    }

    .side-nav {
        position: fixed !important;
        top: 10px !important;
        bottom: 10px !important;
        left: 10px !important;
        z-index: 2002 !important;
        width: min(318px, calc(100vw - 20px)) !important;
        height: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        padding: 16px 14px !important;
        border: 1px solid rgba(124, 142, 164, 0.22) !important;
        border-radius: 14px !important;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 239, 0.90)) !important;
        box-shadow: 0 26px 70px rgba(31, 41, 65, 0.24) !important;
        transform: translateX(calc(-100% - 24px)) !important;
        transition: transform 180ms ease !important;
        overflow: hidden !important;
    }

    .side-nav.open {
        transform: translateX(0) !important;
    }

    .brand {
        min-height: 98px !important;
        padding: 4px 0 8px !important;
    }

    .brand img {
        width: min(190px, 100%) !important;
        height: auto !important;
    }

    .nav-links {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .nav-spacer {
        display: block !important;
        flex: 1 !important;
    }

    .nav-user {
        display: grid !important;
    }

    .app-main {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .workspace {
        padding: 10px !important;
    }

    .workspace-header h1 {
        font-size: 1.55rem !important;
    }

    .week-toolbar {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .week-nav-group,
    .week-option-group {
        width: 100% !important;
        justify-content: stretch !important;
        flex-wrap: wrap !important;
    }

    .week-picker {
        flex: 1 1 auto !important;
    }
}

@media (max-width: 720px) {
    .week-grid-shell {
        display: none !important;
    }

    .mobile-day-panel {
        display: grid !important;
        gap: 12px;
    }

    .mobile-day-header,
    .mobile-meal-card {
        border: 1px solid rgba(124, 142, 164, 0.22);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.78);
        box-shadow: var(--soft-shadow);
        backdrop-filter: blur(14px);
    }

    .mobile-day-header {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        padding: 8px;
        text-align: center;
    }

    .mobile-day-header span,
    .mobile-day-header strong {
        display: block;
    }

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

    .mobile-day-header strong {
        color: var(--accent-dark);
        font-size: 1.05rem;
    }

    .mobile-meal-card {
        display: grid;
        gap: 12px;
        padding: 14px;
    }

    .mobile-meal-card > header,
    .mobile-meal-card > footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-meal-card > header > strong {
        color: #171a2f;
        font-size: 1.1rem;
    }

    .mobile-meal-card .menu-icons {
        position: static;
        display: flex;
        gap: 4px;
    }

    .mobile-meal-card .quantity-box {
        position: static;
        width: auto;
    }

    .mobile-info-button {
        position: static !important;
        flex: 0 0 auto;
    }

    .mobile-meal-card .matrix-components {
        font-size: 0.92rem;
    }

    .legend-panel {
        grid-template-columns: 1fr !important;
    }
}

/* Navigation and responsive polish */
html,
body {
    min-height: 100%;
    overflow: hidden;
}

.app-shell {
    height: 100vh;
    overflow: hidden;
}

.app-nav {
    position: sticky;
    top: 10px;
    height: calc(100vh - 20px);
    min-height: 0;
    overflow: hidden;
}

.app-main {
    height: calc(100vh - 20px);
    overflow: auto;
}

.side-nav {
    height: 100%;
    min-height: 0;
}

.brand {
    min-height: 112px;
    padding: 6px 0 14px;
}

.brand::before {
    display: none;
}

.brand img {
    display: block;
    width: min(190px, 100%);
    height: auto;
    object-fit: contain;
}

.sunshine-mark,
.brand small {
    display: none;
}

.mobile-menu-button,
.nav-scrim {
    display: none;
}

.language-globe {
    display: inline-grid;
    width: 20px;
    height: 20px;
    margin-right: 4px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 210, 10, 0.28);
    color: var(--wine);
    font-size: 0.82rem;
}

.week-toolbar {
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.week-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-nav-button {
    display: inline-grid;
    place-items: center;
    font-size: 1.2rem;
    font-weight: 800;
}

.week-picker {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.week-picker input {
    min-height: 34px;
    border: 0;
    background: transparent;
}

.week-option-group {
    gap: 18px;
}

.switch-row input[type="checkbox"] {
    position: relative;
    width: 46px;
    height: 24px;
    margin: 0;
    appearance: none;
    border: 1px solid rgba(124, 142, 164, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 2px rgba(31, 41, 65, 0.08);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.switch-row input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 7px rgba(31, 41, 65, 0.22);
    transition: transform 160ms ease;
}

.switch-row input[type="checkbox"]:checked {
    border-color: #2f7fe8;
    background: #2f7fe8;
}

.switch-row input[type="checkbox"]:checked::before {
    transform: translateX(22px);
}

.icon-badge {
    --icon-bg: #eef8ef;
    --icon-border: rgba(63, 124, 67, 0.2);
    --icon-color: #2b7a38;
    display: inline-grid !important;
    min-width: 28px !important;
    width: 28px;
    height: 28px !important;
    place-items: center;
    padding: 0 !important;
    border: 1px solid var(--icon-border) !important;
    border-radius: 50% !important;
    background: var(--icon-bg) !important;
    color: var(--icon-color) !important;
    box-shadow: 0 2px 8px rgba(31, 41, 65, 0.08);
}

.icon-glyph {
    display: block;
    font-size: 0.9rem;
    line-height: 1;
    transform: translateY(-0.5px);
}

.icon-fish {
    --icon-bg: #e8f4ff;
    --icon-border: rgba(47, 127, 232, 0.28);
    --icon-color: #2563eb;
}

.icon-beef {
    --icon-bg: #f6eff9;
    --icon-border: rgba(136, 76, 161, 0.24);
    --icon-color: #7e3f98;
}

.icon-pork {
    --icon-bg: #fff0f5;
    --icon-border: rgba(219, 39, 119, 0.22);
    --icon-color: #be185d;
}

.icon-poultry {
    --icon-bg: #fff4e6;
    --icon-border: rgba(217, 119, 6, 0.24);
    --icon-color: #b45309;
}

.icon-cold {
    --icon-bg: #eef7ff;
    --icon-border: rgba(14, 116, 144, 0.22);
    --icon-color: #0e7490;
}

.legend-item.icon-badge {
    width: auto;
    min-width: 0 !important;
    height: auto !important;
    display: inline-flex !important;
    gap: 7px;
    padding: 5px 10px 5px 5px !important;
    border-radius: 999px !important;
    color: #21304a !important;
}

.legend-item.icon-badge strong {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--icon-bg);
    color: var(--icon-color);
}

@media (max-width: 980px) {
    html,
    body,
    .app-shell,
    .app-main {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .app-shell {
        display: block;
        padding: 72px 10px 10px;
    }

    .app-nav {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        z-index: 80;
        height: 52px;
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .mobile-menu-button {
        display: inline-grid;
        width: 52px;
        height: 52px;
        place-items: center;
        gap: 4px;
        border: 1px solid rgba(124, 142, 164, 0.22);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.88);
        box-shadow: var(--soft-shadow);
    }

    .mobile-menu-button span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: #171a2f;
    }

    .nav-scrim.open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 81;
        border: 0;
        border-radius: 0;
        background: rgba(15, 23, 42, 0.28);
        backdrop-filter: blur(2px);
    }

    .side-nav {
        position: fixed;
        top: 10px;
        bottom: 10px;
        left: 10px;
        z-index: 82;
        width: min(318px, calc(100vw - 20px));
        height: auto;
        min-height: 0;
        padding: 16px 14px;
        border: 1px solid rgba(124, 142, 164, 0.22);
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 239, 0.86));
        box-shadow: var(--glass-shadow);
        transform: translateX(calc(-100% - 18px));
        transition: transform 180ms ease;
        overflow: hidden;
    }

    .side-nav.open {
        transform: translateX(0);
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .nav-spacer,
    .nav-user {
        display: grid;
    }

    .workspace {
        padding: 18px 10px;
    }

    .week-toolbar {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .week-nav-group,
    .week-option-group {
        justify-content: stretch;
        flex-wrap: wrap;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px 1fr;
}

.app-nav {
    background: #13212f;
    color: #eef4f8;
    padding: 24px 18px;
}

.side-nav {
    display: grid;
    gap: 10px;
}

.brand {
    display: grid;
    gap: 4px;
    text-decoration: none;
    margin-bottom: 24px;
}

.brand span {
    color: #88d2ca;
    font-weight: 700;
    letter-spacing: 0;
}

.brand strong {
    font-size: 1.05rem;
}

.nav-link {
    color: #dbe7ee;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.app-main {
    min-width: 0;
}

.workspace {
    display: grid;
    gap: 18px;
    padding: 28px;
}

.workspace-header,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.workspace-header h1 {
    margin: 2px 0 4px;
    font-size: 2rem;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-weight: 700;
}

.muted {
    margin: 0;
    color: var(--muted);
}

.header-actions,
.toolbar {
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar {
    justify-content: flex-start;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.toolbar label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.week-toolbar {
    justify-content: space-between;
}

.week-nav-group,
.week-option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-nav-button {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    background: white;
    color: #213c64;
    font-size: 1.4rem;
    line-height: 1;
}

.icon-nav-button:hover {
    background: #eef6ff;
    color: #0d4ea3;
}

.week-picker {
    grid-template-columns: auto auto;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}

.week-picker span {
    color: #213c64;
    font-weight: 700;
}

.week-picker input {
    width: 164px;
    border: 0;
}

.switch-row {
    grid-template-columns: auto auto;
    align-items: center;
    color: var(--text) !important;
}

.switch-row input {
    width: 42px;
    height: 22px;
    accent-color: var(--accent);
}

button,
.logout-link {
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.logout-link:hover {
    background: var(--accent-dark);
}

input,
select {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    background: white;
    color: var(--text);
}

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

.order-grid-shell {
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.order-grid {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.order-grid th,
.order-grid td {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.order-grid th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f9fbfd;
}

.order-grid thead th {
    background: #edf3f8;
    color: #25344a;
}

.order-grid thead span,
.order-grid thead strong {
    display: block;
}

.order-grid input[type="number"] {
    width: 92px;
}

.order-grid tfoot th,
.order-grid tfoot td {
    background: #f6faf9;
    font-weight: 700;
}

.locked {
    background: #f7f0f0;
}

.non-delivery {
    background: #f3f1ed !important;
}

.not-available,
.cell-note {
    color: var(--muted);
    font-size: 0.85rem;
}

.cell-note {
    display: block;
    margin-top: 5px;
}

.meal-week {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    align-items: start;
}

.week-grid-shell {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.customer-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.14fr) minmax(360px, 0.86fr);
    gap: 16px;
    align-items: start;
}

.meal-matrix {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
}

.meal-matrix th,
.meal-matrix td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.meal-matrix thead th {
    padding: 10px;
    background: #dce7f3;
    color: #213c64;
    text-align: left;
}

.meal-matrix thead span,
.meal-matrix thead strong {
    display: block;
}

.meal-matrix thead em {
    display: block;
    margin-top: 4px;
    color: var(--danger);
    font-style: normal;
    font-size: 0.78rem;
}

.meal-matrix thead em.school {
    color: #1d5fae;
}

.meal-matrix tfoot th,
.meal-matrix tfoot td {
    padding: 10px;
    background: #f6faf9;
    font-weight: 700;
}

.line-column {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 92px;
    padding: 12px 10px;
    background: #f9fbfd;
    color: #13212f;
    text-align: left;
}

.meal-cell {
    position: relative;
    height: 220px;
    padding: 9px;
    background: white;
}

.meal-cell-content {
    position: static;
    padding: 28px 0 34px;
}

.matrix-components {
    align-content: start;
    font-size: 0.84rem;
}

.matrix-components p {
    line-height: 1.32;
}

.matrix-icons {
    position: absolute;
    top: 5px;
    right: 5px;
    min-height: 24px;
    justify-content: flex-end;
}

.info-button {
    position: absolute;
    left: 5px;
    bottom: 5px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #7fb6ff;
    border-radius: 50%;
    background: white;
    color: #1267d8;
    font-size: 0.8rem;
    font-weight: 700;
}

.info-button:hover {
    background: #eef6ff;
    color: #0d4ea3;
}

.matrix-quantity {
    position: absolute;
    right: 5px;
    bottom: 5px;
}

.cell-note {
    position: absolute;
    right: 5px;
    bottom: 38px;
    color: var(--muted);
    font-size: 0.76rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(19, 33, 47, 0.38);
}

.menu-info-modal {
    width: min(760px, 100%);
    max-height: min(760px, 92vh);
    overflow: auto;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #b9d3f3;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 60px rgba(19, 33, 47, 0.28);
}

.menu-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.menu-info-header h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.menu-info-header p {
    margin: 0;
    color: var(--muted);
}

.icon-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: white;
    border: 1px solid #9dc6f8;
    color: #213c64;
    font-size: 1.2rem;
}

.menu-info-summary {
    padding: 12px 14px;
    border: 1px solid #c8dcf5;
    border-radius: 8px;
    background: #fbfdff;
    color: #213c64;
    line-height: 1.5;
}

.info-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.info-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.info-chip-grid section,
.component-detail-card {
    padding: 12px;
    border: 1px solid #c8dcf5;
    border-radius: 8px;
    background: #fbfdff;
}

.info-chip-grid h3 {
    margin: 0 0 10px;
    font-size: 0.98rem;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid #a9cdfb;
    border-radius: 999px;
    background: #f7fbff;
    color: #1d5fae;
    font-size: 0.84rem;
}

.info-chip.strong {
    background: #eaf4ff;
    color: #125aab;
    font-weight: 600;
}

.legend-panel {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.legend-panel h2 {
    margin: 0 0 3px;
    font-size: 1rem;
}

.legend-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 3px 9px 3px 4px;
    border: 1px solid #c8dcf5;
    border-radius: 999px;
    color: #213c64;
    background: #f7fbff;
    font-size: 0.83rem;
}

.legend-item strong {
    display: inline-grid;
    min-width: 24px;
    min-height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #eaf4ff;
    color: #125aab;
    font-size: 0.78rem;
}

.compact-action {
    min-height: 36px;
    padding-inline: 12px;
    white-space: nowrap;
}

.allergen-modal {
    width: min(640px, 100%);
    max-height: min(760px, 92vh);
    overflow: auto;
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.allergen-list {
    display: grid;
    gap: 4px;
}

.allergen-list article {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
}

.allergen-list strong {
    display: inline-grid;
    min-height: 26px;
    place-items: center;
    border: 1px solid #a9cdfb;
    border-radius: 999px;
    color: #125aab;
    background: #eaf4ff;
    font-size: 0.83rem;
}

.component-details summary {
    color: #1764c2;
    font-weight: 700;
    cursor: pointer;
}

.component-detail-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.component-detail-card header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #213c64;
}

.component-detail-card p {
    margin: 8px 0 10px;
    color: #274d7d;
}

.day-plan {
    min-width: 0;
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.day-plan-header,
.day-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.day-plan-header span {
    color: var(--muted);
    font-size: 0.92rem;
}

.day-plan-header strong {
    font-size: 1.05rem;
}

.menu-card-list {
    display: grid;
    gap: 10px;
}

.menu-card {
    position: relative;
    min-height: 178px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--menu-color), #97a6b4 35%);
    border-left: 6px solid color-mix(in srgb, var(--menu-color), #0d6b63 44%);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--menu-color), #fff 72%);
}

.menu-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.menu-line {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    color: #13212f;
    font-weight: 800;
}

.menu-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.menu-icons span {
    min-width: 28px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(19, 33, 47, 0.1);
    color: #25344a;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.menu-components {
    display: grid;
    gap: 6px;
    padding-bottom: 4px;
}

.menu-components p {
    margin: 0;
    line-height: 1.35;
}

.component-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
}

.component-info {
    position: relative;
}

.component-info summary {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(19, 33, 47, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.component-info summary::-webkit-details-marker {
    display: none;
}

.component-info span {
    position: absolute;
    right: 0;
    top: 28px;
    z-index: 4;
    width: min(280px, 78vw);
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    box-shadow: 0 10px 24px rgba(19, 33, 47, 0.16);
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.35;
}

.menu-declaration {
    color: var(--muted);
    font-size: 0.78rem;
}

.meal-note {
    color: var(--muted);
    font-size: 0.86em;
}

.meal-bio {
    color: #26804b;
    font-size: 0.86em;
    font-weight: 700;
}

.quantity-box {
    justify-self: end;
    display: grid;
    grid-template-columns: auto 82px;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.quantity-box input {
    width: 82px;
    text-align: right;
    font-weight: 700;
}

.matrix-quantity.quantity-box {
    width: auto;
    grid-template-columns: auto 82px;
}

.day-total {
    padding-top: 2px;
    color: var(--muted);
}

.day-total strong {
    color: var(--text);
    font-size: 1.1rem;
}

.empty-day {
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #f9fbfd;
}

.alert-message,
.empty-state {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.alert-message {
    border-color: #e7b9b9;
    color: var(--danger);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #eef3f6;
}

.login-panel {
    width: min(420px, 100%);
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.login-panel h1 {
    margin: 0 0 4px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-workbench {
    display: grid;
    gap: 12px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--line);
}

.admin-tabs button {
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--muted);
}

.admin-tabs button.active,
.admin-tabs button:hover {
    background: var(--accent);
    color: white;
}

.admin-tools,
.import-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-tools label,
.import-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
}

.admin-tools input[type="search"] {
    min-width: min(360px, 78vw);
}

.admin-master-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 16px;
    align-items: start;
}

.admin-panel,
.admin-list,
.admin-drawer {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.admin-panel h2,
.admin-list h2,
.admin-drawer h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.admin-drawer {
    position: sticky;
    top: 16px;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
}

.readonly-fields {
    display: grid;
    gap: 4px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f9fbfd;
    color: var(--text);
}

.readonly-fields span:first-child {
    color: var(--muted);
    font-size: 0.84rem;
}

.inline-check {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
}

.inline-check input {
    width: auto;
}

.menu-rights {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.menu-rights legend {
    padding: 0 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.calendar-region-box {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.calendar-region-box legend {
    padding: 0 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.calendar-region-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.calendar-region-values span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f9fbfd;
    color: var(--muted);
    font-size: 0.82rem;
}

.calendar-region-values strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-wrap {
    overflow: auto;
}

.admin-table {
    min-width: 920px;
}

.click-row {
    cursor: pointer;
}

.click-row:hover {
    background: #f6faf9;
}

.portion-editor {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.portion-editor-head,
.portion-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.portion-editor h3 {
    margin: 0;
    font-size: 1rem;
}

.portion-toolbar label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 0.86rem;
}

.portion-grid {
    overflow: auto;
}

.portion-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.portion-table th,
.portion-table td {
    border: 1px solid var(--line);
    padding: 7px;
    text-align: left;
}

.portion-table thead th {
    background: #edf3f8;
}

.portion-table input[type="number"] {
    width: 72px;
    padding: 7px;
    text-align: right;
    font-weight: 700;
}

.admin-subsection {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.admin-subsection h3 {
    margin: 0;
    font-size: 1rem;
}

.compact-list {
    display: grid;
    gap: 6px;
}

.link-row {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: #f9fbfd;
    color: var(--text);
    text-align: left;
}

.link-row:hover {
    background: #edf3f8;
    color: var(--text);
}

.compact-form {
    gap: 9px;
}

.overview-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.overview-panel.standalone {
    padding: 18px;
}

.overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.overview-head h2 {
    margin: 0 0 4px;
    font-size: 1.55rem;
}

.overview-head p,
.assigned-plan {
    margin: 0;
    color: var(--muted);
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #7fb6ff;
    background: white;
    color: #125aab;
    text-decoration: none;
}

.secondary-button:hover {
    background: #eef6ff;
    color: #0d4ea3;
}

.danger-button {
    border: 1px solid #e1a6a6;
    background: white;
    color: var(--danger);
}

.danger-button:hover {
    background: #fff1f1;
    color: #7f1f1f;
}

.month-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.month-card {
    display: grid;
    gap: 10px;
    min-height: 166px;
    padding: 12px;
    border: 1px solid #cfd9e6;
    border-radius: 8px;
    background: #fff;
}

.month-card.available {
    background: #f0fff6;
    border-color: #8fd7aa;
}

.month-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.month-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.month-card header span {
    padding: 3px 8px;
    border: 1px solid #acd5ba;
    border-radius: 999px;
    color: #27643e;
    font-size: 0.78rem;
    font-weight: 700;
}

.month-card.unavailable header span {
    border-color: #cbd4df;
    color: var(--muted);
}

.month-card dl {
    display: grid;
    gap: 4px;
    margin: 0;
}

.month-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.month-card dt,
.month-card dd {
    margin: 0;
}

.month-card dt,
.month-card small {
    color: var(--muted);
}

.month-card dd {
    font-weight: 700;
}

.progress-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4ebf2;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2fbf74;
}

.month-link {
    justify-self: end;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: #fff3cd;
    color: #493900;
    z-index: 1000;
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-nav {
        padding: 14px;
    }

    .side-nav {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .brand {
        margin-bottom: 0;
    }

    .workspace {
        padding: 16px;
    }

    .workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-master-detail {
        grid-template-columns: 1fr;
    }

    .admin-drawer {
        position: static;
    }

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

        .calendar-region-values {
            grid-template-columns: 1fr;
        }

        .meal-week {
        grid-template-columns: 1fr;
    }

    .meal-matrix {
        min-width: 760px;
    }

    .customer-dashboard {
        grid-template-columns: 1fr;
    }

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

    .meal-cell {
        height: 190px;
    }

        .info-chip-grid {
            grid-template-columns: 1fr;
        }

        .legend-panel {
            grid-template-columns: 1fr;
        }

        .quantity-box {
            width: 100%;
            grid-template-columns: 1fr 92px;
        }

        .matrix-quantity.quantity-box {
            width: auto;
            grid-template-columns: auto 82px;
        }
}

@media (max-width: 560px) {
    .toolbar,
    .overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .meal-matrix {
        min-width: 640px;
    }

    .line-column {
        width: 70px;
    }

    .meal-cell {
        height: 180px;
        padding: 8px;
    }

    .matrix-components {
        font-size: 0.78rem;
    }

    .month-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* Final Sunshine mockup overrides */
html,
body {
    background:
        radial-gradient(circle at 6% 3%, rgba(255, 210, 10, 0.20), transparent 280px),
        radial-gradient(circle at 96% 8%, rgba(63, 124, 67, 0.10), transparent 340px),
        linear-gradient(135deg, #fffdf8 0%, #fff8de 44%, #f7fbf7 100%) !important;
}

.app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 14px;
    padding: 10px;
}

.app-nav,
.app-main,
.toolbar,
.week-grid-shell,
.overview-panel,
.legend-panel,
.admin-panel,
.admin-list,
.admin-drawer {
    border: 1px solid rgba(124, 142, 164, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(14px);
}

.app-nav {
    min-height: calc(100vh - 20px);
    padding: 16px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(255, 252, 239, 0.74));
    color: var(--text);
    box-shadow: var(--glass-shadow);
}

.side-nav {
    min-height: calc(100vh - 52px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand {
    position: relative;
    min-height: 104px;
    display: grid;
    place-items: center;
    gap: 0;
    margin: 0 0 8px;
    text-align: center;
}

.brand::before {
    content: "";
    position: absolute;
    top: 0;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--sunshine);
    box-shadow: 0 10px 20px rgba(255, 210, 10, 0.25);
}

.sunshine-mark {
    position: relative;
    z-index: 1;
    margin-top: 28px;
    color: #a41476 !important;
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: 2rem;
    font-weight: 800 !important;
    line-height: 1;
    text-shadow: 0 2px 0 #ffd20a;
}

.brand small {
    position: relative;
    z-index: 1;
    margin-top: -8px;
    color: #2b2633;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.28em;
}

.nav-links {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #20243a;
    font-weight: 650;
}

.nav-link.active {
    border-color: rgba(165, 20, 52, 0.16);
    background: linear-gradient(135deg, var(--wine), #b51c45) !important;
    color: white !important;
    box-shadow: 0 10px 22px rgba(165, 20, 52, 0.20);
}

.nav-link:hover {
    background: rgba(165, 20, 52, 0.08);
    color: var(--wine);
}

.nav-icon {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.nav-spacer {
    flex: 1;
    border-bottom: 1px solid rgba(144, 119, 78, 0.22);
}

.nav-language {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
}

.nav-user {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.user-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: rgba(23, 26, 47, 0.08);
}

.nav-user small,
.nav-user strong,
.nav-user a {
    display: block;
}

.nav-user small {
    color: var(--muted);
    font-size: 0.72rem;
}

.nav-user strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user a {
    margin-top: 4px;
    color: var(--wine);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.app-main {
    min-width: 0;
    background: rgba(255, 255, 255, 0.50);
    box-shadow: var(--glass-shadow);
}

.workspace {
    gap: 14px;
    padding: 22px 28px;
}

.workspace-header {
    align-items: end;
}

.workspace-header h1 {
    margin: 0;
    color: #171a2f;
    font-size: 2rem;
}

.eyebrow,
.header-actions:empty {
    display: none;
}

.toolbar {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.week-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
}

.week-nav-group {
    min-height: 48px;
    padding: 4px;
    border: 1px solid rgba(124, 142, 164, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 24px rgba(31, 41, 65, 0.05);
}

.week-option-group {
    justify-content: end;
}

.icon-nav-button {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #0f172a;
    border-radius: 7px;
}

.week-picker {
    min-height: 38px;
    border: 0;
    background: transparent;
}

.week-picker span {
    color: #171a2f;
}

button,
.logout-link,
.secondary-button {
    border-radius: 8px;
    background: var(--wine);
    color: white;
    font-weight: 700;
}

button:hover,
.logout-link:hover,
.secondary-button:hover {
    background: var(--wine-dark);
}

.secondary-button,
.compact-action {
    border: 1px solid rgba(165, 20, 52, 0.38);
    background: rgba(255, 255, 255, 0.82);
    color: var(--wine);
}

.switch-row {
    display: flex !important;
    gap: 10px !important;
    align-items: center;
    color: #39465a !important;
}

.meal-matrix {
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
}

.meal-matrix th,
.meal-matrix td {
    border-right: 1px solid rgba(124, 142, 164, 0.18);
    border-bottom: 1px solid rgba(124, 142, 164, 0.18);
}

.meal-matrix thead th {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.70);
    color: #171a2f;
    font-size: 0.92rem;
}

.meal-matrix thead strong {
    color: var(--accent-dark);
}

.line-column {
    width: 94px;
    background: rgba(255, 255, 255, 0.78);
}

.meal-cell {
    height: 226px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.52);
}

.meal-cell-content {
    position: static;
    padding: 30px 0 42px;
}

.matrix-components {
    color: #111827;
    font-size: 0.84rem;
}

.matrix-components p {
    margin-bottom: 5px;
}

.matrix-icons {
    top: 5px;
    right: 5px;
}

.menu-icons span {
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(63, 124, 67, 0.18);
    background: #eef8ef;
    color: var(--accent-dark);
    font-size: 0.88rem;
    line-height: 1;
}

.info-button {
    left: 5px;
    bottom: 5px;
    width: 24px;
    height: 24px;
    border-color: rgba(165, 20, 52, 0.38);
    background: rgba(255, 255, 255, 0.88);
    color: var(--wine);
    font-family: Georgia, serif;
}

.matrix-quantity {
    right: 5px;
    bottom: 5px;
}

.meal-bio {
    color: #166534;
    font-size: 1em;
}

.legend-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 4px;
}

.legend-item {
    border-color: rgba(124, 142, 164, 0.22);
    background: rgba(255, 255, 255, 0.72);
}

.legend-item strong,
.info-chip,
.allergen-list strong {
    border-color: rgba(63, 124, 67, 0.24);
    background: #eef8ef;
    color: var(--accent-dark);
}

.allergen-modal,
.menu-info-modal {
    border: 1px solid rgba(124, 142, 164, 0.24);
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 24px 70px rgba(31, 41, 65, 0.18);
    backdrop-filter: blur(18px);
}

.month-card.available {
    border-color: rgba(63, 124, 67, 0.24);
    background: linear-gradient(180deg, rgba(234, 246, 236, 0.92), rgba(255, 255, 255, 0.72));
}

.progress-track span {
    background: #2db56f;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-nav,
    .side-nav {
        min-height: auto;
    }

    .nav-spacer,
    .nav-user {
        display: none;
    }

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

    .week-toolbar {
        grid-template-columns: 1fr;
    }

    .week-option-group {
        justify-content: start;
    }
}
