/* Self-hosted Manrope (redesign phase 1) — no Google Fonts CDN at runtime. Three files, each the
   variable-font instance Google Fonts itself serves for this family (a single file spans the whole
   200–800 weight axis per script subset), covering the two scripts this shop actually renders:
   Bulgarian (cyrillic/cyrillic-ext) and English (latin, which also covers general punctuation).
   `font-weight: 200 800` tells the browser this file is variable so it can interpolate any requested
   weight (400/500/600/700/800 are the ones this app actually uses) from the one download instead of
   fetching a separate static file per weight. */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/manrope/manrope-latin-var.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/manrope/manrope-cyrillic-var.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/manrope/manrope-cyrillic-ext-var.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
    color-scheme: light;
    --cs-background: #fffdfb;
    --cs-background-soft: #fff5ef;
    --cs-surface: #ffffff;
    --cs-surface-strong: #fff1e7;
    --cs-text: #352720;
    --cs-muted: #78685e;
    --cs-border: #efdccf;
    --cs-accent: #ce7e5d;
    --cs-accent-strong: #9b5639;
    /* Foreground colour for text/icons sitting ON an accent-coloured background (a primary button
       label, a filled badge). Never reuse --cs-surface for this — it happens to be near-white today,
       but it means "a panel's background", not "readable on --cs-accent", and a colour scheme whose
       surface isn't light would make every one of those five spots invisible. */
    --cs-on-accent: #ffffff;
    /* Bug fix (redesign phase 0): this was declared in every [data-cs-scheme="…"] block below but
       never here in :root, so under the default peach scheme (no data-cs-scheme override) every
       rgba(var(--cs-accent-rgb), …) below was invalid CSS and rendered no shadow at all. Matches
       --cs-accent: #ce7e5d converted to r,g,b. */
    --cs-accent-rgb: 206, 126, 93;
    /* Tinted toward the accent (not a neutral black shadow) so cards and buttons read as part of
       this scheme rather than generic. Built from --cs-accent-rgb for the same reason the tints
       above are: a literal here would leave every shadow in the app peach under any other scheme. */
    --cs-shadow-soft: 0 10px 28px rgba(var(--cs-accent-rgb), 0.14);
    --cs-shadow-strong: 0 18px 40px rgba(var(--cs-accent-rgb), 0.16);
    --cs-radius-sm: 0.9rem;
    --cs-radius-md: 1.2rem;
    --cs-radius-lg: 1.75rem;
    /* Redesign phase 1 — additive tokens only, nothing above this line changes value. Consumed by the
       componentised home page (Components/Home/*) and the catalog; every other screen keeps reading
       its existing literal spacing/type values untouched. */
    --cs-radius-pill: 999px;
    --cs-space-xs: 0.5rem;
    --cs-space-sm: 0.75rem;
    --cs-space-md: 1.25rem;
    --cs-space-lg: 2rem;
    --cs-space-xl: 3.5rem;
    --cs-font-size-sm: 0.875rem;
    --cs-font-size-base: 1rem;
    --cs-font-size-lg: 1.125rem;
    --cs-font-size-xl: 1.375rem;
    --cs-font-size-2xl: 1.75rem;
    --cs-font-size-3xl: 2.25rem;
    --cs-font-hero: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
    /* The phone tab bar without the home indicator (Components/MobileTabBar). Whatever sits at the bottom edge of
       a phone clears this plus env(safe-area-inset-bottom). */
    --cs-tabbar-height: 3.5rem;
}

/* Admin-selectable colour schemes (owner decision, CakeShop appearance settings). "peach" is the
   original palette and lives in :root above, so a missing or unrecognised scheme code still renders
   correctly with zero extra logic — see Modules.Content.Domain.Appearance.ColourSchemeCatalog for the
   codes these selectors must keep matching. Each block redeclares the FULL set every other rule in
   this file reads from (including --cs-accent-rgb and the two shadow tokens) — a scheme that forgets
   one silently falls back to peach for just that value, which is worse than an obviously wrong colour.
   Never edit .fsb-shell's or the --nb-* family's own dark palette from here; both are fixed regardless
   of scheme by design (see their own comments below). */
[data-cs-scheme="chocolate"] {
    --cs-background: #fdfaf7;
    --cs-background-soft: #f7ede4;
    --cs-surface: #ffffff;
    --cs-surface-strong: #f3e4d6;
    --cs-text: #2e211a;
    --cs-muted: #7a6a5c;
    --cs-border: #e6d3c2;
    --cs-accent: #8a5a3b;
    --cs-accent-strong: #5c3820;
    --cs-accent-rgb: 138, 90, 59;
    --cs-on-accent: #ffffff;
    --cs-shadow-soft: 0 10px 28px rgba(var(--cs-accent-rgb), 0.16);
    --cs-shadow-strong: 0 18px 40px rgba(var(--cs-accent-rgb), 0.18);
}

[data-cs-scheme="berry"] {
    --cs-background: #fffbfc;
    --cs-background-soft: #fdeef1;
    --cs-surface: #ffffff;
    --cs-surface-strong: #fbe3e8;
    --cs-text: #3a1f26;
    --cs-muted: #7d5c63;
    --cs-border: #f3d3da;
    --cs-accent: #c85a72;
    --cs-accent-strong: #8f2f47;
    --cs-accent-rgb: 200, 90, 114;
    --cs-on-accent: #ffffff;
    --cs-shadow-soft: 0 10px 28px rgba(var(--cs-accent-rgb), 0.14);
    --cs-shadow-strong: 0 18px 40px rgba(var(--cs-accent-rgb), 0.16);
}

[data-cs-scheme="pistachio"] {
    --cs-background: #fbfdf9;
    --cs-background-soft: #eef5e8;
    --cs-surface: #ffffff;
    --cs-surface-strong: #e6efdd;
    --cs-text: #263420;
    --cs-muted: #62705a;
    --cs-border: #d8e6cb;
    --cs-accent: #7a9b5e;
    --cs-accent-strong: #4f6c3a;
    --cs-accent-rgb: 122, 155, 94;
    --cs-on-accent: #ffffff;
    --cs-shadow-soft: 0 10px 28px rgba(var(--cs-accent-rgb), 0.16);
    --cs-shadow-strong: 0 18px 40px rgba(var(--cs-accent-rgb), 0.18);
}

[data-cs-scheme="vanilla"] {
    --cs-background: #fffefb;
    --cs-background-soft: #f7f3ea;
    --cs-surface: #ffffff;
    --cs-surface-strong: #f1ebda;
    --cs-text: #2f2a1f;
    --cs-muted: #7c7462;
    --cs-border: #e7ddc4;
    --cs-accent: #b8955a;
    --cs-accent-strong: #856a37;
    --cs-accent-rgb: 184, 149, 90;
    --cs-on-accent: #ffffff;
    --cs-shadow-soft: 0 10px 28px rgba(var(--cs-accent-rgb), 0.16);
    --cs-shadow-strong: 0 18px 40px rgba(var(--cs-accent-rgb), 0.18);
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top right, var(--cs-surface-strong) 0%, var(--cs-background-soft) 38%, var(--cs-background) 100%);
    color: var(--cs-text);
    font-family: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
}

a:hover {
    color: inherit;
}

h1:focus {
    outline: none;
}

h1,
h2,
h3 {
    margin-top: 0;
    letter-spacing: -0.02em;
}

p {
    margin-top: 0;
}

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

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

/* One end of the focus trap of a dialog: a focusable element with no size that tabbing walks onto when it leaves the dialog,
   and whose focus handler sends the focus to the other end. It is laid out of the flow, so it takes no cell of the backdrop's
   grid, and it shows no ring, because nobody is meant to rest on it. */
.cs-focus-sentinel {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    outline: none;
    pointer-events: none;
}

.leaflet-container {
    overflow: hidden;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-container,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-control-container,
.leaflet-pane,
.leaflet-overlay-pane svg,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    user-select: none;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
    max-width: none !important;
    max-height: none !important;
}

.leaflet-pane {
    z-index: 400;
}

.leaflet-tile-pane {
    z-index: 200;
}

.leaflet-overlay-pane {
    z-index: 400;
}

.leaflet-marker-pane {
    z-index: 600;
}

.leaflet-tooltip-pane {
    z-index: 650;
}

.leaflet-popup-pane {
    z-index: 700;
}

.leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.leaflet-top {
    top: 0;
}

.leaflet-right {
    right: 0;
}

.leaflet-bottom {
    bottom: 0;
}

.leaflet-left {
    left: 0;
}

.leaflet-control-zoom {
    margin-left: 10px;
    margin-top: 10px;
    border: 1px solid var(--cs-border);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--cs-shadow-soft);
}

.leaflet-control-zoom a {
    display: block;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    background: var(--cs-surface);
    color: var(--cs-text);
    text-align: center;
    text-decoration: none;
    font-weight: 800;
}

.leaflet-control-attribution {
    margin: 0;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.75rem;
}

.leaflet-popup {
    position: absolute;
    text-align: center;
    margin-bottom: 20px;
}

.leaflet-popup-content-wrapper {
    padding: 0.2rem 0.4rem;
    border-radius: 0.5rem;
    background: var(--cs-surface);
    box-shadow: var(--cs-shadow-soft);
}

.leaflet-interactive {
    cursor: pointer;
}

.cs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-button:hover {
    transform: translateY(-1px);
}

.cs-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.cs-button:disabled:hover {
    transform: none;
}

.cs-button--primary {
    background: linear-gradient(135deg, var(--cs-accent), #e29a73);
    color: var(--cs-on-accent);
    box-shadow: var(--cs-shadow-soft);
}

.cs-button--secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--cs-border);
}

/* Radio card: a whole-row label around a native radio, for a choice with a line of explanation. */
.cs-choice-group {
    display: grid;
    gap: var(--cs-space-sm);
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.cs-choice {
    display: flex;
    align-items: center;
    gap: var(--cs-space-sm);
    min-height: 2.75rem;
    padding: var(--cs-space-sm) var(--cs-space-md);
    border: 2px solid var(--cs-border);
    border-radius: var(--cs-radius-sm);
    background: var(--cs-surface);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.cs-choice input[type="radio"] {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--cs-accent);
}

.cs-choice:has(input:focus-visible) {
    outline: 2px solid var(--cs-accent);
    outline-offset: 2px;
}

.cs-choice--active {
    border-color: var(--cs-accent);
    background: var(--cs-background-soft);
}

.cs-choice__icon {
    flex-shrink: 0;
    font-size: 1.4rem;
    line-height: 1;
}

.cs-choice__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.cs-choice__text strong {
    color: var(--cs-text);
    font-size: var(--cs-font-size-sm);
    font-weight: 700;
}

.cs-choice__meta {
    color: var(--cs-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

@media (hover: hover) and (pointer: fine) {
    .cs-choice:hover {
        border-color: var(--cs-accent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-choice {
        transition: none;
    }
}

/* Chip: a pill that switches a quick filter on and off or picks one of a few choices. Its state is the aria-pressed
   attribute, written as the text "true" or "false" (a bool would draw an empty attribute for true and nothing for
   false), so what a screen reader says and what the CSS draws come from one place. A pressed chip is filled with the
   strong accent, and white on it is at least 5.1:1 in each of the five colour schemes. An unpressed chip is the text
   colour on the surface. The target is 44px high, and a long name ends in an ellipsis inside the chip. */
.cs-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    max-width: 100%;
    margin: 0;
    padding: 0.5rem 1rem;
    overflow: hidden;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-pill);
    background: var(--cs-surface);
    color: var(--cs-text);
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cs-chip__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-chip[aria-pressed="true"] {
    border-color: var(--cs-accent-strong);
    background: var(--cs-accent-strong);
    color: var(--cs-on-accent);
}

@media (hover: hover) and (pointer: fine) {
    .cs-chip[aria-pressed="false"]:hover {
        border-color: var(--cs-accent);
        background: rgba(var(--cs-accent-rgb), 0.12);
    }
}

/* A ring in two colours, so it shows on a pressed chip too, whose fill is the ring's own colour. The outline is
   transparent on purpose: Windows high contrast removes shadows but draws an outline in a system colour. */
.cs-chip:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--cs-surface), 0 0 0 4px var(--cs-accent-strong);
}

@media (forced-colors: active) {
    .cs-chip[aria-pressed="true"] {
        forced-color-adjust: none;
        border-color: Highlight;
        background: Highlight;
        color: HighlightText;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-chip {
        transition: none;
    }
}

/* Toast notifications — fixed top-right on desktop, out of the way of the modal layer (z-index
   1000) and the floating contact button. On mobile it docks to the bottom, clearing the fixed
   contact-fab bubble (contact-fab bottom offset + its own height stays under ~4rem — see
   ContactFloatingChat.razor.css). */
.cs-toast-host {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.cs-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    pointer-events: auto;
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-left: 4px solid var(--cs-accent);
    border-radius: var(--cs-radius-sm);
    box-shadow: var(--cs-shadow-strong);
    color: var(--cs-text);
    padding: 0.85rem 0.9rem;
    animation: cs-toast-in 0.2s ease;
}

@keyframes cs-toast-in {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cs-toast--success {
    border-left-color: #1e6b1e;
}

.cs-toast--error {
    border-left-color: #8a1a1a;
}

.cs-toast--info {
    border-left-color: var(--cs-accent-strong);
}

.cs-toast__body {
    flex: 1 1 auto;
    min-width: 0;
}

.cs-toast__title {
    margin: 0 0 0.15rem;
    font-weight: 700;
}

.cs-toast__message {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cs-muted);
}

.cs-toast__close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 1;
    font-size: 1.2rem;
    color: var(--cs-muted);
    cursor: pointer;
}

.cs-toast__close:hover {
    color: var(--cs-text);
}

@media (max-width: 640px) {
    .cs-toast-host {
        top: auto;
        bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
        left: 1rem;
        right: 1rem;
        width: auto;
    }

    /* The bottom edge belongs to the tab bar, or to the checkout's order bar where the tab bar is not shown:
       the contact buttons and the toasts sit above the first and keep away from the second. :has() keeps the rules
       off every page that has neither. */
    body:has(.cs-tabbar) .contact-fab {
        bottom: calc(var(--cs-tabbar-height) + 0.75rem + env(safe-area-inset-bottom, 0px));
    }

    body:has(.cs-tabbar) .cs-toast-host {
        bottom: calc(var(--cs-tabbar-height) + 5.5rem + env(safe-area-inset-bottom, 0px));
    }

    body:has(.checkout-submit-bar) .contact-fab {
        display: none;
    }

    /* Room at the very end of the page for the checkout's bar, so the footer can be read to its last line. */
    body .cs-shell:has(.checkout-submit-bar) {
        padding-bottom: calc(11rem + env(safe-area-inset-bottom, 0px));
    }

    body:has(.checkout-submit-bar) .cs-toast-host {
        bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
    }
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 2rem 0 1rem;
}

.auth-card {
    width: min(100%, 32rem);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-lg);
    box-shadow: var(--cs-shadow-soft);
    padding: 2rem;
}

/* The checkout page's own layout lives in Pages/Checkout.razor.css. .checkout-checkbox stays here
   because the cancel-order modal and the address book use it too. */
.checkout-checkbox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    color: var(--cs-text);
    line-height: 1.45;
}

.checkout-checkbox input {
    margin-top: 0.2rem;
    accent-color: var(--cs-accent);
}

.auth-card__header {
    margin-bottom: 1.5rem;
}

.auth-eyebrow {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs-accent-strong);
}

.auth-subtitle {
    color: var(--cs-muted);
    margin-bottom: 0;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.45rem;
}

.auth-label {
    font-weight: 700;
}

.auth-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border-radius: var(--cs-radius-sm);
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
    color: var(--cs-text);
}

.auth-input:focus {
    outline: 2px solid rgba(206, 126, 93, 0.22);
    border-color: var(--cs-accent);
}

.auth-submit {
    width: 100%;
    margin-top: 0.25rem;
}

.auth-footer {
    margin-top: 1.25rem;
    color: var(--cs-muted);
}

.auth-footer a {
    color: var(--cs-accent-strong);
    font-weight: 700;
    margin-left: 0.35rem;
    text-decoration: none;
}

.auth-links {
    margin-top: 1rem;
    display: grid;
    gap: 0.5rem;
}

.auth-links a {
    color: var(--cs-accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.auth-alert {
    padding: 0.9rem 1rem;
    border-radius: var(--cs-radius-sm);
    margin-bottom: 1rem;
}

.auth-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-alert--error {
    background: #fff1f0;
    color: #8f312e;
    border: 1px solid #f1c6c2;
}

.auth-alert--success {
    background: #eefaf1;
    color: #256b39;
    border: 1px solid #bfe0c7;
}

.auth-alert--warning {
    background: #fff8e6;
    color: #8a6415;
    border: 1px solid #f0dca3;
}

/* .auth-validation went with the <ValidationSummary> blocks on 2026-09-17: every message in
   those forms is field-level and was already rendered under its own input, so the summary was
   the same text a second time. Only .auth-message survives. */
.auth-message {
    color: #b13d39;
    font-size: 0.92rem;
}

.auth-captcha {
    padding: 1rem;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    background: var(--cs-background-soft);
}

.auth-captcha__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-captcha__refresh {
    border: 0;
    background: transparent;
    color: var(--cs-accent-strong);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.auth-captcha__refresh:disabled {
    cursor: default;
    opacity: 0.6;
}

.auth-captcha__image-wrap {
    display: flex;
    justify-content: center;
    padding: 0.35rem;
    border-radius: var(--cs-radius-sm);
    background: var(--cs-surface);
    border: 1px dashed var(--cs-border);
}

.auth-captcha__image {
    display: block;
    max-width: 100%;
    height: auto;
}

.auth-captcha__hint {
    margin: 0;
    color: var(--cs-muted);
    font-size: 0.92rem;
}

.auth-captcha__input {
    text-align: center;
    letter-spacing: 0.3rem;
    font-weight: 700;
}

.admin-page {
    padding: 1.5rem;
}

.admin-page__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-page__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs-accent-strong);
}

.admin-page__title {
    margin-bottom: 0.75rem;
}

.admin-page__lead {
    max-width: 46rem;
    margin-bottom: 0;
    color: var(--cs-muted);
}

.admin-page__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: var(--cs-background-soft);
    border: 1px solid var(--cs-border);
    font-weight: 700;
    color: var(--cs-accent-strong);
}

.admin-page__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-page__content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1rem;
}

.admin-page__content-grid--editor {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
}

.product-editor__column {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

/* The admin order-detail "Управление" panel — a single persistent panel, never conditionally
   unmounted, so the grid never reflows while an action is in flight (that was the old page's
   layout-break: the "Приемане" card unmounted on every click). Sticks alongside the left info
   column on desktop; on narrow screens it stacks first (see the 1100px breakpoint below) since the
   actions are the point of the screen. */
.admin-order-manage {
    position: sticky;
    top: 1rem;
    align-self: start;
    display: grid;
    gap: 1.1rem;
    min-width: 0;
}

.admin-order-manage__meta {
    display: grid;
    gap: 0.25rem;
}

.admin-order-manage__section {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cs-border);
}

.admin-order-manage__section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.admin-order-manage__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-page__title .admin-badge {
    margin-left: 0.6rem;
    vertical-align: middle;
}

.admin-page__content-grid--full {
    grid-template-columns: minmax(0, 1fr);
}

.admin-card,
.admin-panel,
.admin-role-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    box-shadow: var(--cs-shadow-soft);
}

.admin-card {
    padding: 1.1rem;
}

.admin-card__label,
.admin-card__note,
.admin-role-card__text,
.admin-list span,
.admin-inline-note {
    color: var(--cs-muted);
}

.admin-card__label {
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-card__value {
    margin: 0 0 0.45rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.admin-card__note {
    margin-bottom: 0;
}

.admin-panel {
    padding: 1.25rem;
}

.admin-panel__title,
.admin-role-card__title {
    margin-bottom: 0.85rem;
}

.admin-panel__header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-panel__divider {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--cs-border);
}

.admin-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.85rem;
}

.admin-list li {
    display: grid;
    gap: 0.2rem;
}

.admin-role-grid {
    display: grid;
    gap: 0.85rem;
}

.admin-role-card {
    padding: 1rem;
}

.admin-role-card__title {
    font-weight: 700;
}

.admin-inline-note {
    font-size: 0.92rem;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table-wrap:focus-visible {
    outline: 2px solid var(--cs-accent);
    outline-offset: 2px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid rgba(239, 220, 207, 0.8);
    vertical-align: top;
}

.admin-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cs-muted);
}

.admin-table__actions {
    width: 13rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.admin-table__thumb {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--cs-radius-sm);
    object-fit: cover;
    display: block;
    background: var(--cs-background-soft);
    border: 1px solid var(--cs-border);
}

.admin-table__thumb--empty {
    display: grid;
    place-items: center;
    color: var(--cs-muted);
    font-size: 0.8rem;
}

.admin-table__empty {
    color: var(--cs-muted);
    text-align: center;
}

.admin-action-link {
    background: transparent;
    border: 0;
    padding: 0;
    margin-right: 0.8rem;
    color: var(--cs-accent-strong);
    font-weight: 700;
    cursor: pointer;
}

.admin-action-link--danger {
    color: #a13832;
}

/* Without this a disabled action link is indistinguishable from an active one — same accent colour,
   same pointer cursor — so the whole Roles screen (every role there is a built-in one, and built-in
   roles are not editable) reads as clickable and answers nothing. */
.admin-action-link:disabled {
    color: var(--cs-muted);
    cursor: not-allowed;
}

/* Compact icon-only row action for admin tables — same role as .admin-action-link above, but for
   the dense list screens (Products/Categories/Measures/Orders/Users/Content) where three or more
   spelled-out text actions per row ("Преглед" / "Редактирай" / "Изтрий") pushed the actions column
   wide and read as a wall of links. Mirrors the app's existing icon-button language
   (.product-card__icon: circular, bordered, --cs-surface fill) rather than inventing a new visual
   family. The glyph is decorative; every caller MUST pass a localized title + aria-label carrying
   the real action name, so the accessible name and the hover tooltip still say "Преглед"/
   "Редактирай"/"Изтрий" even though the visible content is a symbol. 2.75rem = 44px, the minimum
   touch target. */
.admin-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--cs-border);
    border-radius: 999px;
    background: var(--cs-surface);
    color: var(--cs-accent-strong);
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.admin-icon-button:hover {
    transform: translateY(-1px);
    background: var(--cs-background-soft);
    box-shadow: var(--cs-shadow-soft);
}

.admin-icon-button:active {
    transform: scale(0.97);
}

.admin-icon-button:focus-visible {
    outline: 2px solid var(--cs-accent);
    outline-offset: 2px;
}

.admin-icon-button--danger {
    color: #a13832;
}

/* Same rationale as .admin-action-link:disabled above — a disabled icon button must not read as a
   live one. */
.admin-icon-button:disabled {
    color: var(--cs-muted);
    cursor: not-allowed;
    background: var(--cs-surface);
    box-shadow: none;
    transform: none;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #efe6df;
    color: var(--cs-text);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
}

.admin-badge--ok {
    background: #d8efd8;
    color: #1e6b1e;
}

.admin-badge--warn {
    background: #fbe7c2;
    color: #7a4d00;
}

.admin-badge--danger {
    background: #f7d4d4;
    color: #8a1a1a;
}

.admin-badge--info {
    background: #dbe7f5;
    color: #1f4e79;
}

/* Counter orders: scheme tokens, not a fixed hue, so the badge follows the colour scheme. */
.admin-badge--in-store {
    background: var(--cs-surface-strong);
    color: var(--cs-accent-strong);
    box-shadow: inset 0 0 0 1px var(--cs-accent);
}

/* Cakes made to a customer's design: filled with the strong accent, so it reads apart from the outlined counter badge. The surface colour
   is the text, which is light on the light schemes and dark on the board, where the accent is the light one. */
.admin-badge--design {
    background: var(--cs-accent-strong);
    color: var(--cs-surface);
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(53, 39, 32, 0.45);
    display: grid;
    place-items: center;
    padding: 1.5rem;
    z-index: 1000;
}

.admin-modal {
    width: min(100%, 32rem);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    box-shadow: var(--cs-shadow-strong);
    padding: 1.5rem;
}

.admin-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.home-announcement {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    background: linear-gradient(135deg, rgba(255, 241, 231, 0.95), rgba(255, 255, 255, 0.96));
    box-shadow: var(--cs-shadow-soft);
}

.home-announcement__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.home-announcement__title {
    margin-bottom: 0.25rem;
    font-weight: 800;
}

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

.home-placement__image {
    display: block;
    width: 100%;
    max-height: 18rem;
    object-fit: cover;
    border-radius: var(--cs-radius-md);
    margin-top: 1rem;
    border: 1px solid var(--cs-border);
}

.home-placement__image--card {
    max-height: 12rem;
    margin-bottom: 1rem;
}

.home-placement__image--hero {
    max-height: 20rem;
}

/* The hero used to be panel + advertisement aside. The advertisement card was removed, so the hero is
   now a single full-width panel and the two-column split moved inside it: copy left, image right.
   (Legacy `@media` blocks below still list `.home-hero` in their `grid-template-columns: 1fr` groups —
   harmless, since this is no longer a grid container.) */
.home-hero {
    display: block;
    margin-bottom: 2rem;
}

.home-hero__panel,
.home-card,
.home-story,
.home-visit {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(239, 220, 207, 0.92);
    border-radius: var(--cs-radius-lg);
    box-shadow: var(--cs-shadow-soft);
}

.home-hero__panel {
    padding: 2rem;
}

/* Row alignment for the client account/profile card grids (owner-reported, 2026-09-25): .home-grid
   stretches every .home-card to its row's tallest sibling by default (CSS Grid's own
   align-items: stretch — nothing here overrides it), but a plain .home-card left that extra height
   as dead space below a short card's content instead of doing anything with it, so a two-field
   "Основни данни"/"Смяна на парола" card next to a seven-field "Телефон и адрес" card looked broken
   rather than intentionally compact. Same fix already applied to .product-card on 2026-09-24: turn
   the card into a column flexbox so its trailing action row can absorb the slack via
   margin-top: auto instead of leaving it unused at the bottom. */
.home-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* The action row anchors to the card's stretched bottom edge — .home-card__footer gets its
   margin-top: auto below, next to its other rules; a .home-hero__actions row gets the same
   treatment only when it is a direct child of the card (ProfileAddresses' address list), not when
   it is nested inside a form or standalone in the hero panel, where it must stay in normal flow. */
.home-card > .home-hero__actions:last-child {
    margin-top: auto;
}

/* A form is its own flex column inside the card, one level deeper, so its trailing submit button
   lands at the bottom of the stretched CARD rather than the bottom of its own shorter content —
   same trick as .home-card__footer above. Used by ClientProfile and the client-facing
   profile/security screen, whose EditForms had no layout class at all (so their fields ran together
   with no gap, on top of the height mismatch). */
.home-card__form {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1rem;
}

.home-card__form > :last-child {
    margin-top: auto;
}

.home-hero__eyebrow,
.home-section__eyebrow {
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs-accent-strong);
}

.home-hero__title {
    font-size: clamp(2.4rem, 4vw, 4.3rem);
    line-height: 1;
    margin-bottom: 1rem;
}

.home-hero__lead,
.home-section__lead {
    font-size: 1.05rem;
    color: var(--cs-muted);
    max-width: 42rem;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.5rem 0 0;
}

/* This had no base rule at all — only the flex-direction override in the 1100px media query below,
   which does nothing without a display:flex to override. So every card footer using it was a plain
   block: wrapped buttons touched each other with no gap, and the mobile rule that is supposed to
   stack them full width never applied. ClientProfile and ProfileOrders both rely on it.
   margin-top: auto (2026-09-25) anchors it to the bottom of a stretched .home-card — see the row
   alignment comment above .home-card. */
.home-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: auto;
}

/* Removed with the hero rework: `.home-hero__stats` (Поръчка / Витрина / Поводи) and
   `.home-hero__spotlight*` (the advertisement card). `.home-pill` below is still used by the
   promotion and catering cards, so it stays. */

.home-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--cs-border);
    color: var(--cs-accent-strong);
    font-size: 0.85rem;
    font-weight: 700;
}

.home-spotlight__price {
    font-size: 2rem;
    font-weight: 800;
}

.home-section {
    margin-top: 2.5rem;
}

.home-section__header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

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

.home-card {
    padding: 1.4rem;
}

.home-card__title {
    margin-bottom: 0.65rem;
    font-size: 1.2rem;
}

/* The card title is a real link so the catalogue is crawlable; it should still read as a heading. */
.home-card__title-link {
    color: inherit;
    text-decoration: none;
}

.home-card__title-link:hover .home-card__title,
.home-card__title-link:focus-visible .home-card__title {
    color: var(--cs-accent-strong);
    text-decoration: underline;
}

.home-card__meta {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--cs-background-soft);
    color: var(--cs-accent-strong);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.home-card__text {
    color: var(--cs-muted);
    margin-bottom: 1rem;
}

.home-story {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 1.25rem;
    padding: 1.75rem;
}

.home-story__panel {
    border-radius: var(--cs-radius-md);
    background: linear-gradient(135deg, rgba(255, 245, 238, 0.95), rgba(255, 255, 255, 0.95));
    border: 1px solid var(--cs-border);
    padding: 1.25rem;
}

.home-story__list {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--cs-muted);
}

.home-story__aside {
    display: grid;
    gap: 0.9rem;
}

.home-story__note {
    padding: 1rem;
    border-radius: var(--cs-radius-md);
    background: var(--cs-background-soft);
    border: 1px solid var(--cs-border);
}

.home-visit {
    padding: 1.75rem;
}

.home-visit__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-visit__item {
    padding: 1.1rem;
    border-radius: var(--cs-radius-md);
    background: var(--cs-background-soft);
    border: 1px solid var(--cs-border);
}

.home-visit__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cs-muted);
    margin-bottom: 0.35rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2IDY2LjAxODMgMjYzLjU4NiA2Ni4wMTgzIDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.product-view__gallery {
    display: grid;
    gap: 1rem;
}

.product-view__hero-wrap {
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
}

.product-view__hero {
    display: block;
    width: 100%;
    max-height: 28rem;
    object-fit: cover;
    background: var(--cs-background-soft);
}

.product-view__empty-image {
    min-height: 18rem;
    display: grid;
    place-items: center;
    color: var(--cs-muted);
    padding: 1rem;
}

.order-slots-bulk-grid,
.order-day-slot-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.order-slots-days-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.product-view__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-view__thumb {
    width: 6rem;
    height: 6rem;
    padding: 0;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-sm);
    overflow: hidden;
    background: var(--cs-surface);
    cursor: pointer;
}

.product-view__thumb--active {
    border-color: var(--cs-accent);
    box-shadow: 0 0 0 2px rgba(206, 126, 93, 0.22);
}

.product-view__thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-view__details {
    display: grid;
    gap: 1rem;
}

.product-view__details div {
    display: grid;
    gap: 0.3rem;
}

.product-view__details dt {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--cs-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-view__details dd {
    margin: 0;
}

/* Size/variant picker. Split from .product-view__add-to-cart so the filling picker can sit between
   the two, which is the order the shop asked for: size -> filling -> add to cart. */
.product-view__variant {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr);
    gap: 0.35rem;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
}

.product-view__add-to-cart {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.product-view__quantity-label {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--cs-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-view__quantity-select {
    min-width: 0;
}

.product-view__cart-button {
    white-space: nowrap;
}

.product-view__cart-message {
    grid-column: 1 / -1;
    color: var(--cs-muted);
    font-weight: 700;
}

@media (max-width: 640px) {
    .product-view__add-to-cart {
        grid-template-columns: 1fr;
    }

    .product-view__cart-button {
        width: 100%;
    }

    .product-view__cart-message {
        text-align: center;
    }
}

.product-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 18rem));
    gap: 1rem;
    align-items: start;
}

.product-image-card {
    width: 100%;
    max-width: 18rem;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--cs-shadow-soft);
}

.product-image-card__preview {
    display: block;
    width: 100%;
    height: 12rem;
    object-fit: cover;
    background: var(--cs-background-soft);
}

.product-image-card__body {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.product-image-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-price-list {
    display: grid;
    gap: 1rem;
}

.product-price-row {
    padding: 1rem;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--cs-shadow-soft);
}

.product-price-row__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.product-price-row__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 900px) {
    .admin-page,
    .admin-panel {
        padding: 1.1rem;
    }

    .admin-page__header,
    .admin-page__content-grid,
    .admin-page__stats,
    .home-hero,
    .home-story,
    .home-visit__grid,
    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-section__header {
        align-items: start;
        flex-direction: column;
    }

    .product-images-grid {
        grid-template-columns: 1fr;
    }

    .product-image-card {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .auth-card,
    .home-hero__panel,
    .home-card,
    .home-story,
    .home-visit {
        padding: 1.25rem;
    }
}

@media (max-width: 1100px) {
    .admin-page__stats,
    .admin-page__content-grid,
    .admin-page__content-grid--editor,
    .home-hero,
    .home-feature-grid,
    .home-story,
    .home-visit,
    .catalog-grid,
    .catalog-filters,
    .catalog-highlight,
    .layout-shell {
        grid-template-columns: 1fr;
    }

    .admin-page__header,
    .layout-shell__topbar,
    .home-hero__actions,
    .home-card__footer,
    .catalog-card__footer,
    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .product-price-row__grid {
        grid-template-columns: 1fr;
    }

    /* The actions panel is the point of this screen — stack it above the info cards, and drop the
       desktop-only sticky positioning now that the column is no longer beside anything. */
    .admin-order-manage {
        position: static;
        order: -1;
    }
}



/* Product catalog layout (shared cross-platform source of truth) */
/* Row alignment (owner requirement, 2026-09-24): .home-grid stretches every card to its row's
   tallest (CSS Grid's default align-items: stretch); turning the card into a column flexbox whose
   footer carries margin-top: auto (below) pins that footer to the same height across a row no matter
   how long the title, category or body content runs — the flex "auto margin on the last child"
   trick, no wrapping body element required. */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-card__icon--favorite {
    position: absolute;
    top: .85rem;
    right: .85rem;
}

.product-card__footer {
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    /* Last child of the .product-card flex column — auto absorbs all the slack above it, so the
       footer lands at the same height across a grid row regardless of body length. Inert (resolves
       to 0) anywhere .product-card isn't a flex container, so this is safe wherever the class is
       still used outside .home-grid. */
    margin-top: auto;
}

.product-card__media {
    margin: 0.65rem 0 0.85rem;
}

/* FilterBar now supplies its own complete surface (warm gradient, border, accent top edge — see
   FilterBar.razor.css), so this wrapper only needs to handle sticky positioning: it used to also
   paint a bordered/blurred white box of its own, which sat ~12px outside FilterBar's own box and
   read as two nested near-white rectangles rather than one considered surface. */
.catalog-sticky-filters {
    position: sticky;
    top: .75rem;
    z-index: 5;
}

/* Only the collapsed bar (the toggle row) may stay pinned over the grid. An opened panel is up to a few
   hundred pixels tall, which on a laptop is most of the viewport, so it scrolls with the page instead. */
.catalog-sticky-filters:has(.cs-filter-bar--expanded) {
    position: static;
}

.catalog-sticky-filters + .cs-partner-banner {
    margin-bottom: 1.5rem;
}

/* On the home page the first banner sits under the hero, which brings its own bottom margin. A banner that
   follows any other section has nothing above it, and its caption would touch the cards. */
.home-layout > .home-section + .cs-partner-banner,
.home-layout > .cs-partner-banner + .cs-partner-banner {
    margin-top: 2rem;
}

.product-card__icon {
    width: 2.9rem;
    height: 2.9rem;
    font-size: 1.15rem;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.product-card__icon:hover {
    transform: translateY(-1px) scale(1.04);
    background: var(--cs-background-soft);
    box-shadow: var(--cs-shadow-soft);
}

.product-card__icon:active {
    transform: scale(.97);
}

.catalog-favorites-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 3rem;
    font-weight: 650;
}

.catalog-load-more {
    text-align: center;
    margin-top: 1rem;
}

/* ═══════════════════════════════════════════════
   Shared text-clamp + media-frame primitives
   Fixed aspect-ratio boxes so a CMS-uploaded image can never stretch a card taller than its neighbours
   or push surrounding text around while it loads (no reserved space = layout shift on load).
═══════════════════════════════════════════════ */
.cs-clamp-1,
.cs-clamp-2,
.cs-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-clamp-1 { -webkit-line-clamp: 1; }
.cs-clamp-2 { -webkit-line-clamp: 2; }
.cs-clamp-3 { -webkit-line-clamp: 3; }

.cs-media-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--cs-radius-md);
    border: 1px solid var(--cs-border);
    background: var(--cs-background-soft);
}

.cs-media-frame > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-media-frame--wide {
    aspect-ratio: 16 / 9;
}

.cs-media-frame--banner {
    aspect-ratio: 4 / 1;
}

/* Product photos must show in full, never cropped (owner requirement, 2026-09-24: "снимката трябва
   да се побира точно, а не да се реже"). The frame's own fixed aspect-ratio is unchanged — that is
   what keeps every card in a row the same size even though the uploaded photos run from ~1:1 to
   ~4:3 — only the fit inside it changes from cover to contain, letterboxed on the frame's own
   --cs-background-soft. Opt-in modifier, not a change to .cs-media-frame itself: the hero, catering
   and product-view frames elsewhere in the app are out of scope for this pass and keep object-fit:
   cover. */
.cs-media-frame--contain > img {
    object-fit: contain;
}

/* Empty state is styled, not bare: a soft diagonal wash plus a low-contrast glyph, so a section with
   no photography yet reads as "deliberately blank" rather than "broken image". */
.cs-media-frame--empty {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85), transparent 58%),
        linear-gradient(135deg, #f7ddcd, #fdeee4);
}

.cs-media-frame--empty > span {
    font-size: 2.1rem;
    opacity: 0.5;
}

.cs-badge-new {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    background: var(--cs-accent-strong);
    color: var(--cs-on-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(155, 86, 57, 0.32);
}

/* "In the shop": the product is marked as available in the pickup store the page speaks about. It sits at the bottom
   left of the photo, so it never meets the "new" badge at the top left or the heart at the top right of the card. It
   is a div and not a span on purpose: the rule above for an empty frame blows up and fades every span in the frame.
   The fill is the opaque surface, so the text does not depend on the photo under it, and the strong accent on the
   surface is at least 5.1:1 in each of the five colour schemes. The tick is drawn with borders, not with a glyph. */
.cs-badge-available {
    position: absolute;
    left: 0.6rem;
    bottom: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: calc(100% - 1.2rem);
    padding: 0.25rem 0.7rem 0.25rem 0.55rem;
    border: 1px solid var(--cs-accent-strong);
    border-radius: var(--cs-radius-pill);
    background: var(--cs-surface);
    color: var(--cs-accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.3;
    box-shadow: 0 4px 10px rgba(var(--cs-accent-rgb), 0.28);
}

.cs-badge-available::before {
    content: "";
    flex: none;
    width: 0.6rem;
    height: 0.3rem;
    margin-top: -0.15rem;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg);
}

/* "On promotion": the percent a promotion takes off a price, "-20%". It is the one badge every surface draws, so every
   surface says the same thing the same way. On a photo it is laid over the top right corner: the "new" badge holds the top
   left, the badge "in the shop" the bottom left, and the heart of a catalogue card is on the card above the photo, so the
   four never meet. Beside a price on a plain card it is a pill in the flow of the line. The fill is the strong accent and
   the text the colour made for text on it, which is at least 5.1:1 in each of the five colour schemes. The transparent
   border is what Windows high contrast draws in a system colour once it has taken the fill away. The second selector is
   there for the empty frame: its rule blows up and fades every span in the frame, and this one states the size and the
   opacity again with enough weight to win. */
.cs-badge-promo {
    display: inline-flex;
    align-items: center;
    flex: none;
    max-width: 100%;
    padding: 0.2rem 0.6rem;
    border: 1px solid transparent;
    border-radius: var(--cs-radius-pill);
    background: var(--cs-accent-strong);
    color: var(--cs-on-accent);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.02em;
    white-space: nowrap;
    vertical-align: middle;
}

.cs-media-frame > .cs-badge-promo {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    opacity: 1;
    box-shadow: 0 4px 10px rgba(var(--cs-accent-rgb), 0.28);
}

/* The hero panel splits copy | image. Below 900px it stacks, image last. */
.home-hero__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    align-items: center;
}

.home-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.home-hero__media {
    margin: 0;
    min-width: 0;
}

@media (min-width: 901px) {
    .home-hero__panel {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 2.25rem;
    }
}

/* ═══════════════════════════════════════════════
   Landing-page rhythm
   The complaint this solves: consecutive sections ran together, so the page read as one long column
   with no hierarchy. Three devices, applied consistently: a bigger gap between sections, an accent
   rule under every section eyebrow, and an optional tinted band that alternating sections sit on.
═══════════════════════════════════════════════ */
:root {
    --cs-section-gap: 4.5rem;
}

.home-section {
    margin-top: var(--cs-section-gap);
    scroll-margin-top: 1.5rem;
}

.home-section__header {
    margin-bottom: 1.5rem;
}

/* The eyebrow carries a short accent rule — a cheap, repeatable signal that a new section started. */
.home-section__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.home-section__eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 2px;
    border-radius: 2px;
    background: var(--cs-accent);
    flex: none;
}

.home-section__header h2 {
    font-size: clamp(1.5rem, 2.2vw, 2.1rem);
    line-height: 1.2;
    margin: 0;
    max-width: 34ch;
}

.home-section__header .home-section__lead {
    margin-top: 0.6rem;
}

/* Tinted band for alternating sections, so neighbouring sections never share a background. */
.home-band {
    padding: 2.5rem;
    border-radius: var(--cs-radius-lg);
    background: linear-gradient(160deg, var(--cs-surface-strong), var(--cs-background-soft) 65%);
    border: 1px solid var(--cs-border);
}

/* Closing band on the home page that hands off to /contacts. */
.home-contact-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 2rem 2.5rem;
    border-radius: var(--cs-radius-lg);
    background: linear-gradient(160deg, var(--cs-surface-strong), var(--cs-background-soft) 65%);
    border: 1px solid var(--cs-border);
}

.home-contact-cta__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    line-height: 1.2;
}

.home-contact-cta .home-section__lead {
    margin: 0;
}

@media (max-width: 640px) {
    .home-contact-cta {
        padding: 1.25rem;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    :root {
        --cs-section-gap: 3rem;
    }

    .home-band {
        padding: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════
   Home layout presets (redesign phase 2, /admin/settings → LayoutVariant)
   Reordering the sections is Home.razor.cs's job (Services/UI/HomeLayoutPlan.cs); this is only the
   handful of small visual differences between presets, one specificity point above the base rules
   above, no !important. Full-bleed sections are out of scope — .cs-main__inner's centred container
   is unchanged for every preset.
═══════════════════════════════════════════════ */

/* Whichever section a preset puts first must not inherit the top margin meant for a section that
   comes after another one. */
[data-cs-layout] > .home-section:first-child {
    margin-top: 0;
}

[data-cs-layout="minimal"] {
    /* Fewer sections, so the ones that remain get more room to breathe rather than reading cramped. */
    --cs-section-gap: 5.5rem;
}

[data-cs-layout="story-led"],
[data-cs-layout="promo-focus"] {
    /* The featured section (story / promotions) sits tighter against the hero than the standard
       rhythm, reading as "the very next thing", not just another section further down the page. */
    --cs-section-gap: 3.75rem;
}

/* story-led: the story's photo panel leads, copy follows — the one legitimate use of `order` here,
   since it reorders a non-focusable image, never focusable/interactive content or tab order. Applies
   at every width; .home-hero__panel is a single column on narrow viewports too, so this still puts
   the image first when it stacks. */
[data-cs-layout="story-led"] .home-hero__media {
    order: -1;
}

/* promo-focus: the promotions grid (the only .home-grid the home page itself renders — the product
   strips use their own .home-product-strip__grid) goes denser, so the featured promotions read as a
   wall of offers rather than three cards trailing off into whitespace. */
@media (min-width: 901px) {
    [data-cs-layout="promo-focus"] .home-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Hero: the original clamp topped out at 4.3rem, which broke a 45-character Bulgarian headline across
   four lines inside a ~560px column. Smaller ceiling + tighter leading keeps it to two. */
.home-hero__title {
    font-size: clamp(2rem, 3.1vw, 3.1rem);
    line-height: 1.06;
    letter-spacing: -0.015em;
    max-width: 18ch;
}

.home-hero__lead {
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 44ch;
}

/* Without this the left panel stretches to match the taller two-note aside, leaving a large empty
   area under a single paragraph. */
.home-story {
    align-items: start;
}

.home-visit__label {
    letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════
   Nebular-inspired Admin Shell  (global styles)
═══════════════════════════════════════════════ */
:root{
  --nb-sw:260px;--nb-sc:68px;--nb-th:56px;
  --nb-bg:#1a0e08;--nb-bd:rgba(255,255,255,.07);
  --nb-tx:rgba(255,235,215,.82);--nb-mt:rgba(255,200,160,.38);
  --nb-hv:rgba(255,255,255,.07);
  /* Bright foreground for the sidebar's own bits (brand name, avatar initial, a hovered nav item)
     that need actual white, not --nb-tx's translucent cream. Own token, not --cs-surface: this shell
     stays dark unconditionally (never gets [data-cs-scheme]), so it must never borrow a --cs-* value
     that a colour scheme is free to repoint to something that isn't light. */
  --nb-surface:#fff;
  --nb-ab:rgba(224,123,58,.18);--nb-at:#f0a06a;
  --nb-tr:.22s ease;
}
.nb-shell{display:flex;min-height:100vh;background:#f9f4f0}
.nb-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:40}
/* Sidebar */
.nb-sidebar{
  display:flex;flex-direction:column;
  width:var(--nb-sw);min-height:100vh;
  background:var(--nb-bg);border-right:1px solid var(--nb-bd);
  flex-shrink:0;overflow:hidden;
  position:sticky;top:0;height:100vh;
  transition:width var(--nb-tr);
}
/* Brand */
.nb-sidebar__brand{
  display:flex;align-items:center;gap:.9rem;
  padding:1.25rem 1rem 1rem;
  border-bottom:1px solid var(--nb-bd);
  flex-shrink:0;overflow:hidden;min-height:72px;
}
.nb-sidebar__logo{
  width:2.6rem;height:2.6rem;object-fit:contain;
  border-radius:8px;flex-shrink:0;
  /* No brightness/invert filter here (unlike the old line-art crest): this mark is full-color
     (red on transparent), and forcing it through brightness(0) invert(1) would flatten it into an
     unreadable solid-white silhouette instead of showing the actual logo. Red reads fine on the
     sidebar's dark background as-is. */
}
.nb-sidebar__brand-text{display:flex;flex-direction:column;overflow:hidden;white-space:nowrap}
.nb-sidebar__brand-name{font-size:.95rem;font-weight:800;color:var(--nb-surface);letter-spacing:.01em}
.nb-sidebar__brand-sub{font-size:.72rem;color:var(--nb-mt);font-weight:600;letter-spacing:.06em;text-transform:uppercase;margin-top:.1rem}
/* Nav */
.nb-sidebar__nav{
  flex:1;overflow-y:auto;overflow-x:hidden;
  padding:.75rem .65rem;
  display:flex;flex-direction:column;gap:.1rem;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.1) transparent;
}
.nb-nav-group{margin-bottom:.35rem}
.nb-nav-group__label{
  display:block;font-size:.66rem;font-weight:800;
  letter-spacing:.1em;text-transform:uppercase;
  color:var(--nb-mt);padding:.55rem .65rem .3rem;
  white-space:nowrap;overflow:hidden;
}
.nb-nav-item{
  position:relative;
  display:flex;align-items:center;gap:.8rem;
  padding:.62rem .75rem;border-radius:10px;
  text-decoration:none;color:var(--nb-tx);
  border:1px solid transparent;
  transition:background var(--nb-tr),color var(--nb-tr),border-color var(--nb-tr);
  white-space:nowrap;overflow:hidden;
}
.nb-nav-item__count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:1.35rem;height:1.35rem;padding:0 .35rem;border-radius:999px;
  background:#e0473a;color:#fff;
  font-size:.68rem;font-weight:800;line-height:1;flex-shrink:0;margin-left:auto;
}
.nb-nav-item:hover{background:var(--nb-hv);color:var(--nb-surface)}
.nb-nav-item.active{background:var(--nb-ab);color:var(--nb-at);border-color:rgba(224,123,58,.25);font-weight:700}
.nb-nav-item__badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:2rem;height:2rem;min-width:2rem;border-radius:8px;
  background:rgba(255,255,255,.09);
  font-size:.65rem;font-weight:900;letter-spacing:.03em;
  color:rgba(255,220,190,.75);flex-shrink:0;
  transition:background var(--nb-tr),color var(--nb-tr);
}
.nb-nav-item.active .nb-nav-item__badge{background:rgba(224,123,58,.30);color:var(--nb-at)}
.nb-nav-item__label{font-size:.875rem;font-weight:600;overflow:hidden;text-overflow:ellipsis}
/* The count takes room from the label, and "Заявки за доставка" needs 141px where 133px are left, so a
   label that shares its row with a count may wrap instead of being cut. Items without a count keep
   their single line. */
.nb-nav-item:has(.nb-nav-item__count) .nb-nav-item__label{white-space:normal;line-height:1.25}
/* Footer */
.nb-sidebar__footer{border-top:1px solid var(--nb-bd);padding:.75rem .65rem;flex-shrink:0;overflow:hidden}
.nb-user-card{
  display:flex;align-items:center;gap:.75rem;
  padding:.5rem .65rem;border-radius:10px;
  background:rgba(255,255,255,.06);margin-bottom:.5rem;overflow:hidden;
}
.nb-user-card__avatar{
  width:2.1rem;height:2.1rem;min-width:2.1rem;
  border-radius:50%;background:linear-gradient(135deg,#e07b3a,#c96a2d);
  color:var(--nb-surface);font-weight:800;font-size:.9rem;
  display:flex;align-items:center;justify-content:center;
}
.nb-user-card__info{display:flex;flex-direction:column;overflow:hidden;white-space:nowrap}
.nb-user-card__name{font-size:.8rem;font-weight:700;color:rgba(255,235,215,.9);overflow:hidden;text-overflow:ellipsis}
.nb-user-card__role{font-size:.7rem;color:var(--nb-mt);overflow:hidden;text-overflow:ellipsis}
.nb-footer-actions{display:flex;gap:.4rem}
.nb-footer-btn{
  flex:1;display:inline-flex;align-items:center;justify-content:center;
  padding:.45rem .6rem;border-radius:8px;
  font-size:.78rem;font-weight:700;
  border:1px solid var(--nb-bd);background:rgba(255,255,255,.07);
  color:var(--nb-tx);text-decoration:none;cursor:pointer;
  transition:background var(--nb-tr),color var(--nb-tr);white-space:nowrap;
}
.nb-footer-btn:hover{background:rgba(255,255,255,.12);color:var(--nb-surface)}
.nb-footer-btn--danger{border-color:rgba(229,57,53,.3);color:rgba(255,160,140,.8)}
.nb-footer-btn--danger:hover{background:rgba(229,57,53,.15);color:#ff8a80}
/* Content */
.nb-content{flex:1;display:flex;flex-direction:column;min-width:0}
.nb-topbar{
  position:sticky;top:0;z-index:20;
  height:calc(var(--nb-th) + env(safe-area-inset-top,0px));background:var(--cs-surface);
  border-bottom:1px solid var(--cs-border,#ede0d6);
  display:flex;align-items:center;gap:1rem;padding:env(safe-area-inset-top,0px) max(1.5rem,env(safe-area-inset-right,0px)) 0 max(1.5rem,env(safe-area-inset-left,0px));
  box-shadow:0 1px 8px rgba(0,0,0,.06);
}
.nb-topbar__toggle{
  display:flex;flex-direction:column;justify-content:center;gap:.3rem;
  width:2.2rem;height:2.2rem;padding:.35rem .4rem;
  border:none;background:transparent;border-radius:8px;
  cursor:pointer;flex-shrink:0;transition:background .15s;
}
.nb-topbar__toggle:hover{background:#f5ede4}
.nb-topbar__toggle span{display:block;height:2px;border-radius:999px;background:#2c1a12}
.nb-topbar__title{font-size:1rem;font-weight:700;color:#2c1a12}
.nb-main{flex:1;padding:1.5rem}
/* Collapsed — desktop icon rail only (min-width guard below). AdminLayout's single hamburger
   button drives BOTH `collapsed` (desktop mini-rail) and `sidebarOpen` (mobile off-canvas open/
   close) from the one ToggleSidebar handler, relying on each state's CSS effect being scoped to
   its own viewport so the other is a harmless no-op. Before this fix these label/rail rules had no
   such guard, so the FIRST tap of the hamburger on mobile — which sets collapsed=true and
   sidebarOpen=true together — opened the sidebar AND collapsed it to icon-only in the same paint:
   every nav item showed just its badge with no label until a second toggle flipped collapsed back
   off. Gating the whole block to desktop widths removes that side effect at the source. */
@media(min-width:901px){
  .nb-shell--collapsed .nb-sidebar{width:var(--nb-sc)}
  .nb-shell--collapsed .nb-sidebar__brand-text,
  .nb-shell--collapsed .nb-nav-group__label,
  .nb-shell--collapsed .nb-nav-item__label,
  .nb-shell--collapsed .nb-user-card__info,
  .nb-shell--collapsed .nb-footer-actions{display:none}
  .nb-shell--collapsed .nb-user-card{justify-content:center;padding:.5rem}
  .nb-shell--collapsed .nb-nav-item{justify-content:center;padding:.62rem}
  .nb-shell--collapsed .nb-nav-item__badge{width:2.2rem;height:2.2rem}
  .nb-shell--collapsed .nb-nav-item__count{
    position:absolute;top:.2rem;right:.2rem;margin-left:0;
    min-width:1.1rem;height:1.1rem;padding:0 .25rem;font-size:.6rem;
  }
}
/* Mobile */
@media(max-width:900px){
  .nb-overlay{display:block}
  .nb-sidebar{
    position:fixed;left:0;top:0;bottom:0;z-index:50;
    padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);
    transform:translateX(-100%);
    transition:transform var(--nb-tr);
    width:min(var(--nb-sw),90vw);
  }
  .nb-sidebar--open{transform:translateX(0);box-shadow:4px 0 32px rgba(0,0,0,.25)}
  .nb-main{padding:1rem max(1rem,env(safe-area-inset-right,0px)) calc(1rem + env(safe-area-inset-bottom,0px)) max(1rem,env(safe-area-inset-left,0px))}
}
@media(max-width:640px){
  .nb-topbar{padding:env(safe-area-inset-top,0px) max(.875rem,env(safe-area-inset-right,0px)) 0 max(.875rem,env(safe-area-inset-left,0px))}
  .nb-main{padding:.75rem max(.75rem,env(safe-area-inset-right,0px)) calc(.75rem + env(safe-area-inset-bottom,0px)) max(.75rem,env(safe-area-inset-left,0px))}
}

/* Admin page content card */
.nb-main .admin-page {
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-lg, 16px);
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

/* This whole region (through Category Slots Admin below) used to run a second, near-but-not-equal
   palette (#e07b3a instead of --cs-accent, #888 instead of --cs-muted, #fff8f3 instead of
   --cs-background-soft, plus a couple of stale var() fallbacks) that a colour-scheme switch would
   never see. Converted to the real tokens; a few near-matches (#2c1a12/#4a2c1a text, #fafafa/#f5f5f5
   backgrounds, #999/#ccc mutes) shift slightly to their nearest token rather than gaining new
   one-off tokens of their own. Success-green and danger-red stay literal — those are semantic
   status colours, not theme colours, same as .admin-badge--ok/--danger. The checkout delivery-method
   cards that opened this region now live in Pages/Checkout.razor.css. */

/* ── Admin Settings fields ─────────────────────── */
.settings-field{margin-bottom:1.25rem}
.settings-field--row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.settings-label{display:block;font-size:.85rem;font-weight:700;margin-bottom:.35rem;color:var(--cs-text)}
.settings-toggle{display:flex;align-items:center;gap:.6rem;cursor:pointer;font-weight:700;font-size:.9rem}
.settings-toggle input[type=checkbox]{width:1.1rem;height:1.1rem;accent-color:var(--cs-accent)}
.settings-hint{font-size:.8rem;color:var(--cs-muted);margin:.35rem 0 0}
.admin-panel__desc{font-size:.875rem;color:var(--cs-muted);margin:.25rem 0 1.25rem}
@media(max-width:640px){.settings-field--row{grid-template-columns:1fr}}

/* ── Shop appearance (Settings.razor) ──────────── */
/* Spans both columns of .admin-page__content-grid — the layout/scheme pickers need real width to
   lay out as a grid of cards, not a column as narrow as the photo-print toggle beside it. */
.admin-panel--wide{grid-column:1 / -1}
.appearance-option-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:.75rem}
.appearance-option{
  display:flex;flex-direction:column;gap:.3rem;text-align:left;
  padding:.85rem 1rem;border-radius:var(--cs-radius-md);
  border:2px solid var(--cs-border);background:var(--cs-surface);
  cursor:pointer;transition:border-color .15s,background .15s;
}
.appearance-option:hover{border-color:var(--cs-accent)}
.appearance-option--selected{border-color:var(--cs-accent);background:var(--cs-background-soft)}
.appearance-option__name{font-weight:700;font-size:.92rem;color:var(--cs-text)}
.appearance-option__description{font-size:.8rem;color:var(--cs-muted)}
.appearance-scheme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(7rem,1fr));gap:.65rem}
/* Each swatch carries its OWN data-cs-scheme, so its --cs-accent (read by .appearance-swatch__dot
   below) is that scheme's colour regardless of which scheme the page itself is currently showing —
   this is what lets an admin see all five true colours side by side, on any current scheme. */
.appearance-swatch{
  display:flex;flex-direction:column;align-items:center;gap:.4rem;
  padding:.75rem .5rem;border-radius:var(--cs-radius-md);
  border:2px solid var(--cs-border);background:var(--cs-surface);
  cursor:pointer;transition:border-color .15s,box-shadow .15s;
}
.appearance-swatch:hover{border-color:var(--cs-accent)}
.appearance-swatch--selected{border-color:var(--cs-accent);box-shadow:0 0 0 3px rgba(var(--cs-accent-rgb),.18)}
.appearance-swatch__dot{width:2rem;height:2rem;border-radius:50%;background:linear-gradient(135deg,var(--cs-accent),var(--cs-accent-strong))}
.appearance-swatch__name{font-size:.78rem;font-weight:700;color:var(--cs-text)}
.appearance-logo-row{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.appearance-logo-preview{
  display:flex;align-items:center;justify-content:center;
  width:5rem;height:5rem;border-radius:var(--cs-radius-md);
  border:1px solid var(--cs-border);background:var(--cs-surface);padding:.5rem;flex-shrink:0;
}
.appearance-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}
@media(max-width:640px){.appearance-scheme-grid{grid-template-columns:repeat(auto-fill,minmax(5.5rem,1fr))}}

/* ── Checkout store info ─────────────────────── */
.checkout-store-free{display:inline-block;margin-top:.25rem;color:#2e7d32;font-weight:700;font-size:.8rem}

/* ── Admin stores list ───────────────────────── */
.stores-list{display:flex;flex-direction:column;gap:1rem}
.store-card{background:var(--cs-surface);border:1px solid var(--cs-border);border-radius:12px;padding:1rem;display:grid;grid-template-columns:1fr 200px auto;gap:1rem;align-items:start}
.store-card--editing{border-color:var(--cs-accent);background:var(--cs-background-soft)}
.store-card__info{display:flex;flex-direction:column;gap:.3rem;font-size:.875rem}
.store-card__info strong{font-weight:700}
.store-card__actions{display:flex;flex-direction:column;gap:.5rem}
.store-badge--active{color:#2e7d32;font-size:.8rem;font-weight:700}
.store-badge--inactive{color:var(--cs-muted);font-size:.8rem}
.store-edit-panel{margin-top:1.5rem;padding:1.25rem;background:var(--cs-surface);border:1px solid var(--cs-border);border-radius:12px}
.store-edit-panel h3{margin:0 0 1.25rem;font-size:1rem}
@media(max-width:768px){.store-card{grid-template-columns:1fr;grid-template-rows:auto auto auto}}

/* ── Delivery Slot Picker ──────────────────────── */
.slot-picker{display:flex;flex-direction:column;gap:1rem}
.slot-picker__empty{font-size:.875rem;color:var(--cs-muted)}
.slot-picker__days{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:.5rem}
.slot-day{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:.2rem;padding:.65rem .5rem;border-radius:10px;
  border:2px solid var(--cs-border);
  background:var(--cs-surface);cursor:pointer;
  transition:border-color .18s,background .18s;
  text-align:center;
}
.slot-day:hover:not(:disabled){border-color:var(--cs-accent);background:var(--cs-background-soft)}
.slot-day--active{border-color:var(--cs-accent)!important;background:var(--cs-background-soft)!important}
.slot-day--disabled{opacity:.4;cursor:not-allowed;background:var(--cs-background-soft)}
.slot-day__name{font-size:.82rem;font-weight:700}
.slot-day__count{font-size:.72rem;color:var(--cs-muted)}
.slot-day--active .slot-day__count{color:var(--cs-accent)}
.slot-picker__slots{padding:1rem;background:var(--cs-background-soft);border-radius:10px;border:1px solid var(--cs-border)}
.slot-picker__slots-label{font-size:.82rem;font-weight:700;margin:0 0 .65rem;color:var(--cs-text)}
.slot-picker__chips{display:flex;flex-wrap:wrap;gap:.5rem}
.slot-chip{
  padding:.45rem .9rem;border-radius:999px;
  border:1.5px solid var(--cs-border);
  background:var(--cs-surface);font-size:.82rem;font-weight:600;
  cursor:pointer;transition:border-color .15s,background .15s,color .15s;
}
.slot-chip:hover{border-color:var(--cs-accent);color:var(--cs-accent)}
.slot-chip--active{border-color:var(--cs-accent);background:var(--cs-accent);color:var(--cs-on-accent)}
.slot-picker__selected{font-size:.85rem;color:#2e7d32;background:#e8f5e9;padding:.5rem .75rem;border-radius:8px;margin:0}

/* ── Category Slots Admin ─────────────────────── */
.cat-slots-list{display:flex;flex-direction:column;gap:.35rem}
.cat-slots-row{display:flex;align-items:center;gap:.6rem;padding:.45rem .5rem;border-radius:8px;cursor:pointer}
.cat-slots-row:hover{background:var(--cs-background-soft)}
.cat-slots-row input[type=checkbox]{accent-color:var(--cs-accent);width:1rem;height:1rem;flex-shrink:0}
.cat-slots-badge{font-size:.7rem;color:var(--cs-accent);font-weight:700;border:1px solid rgba(206,126,93,.3);border-radius:999px;padding:.1rem .5rem;margin-left:auto}
.cat-slots-clear{margin-left:.25rem;background:none;border:none;cursor:pointer;color:var(--cs-muted);font-size:.8rem;padding:.15rem .4rem;border-radius:4px}
.cat-slots-clear:hover{color:#e53935}
.cat-day-row{border-bottom:1px solid var(--cs-border);padding:.75rem 0}
.cat-day-row:last-child{border-bottom:none}
.cat-day-slots{margin-top:.65rem;display:flex;flex-direction:column;gap:.4rem;padding-left:.5rem}
.cat-slot-row{display:flex;align-items:center;gap:.5rem}
.cat-slot-input{width:110px;padding:.35rem .5rem!important;font-size:.85rem}
.cat-slot-remove{background:none;border:none;cursor:pointer;color:var(--cs-muted);font-size:.85rem;padding:.2rem .4rem}
.cat-slot-remove:hover{color:#e53935}

/* ── Slot Picker — dropdown layout (overrides grid) ── */
.slot-picker__dropdowns{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.slot-picker__group{display:flex;flex-direction:column;gap:.35rem}
@media(max-width:540px){.slot-picker__dropdowns{grid-template-columns:1fr}}

.auth-input--error{border-color:#e53935!important}
.slot-picker__hint{font-size:.78rem;color:var(--cs-muted);margin:.25rem 0 0}

/* ── Legal documents (ОУ, Поверителност, Бисквитки, Доставка и плащане, Рекламации, Отказ) ── */
.legal-doc {
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.legal-doc__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs-muted);
}

.legal-doc__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.legal-doc__meta {
    margin: 0 0 1.25rem;
    color: var(--cs-muted);
    font-size: 0.9rem;
}

.legal-doc__print {
    margin-bottom: 1.5rem;
}

.legal-doc__body {
    line-height: 1.65;
}

.legal-doc__body h2 {
    margin: 2.25rem 0 0.75rem;
    font-size: 1.3rem;
    letter-spacing: -0.005em;
}

.legal-doc__body h2:first-child {
    margin-top: 0;
}

.legal-doc__body h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.05rem;
}

.legal-doc__body p {
    margin: 0 0 0.9rem;
}

.legal-doc__body ol,
.legal-doc__body ul {
    margin: 0 0 0.9rem;
    padding-left: 1.4rem;
}

.legal-doc__body li {
    margin-bottom: 0.4rem;
}

.legal-doc__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
}

.legal-doc__body th,
.legal-doc__body td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--cs-border);
}

.legal-doc__body th {
    background: var(--cs-background-soft);
}

/* Wide tables must scroll inside their own container, never make the page scroll sideways. */
.legal-doc__table-wrap {
    overflow-x: auto;
    margin: 0 0 1.25rem;
}

.legal-doc__table-wrap table {
    min-width: 34rem;
    margin: 0;
}

.legal-doc__current-choice {
    padding: 0.85rem 1rem;
    border-radius: var(--cs-radius-md);
    background: var(--cs-surface-strong);
}

.legal-doc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
}

.legal-doc__note {
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    border-radius: var(--cs-radius-md);
    background: var(--cs-background-soft);
    border: 1px solid var(--cs-border);
}

@media (max-width: 640px) {
    .legal-doc {
        padding: 1rem 0 2rem;
    }
}

/* ── Admin help articles (/admin/help/*) — shares .legal-doc__body's prose typography by dual-class,
   only the header/chrome differs (no version/date/print — those are legal-page concepts). ── */
.help-doc {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 0 3rem;
}

.help-doc__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs-muted);
}

.help-doc__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.help-doc__lead {
    margin: 0 0 1rem;
    color: var(--cs-muted);
}

.help-doc__back {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.help-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.help-hub__card {
    display: block;
    padding: 1.15rem;
    border-radius: var(--cs-radius-md);
    background: var(--cs-surface);
    border: 1px solid var(--cs-border);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.help-hub__card:hover {
    box-shadow: var(--cs-shadow-soft);
    border-color: var(--cs-accent);
}

.help-hub__card-title {
    margin: 0 0 0.35rem;
    font-weight: 800;
}

.help-hub__card-desc {
    margin: 0;
    color: var(--cs-muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .help-doc {
        padding: 0 0 2rem;
    }
}

/* ── Print — hide site chrome on every printed page (legal-page requirement, but applies generally) ── */
@media print {
    .cs-header, .cs-footer, .contact-fab, #blazor-error-ui, .legal-doc__print { display: none !important; }
    .cs-main__inner { max-width: none; padding: 0; margin: 0; }
    body { background: var(--cs-surface); color: #000; }

    /* The admin shell: a page printed from the admin area (a supply request, for one) is its own content and not the
       sidebar, the top bar or a toast around it. */
    .nb-sidebar, .nb-topbar, .nb-overlay, .cs-toast-host { display: none !important; }
    .nb-shell { display: block; background: none; }
    .nb-main { padding: 0; }
    .nb-main .admin-page { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }

    /* One part of a page printed from its own button (the production specification of an order, js/print-region.js): everything that
       neither holds that part nor sits inside it stays off the paper, and what holds it stops clipping it, so a panel that scrolls
       inside itself (the order overlay of the board) prints in full. */
    html.print-region body *:not(:has(.print-region__target)):not(.print-region__target):not(.print-region__target *) { display: none !important; }
    html.print-region body *:has(.print-region__target) { display: block; position: static; overflow: visible; height: auto; min-height: 0; max-height: none; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; }
}

/* ── Realtime orders wall ("Стена с поръчки", /admin/board) — shell + topbar only.
   CSS isolation does not apply to layout components (@Body belongs to the routed page, not to the
   layout's own rendered markup — see FullScreenLayout.razor and the identical note on
   AdminLayout.razor.css), and this block is shared between the board page and its details overlay,
   so it lives here rather than in either component's isolated .razor.css. Card/grid/pulse rules
   specific to the board live in OrdersBoard.razor.css; overlay-panel rules live in
   OrderDetailsOverlay.razor.css — that panel is a DOM sibling of .fsb-shell (not a descendant), so it
   never inherits the dark --cs-* overrides below and renders in the normal light admin theme. */
.fsb-shell {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: clamp(1rem, 0.55vw + 0.85rem, 1.75rem);
    /* Dark theme, re-declared locally so OrderStatusBadge (its colors are theme-independent hex
       values already) and .cs-button (picks up --cs-text/--cs-border/--cs-accent via the cascade)
       keep rendering correctly here without forking either component. */
    --cs-background: #14100e;
    --cs-background-soft: #1c1613;
    --cs-surface: #201a17;
    --cs-surface-strong: #2a221d;
    --cs-text: #f6efe9;
    --cs-muted: #c3b3a8;
    --cs-border: #3a2f29;
    --cs-accent: #e2a074;
    --cs-accent-strong: #f2c39c;
    --cs-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.35);
    --cs-shadow-strong: 0 18px 40px rgba(0, 0, 0, 0.45);
    background: var(--cs-background);
    color: var(--cs-text);
}

.fsb-shell:focus {
    outline: none;
}

.fsb-topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* TV overscan safe area: env() covers notched phones, the max() floor guarantees a gutter on a
       TV that reports no insets at all. */
    padding: max(env(safe-area-inset-top), 1.5vh) max(env(safe-area-inset-right), 2.5vw) 0.75rem max(env(safe-area-inset-left), 2.5vw);
    border-bottom: 1px solid var(--cs-border);
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.fsb-topbar__title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fsb-topbar__title {
    font-size: clamp(1.1rem, 1.1vw, 1.75rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.fsb-scope-toggle {
    display: inline-flex;
    border: 1px solid var(--cs-border);
    border-radius: 999px;
    padding: 0.2rem;
    gap: 0.2rem;
}

.fsb-scope-toggle__btn {
    border: 0;
    background: transparent;
    color: var(--cs-muted);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85em;
    cursor: pointer;
    /* Touch target >=44px, same precedent as .fsb-card__action (5.3) — was 2.25rem (36px). */
    min-height: 2.75rem;
}

.fsb-scope-toggle__btn--active {
    background: var(--cs-accent);
    color: #241a12;
}

.fsb-topbar__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    color: var(--cs-muted);
    font-size: 0.8em;
    font-variant-numeric: tabular-nums;
}

.fsb-connection-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #6b6b6b;
    flex: 0 0 auto;
}

.fsb-connection-dot--live {
    background: #4caf6d;
    box-shadow: 0 0 0 3px rgba(76, 175, 109, 0.25);
}

.fsb-connection-dot--down {
    background: #d9534f;
}

.fsb-topbar__updated--stale {
    color: #f2b6b3;
    font-weight: 700;
}

.fsb-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fsb-icon-button {
    min-width: 3rem;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--cs-border);
    background: var(--cs-surface);
    color: var(--cs-text);
    font-size: 1.3rem;
    cursor: pointer;
}

.fsb-icon-button:hover {
    border-color: var(--cs-accent);
}

.fsb-icon-button--close {
    font-size: 1.6rem;
    line-height: 1;
}

.fsb-alert {
    margin: 0.75rem max(env(safe-area-inset-right), 2.5vw) 0 max(env(safe-area-inset-left), 2.5vw);
    padding: 0.75rem 1rem;
    border-radius: var(--cs-radius-sm);
    background: #4a1f1c;
    color: #ffd9d6;
    border: 1px solid #7a2e29;
}

.fsb-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--cs-muted);
    font-size: 1.1em;
}

/* Staff preview of a customer's not-yet-ordered cart photo (/admin/orders → „Чакащи снимки"). */
.admin-photo-preview {
    max-width: 100%;
    max-height: 260px;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Cake Configurator admin lists (Pages/Admin/CakeConfigurator). One family for every catalogue table so the pages look alike.
   The table is a table while its panel is wide and a labelled card for each row when it is not (the panel is the container, because
   the admin sidebar takes room the window width does not show). A cell carries data-label for the card. Text a staff member typed may
   break anywhere in the card and in the name column, so one long word cannot widen a card. In the other table columns a word breaks
   only when it is longer than the column (break-word), because anywhere lets the browser squeeze a column to one letter and split
   ordinary words in the middle. The cards run up to a panel of 62rem and the table starts above it, because the two buttons of a row
   side by side are about 250px wide and the widest list (coatings) does not fit as a table below that (a bare symbol is easy to
   misread, so there is no symbol-only width). A laptop window of 1280px leaves a panel of about 54rem, so it gets cards, and the
   table starts at a window of about 1400px. */
.designs-page__heading {
    min-width: 0;
}

.designs-page__back {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--cs-accent-strong);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.designs-page__actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.designs-page__button[aria-disabled="true"],
.designs-table__action[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.designs-page__button:focus-visible,
.designs-page__back:focus-visible,
.designs-table__action:focus-visible {
    outline: 2px solid var(--cs-accent-strong);
    outline-offset: 2px;
}

.designs-page__button,
.designs-page__back,
.designs-table__action {
    scroll-margin-top: calc(var(--nb-th, 56px) + 0.75rem);
}

/* A field sits at the top of its cell. Without this the grid stretches an auto row, so in a pair the shorter field (no hint under it)
   gets a taller row and its input moves down: the inputs of a pair then no longer start on one line. */
.designs-dialog .auth-field,
.designs-settings .auth-field {
    align-content: start;
    min-width: 0;
}

/* The rest of a field (its box, its hint and its message) is one piece under the label. In a pair of fields each field is a subgrid of two
   rows of the pair, the label on the first and the rest on the second, so a label that takes a second line in one column (a long word, the
   word "optional" that does not fit) makes that row taller for both fields and the two boxes still start on one line. A pair that holds
   something other than fields (the colour preview) is left as it was. */
.designs-field__rest {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    min-width: 0;
}

.designs-dialog [class*="__pair"]:not(:has(> :not(.auth-field))) > .auth-field:has(> .designs-field__rest) {
    grid-row: span 2;
    grid-template-rows: subgrid;
}

/* The unit of a settings number sits in a column of its own with one width, so the inputs of every group end on the same line
   whatever the word beside them is. A row with no unit keeps the column empty. A word wider than that width ("€ per serving")
   widens its column to fit and stays on one line, so it is the box that gives way. */
.designs-settings .designs-number .designs-number__row,
.designs-settings .designs-price .designs-price__row,
.designs-dialog .designs-number .designs-number__row,
.designs-dialog .designs-price .designs-price__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.5rem, max-content);
    align-items: center;
    gap: var(--cs-space-xs);
}

/* A group legend starts on the same line as the labels around it (the browser gives a legend 2px of side padding), and the boxes and
   round buttons in a dialog take the accent of the shop like every other control of the app. */
.designs-dialog legend,
.designs-settings legend {
    padding: 0;
}

.designs-dialog input[type="radio"],
.designs-dialog input[type="checkbox"],
.designs-settings input[type="checkbox"] {
    accent-color: var(--cs-accent);
}

/* The marker after the label of a field in a dialog (DesignsFieldMark): a star for a field that must be filled in and the word "optional"
   for one that need not be. The star is for the eye only, because the box tells a screen reader it is required. The word is lighter and
   smaller than the label and moves to the next line as one piece, so a narrow column never splits it. */
.designs-mark--required {
    margin-inline-start: 0.2em;
    color: var(--cs-accent-strong);
    font-weight: 800;
}

.designs-mark--optional {
    color: var(--cs-muted);
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

/* An account with designs:read only sees the fields filled but cannot type in them, so they look muted, as a disabled select does. */
.designs-dialog .auth-input[readonly],
.designs-settings .auth-input[readonly] {
    background: var(--cs-background-soft);
    color: var(--cs-muted);
    cursor: default;
}

.designs-page__alert {
    min-width: 0;
    overflow-wrap: anywhere;
}

.designs-page__alert ul {
    margin: 0;
    padding-left: 1.25rem;
}

.designs-page__alert .cs-button {
    margin-top: var(--cs-space-xs);
}

.designs-panel {
    min-width: 0;
    container-name: designs-panel;
    container-type: inline-size;
}

.designs-stack > .designs-panel + .designs-panel {
    margin-top: var(--cs-space-md);
}

.designs-no-match {
    display: grid;
    justify-items: center;
    gap: var(--cs-space-xs);
    margin: 0;
    padding: var(--cs-space-lg) var(--cs-space-md);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    background: var(--cs-background-soft);
    text-align: center;
}

.designs-no-match__title {
    margin: 0;
    font-size: var(--cs-font-size-lg);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.designs-no-match__text {
    max-width: 36rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.designs-table {
    width: 100%;
}

.designs-table td {
    vertical-align: middle;
    overflow-wrap: break-word;
}

.designs-table__name {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* The small picture of a recipe, a stand or a blank cake sits before its name. It keeps its shape inside a fixed box. */
.designs-table__identity {
    display: flex;
    align-items: center;
    gap: var(--cs-space-xs);
    min-width: 0;
}

.designs-table__thumb {
    flex: none;
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    background-color: var(--cs-surface);
    background-image:
        linear-gradient(45deg, color-mix(in srgb, var(--cs-text) 6%, var(--cs-surface)) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--cs-text) 6%, var(--cs-surface)) 75%),
        linear-gradient(45deg, color-mix(in srgb, var(--cs-text) 6%, var(--cs-surface)) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--cs-text) 6%, var(--cs-surface)) 75%);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
}

.designs-table__sub {
    display: block;
    color: var(--cs-muted);
    font-size: 0.85rem;
}

.designs-table__cell--name {
    min-width: 10rem;
}

.designs-table__cell--number {
    min-width: 6.5rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* A short code or key that must not be split: a shape, a font. */
.designs-table__cell--nowrap {
    white-space: nowrap;
}

/* A cell with a sentence or a list in it keeps a width a person can read, so the name column and not this one gives way. */
.designs-table__cell--wide {
    min-width: 10rem;
}

/* An empty value is words in muted type (such as "price after review"), so it is not mistaken for a zero, and it wraps even in a
   number cell. */
.designs-table__muted {
    color: var(--cs-muted);
    font-weight: 600;
    white-space: normal;
}

/* Sponge and cream are two lines of one cell. */
.designs-table__line {
    display: block;
}

.designs-table__cell--status,
.designs-table__cell--actions,
.designs-table__head-actions {
    width: 1%;
    white-space: nowrap;
}

/* A retired item stays in the list, dimmed, with its badge; the dimming is never the only signal. */
.designs-table__row--retired .designs-table__name,
.designs-table__row--retired .designs-table__cell--number {
    color: var(--cs-muted);
}

.designs-table__buttons {
    display: flex;
    gap: 0.4rem;
}

.designs-table__action-text {
    display: none;
}

/* The restore and retire buttons carry their word beside the symbol on a wide table too, because a bare symbol is easy to misread. */
.designs-table__action--wide {
    width: auto;
    padding: 0 0.9rem;
    gap: 0.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.designs-table__action--wide .designs-table__action-text {
    display: inline;
}

@media (max-width: 640px) {
    .designs-page__actions {
        width: 100%;
    }

    .designs-page__actions .cs-button {
        flex: 1 1 10rem;
    }
}

@container designs-panel (max-width: 62rem) {
    .designs-table-wrap {
        overflow: visible;
    }

    .designs-table,
    .designs-table thead,
    .designs-table tbody,
    .designs-table tr,
    .designs-table th,
    .designs-table td {
        display: block;
    }

    .designs-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .designs-table tbody {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
        gap: 0.75rem;
    }

    /* Every card of a grid row is as tall as the tallest. The spare height of a short card must go into one place only: the last row,
       which holds the buttons, so the buttons still end at the foot of the card and the rows above keep their own height. With
       align-content: stretch the spare height was split between all the rows, which opened gaps between the label rows. The fourteen
       rows of the content size (more than any list has cells; empty ones are zero high) are followed by the row that takes the rest,
       and the actions cell sits in that one. */
    .designs-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: repeat(14, max-content) minmax(0, 1fr);
        align-content: start;
        overflow: hidden;
        border: 1px solid var(--cs-border);
        border-radius: var(--cs-radius-md);
        background: var(--cs-surface);
        box-shadow: var(--cs-shadow-soft);
    }

    .designs-table td {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: minmax(7.5rem, 40%) minmax(0, 1fr);
        gap: 0.15rem 0.5rem;
        align-items: center;
        width: auto;
        min-width: 0;
        padding: 0.6rem 1rem;
        border-bottom: 1px solid var(--cs-border);
        overflow-wrap: anywhere;
        white-space: normal;
    }

    /* Everything in a cell goes in the value column, one under the other. Without this a second element of a cell (the cream under the
       sponge, the tier names under the tier count) becomes a grid item of its own and lands under the label. */
    .designs-table td:not(.designs-table__cell--actions) > * {
        grid-column: 2;
    }

    .designs-table td::before {
        overflow-wrap: break-word;
        content: attr(data-label);
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--cs-muted);
    }

    .designs-table .designs-table__cell--name {
        display: block;
        grid-column: 1;
        grid-row: 1;
        padding-top: 0.9rem;
        border-bottom: 0;
    }

    .designs-table .designs-table__cell--status {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        align-items: flex-start;
        justify-content: flex-end;
        padding-top: 0.9rem;
        border-bottom: 0;
    }

    .designs-table .designs-table__cell--name::before,
    .designs-table .designs-table__cell--status::before,
    .designs-table .designs-table__cell--actions::before {
        content: none;
    }

    .designs-table .designs-table__cell--actions {
        grid-row: 15;
        grid-template-columns: minmax(0, 1fr);
        align-self: end;
        padding-block: 0.75rem;
        border-top: 1px solid var(--cs-border);
        border-bottom: 0;
    }

    .designs-table__buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .designs-table__action {
        flex: 1 1 auto;
        width: auto;
        gap: 0.5rem;
        padding: 0 1rem;
        font-size: 0.9rem;
        font-weight: 700;
    }

    .designs-table__action-text {
        display: inline;
    }
}

@container designs-panel (max-width: 22rem) {
    .designs-table td {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.15rem;
    }

    .designs-table td:not(.designs-table__cell--actions) > * {
        grid-column: 1;
    }
}

@media (forced-colors: active) {
    .designs-table tr {
        border-color: CanvasText;
    }
}

/* The checkbox and its words are one target of at least 44px, so a finger does not have to hit the small box. */
.designs-quotas__toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    font-weight: 700;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.designs-quotas__toggle input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--cs-accent);
}

.designs-quotas__toggle:has(input:focus-visible) {
    outline: 2px solid var(--cs-accent-strong);
    outline-offset: 2px;
}

/* The cake configurator canvas (the TypeScript module in Client/cake-configurator). The module adds these classes to the element that the page gives
   it, and sizes its canvas to the content box. The page decides the width and the height of the container. Touch gestures belong to the module, so
   the browser must not scroll, select text or show a callout on the canvas. These rules live here because a scoped stylesheet does not reach a
   node that a script adds. */
.cs-configurator-stage {
    position: relative;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: contain;
}

.cs-configurator-stage:focus-visible {
    outline: 2px solid var(--cs-accent-strong);
    outline-offset: 2px;
}

/* The live region and the help text are for a screen reader only, laid out of the flow with no size. */
.cs-configurator-stage__live,
.cs-configurator-stage__help {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The editor of the cake configurator is wider than the shop column. The selector is more specific than the scoped rule of the layout,
   so the wide container wins without !important. The rest of the editor layout lives in the scoped files of its components. */
.cs-main > .cs-main__inner:has(.cfg-editor) {
    width: min(90rem, calc(100% - 2rem));
}

/* The editor owns its top space, so on a desktop its height can be the window below the header and no more. The selector is more specific than the scoped rule of the layout. */
body .cs-main:has(.cfg-editor) {
    padding-top: 0;
}

/* The floating contact buttons sit in the bottom right corner of the window, over the price bar of the editor. The bar keeps that corner free so its label and button stay readable. */
body:has(.contact-fab) .cfg-price {
    padding-right: 8.75rem;
}

/* On a phone the price bar has no room to give up a corner, so the contact buttons sit above it instead. The page script measures the bar; 5.5rem is the answer until it has. */
@media (max-width: 40rem) {
    body:has(.contact-fab) .cfg-price {
        padding-right: 1rem;
    }

    body:has(.cfg-editor) .contact-fab {
        bottom: calc(var(--cfg-price-height, 5.5rem) + 0.75rem);
    }
}

/* The entry points of the cake configurator keep their place while the status call is out, so the header and the home page do not move when the link and the band appear. */
.cfg-nav-slot {
    display: inline-block;
    min-width: 9.75rem;
    min-height: 2.35rem;
}

.cfg-entry-band-slot {
    margin-top: var(--cs-section-gap);
    min-height: 9rem;
}

/* The header is tighter between 1081 and 1151 px (see MainLayout.razor.css), so the link is narrower and the slot is too: a slot wider than the link would wrap the nav until the status call answers. Up to 1080 px the links are behind the menu button and the slot goes with them. */
@media (min-width: 1081px) and (max-width: 1151px) {
    .cfg-nav-slot {
        min-width: 9.5rem;
    }
}

@media (max-width: 1080px) {
    .cfg-nav-slot {
        display: none;
    }
}

@media (max-width: 640px) {
    .cfg-entry-band-slot {
        min-height: 16rem;
    }
}
