@font-face {
    font-family: Inter;
    src: url('../fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap
}

:root, [data-bs-theme=light] {
    --chef-bg: #f5f6f8;
    --chef-panel: #fff;
    --chef-ink: #172b3a;
    --chef-muted: #6b7786;
    --chef-line: #e1e6eb;
    --chef-accent: #176b5c;
    --chef-soft: #e8f3ef;
    --chef-warn: #94611b;
    --bs-primary: #176b5c;
    --bs-body-font-family: Inter,system-ui,sans-serif
}

[data-bs-theme=dark] {
    --chef-bg: #111a22;
    --chef-panel: #192630;
    --chef-ink: #e7eef3;
    --chef-muted: #9faebc;
    --chef-line: #2d3f4c;
    --chef-accent: #74c7b0;
    --chef-soft: #1d3b34;
    --chef-warn: #efbd7b;
    --bs-body-bg: #192630;
    --bs-body-color: #e7eef3;
    --bs-border-color: #2d3f4c
}

body {
    margin: 0;
    background: var(--chef-bg);
    color: var(--chef-ink);
    font-size: 14px
}

a {
    color: var(--chef-accent);
    text-decoration: none
}

    a:hover {
        text-decoration: underline
    }

button, input, select, textarea {
    font: inherit
}

.chef-app {
    min-height: 100vh
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: var(--chef-panel);
    border-right: 1px solid var(--chef-line);
    padding: 30px 18px;
    flex-direction: column;
    overflow-y: auto
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--chef-ink);
    padding: 0 12px 30px
}

    .brand:hover {
        text-decoration: none
    }

    .brand strong {
        display: block;
        font-size: 19px;
        letter-spacing: -.7px
    }

    .brand small {
        display: block;
        font-size: 8px;
        letter-spacing: 1.5px;
        margin-top: 4px;
        font-weight: 700;
        color: var(--chef-muted)
    }

.brand-mark {
    display: grid;
    place-items: center;
    background: #176b5c;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 25px;
    font-weight: 700
}

.navigation {
    display: grid;
    gap: 5px
}

    .navigation a {
        display: flex;
        gap: 12px;
        align-items: center;
        padding: 11px 14px;
        border-radius: 8px;
        color: var(--chef-muted);
        font-weight: 550
    }

        .navigation a > .fa {
            width: 19px;
            flex: none;
            text-align: center;
            font-size: 16px
        }

        .navigation a:hover, .navigation a.active {
            background: var(--chef-soft);
            color: var(--chef-accent);
            text-decoration: none
        }

        .navigation a[aria-current="page"] {
            background: var(--chef-soft);
            color: var(--chef-accent);
            box-shadow: inset 3px 0 0 var(--chef-accent);
            font-weight: 650
        }

.nav-label {
    font-size: 9px;
    letter-spacing: 1.7px;
    font-weight: 700;
    color: var(--chef-muted);
    margin: 20px 14px 9px
}

.sidebar-footer {
    font-size: 10px;
    color: var(--chef-muted);
    border-top: 1px solid var(--chef-line);
    padding-top: 20px;
    margin-top: auto
}

.status-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    border-radius: 50%;
    background: #299874;
    margin-right: 5px
}

.main-shell {
    margin-left: 240px
}

.topbar {
    height: 75px;
    border-bottom: 1px solid var(--chef-line);
    background: var(--chef-panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    gap: 16px
}

.topbar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--chef-muted)
}

.account-link {
    font-size: 11px;
    color: var(--chef-muted);
    padding: 7px
}

.theme-toggle {
    display: flex;
    border: 1px solid var(--chef-line);
    padding: 3px;
    border-radius: 7px;
    gap: 2px
}

    .theme-toggle button {
        border: 0;
        background: transparent;
        padding: 4px 7px;
        border-radius: 4px;
        color: var(--chef-muted);
        font-size: 10px
    }

        .theme-toggle button.active {
            background: var(--chef-soft);
            color: var(--chef-accent)
        }

.content {
    max-width: 1480px;
    margin: auto;
    padding: 5px 36px 40px
}

.app-footer {
    font-size: 10px;
    color: var(--chef-muted);
    padding: 10px 36px 24px
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 24px;
    margin-bottom: 18px
}

.page-heading-title {
    flex: 1 1 240px;
    min-width: 0;
    overflow-wrap: anywhere
}

.page-actions {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: .65rem;
    max-width: 65%;
    min-width: 0;
    margin-left: auto
}

    .page-actions:empty {
        display: none
    }

    .page-actions > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
        min-height: 42px;
        max-width: 100%
    }

    .page-actions > [aria-expanded="true"] {
        background: var(--chef-soft);
        border-color: var(--chef-accent);
        color: var(--chef-accent)
}

.eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--chef-accent);
    margin-bottom: 9px
}

h1 {
    font-size: 28px;
    letter-spacing: -1px;
    font-weight: 650;
    margin-bottom: 8px
}

h2 {
    font-size: 18px;
    letter-spacing: -.45px;
    font-weight: 650
}

h3 {
    font-size: 15px;
    font-weight: 650
}

.panel {
    background: var(--chef-panel);
    border: 1px solid var(--chef-line);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px
}

    .panel-header h2 {
        margin: 0
    }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
    margin-bottom: 26px
}

.metric {
    padding: 22px;
    border: 1px solid var(--chef-line);
    border-radius: 11px;
    background: var(--chef-panel)
}

    .metric .value {
        font-size: 31px;
        letter-spacing: -1px;
        font-weight: 600;
        display: block;
        margin: 8px 0 4px
    }

    .metric .label {
        color: var(--chef-muted);
        font-size: 11px
    }

    .metric small {
        color: var(--chef-muted);
        font-size: 10px
    }

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) 310px;
    gap: 22px;
    align-items: start
}

.workspace-main {
    min-width: 0
}

.event-card {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid var(--chef-line);
    color: var(--chef-ink)
}

    .event-card:last-child {
        border-bottom: 0
    }

    .event-card:hover {
        text-decoration: none
    }

        .event-card:hover h3 {
            color: var(--chef-accent)
        }

    .event-card h3 {
        margin: 6px 0
    }

    .event-card .meta {
        color: var(--chef-muted);
        font-size: 11px
    }

.ref {
    font-size: 10px;
    color: var(--chef-accent);
    font-weight: 700;
    letter-spacing: .5px
}

.badge-soft {
    display: inline-block;
    background: var(--chef-soft);
    color: var(--chef-accent);
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap
}

.badge-attention {
    background: #fff0d8;
    color: #94611b
}

.badge-danger {
    background: #fce9e7;
    color: #a33c34
}

.badge-muted {
    background: var(--chef-bg);
    color: var(--chef-muted)
}

.btn {
    font-weight: 600;
    font-size: 12px;
    padding: 9px 15px
}

.btn-sm {
    font-size: 11px;
    padding: 6px 10px
}

.btn-primary {
    --bs-btn-bg: #176b5c;
    --bs-btn-border-color: #176b5c;
    --bs-btn-hover-bg: #125a4d;
    --bs-btn-hover-border-color: #125a4d;
    --bs-btn-active-bg: #125a4d;
    --bs-btn-disabled-bg: #176b5c;
    --bs-btn-disabled-border-color: #176b5c
}

.form-label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px
}

.form-control, .form-select {
    font-size: 13px;
    padding: 9px 11px
}

.form-text {
    font-size: 10px
}

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

    .form-grid .full {
        grid-column: 1/-1
    }

.form-actions {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-top: 22px;
    flex-wrap: wrap
}

.search-bar {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin-bottom: 20px
}

.table {
    font-size: 12px;
    vertical-align: middle;
    margin: 0
}

    .table th {
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: .8px;
        color: var(--chef-muted);
        font-weight: 600;
        padding: 13px 10px;
        border-bottom: 1px solid var(--chef-line)
    }

    .table td {
        padding: 15px 10px;
        border-color: var(--chef-line)
    }

        .table td small {
            display: block;
            font-size: 10px;
            color: var(--chef-muted);
            margin-top: 3px
        }

    .table .number {
        text-align: right;
        font-variant-numeric: tabular-nums
    }

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--chef-muted);
    padding: 20px 0 0
}

.empty-state {
    text-align: center;
    padding: 45px 22px;
    color: var(--chef-muted)
}

    .empty-state h2 {
        color: var(--chef-ink)
    }

.alert {
    font-size: 12px
}

.validation-message {
    font-size: 11px;
    color: #b54136
}

.validation-summary-errors {
    font-size: 12px;
    color: #b54136
}

.action-list {
    display: grid;
    gap: 8px
}

    .action-list .btn {
        text-align: left
    }

.detail-strip {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 12px;
    padding: 18px 0
}

    .detail-strip dt {
        font-size: 10px;
        color: var(--chef-muted);
        font-weight: 500;
        margin-bottom: 5px
    }

    .detail-strip dd {
        margin: 0;
        font-weight: 600
    }

.section-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin: 0 0 22px
}

    .section-nav a {
        padding: 8px 12px;
        background: var(--chef-panel);
        border: 1px solid var(--chef-line);
        border-radius: 6px;
        font-size: 11px
    }

.attention-row {
    padding: 13px 0;
    border-bottom: 1px solid var(--chef-line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px
}

    .attention-row:last-child {
        border: 0
    }

    .attention-row small {
        display: block;
        color: var(--chef-muted);
        font-size: 10px;
        margin-top: 4px
    }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 25px
}

.login-card {
    max-width: 460px;
    background: var(--chef-panel);
    border: 1px solid var(--chef-line);
    border-radius: 18px;
    padding: 40px
}

    .login-card h1 {
        font-size: 31px
    }

    .login-card form {
        margin-top: 28px
    }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffdf97;
    padding: 12px;
    color: #352600;
    z-index: 9999
}

details > summary {
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    margin-bottom: 12px
}

details[open] > summary {
    margin-bottom: 20px
}

.muted {
    color: var(--chef-muted)
}

.wrap {
    overflow-wrap: anywhere
}

.print-only {
    display: none
}

@media(max-width:1199px) {
    .workspace-grid {
        grid-template-columns: minmax(0,1fr) 270px
    }

    .topbar {
        padding: 0 24px
    }

    .content {
        padding: 5px 24px 40px
    }

    .metric-grid {
        gap: 10px
    }

    .metric {
        padding: 18px
    }
}

@media(max-width:991px) {
    .main-shell {
        margin-left: 0
    }

    .content {
        padding: 5px 18px 40px
    }

    .topbar {
        padding: 0 18px
    }

    .topbar-label {
        display: none
    }

    .workspace-grid {
        grid-template-columns: 1fr
    }

    .workspace-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px
    }

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

    .page-heading h1 {
        font-size: 25px
    }
}

@media(max-width:575px) {
    .content {
        padding: 5px 12px 40px
    }

    .panel {
        padding: 17px 14px
    }

    .topbar {
        padding: 0 12px;
        height: 65px
    }

    .account-link {
        font-size: 10px;
        padding: 3px
    }

    .theme-toggle button {
        padding: 4px;
        font-size: 9px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .workspace-side {
        display: block
    }

    .metric {
        padding: 16px
    }

        .metric .value {
            font-size: 27px
        }

    .mobile-cards thead {
        display: none
    }

    .mobile-cards tbody, .mobile-cards tr, .mobile-cards td {
        display: block;
        width: 100%
    }

    .mobile-cards tr {
        border-bottom: 1px solid var(--chef-line);
        padding: 10px 0
    }

    .mobile-cards td {
        border: 0;
        padding: 5px 0;
        display: flex;
        justify-content: space-between;
        gap: 14px;
        text-align: right
    }

        .mobile-cards td:before {
            content: attr(data-label);
            font-size: 10px;
            color: var(--chef-muted);
            text-align: left;
            padding-top: 2px
        }

        .mobile-cards td:first-child {
            font-weight: 600;
            text-align: left;
            display: block;
            padding-bottom: 9px
        }

            .mobile-cards td:first-child:before {
                display: none
            }

        .mobile-cards td small {
            margin: 3px 0
        }

    .search-bar {
        max-width: none
    }

    .detail-strip {
        gap: 16px
    }

    .form-actions .btn {
        flex: 1
    }

    .app-footer {
        padding-left: 15px
    }

    .login-card {
        padding: 28px
    }

    .table-responsive {
        overflow-x: auto
    }
}

@media print {
    .sidebar, .topbar, .app-footer, .btn, .section-nav, .page-actions, .page-filters, form, details {
        display: none !important
    }

    .main-shell {
        margin: 0
    }

    .content {
        padding: 0
    }

    .panel {
        break-inside: avoid
    }

    .print-only {
        display: block
    }

    .workspace-grid {
        display: block
    }

    body {
        background: white;
        color: black
    }
}

@media(max-width:575px) {
    .btn {
        min-height: 42px
    }

    .theme-toggle button {
        min-height: 28px
    }
}

.account-avatar {
    width: 34px;
    height: 34px;
    flex: none;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--chef-soft);
    color: var(--chef-accent);
    font-size: 11px;
    font-weight: 750
}

.account-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow: hidden
}

    .account-summary > div {
        min-width: 0
    }

    .account-summary strong {
        font-size: 11px;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .account-summary small {
        font-size: 10px;
        display: block;
        color: var(--chef-muted);
        margin-top: 4px
    }

.account-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 4px 6px;
    max-width: 230px
}

    .account-button > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

.account-menu {
    width: 230px;
    background: var(--chef-panel);
    border-color: var(--chef-line);
    font-size: 12px
}

    .account-menu .dropdown-item {
        padding-top: 10px;
        padding-bottom: 10px
    }

/* Information workspaces: usable in SSR, dark mode and on a phone. */
.detail-actions, .record-tools {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap
}

.record-tools {
    margin: 0 0 1.25rem
}

.record-profile {
    display: flex;
    gap: 1.5rem
}

.record-metadata {
    flex: 1;
    min-width: 0
}

.record-cover {
    width: 180px;
    flex-shrink: 0
}

    .record-cover img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: .75rem
    }

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

    .detail-grid dt {
        font-size: .78rem;
        color: var(--bs-secondary-color);
        font-weight: 500
    }

    .detail-grid dd {
        margin: .2rem 0 0;
        overflow-wrap: anywhere
    }

.record-notes {
    white-space: pre-wrap
}

.record-audit {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--bs-border-color);
    padding-top: .8rem
}

.record-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
    gap: 1rem
}

.record-metric {
    margin-bottom: 1rem !important
}

    .record-metric p {
        margin: 0;
        color: var(--bs-secondary-color);
        font-size: .85rem
    }

    .record-metric strong {
        display: block;
        font-size: 1.7rem;
        margin: .35rem 0
    }

    .record-metric small {
        display: block;
        color: var(--bs-secondary-color)
    }

    .record-metric.attention {
        border-top: 3px solid var(--bs-warning)
    }

    .record-metric.accent {
        border-top: 3px solid var(--bs-success)
    }

.related-panel {
    padding: 0 !important;
    overflow: hidden
}

.record-tabs {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--bs-border-color);
    padding: .7rem 1rem 0
}

    .record-tabs a {
        padding: .7rem .9rem;
        white-space: nowrap;
        text-decoration: none;
        color: var(--bs-secondary-color);
        border-bottom: 3px solid transparent
    }

        .record-tabs a.active {
            color: var(--bs-emphasis-color);
            border-color: var(--bs-success);
            font-weight: 600
        }

.related-content {
    padding: 1.25rem
}

.related-table td {
    max-width: 300px;
    overflow-wrap: anywhere
}

.related-table .attention {
    font-weight: 700;
    color: var(--bs-danger-text-emphasis)
}

.section-loading {
    padding: .5rem 0;
    min-height: 130px
}

.shimmer {
    height: 1rem;
    border-radius: .35rem;
    margin: .9rem 0;
    background: linear-gradient(100deg,var(--bs-tertiary-bg) 25%,var(--bs-secondary-bg) 45%,var(--bs-tertiary-bg) 65%);
    background-size: 300% 100%;
    animation: record-shimmer 1.5s ease-in-out infinite
}

.shimmer-title {
    width: 35%;
    height: 1.5rem
}

.shimmer-short {
    width: 65%
}

@keyframes record-shimmer {
    to {
        background-position: -150% 0
    }
}

@media(prefers-reduced-motion:reduce) {
    .shimmer {
        animation: none
    }
}

@media(max-width:767px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px
    }

    .page-heading-title {
        flex-basis: auto;
        width: 100%
    }

    .page-actions {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        margin-left: 0
    }

        .page-actions > .btn {
            flex: 1 1 auto
        }

    .record-profile {
        flex-direction: column
    }

    .record-cover {
        width: 100%
    }

        .record-cover img {
            height: 220px
        }

    .record-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: .6rem
    }

    .record-metric {
        padding: .9rem !important
    }

        .record-metric strong {
            font-size: 1.35rem
        }

    .detail-actions {
        width: 100%
    }

        .detail-actions a {
            flex: 1
        }

    .related-content {
        padding: 1rem
    }

    .related-table td {
        max-width: none
    }
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
    gap: 1.25rem
}

.file-card {
    padding: 0 !important;
    overflow: hidden
}

.file-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: var(--bs-tertiary-bg)
}

    .file-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

.file-type {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-secondary-color)
}

.file-card-body {
    padding: 1.1rem
}

    .file-card-body h2 {
        font-size: 1rem;
        overflow-wrap: anywhere
    }

.file-preview img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    margin: auto
}

.file-preview iframe {
    width: 100%;
    height: 70vh;
    border: 0
}

.file-preview .empty-state {
    overflow-wrap: anywhere
}

h1:focus {
    outline: none
}

@media(min-width:1200px) {
    .record-metrics {
        grid-template-columns: repeat(4,minmax(0,1fr))
    }
}

/* Authenticated mobile shortcuts, using the same breakpoint as the sidebar. */
.chef-bottom-nav, .chef-bottom-nav-space {
    display: none
}

@media screen and (max-width:991.98px) {
    .chef-app {
        --chef-bottom-nav-height: 72px;
        --chef-bottom-nav-gap: 10px;
        --chef-bottom-nav-clearance: calc(var(--chef-bottom-nav-height) + var(--chef-bottom-nav-gap) + 16px + env(safe-area-inset-bottom,0px));
    }

    .chef-bottom-nav-space {
        display: block;
        height: var(--chef-bottom-nav-clearance)
    }

    .chef-bottom-nav {
        position: fixed;
        left: calc(var(--chef-bottom-nav-gap) + env(safe-area-inset-left,0px));
        right: calc(var(--chef-bottom-nav-gap) + env(safe-area-inset-right,0px));
        bottom: calc(var(--chef-bottom-nav-gap) + env(safe-area-inset-bottom,0px));
        z-index: 1030;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0,1fr);
        gap: 2px;
        height: var(--chef-bottom-nav-height);
        max-width: 560px;
        margin-inline: auto;
        padding: 6px;
        border: 1px solid var(--chef-line);
        border-radius: 20px;
        background: var(--chef-panel);
        box-shadow: 0 8px 32px rgba(0,0,0,.14);
    }

    .chef-bottom-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 0;
        min-height: 54px;
        padding: 5px 2px;
        border: 0;
        border-radius: 13px;
        background: transparent;
        color: var(--chef-muted);
        font-size: 10px;
        font-weight: 650;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        touch-action: manipulation;
    }

        .chef-bottom-nav-link > .fa {
            width: 24px;
            height: 24px;
            flex: none;
            font-size: 22px;
            line-height: 24px;
            text-align: center
        }

        .chef-bottom-nav-link:hover, .chef-bottom-nav-link.active, .chef-bottom-nav-link[aria-expanded=true] {
            background: var(--chef-soft);
            color: var(--chef-accent);
            text-decoration: none
        }

        .chef-bottom-nav-link:focus-visible {
            outline: 2px solid var(--chef-accent);
            outline-offset: 2px
        }

    .chef-app .content :is(a,button,input,select,textarea,[tabindex]) {
        scroll-margin-bottom: var(--chef-bottom-nav-clearance)
    }

    #mobile-nav .offcanvas-body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom,0px))
    }
}

@media print {
    .chef-bottom-nav, .chef-bottom-nav-space, #mobile-nav, .offcanvas-backdrop {
        display: none !important
    }
}

/* Font Awesome theme controls: same pill on app and Identity pages. */
.theme-toggle {
    flex-shrink: 0;
    align-items: center;
    background: var(--chef-panel);
    border-radius: 999px;
    padding: 4px;
    gap: 2px
}

    .theme-toggle button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        border-radius: 50%;
        font-size: 18px;
        line-height: 1;
        cursor: pointer
    }

        .theme-toggle button.active {
            background: var(--chef-accent);
            color: var(--chef-panel)
        }

        .theme-toggle button:focus-visible {
            outline: 2px solid var(--chef-accent);
            outline-offset: 2px
        }

        .theme-toggle button:hover:not(.active) {
            background: var(--chef-soft);
            color: var(--chef-accent)
        }

/* Finance workspace: retains the application's existing theme colours. */
.finance-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    margin: 1rem 0;
}

.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr));
    gap: 1rem;
}

    .finance-grid > label {
        display: block;
        min-width: 0;
        font-weight: 500;
    }

    .finance-grid .form-control, .finance-grid .form-select {
        margin-top: .35rem;
    }

.finance-multiline {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.finance-logo {
    max-width: 220px;
    max-height: 130px;
    object-fit: contain;
}

.table input.form-control {
    min-width: 90px;
}

.table select.form-select {
    min-width: 160px;
}

@media(max-width:600px) {
    .finance-nav > .btn {
        flex: 1 1 auto
    }

    .finance-grid {
        grid-template-columns: 1fr
    }
}

/* Heading buttons reveal filters below the title without a second toolbar. */
.page-filters > .panel {
    margin-bottom: 18px
}

.page-filters .search-bar {
    max-width: none;
    margin-bottom: 0
}

.page-filters > .panel > label {
    display: block;
    margin-bottom: 1rem
}
