/*
  Foodisy Admin - the Foodisy design system (Claude Design) applied to MudBlazor.

  :root below carries the design system's (v2) tokens under their own names, and html.fs-dark
  the dark theme's values for the semantic ones. Surfaces, text and lines come from MudBlazor's
  --mud-palette-* variables (FoodiSyTheme.cs), so both themes follow.

  The rules it asks for, and where they are:
  - Everything rounded: pill buttons/chips/badges, 24px cards, 14px inputs and tiles.
  - Cards stay flat: white on Vanilla with a hairline border; only floating layers cast the
    soft shadow-sm/md/lg.
  - Keyboard focus: 2px solid focus-ring outline, 2px offset.
  - Honey and Mint are fills with Ink Navy text, never text colours on light grounds.
  - Motion is small and cheap: transform and opacity only, 200-350ms, played once on mount or
    on input, nothing looping but the live dots; all of it off under prefers-reduced-motion.
*/

:root {
    /* Brand primitives */
    --steel-blue: #3D6E8F;
    --fresh-mint: #7ACCA6;
    --honey: #F6C453;
    --vanilla: #FFF9F0;
    --ink-navy: #1E3444;
    --lilac: #8C7AE0;
    --white: #FFFFFF;
    --plate-blue: #E4EEF4;
    --hairline: #E3EAF0;

    /* Semantic roles (light); html.fs-dark below has the dark values. */
    --text-muted: #616E77;
    --text-subtle: #66737C;
    --primary-soft: #F0F8FE;
    --success-text: #2F6B51;
    --success-soft: #EAFCF2;
    --offer-soft: #FFF6E4;
    --border-strong: #7F8F9B;
    --focus-ring: var(--steel-blue);
    /* The raspberry error: errors and destructive actions only, never decorative. */
    --error: #B3365B;
    --error-soft: #FCECF1;
    --skeleton: #E8EEF2;
    --skeleton-shine: #F4F7F9;

    /* Type */
    --font-display: Fredoka, "Arial Rounded MT Bold", Arial, sans-serif;
    --font-body: Poppins, Arial, sans-serif;
    --font-arabic: "Baloo Bhaijaan 2", Tahoma, Arial, sans-serif;

    /* Space (8px grid, 4px half-step), radius, size */
    --space-half: 4px;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 9999px;
    --control-height: 48px;
    --control-height-sm: 40px;
    --chip-height: 40px;

    /* Elevation: only floating layers cast a shadow. */
    --shadow-sm: 0 1px 2px rgb(30 52 68 / .06), 0 1px 3px rgb(30 52 68 / .08);
    --shadow-md: 0 4px 12px rgb(30 52 68 / .08), 0 2px 4px rgb(30 52 68 / .05);
    --shadow-lg: 0 -8px 32px rgb(30 52 68 / .12), 0 -2px 8px rgb(30 52 68 / .06);

    /* Motion */
    --fs-ease: cubic-bezier(.34, 1.56, .64, 1); /* ease-bounce */
    --fs-ease-out: cubic-bezier(.22, 1, .36, 1);
    --fs-ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --fs-dur-fast: 200ms;
    --fs-dur: 280ms;
    --fs-dur-slow: 350ms;
}

html.fs-dark {
    --plate-blue: #1D3242;
    --hairline: #2E4656;
    --text-muted: #A3B1BB;
    --text-subtle: #93A2AD;
    --primary-soft: #1F3A4E;
    --success-text: var(--fresh-mint);
    --success-soft: #1A3A31;
    --offer-soft: #33301F;
    --border-strong: #62798A;
    --focus-ring: #9CC5E0;
    --error: #F08AA8;
    --error-soft: #3A2130;
    --skeleton: #233A4A;
    --skeleton-shine: #2C4657;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .32);
    --shadow-md: 0 6px 16px rgb(0 0 0 / .4);
    --shadow-lg: 0 -10px 36px rgb(0 0 0 / .55);
}

html, body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Native scrollbars, form controls and the date picker follow the theme. */
html.fs-dark {
    color-scheme: dark;
}

[lang="ar"], [dir="rtl"] {
    font-family: var(--font-arabic);
}

.fs-muted {
    color: var(--mud-palette-text-secondary) !important;
}

.fs-eyebrow {
    color: var(--mud-palette-primary) !important;
}

/* Identifiers and codes: a quiet plate-blue pill. */
code, .fs-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78em;
    color: var(--ink-navy);
    background: var(--plate-blue);
    padding: .15em .65em;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

html.fs-dark code, html.fs-dark .fs-id {
    color: var(--mud-palette-text-primary);
}

/* Keyboard focus, everywhere the same. */
:is(a, button, .mud-button-root, .mud-chip, .mud-nav-link, .fs-card--link, [tabindex]):focus-visible {
    outline: 2px solid var(--mud-palette-primary) !important;
    outline-offset: 2px;
}

/* Browser autofill paints inputs light blue; keep them on the theme surface instead. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--mud-palette-text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--mud-palette-surface) inset;
    caret-color: var(--mud-palette-text-primary);
    transition: background-color 9999s ease-out 0s;
}

/* ---------- MudBlazor controls, reshaped ---------- */

/* Buttons: pills, at least control-height tall; small ones at chip-height. */
.mud-button-root.mud-button {
    border-radius: var(--radius-pill);
    min-height: var(--control-height);
    padding-inline: 24px;
    box-shadow: none !important;
    /* MudBlazor's own colour transitions, plus the press. */
    transition: background-color .25s, border-color .25s, color .25s, transform var(--fs-dur-fast) var(--fs-ease-out);
}

    .mud-button-root.mud-button:active:not(:disabled) {
        transform: scale(.97);
    }

    .mud-button-root.mud-button.mud-button-text {
        padding-inline: 16px;
    }

    .mud-button-root.mud-button[class*="-size-small"] {
        min-height: 36px;
        padding-inline: 14px;
        font-size: .9375rem;
    }

    .mud-button-root.mud-button[class*="-size-large"] {
        min-height: 52px;
    }

/* secondary: a 2px outline. */
.mud-button-outlined {
    border-width: 2px !important;
}

.mud-icon-button {
    border-radius: var(--radius-pill);
    transition: background-color .25s, transform var(--fs-dur-fast) var(--fs-ease-out);
}

    .mud-icon-button:active:not(:disabled) {
        transform: scale(.92);
    }

/* Inputs: radius-md, a 2px hairline that turns primary on focus. */
.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--radius-md) !important;
    border-width: 2px !important;
    border-color: var(--mud-palette-lines-inputs);
}

.mud-input.mud-input-outlined:focus-within .mud-input-outlined-border,
.mud-input.mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: var(--mud-palette-primary) !important;
}

.mud-input.mud-input-outlined {
    background: var(--mud-palette-surface);
    border-radius: var(--radius-md);
}

/* Chips: pills; selected is a Steel Blue fill with white text, never the border alone. */
.mud-chip {
    border-radius: var(--radius-pill) !important;
    font-family: var(--font-body);
    font-weight: 500;
}

.mud-chipset .mud-chip.mud-chip-outlined {
    height: 36px;
    padding-inline: 16px;
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
}

    .mud-chipset .mud-chip.mud-chip-outlined.mud-chip-selected {
        color: var(--mud-palette-primary-text);
        border-color: var(--mud-palette-primary);
        background: var(--mud-palette-primary);
    }

/* Dialogs, menus, popovers: rounded like cards, with the soft floating-layer shadows. */
.mud-dialog {
    border-radius: var(--radius-lg) !important;
    border: 2px solid var(--mud-palette-lines-default);
    box-shadow: var(--shadow-lg) !important;
}

    .mud-dialog .mud-dialog-title {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 1.25rem;
        padding: 24px 24px 8px;
    }

    .mud-dialog .mud-dialog-content {
        padding-inline: 24px;
    }

    .mud-dialog .mud-dialog-actions {
        padding: 16px 24px 24px;
        gap: 8px;
    }

.mud-popover.mud-paper {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--shadow-md) !important;
}

.mud-snackbar {
    border-radius: var(--radius-md) !important;
    font-family: var(--font-body);
}

.mud-alert {
    border-radius: var(--radius-md) !important;
    animation: fs-fade var(--fs-dur) var(--fs-ease-out);
}

/* ---------- Page header ---------- */

.fs-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.fs-page-header__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.fs-section-title {
    font-family: var(--font-display) !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary) !important;
    margin: 24px 0 8px !important;
}

/* ---------- Cards: white, 24px, hairline, no shadow ---------- */

.fs-card {
    background: var(--mud-palette-surface);
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    box-shadow: none;
    transition: border-color .2s ease, transform .25s var(--fs-ease);
    /* Rises in once, as it replaces its skeleton; "backwards" leaves transform free for the hover lift. */
    animation: fs-rise var(--fs-dur-slow) var(--fs-ease-out) backwards;
}

/* A row of cards cascades in: the first eight, 30ms apart, so long grids are not held back. */
.mud-grid > .mud-grid-item:nth-child(2) > .fs-card { animation-delay: 30ms; }
.mud-grid > .mud-grid-item:nth-child(3) > .fs-card { animation-delay: 60ms; }
.mud-grid > .mud-grid-item:nth-child(4) > .fs-card { animation-delay: 90ms; }
.mud-grid > .mud-grid-item:nth-child(5) > .fs-card { animation-delay: 120ms; }
.mud-grid > .mud-grid-item:nth-child(6) > .fs-card { animation-delay: 150ms; }
.mud-grid > .mud-grid-item:nth-child(7) > .fs-card { animation-delay: 180ms; }
.mud-grid > .mud-grid-item:nth-child(8) > .fs-card { animation-delay: 210ms; }

.fs-card--link {
    display: block;
    color: inherit;
    text-decoration: none;
}

    .fs-card--link:hover {
        border-color: var(--mud-palette-primary);
        transform: translateY(-2px);
    }

.fs-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 0;
}

    .fs-card__header .mud-typography-h6 {
        flex: 1;
    }

.fs-card__body {
    padding: 16px 24px 24px;
}

.fs-card__footer {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 8px 12px;
    border-top: 2px solid var(--mud-palette-lines-default);
}

/* A card that fills its grid cell, so a row of cards lines up. */
.fs-card--fill {
    height: 100%;
}

/* Loading placeholders take the card's shape. */
.mud-skeleton.fs-skeleton-card {
    border-radius: var(--radius-lg);
}

.fs-card.mud-paper, .fs-card .mud-table-container {
    box-shadow: none !important;
}

.fs-card.mud-table {
    overflow: hidden;
}

/* ---------- Tiles (icon squares) and KPI cards ---------- */

.fs-tile {
    --fs-tile-bg: var(--plate-blue);
    --fs-tile-fg: var(--steel-blue);
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    color: var(--fs-tile-fg);
    background: var(--fs-tile-bg);
}

.fs-tile--sm {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.fs-kpi {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 20px 24px;
    height: 100%;
}

.fs-kpi__value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--mud-palette-text-primary);
}

/*
  Tones: design-system fills with the text colour each one allows. Shared by tiles and badges.
  primary = plate-blue/steel, success = mint/ink, warning = honey/ink, secondary = ink/vanilla,
  error = soft red/red, default = plate-blue/muted.
*/
.fs-tone-primary, .fs-tone-info { --fs-tile-bg: var(--plate-blue); --fs-tile-fg: var(--steel-blue); }
.fs-tone-success { --fs-tile-bg: var(--fresh-mint); --fs-tile-fg: var(--ink-navy); }
.fs-tone-warning, .fs-tone-tertiary { --fs-tile-bg: var(--honey); --fs-tile-fg: var(--ink-navy); }
.fs-tone-secondary, .fs-tone-dark { --fs-tile-bg: var(--ink-navy); --fs-tile-fg: var(--vanilla); }
.fs-tone-error { --fs-tile-bg: var(--error-soft); --fs-tile-fg: var(--error); }
.fs-tone-default { --fs-tile-bg: var(--plate-blue); --fs-tile-fg: var(--text-muted); }
.fs-tone-strong { --fs-tile-bg: var(--steel-blue); --fs-tile-fg: var(--white); }

html.fs-dark .fs-tone-primary, html.fs-dark .fs-tone-info { --fs-tile-bg: var(--primary-soft); --fs-tile-fg: var(--mud-palette-primary); }
/* Full-strength Mint and Honey fills glare on midnight: in dark they become the soft tints, with Mint and Honey as text (allowed on dark). */
html.fs-dark .fs-tone-success { --fs-tile-bg: var(--success-soft); --fs-tile-fg: var(--fresh-mint); }
html.fs-dark .fs-tone-warning, html.fs-dark .fs-tone-tertiary { --fs-tile-bg: var(--offer-soft); --fs-tile-fg: var(--honey); }
html.fs-dark .fs-tone-secondary, html.fs-dark .fs-tone-dark { --fs-tile-bg: #344857; --fs-tile-fg: var(--mud-palette-text-primary); }
html.fs-dark .fs-tone-default { --fs-tile-bg: #203545; --fs-tile-fg: var(--text-muted); }
html.fs-dark .fs-tone-strong { --fs-tile-bg: var(--mud-palette-primary); --fs-tile-fg: var(--mud-palette-primary-text); }

/* ---------- Dashboards: rich KPI cards, chart cards, ranked lists, the period picker ---------- */

/* The line and bar colour of each tone: darker than the tile fill, so a thin line still reads. */
.fs-tone-primary, .fs-tone-info, .fs-tone-default, .fs-tone-strong { --fs-spark: var(--steel-blue); }
.fs-tone-success { --fs-spark: #5FA686; }
.fs-tone-warning, .fs-tone-tertiary { --fs-spark: #D7AA41; }
.fs-tone-secondary, .fs-tone-dark { --fs-spark: var(--ink-navy); }
.fs-tone-error { --fs-spark: var(--error); }
html.fs-dark .fs-tone-primary, html.fs-dark .fs-tone-info, html.fs-dark .fs-tone-default, html.fs-dark .fs-tone-strong { --fs-spark: var(--mud-palette-primary); }
html.fs-dark .fs-tone-success { --fs-spark: var(--fresh-mint); }
html.fs-dark .fs-tone-warning, html.fs-dark .fs-tone-tertiary { --fs-spark: var(--honey); }
html.fs-dark .fs-tone-secondary, html.fs-dark .fs-tone-dark { --fs-spark: #C3CCD2; }

.fs-kpi--rich {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.fs-kpi__top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
}

.fs-kpi__title {
    flex: 1;
    min-width: 0;
}

.fs-kpi__trend {
    flex: none;
    inline-size: 84px;
    block-size: 28px;
    color: var(--fs-spark);
}

.fs-sparkline {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    overflow: visible;
}

.fs-kpi__foot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 22px;
}

.fs-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 8px 1px 6px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: .8rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    background: var(--plate-blue);
}

.fs-delta--good { color: var(--success-text); background: var(--success-soft); }
.fs-delta--bad { color: var(--error); background: var(--error-soft); }
html.fs-dark .fs-delta { background: #203545; }
html.fs-dark .fs-delta--good { color: var(--success-text); background: var(--success-soft); }
html.fs-dark .fs-delta--bad { color: var(--error); background: var(--error-soft); }

.fs-dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 8px;
}

    .fs-dashboard-head .fs-section-title {
        margin: 0 !important;
    }

.fs-period {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fs-period__range {
    max-inline-size: 280px;
}

.fs-chart-card__titles {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fs-chart-card__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

/* MudChart draws its labels in the panel's text colour, not black. */
.fs-chart-card .mud-chart text {
    fill: var(--mud-palette-text-secondary);
    font-family: var(--font-body);
}

.fs-ranked {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fs-ranked__row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fs-ranked__rank {
    flex: none;
    inline-size: 24px;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-align: center;
}

.fs-ranked__body {
    flex: 1;
    min-width: 0;
}

.fs-ranked__line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.fs-ranked__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-ranked__value {
    flex: none;
    font-family: var(--font-display);
    font-weight: 600;
}

.fs-ranked__track {
    block-size: 8px;
    margin-block: 4px 2px;
    border-radius: 999px;
    background: var(--mud-palette-lines-default);
    overflow: hidden;
}

.fs-ranked__bar {
    block-size: 100%;
    border-radius: 999px;
    background: var(--fs-spark);
    transition: inline-size var(--fs-dur-slow) var(--fs-ease-out);
}

/* ---------- Badges: pills in Fredoka ---------- */

.fs-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    /* Tone classes set these; untoned badges fall back to plate blue. */
    color: var(--fs-tile-fg, var(--text-muted));
    background: var(--fs-tile-bg, var(--plate-blue));
}

.fs-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.fs-badge--pulse .fs-badge__dot {
    animation: fs-pulse 1.2s ease-in-out infinite;
}

@keyframes fs-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(.55); opacity: .55; }
}

/* ---------- Avatars ---------- */

.fs-avatar {
    --fs-avatar-size: 36px;
    flex: none;
    display: inline-grid;
    place-items: center;
    width: var(--fs-avatar-size);
    height: var(--fs-avatar-size);
    border-radius: 50%;
    background: var(--fs-avatar-bg);
    color: var(--fs-avatar-fg);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: calc(var(--fs-avatar-size) * .4);
    user-select: none;
}

.fs-avatar--square {
    border-radius: 30%;
}

/* On the Ink Navy dark surface the Ink Navy avatar would vanish; a faint Vanilla ring keeps every tile visible. */
html.fs-dark .fs-avatar {
    box-shadow: 0 0 0 2px rgb(255 249 240 / .18);
}

/* A name with a secondary line under it, next to an avatar. */
.fs-entity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* An entity as a full-width link in a card's list. */
.fs-entity--row {
    text-decoration: none;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .fs-entity--row:last-child {
        border-bottom: none;
    }

.fs-entity__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.fs-entity__name {
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.fs-entity__name:hover {
    color: var(--mud-palette-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fs-entity__sub {
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

/* ---------- Empty states ---------- */

.fs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
}

    .fs-empty .fs-tile {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        margin-bottom: 16px;
        animation: fs-pop-in .36s var(--fs-ease) 80ms backwards;
    }

.fs-empty__message {
    max-width: 420px;
    margin-top: 4px !important;
}

/* ---------- Tables ---------- */

.fs-table .mud-table-head .mud-table-cell {
    font-family: var(--font-display);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-gray);
    border-bottom: none;
}

html:not(.fs-dark) .fs-table .mud-table-head .mud-table-cell {
    background: #F3F7FB;
}

.fs-table .mud-table-body .mud-table-cell {
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.fs-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

.fs-table .mud-toolbar {
    gap: 12px;
    padding: 16px 20px;
    height: auto;
    min-height: 72px;
}

.fs-table .mud-table-pagination {
    border-top: 2px solid var(--mud-palette-lines-default);
}

/* On a phone the toolbar stacks: full-width search, then the filter chips in one row. */
@media (max-width: 600px) {
    .fs-table .mud-toolbar {
        flex-wrap: wrap;
    }

        .fs-table .mud-toolbar .mud-spacer {
            display: none;
        }

        .fs-table .mud-toolbar > .mud-input-control,
        .fs-table .mud-toolbar .mud-chipset {
            flex: 1 1 100%;
            max-width: none !important;
        }

    .fs-page-header__actions {
        width: 100%;
    }
}

/* ---------- App shell ---------- */

.fs-appbar.mud-appbar {
    border-bottom: 2px solid var(--mud-palette-lines-default);
}

/* The sidebar is Steel Blue; the reversed logo is drawn on exactly that colour. In dark the
   sidebar is deep navy, so the logo keeps its Steel Blue ground as a rounded chip. */
.fs-drawer.mud-drawer {
    border-inline-end: none;
}

html.fs-dark .fs-drawer.mud-drawer {
    border-inline-end: 1px solid var(--mud-palette-lines-default);
}

html.fs-dark .fs-drawer .fs-brand img {
    border-radius: 12px;
}

.fs-drawer .mud-drawer-content {
    scrollbar-width: thin;
    scrollbar-color: rgb(255 249 240 / .25) transparent;
}

.fs-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
}

.fs-brand {
    display: block;
    padding: 20px 20px 12px;
}

    .fs-brand img {
        display: block;
        width: 168px;
        height: auto;
    }

.fs-nav-caption {
    padding: 20px 28px 8px;
    font-family: var(--font-display);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vanilla);
    opacity: .8;
}

.fs-drawer .mud-navmenu .mud-nav-link {
    margin: 2px 16px;
    width: auto;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    color: var(--vanilla);
    transition: background-color .15s, color .15s;
}

    .fs-drawer .mud-navmenu .mud-nav-link .mud-nav-link-icon {
        color: var(--vanilla);
        transition: transform var(--fs-dur) var(--fs-ease);
    }

    .fs-drawer .mud-navmenu .mud-nav-link:hover:not(.active) .mud-nav-link-icon {
        transform: translateX(2px);
    }

html[dir="rtl"] .fs-drawer .mud-navmenu .mud-nav-link:hover:not(.active) .mud-nav-link-icon {
    transform: translateX(-2px);
}

    .fs-drawer .mud-navmenu .mud-nav-link:hover:not(.active) {
        background: rgb(255 249 240 / .12);
    }

    /* The section's one Honey highlight: the page you are on. */
    .fs-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) {
        color: var(--ink-navy);
        background: var(--honey);
    }

        .fs-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
            color: var(--ink-navy);
        }

/* On the dark sidebar a full Honey pill is the brightest thing on screen; a tint with Honey text (allowed on dark) keeps it the highlight without the glare. */
html.fs-dark .fs-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled),
html.fs-dark .fs-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: var(--honey);
}

html.fs-dark .fs-drawer .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background: rgb(246 196 83 / .16);
    box-shadow: inset 0 0 0 1px rgb(246 196 83 / .35);
}

html.fs-dark .fs-drawer .mud-navmenu .mud-nav-link:not(.active) .mud-nav-link-icon {
    color: var(--mud-palette-drawer-icon);
}

html.fs-dark .fs-nav-caption {
    color: var(--mud-palette-text-secondary);
}

    .fs-drawer .mud-navmenu .mud-nav-link:focus-visible {
        outline-color: var(--vanilla) !important;
    }

.fs-drawer__footer {
    margin-top: auto;
    padding: 16px 28px;
    font-size: .75rem;
    color: var(--vanilla);
    opacity: .75;
    border-top: 1px solid rgb(255 249 240 / .15);
}

html.fs-dark .fs-drawer__footer {
    color: var(--mud-palette-text-secondary);
    border-top-color: var(--mud-palette-lines-default);
}

.fs-main {
    padding-bottom: var(--space-6);
}

/* Each page fades in; its cards do the rising, so the two do not stack. */
.fs-main > * {
    animation: fs-fade var(--fs-dur) var(--fs-ease-out);
}

.fs-user-button {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding-block: 4px;
    padding-inline: 4px 10px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: .875rem;
    transition: border-color var(--fs-dur) ease;
}

    .fs-user-button:hover {
        border-color: var(--mud-palette-primary);
    }

@media (max-width: 600px) {
    .fs-user-button__name {
        display: none;
    }
}

/* ---------- Restaurant detail hero ---------- */

.fs-hero {
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}

.fs-hero__top {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.fs-hero__title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 220px;
}

    .fs-hero__title .mud-typography-h4 {
        font-size: 2rem;
        line-height: 2.5rem;
    }

.fs-hero__meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    font-size: .875rem;
    color: var(--mud-palette-text-secondary);
}

    .fs-hero__meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

/* A cover banner bleeds to the card's edges; the logo overlaps its lower edge. */
.fs-hero--cover {
    padding-top: 0;
    overflow: hidden;
}

.fs-hero__cover {
    height: 180px;
    margin-inline: calc(var(--space-3) * -1);
    margin-bottom: 16px;
    background-size: cover;
    background-position: center;
    background-color: var(--mud-palette-background-gray);
}

/* Only the logo rises into the banner; the name stays below it, readable on any photo. */
.fs-hero--cover .fs-hero__top {
    align-items: flex-start;
}

    .fs-hero--cover .fs-hero__top > .fs-avatar {
        margin-top: -52px;
        box-shadow: 0 0 0 4px var(--mud-palette-surface);
    }

.fs-hero__slogan {
    font-style: italic;
    color: var(--mud-palette-text-secondary);
}

/* Arabic script has no italic form; a slanted one reads as broken. */
html[dir="rtl"] .fs-hero__slogan {
    font-style: normal;
}

/* ---------- Restaurant profile ---------- */

/* The logo image itself: same tile as the initials, cropped to fill it. */
img.fs-logo {
    object-fit: cover;
    background: var(--mud-palette-surface);
}

.fs-profile-section + .fs-profile-section,
.fs-profile-section + form,
form .fs-profile-section {
    margin-top: var(--space-3);
}

.fs-image-field {
    display: flex;
    gap: 16px;
    align-items: center;
}

.fs-image-field__preview {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 30%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--mud-palette-lines-inputs);
    background: var(--mud-palette-background-gray);
}

.fs-image-field__preview--wide {
    width: 192px;
    border-radius: 12px;
}

    .fs-image-field__preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.fs-image-field__body {
    min-width: 0;
}

/* ---------- Plan cards (design system PlanCard) ---------- */

.fs-plan {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fs-plan--inactive {
    opacity: .6;
}

/* The pancake stack: one honey layer per tier. */
.fs-plan__stack {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Room for three layers on every card, so names and prices line up across the row. */
    height: 42px;
    gap: 3px;
    width: 72px;
    margin-bottom: 16px;
}

    .fs-plan__stack span {
        display: block;
        height: 12px;
        border-radius: var(--radius-pill);
        background: var(--honey);
    }

.fs-plan__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 2.25rem;
    color: var(--mud-palette-text-primary);
}

.fs-plan__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 16px 0 4px;
}

.fs-plan__amount {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 2.25rem;
    color: var(--mud-palette-text-primary);
}

.fs-plan__limits {
    list-style: none;
    margin: 16px 0 0;
    padding: 16px 0 0;
    border-top: 2px dashed var(--mud-palette-lines-default);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: .875rem;
    line-height: 1.25rem;
}

    .fs-plan__limits li::before {
        content: "\2022";
        color: var(--mud-palette-primary);
        margin-inline-end: var(--space-1);
        font-weight: 700;
    }

.fs-plan__spacer {
    flex: 1;
}

/* A dashed "add" card at the end of a card grid. */
.fs-card--add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 260px;
    height: 100%;
    width: 100%;
    cursor: pointer;
    border-style: dashed;
    color: var(--mud-palette-text-secondary);
    background: transparent;
    font: inherit;
}

    .fs-card--add:hover {
        color: var(--mud-palette-primary);
        border-color: var(--mud-palette-primary);
        transform: translateY(-2px);
    }

/* ---------- Sign-in ---------- */

.fs-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    background: var(--mud-palette-background);
}

/* Steel Blue with the dessert doodle, the brand's cover treatment. */
.fs-auth__brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 40px 56px;
    color: var(--vanilla);
    /* The pattern at its drawn size (1800 x 600, shown at half), repeated down the panel. */
    background: var(--steel-blue) url("../brand/doodle-on-steel-blue.png") left top / 900px auto repeat;
}

    .fs-auth__brand .fs-brand {
        padding: 0;
        align-self: flex-start;
        border-radius: 12px;
        overflow: hidden;
    }

        .fs-auth__brand .fs-brand img {
            width: 200px;
        }

/* The doodle never sits behind body text: the copy gets a clean Steel Blue panel of its own. */
.fs-auth__headline {
    max-width: 520px;
    margin-inline-start: -28px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--steel-blue);
}

    .fs-auth__headline h2 {
        margin: 0;
        font-family: var(--font-display);
        font-size: 3rem;
        line-height: 3.5rem;
        font-weight: 600;
    }

    /* Honey for the second headline line on Steel Blue: 24px+ only (3.4:1). */
    .fs-auth__headline .fs-auth__arabic {
        display: block;
        margin: 4px 0 20px;
        text-align: left;
        font-family: var(--font-arabic);
        font-size: 2.25rem;
        line-height: 3.25rem;
        font-weight: 700;
        color: var(--honey);
    }

    .fs-auth__headline p {
        margin: 0;
        font-size: 1.0625rem;
        line-height: 1.75rem;
    }

.fs-auth__features {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

    .fs-auth__features li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 500;
    }

        .fs-auth__features li span {
            display: grid;
            place-items: center;
            width: 36px;
            height: 36px;
            border-radius: 12px;
            color: var(--ink-navy);
            background: var(--vanilla);
        }

.fs-auth__footer {
    align-self: flex-start;
    padding: 4px 12px;
    margin-inline-start: -12px;
    border-radius: var(--radius-pill);
    background: var(--steel-blue);
    font-size: .8125rem;
    opacity: .85;
}

.fs-auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px var(--space-3);
}

.fs-auth__card {
    width: 100%;
    max-width: 420px;
}

    .fs-auth__card .fs-card {
        padding: 32px;
    }

.fs-auth__mobile-brand {
    display: none;
}

/* The sign-up form needs room for the bilingual name and the plan cards. */
.fs-auth__card--wide {
    max-width: 560px;
}

/* "or" between the Google/Microsoft buttons and the form. */
.fs-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 20px;
    color: var(--mud-palette-text-secondary);
    font-size: .8125rem;
}

    .fs-divider::before,
    .fs-divider::after {
        content: "";
        flex: 1;
        border-top: 1px solid var(--mud-palette-lines-default);
    }

.fs-provider-button img {
    width: 20px;
    height: 20px;
    margin-inline-end: 12px;
}

/* A line of small links under an auth form ("Forgot password?", "Create an account"). */
.fs-auth__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    margin-top: 20px;
    font-size: .875rem;
}

/* A choosable plan on the sign-up form. */
.fs-plan-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-md);
    background: var(--mud-palette-surface);
    text-align: start;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color var(--fs-dur) ease, transform .25s var(--fs-ease);
}

    .fs-plan-option:hover {
        border-color: var(--mud-palette-primary);
        transform: translateY(-2px);
    }

    .fs-plan-option--selected {
        border-color: var(--mud-palette-primary);
        box-shadow: 0 0 0 1px var(--mud-palette-primary);
    }

    .fs-plan-option__body {
        flex: 1;
        min-width: 0;
    }

    .fs-plan-option__price {
        font-weight: 600;
        white-space: nowrap;
    }

@media (max-width: 960px) {
    .fs-auth {
        grid-template-columns: 1fr;
    }

    .fs-auth__brand {
        display: none;
    }

    .fs-auth__mobile-brand {
        display: flex;
        justify-content: center;
        margin-bottom: 24px;
    }

        .fs-auth__mobile-brand img {
            width: 96px;
            height: 96px;
        }
}

/* ---------- Boot screen (before WebAssembly starts) ---------- */

.fs-boot {
    position: fixed;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 24px;
    background: #FFF9F0;
    color: #1E3444;
}

html.fs-dark .fs-boot {
    background: #0F1B24;
    color: #F5EFE4;
}

.fs-boot__icon {
    width: 72px;
    height: 72px;
    animation: fs-bounce 1.4s var(--fs-ease) infinite;
}

@keyframes fs-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

.loading-progress {
    position: relative;
    display: block;
    width: 3.5rem;
    height: 3.5rem;
}

    .loading-progress circle {
        fill: none;
        stroke: #E3EAF0;
        stroke-width: .4rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

html.fs-dark .loading-progress circle {
    stroke: #2E4656;
}

.loading-progress circle:last-child {
    stroke: #3D6E8F;
    stroke-linecap: round;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

html.fs-dark .loading-progress circle:last-child {
    stroke: #F6C453;
}

.loading-progress-text {
    font-family: Poppins, Arial, sans-serif;
    font-size: .8125rem;
    font-weight: 500;
    opacity: .7;
    margin-top: -8px;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

html[lang="ar"] .loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "جارٍ التحميل");
}

/* ---------- Blazor's own error surfaces ---------- */

#blazor-error-ui {
    color-scheme: light only;
    background: #F6C453;
    color: #1E3444;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: Poppins, Arial, sans-serif;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        inset-inline-end: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #B3365B;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Oops, something spilled."
    }

html[lang="ar"] .blazor-error-boundary::after {
    content: "عذراً، حدث خطأ ما.";
}

/* The banner carries both languages: show the page's. */
html[lang="ar"] #blazor-error-ui [lang="en"],
html:not([lang="ar"]) #blazor-error-ui [lang="ar"] {
    display: none;
}

/* ---------- Motion ---------- */

@keyframes fs-fade {
    from { opacity: 0; }
}

@keyframes fs-rise {
    from { opacity: 0; transform: translateY(6px); }
}

@keyframes fs-pop {
    from { opacity: 0; transform: scale(.96); }
}

@keyframes fs-pop-in {
    from { opacity: 0; transform: scale(.6); }
}

@keyframes fs-ring {
    0% { opacity: .9; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.035); }
}

@keyframes fs-spin-in {
    from { opacity: 0; transform: rotate(-90deg) scale(.6); }
}

/* The theme toggle (foodisy.applyTheme): one crossfade of the whole page, and the sun/moon turns in. */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: var(--fs-dur-slow);
    animation-timing-function: var(--fs-ease-out);
}

.fs-theme-toggle svg {
    view-transition-name: fs-theme-icon;
}

::view-transition-new(fs-theme-icon) {
    animation: fs-spin-in .36s var(--fs-ease);
}

::view-transition-old(fs-theme-icon) {
    animation: fs-fade var(--fs-dur-fast) reverse;
}

@media print {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Reduced motion: every animation and transition ends at once, MudBlazor's included. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fs-card, .fs-card--link:hover, .fs-boot__icon {
        transition: none;
        transform: none;
        animation: none;
    }

    .fs-badge--pulse .fs-badge__dot {
        animation: none;
    }
}
/* ---------- Arabic and right-to-left ---------- */

/* The bilingual lockup's lines carry their own dir (so each shapes correctly) but align with the
   page: left in English, right in Arabic. */
html[dir="rtl"] .fs-auth__headline h2,
html[dir="rtl"] .fs-auth__headline .fs-auth__arabic {
    text-align: right;
}

/* An Arabic input in an English form, and Arabic words in English UI (the language switch). */
.fs-input-arabic input,
.fs-input-arabic textarea,
.fs-arabic-text {
    font-family: var(--font-arabic);
}

.fs-input-arabic input,
.fs-input-arabic textarea {
    font-size: 1.05rem;
}

.fs-language-switch.mud-button-root {
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

    .fs-language-switch .fs-arabic-text {
        font-weight: 700;
        font-size: 1rem;
        line-height: 1;
    }

/* Digits, codes and identifiers stay left-to-right inside Arabic text. */
html[dir="rtl"] code {
    direction: ltr;
    unicode-bidi: isolate;
}

/* An invoice: its dates set against the number, right-aligned in either direction. */
.fs-invoice__dates {
    text-align: end;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .fs-invoice__dates .fs-muted {
        margin-inline-end: 8px;
    }

/* Printing an invoice prints the invoice: no app bar, drawer or page buttons. */
@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-snackbar-provider,
    .fs-no-print {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .fs-invoice {
        box-shadow: none !important;
        border: none !important;
    }
}

/* ---------- Menu pages: list rows, swatches, thumbnails, model cards, code ---------- */

/* One item in a card's list: content, then badges and actions at the end. */
.fs-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .fs-row:last-child {
        border-bottom: none;
    }

.fs-card__body .fs-row {
    padding-inline: 0;
}

.fs-row--dense {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

/* A nested panel inside a card, e.g. one size in the product editor. */
.fs-subcard {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.fs-swatch {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-lines-default);
}

.fs-color-input {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 12px;
    background: none;
    cursor: pointer;
}

.fs-thumb {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--mud-palette-background-gray);
}

    .fs-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* A product photo shown read-only, on the same ground as the upload field's preview. */
.fs-photo {
    display: block;
    width: 100%;
    border-radius: var(--radius-md);
    background: var(--mud-palette-background-gray);
}

.fs-model {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.fs-model__thumb {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background: var(--plate-blue);
}

html.fs-dark .fs-model__thumb {
    background: var(--mud-palette-background-gray);
}

    .fs-model__thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.fs-model .fs-card__footer {
    margin-top: auto;
}

/* Orders: the live board (three columns, stacked on a phone) and its cards. */
.fs-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

@media (max-width: 960px) {
    .fs-board {
        grid-template-columns: minmax(0, 1fr);
    }
}

.fs-board__column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.fs-board__title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-inline: 4px;
}

.fs-board__empty {
    padding: 16px 4px;
}

.fs-order {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    /* A card arriving in a column (a new order, or one moving on) pops in. */
    animation-name: fs-pop;
}

.fs-order--new {
    border-color: var(--honey);
}

    /* A new order rings twice in Honey, then stays still: seen from across a kitchen, not nagging. */
    .fs-order--new::after {
        content: "";
        position: absolute;
        inset: -2px;
        border: 2px solid var(--honey);
        border-radius: inherit;
        pointer-events: none;
        opacity: 0;
        animation: fs-ring 1.1s var(--fs-ease-out) 2;
    }

.fs-order__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fs-order__number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.fs-order__where {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.fs-order__age {
    font-size: .875rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.fs-order__age--late {
    color: var(--mud-palette-error);
    font-weight: 600;
}

.fs-order__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fs-order__customer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.fs-order__phone {
    margin-inline-start: auto;
}

.fs-order__total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.fs-order__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fs-order-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fs-order-item__line {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.fs-order-item__qty {
    font-weight: 600;
    min-width: 2.25em;
}

.fs-order-item__name {
    flex: 1;
    font-weight: 500;
}

.fs-order-item__price {
    margin-inline-start: auto;
    white-space: nowrap;
}

.fs-order-item__detail {
    padding-inline-start: calc(2.25em + 8px);
    font-size: .875rem;
}

/* Blazor trims the space after "Group:", so the gap is set here. */
.fs-order-item__group {
    margin-inline-end: 6px;
}

.fs-order-item__ingredient {
    display: flex;
    gap: 6px;
}

.fs-order-note {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-inline-start: calc(2.25em + 8px);
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    background: var(--honey);
    color: var(--ink-navy);
    font-size: .875rem;
}

html.fs-dark .fs-order-note {
    background: color-mix(in srgb, var(--honey) 18%, var(--ink-navy));
    color: var(--vanilla);
    box-shadow: inset 3px 0 0 var(--honey);
}

html.fs-dark[dir="rtl"] .fs-order-note {
    box-shadow: inset -3px 0 0 var(--honey);
}

.fs-order-note--order {
    margin-inline-start: 0;
}

.fs-order-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

    .fs-order-totals > div {
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

.fs-order-totals__total {
    font-weight: 600;
    font-size: 1.1rem;
}

.fs-inline-code {
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--mud-palette-background-gray);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* The product editor's preview: the customers' configurator, at the width a menu page gives it.
   In dark the widget takes the panel's colours (its theming variables win over the storefront's)
   rather than sitting on the page as a cream block. */
.fs-widget-preview {
    max-width: 720px;
    min-height: 120px;
}

html.fs-dark .fs-widget-preview {
    --foodisy-background: var(--mud-palette-background-gray);
    --foodisy-surface: var(--mud-palette-surface);
    --foodisy-text: var(--mud-palette-text-primary);
}

/* Audit log: one entry of a restaurant's activity, and the changes under it. */
.fs-audit-entry {
    padding-block: 10px;
    border-block-end: 1px solid var(--mud-palette-lines-default);
}

.fs-audit-entry:last-of-type {
    border-block-end: none;
}

.fs-audit-entry__details {
    padding-block: 8px;
    padding-inline-start: 44px;
}

td.fs-audit-entry__details {
    padding-inline: 16px;
    background: var(--mud-palette-background-gray);
}

.fs-audit-changes th,
.fs-audit-changes td {
    text-align: start;
    vertical-align: top;
}

/* Set-up wizards (MudStepper): room around the steps, and step titles that wrap on phones. */
.fs-wizard .mud-stepper-content {
    padding: 16px;
}

@media (max-width: 600px) {
    .fs-wizard .mud-stepper-content {
        padding: 8px;
    }

    .fs-audit-entry__details {
        padding-inline-start: 0;
    }
}

/* The online shop's QR codes: a grid of cards that also prints as one, two or three per row. */
.fs-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.fs-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    text-align: center;
    break-inside: avoid;
}

.fs-qr img {
    width: 180px;
    height: 180px;
    image-rendering: pixelated;
    background: #fff;
}

.fs-qr__link {
    flex: none;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 12px;
}

/* ---------- Legal documents (LEGAL-01) ---------- */

/* A published document's HTML, from the API. */
.fs-legal {
    line-height: 1.65;
    overflow-wrap: anywhere;
}

    .fs-legal h1 {
        font-family: var(--mud-typography-h4-family, inherit);
        font-size: 1.75rem;
        margin: 0 0 var(--space-4, 16px);
    }

    .fs-legal h2 {
        font-size: 1.15rem;
        margin: var(--space-6, 24px) 0 var(--space-2, 8px);
    }

    .fs-legal p, .fs-legal ul, .fs-legal ol {
        margin: 0 0 var(--space-3, 12px);
    }

    .fs-legal ul, .fs-legal ol {
        padding-inline-start: 1.5em;
    }

    .fs-legal blockquote {
        margin: 0 0 var(--space-4, 16px);
        padding: 8px 16px;
        border-inline-start: 4px solid var(--mud-palette-warning);
        background: var(--mud-palette-background-gray);
        border-radius: var(--radius-sm, 6px);
    }

    .fs-legal table {
        width: 100%;
        border-collapse: collapse;
        margin: 0 0 var(--space-4, 16px);
        font-size: .9rem;
    }

    .fs-legal th, .fs-legal td {
        border: 1px solid var(--mud-palette-lines-default);
        padding: 6px 10px;
        text-align: start;
        vertical-align: top;
    }

/* The terms inside the accept-terms step of a sign-in: read in place, scrolled. */
.fs-legal-box {
    max-height: 40vh;
    overflow-y: auto;
    padding: 16px;
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    font-size: .9rem;
}

/* /legal/{kind}: a long read in the sign-in layout's panel. */
.fs-legal-page {
    width: 100%;
    max-width: 760px;
    padding-block: 24px;
}

.fs-terms-check a, .fs-auth__footer a, .fs-drawer__legal a {
    color: inherit;
    text-decoration: underline;
}

.fs-drawer__legal {
    margin-top: 4px;
}

/* What the panel keeps in the browser, until dismissed. */
.fs-storage-notice {
    position: fixed;
    inset-inline: 16px;
    bottom: 16px;
    z-index: 1400;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 640px;
    margin-inline: auto;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    background: var(--mud-palette-surface);
    border: 2px solid var(--mud-palette-lines-default);
    box-shadow: var(--shadow-md);
    font-size: .875rem;
}

    .fs-storage-notice a {
        color: var(--mud-palette-primary);
    }



/* ---------- Two-factor sign-in (SEC-04) ---------- */

.fs-qr {
    image-rendering: pixelated;
    background: #fff;
    padding: 8px;
    border-radius: var(--radius-sm, 6px);
}

.fs-key {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .9rem;
    letter-spacing: .04em;
    user-select: all;
}

.fs-recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
    margin: 0;
    padding: 12px 16px;
    list-style: none;
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: var(--radius-lg);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
