/* ============================================================
   Dourak — Customer PWA (app.css)
   Uses ONLY tokens from variables.css + the §8–§22 components.
   RTL-first, mobile-first. Cairo. Bootstrap Icons.
   ============================================================ */

/* ============================================================
   MEDICAL LIGHT THEME - token layer
   ------------------------------------------------------------
   Medical identity matching variables.css (Dourak Deep Blue
   #123a7a + accent #2f80ed on #f6f8fc). Each sheet loads
   variables.css FIRST; the tokens below mirror those values and
   define the component-scoped extras the PWA layer reads
   (--color-surface, --color-surface-alt, --color-bg-subtle,
   --color-muted, --color-nav, overlays). No layout, spacing,
   radius, font or breakpoint is changed here.
   ============================================================ */
:root {
    /* ---- Medical identity (mirrors variables.css) ---- */
    --color-primary: #123a7a;
    --color-primary-hover: #0f2f63;
    --color-primary-light: #edf4ff;
    --color-primary-soft: #edf4ff;
    --color-primary-tint-text: #123a7a;

    /* ---- Accent: medical blue (links, focus, selected icons, ring) ---- */
    --color-accent: #2f80ed;
    --color-accent-light: rgba(47, 128, 237, 0.16);

    /* ---- Surfaces: light medical tones ---- */
    --color-bg: #f6f8fc;
    --color-card: #ffffff;
    --color-surface: #ffffff;
    --color-surface-alt: #eef3fb;
    --color-bg-subtle: #eef3fb;
    --color-muted: #e9eef6;
    --color-input-bg: #ffffff;
    --color-nav: #ffffff;
    --color-border: #e5eaf2;
    --color-border-strong: #d4dce8;

    /* ---- Text: medical navy family ---- */
    --color-text: #17325c;
    --color-text-secondary: #6b7280;
    --color-text-muted: #98a4b8;
    --color-text-inverse: #ffffff;

    /* ---- App bar / drawer shell: medical navy ---- */
    --color-sidebar: #0c1f42;
    --color-sidebar-2: #0a1833;
    --color-sidebar-text: rgba(255, 255, 255, 0.78);
    --color-sidebar-muted: rgba(255, 255, 255, 0.45);
    --color-sidebar-hover: rgba(255, 255, 255, 0.08);
    --color-sidebar-active: rgba(47, 128, 237, 0.22);

    /* ---- Status: functional semantics preserved (light tints) ---- */
    --color-success: #20b15a;
    --color-success-light: #e9f9f0;
    --color-success-text: #15803d;
    --color-success-solid: #20b15a;
    --color-warning: #f59e0b;
    --color-warning-light: #fff7e8;
    --color-warning-soft: #fff7e8;
    --color-warning-text: #b45309;
    --color-danger: #ef4444;
    --color-danger-light: #fdeeee;
    --color-danger-soft: #fdeeee;
    --color-danger-subtle: #fdeeee;
    --color-danger-text: #b91c1c;
    --color-danger-solid: #ef4444;

    /* ---- Shadows: soft medical blue glow ---- */
    --shadow-card: 0 15px 40px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 14px rgba(18, 58, 122, 0.06);
    --shadow-md: 0 10px 28px rgba(18, 58, 122, 0.10);
    --shadow-lg: 0 24px 60px rgba(18, 58, 122, 0.16);
    --shadow-primary: 0 12px 26px rgba(18, 58, 122, 0.30);
    --shadow-accent: 0 12px 26px rgba(47, 128, 237, 0.32);
    --shadow-danger: 0 10px 22px rgba(239, 68, 68, 0.30);
    --shadow-success: 0 10px 22px rgba(32, 177, 90, 0.30);

    /* ---- Focus: medical blue ring, visible on light surfaces ---- */
    --focus-ring: 0 0 0 4px rgba(47, 128, 237, 0.28);
    /* ---- Light overlays (for white/translucent layers on brand gradients) ---- */
    --color-overlay-faint: rgba(255, 255, 255, 0.10);
    --color-overlay-soft: rgba(255, 255, 255, 0.14);
    --color-overlay: rgba(255, 255, 255, 0.18);
    --color-overlay-mid: rgba(255, 255, 255, 0.22);
    --color-overlay-strong: rgba(255, 255, 255, 0.28);
}



*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.pwa-body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

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

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ---- Safe-area insets (notched / home-indicator devices) ----
   viewport-fit=cover lets env() resolve to the real notches. Fallbacks keep
   desktops/browsers unchanged. */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

/* ---- Accessibility: skip link + screen-reader-only ---- */
.c-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.c-skip-link {
    position: fixed;
    top: var(--safe-top);
    inset-inline-start: var(--space-3);
    z-index: calc(var(--z-drawer) + 20);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    transform: translateY(-200%);
    transition: transform var(--transition-fast);
}

.c-skip-link:focus-visible {
    transform: none;
}

/* ---- App bar (unified navy — identical on every PWA screen).
   The gradient starts at the sidebar navy and ends exactly at
   --color-primary so the home view's .c-hero continues it with
   zero visible seam. ---- */
.pwa-appbar {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    padding-top: var(--safe-top);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.22) 100%),
        linear-gradient(180deg, var(--color-sidebar) 0%, var(--color-primary) 100%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: none;
    box-shadow: var(--shadow-primary);
}

.pwa-appbar-inner {
    max-width: 440px;
    margin-inline: auto;
    min-height: 64px;
    padding-block: var(--space-3);
    padding-inline: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.pwa-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    order: 2;
    color: var(--color-text-inverse);
    text-align: center;
}

/* Brand wrapper: the mark+name row above the tagline. */
.pwa-brand-title {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.pwa-brand-tagline {
    display: block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    opacity: 0.85;
    white-space: nowrap;
}

.pwa-brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: var(--color-text-inverse);
    font-size: 1rem;
    box-shadow: none;
    overflow: hidden;
}

/* Admin-managed header logo (branding.js paints it over the shop icon).
   Fills the mark without distortion; the icon stays when no logo is set. */
.pwa-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.pwa-brand-name {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    color: #ffffff;}

/* Flatten the actions container so bell / install / profile become direct
   flex items and order around the centered brand:
   bell (start) · brand (center) · install · profile (end). */
.pwa-appbar-actions {
    display: contents;
}

#notif-btn {
    order: 1;
}

/* Business drawer toggle. order 0 keeps it at the inline-start edge (the far
   right in RTL), mirroring the PC dashboard where the burger sits on the same
   side as the brand. Hidden by default: the router reveals it on the business
   owner route only, so the customer app bar is untouched. */
#biz-hamburger {
    order: 0;
}

#install-appbar-btn {
    order: 3;
}

.pwa-appbar-actions .pwa-icon-btn:last-child {
    order: 4;
}

.pwa-icon-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-overlay);
    color: var(--color-text-inverse);
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.pwa-icon-btn:hover {
    background: var(--color-overlay-strong);
}

.pwa-icon-btn:active {
    transform: scale(0.94);
}

/* High-contrast keyboard focus on the dark oxblood app bar (the global
   focus ring is too subtle against this surface). */
.pwa-appbar :focus-visible {
    outline: 2px solid var(--color-text-inverse);
    outline-offset: 2px;
    box-shadow: none;
}

/* Back-to-entry link — mirrors the Client PWA's `pwa-back-btn`, only
   revealed on the business dashboard route (router toggles `hidden`). */
.pwa-back-btn {
    order: 5;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding-inline: var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--color-overlay);
    color: var(--color-text-inverse);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.pwa-back-btn[hidden] {
    display: none;
}

.pwa-back-btn:hover {
    background: var(--color-overlay-strong);
}

.pwa-back-btn:active {
    transform: scale(0.94);
}

.pwa-back-btn i {
    font-size: 1rem;
}

/* Very narrow screens: keep «عودة» tappable without crowding the logo. */
@media (max-width: 374px) {
    .pwa-back-btn {
        min-height: 38px;
        padding-inline: var(--space-2);
        font-size: var(--fs-xs);
    }
    .pwa-back-btn i {
        font-size: 0.9rem;
    }
}

/* ---- Business switcher (presentation layer only).
   A one-tap "switch activity" strip under the app bar. It points at the
   exact same ?business= deep links / /customer/go/{id} pages the favorites
   list opens, and only appears once there is more than one context to
   switch between. ---- */
.pwa-switcher {
    max-width: 440px;
    margin-inline: auto;
}

.pwa-switcher[hidden] {
    display: none;
}

.pwa-switcher-strip {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    overflow-x: auto;
    padding: var(--space-2) var(--space-4) 0;
    scrollbar-width: none;
}

.pwa-switcher-strip::-webkit-scrollbar {
    display: none;
}

.pwa-switcher-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex: 0 0 auto;
    max-width: 190px;
    min-height: 36px;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.pwa-switcher-chip:hover {
    border-color: var(--color-accent);
    background: var(--color-primary-light);
}

.pwa-switcher-chip:active {
    transform: scale(0.96);
}

.pwa-switcher-chip.is-current {
    border-color: var(--color-accent);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: var(--fw-bold);
}

.pwa-switcher-chip.is-current {
    cursor: default;
}

.pwa-switcher-chip .bi {
    font-size: var(--fs-sm);
    color: var(--color-accent);
}

.pwa-switcher-chip.is-current .bi {
    color: var(--color-primary-tint-text);
}

.pwa-switcher-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Hero (home view): greeting + search on the same gradient.
   Full-bleed against .pwa-main padding, rounded bottom, and it starts
   at --color-primary — the exact color the appbar gradient ends at. ---- */
.c-hero {
    margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0;
    padding: var(--space-4) var(--space-4) var(--space-5);
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-accent) 130%);
    border-radius: 0 0 26px 26px;
    color: var(--color-text-inverse);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.c-hero-title {
    margin: 0;
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    text-align: center;
}

.c-hero-sub {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-sm);
    opacity: 0.88;
    text-align: center;
}

.c-hero .c-search-bar {
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* ---- Main / screens ---- */
.pwa-main {
    max-width: 440px;
    margin-inline: auto;
    padding: var(--space-4);
    padding-bottom: calc(var(--space-7) + 96px + var(--safe-bottom));
}

.c-screen {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    animation: c-fade-up 300ms cubic-bezier(0.25, 0.6, 0.3, 1);
}

@keyframes c-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.c-greeting {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    margin: 0;
}

.c-greeting strong {
    color: var(--color-text);
}

.c-screen-title {
    font-size: var(--fs-xl);
    font-weight: var(--fw-extrabold);
    margin: 0;
}

.c-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0 0 var(--space-3);
}

.c-section-title .c-section-link {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-accent);
}

/* Title row with no heading text: keeps the single link at the
   inline-end where it sat next to the removed heading. */
.c-section-title-end {
    justify-content: flex-end;
}

.c-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ---- Pills / badges ---- */
.c-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    white-space: nowrap;
}

.c-pill .bi {
    font-size: 0.8rem;
}

.c-pill-success {
    background: var(--color-success-light);
    color: var(--color-success);
}

.c-pill-warning {
    background: var(--color-warning-light);
    color: var(--color-warning-text);
}

.c-pill-danger {
    background: var(--color-danger-light);
    color: var(--color-danger-text);
}

.c-pill-accent {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.c-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: currentColor;
    display: inline-block;
}

.c-pill-live .c-dot {
    animation: c-pulse 1.6s ease-in-out infinite;
}

@keyframes c-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ---- Store hero card ---- */
.c-shopcard {
    position: relative;
    overflow: hidden;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-shopcard-head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.c-shopcard-cover {
    margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) 0;
    width: calc(100% + (var(--space-5) * 2));
    height: 150px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: var(--color-muted);
}

.c-shopcard-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.c-shopcard-mark {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    font-size: 1.75rem;
    box-shadow: var(--shadow-primary);
}

.c-shopcard-meta {
    flex: 1;
    min-width: 0;
}

.c-shopcard-name {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0 0 var(--space-1);
}

.c-shopcard-sub {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-3);
}

.c-shopcard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.c-shopcard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.c-stat {
    text-align: center;
    padding: var(--space-2);
}

.c-stat b {
    display: block;
    font-size: var(--fs-md);
    font-weight: var(--fw-extrabold);
    color: var(--color-text);
}

.c-stat span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.c-stat-urgent b {
    color: var(--color-danger-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Live queue card ---- */
.c-livecard {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 24px;
    box-shadow: var(--shadow-primary);
    color: var(--color-text-inverse);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-livecard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.c-livecard-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    margin: 0;
}

.c-livecard-live {
    background: var(--color-overlay-mid);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    border-radius: var(--radius-pill);
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}

.c-livecard .c-shopcard-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.c-livecard .c-stat b {
    color: #ffffff;
}

.c-livecard .c-stat span {
    color: rgba(255, 255, 255, 0.82);
}

.c-livecard-num {
    font-size: clamp(3rem, 16vw, 4.5rem);
    font-weight: var(--fw-extrabold);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.c-livecard-caption {
    font-size: var(--fs-sm);
    opacity: 0.85;
    margin: 0;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: var(--btn-height);
    padding: 0 var(--space-5);
    border-radius: var(--radius-md);
    border: none;
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary-tint-text);
    border: 1px solid var(--color-border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
}

.btn-danger {
    background: var(--color-danger-solid);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-danger);
}

/* Cancel-booking actions: danger-text treatment only. Keeps the existing
   background, size, position, icon and label untouched; scope is limited to
   the two real cancel buttons (home booking card + bookings list row). */
.c-bookingcard .btn-danger,
.c-bookingrow-actions .btn-danger {
    color: var(--color-danger-text);
}

.btn-lg {
    height: 64px;
    font-size: var(--fs-md);
}

.btn-sm {
    height: 44px;
    padding: 0 var(--space-4);
    font-size: var(--fs-sm);
}

/* ---- Quick actions ---- */
.c-quick {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.c-quick-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.c-quick-item:hover {
    box-shadow: var(--shadow-md);
}

.c-quick-item:active {
    transform: scale(0.97);
}

.c-quick-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-accent);
    font-size: 1.25rem;
}

.c-quick-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1.4;
}

/* ---- Service cards ---- */
.c-service {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    cursor: pointer;
    text-align: start;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.c-service:hover {
    box-shadow: var(--shadow-md);
}

.c-service:active {
    transform: scale(0.98);
}

.c-service.is-selected {
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
}

.c-service-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-accent);
    font-size: 1.4rem;
}

.c-service-body {
    flex: 1;
    min-width: 0;
}

.c-service-name {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    margin: 0 0 var(--space-1);
}

.c-service-desc {
    display: block;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0 0 var(--space-1);
}

.c-service-clinics {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-primary-tint-text);
    margin: 0 0 var(--space-1);
}

.c-service-meta {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    margin: 0;
    display: flex;
    gap: var(--space-3);
}

.c-service-price {
    font-weight: var(--fw-bold);
    color: var(--color-text);
}

.c-service-eta {
    color: var(--color-success);
    font-weight: var(--fw-semibold);
}

/* ---- Reviews ---- */
.c-review {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.c-review-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.c-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-light);
    color: var(--color-accent);
    display: grid;
    place-items: center;
    font-weight: var(--fw-extrabold);
    font-size: var(--fs-base);
}

.c-review-name {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    margin: 0;
}

.c-review-stars {
    color: var(--color-warning);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.c-review-text {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height);
    margin: 0;
}

/* ---- Bottom tab bar: one floating rounded bar (surface drawn by the
   ::before pseudo-element) with a raised circular QR scan FAB ---- */
.c-tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: var(--z-header);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-1);
    max-width: 480px;
    margin-inline: auto;
    padding: 0 calc(var(--safe-left) + var(--space-2)) calc(var(--safe-bottom) + var(--space-2)) calc(var(--safe-right) + var(--space-2));
    pointer-events: none;
}

/* The visible bar surface: spans behind the tabs but excludes the
   safe-area strip so the home-indicator zone stays transparent. */
.c-tabbar::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    bottom: calc(var(--safe-bottom) + var(--space-2));
    background: var(--color-nav);
    border: 1px solid var(--color-border);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

.c-tabbar .c-tab {
    pointer-events: auto;
}

.c-tabbar-inner,
.c-tabbar {
    display: flex;
}

.c-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 62px;
    border-radius: 18px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    box-shadow: none;
    border: none;
    transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.c-tab .bi {
    font-size: 1.35rem;
}

.c-tab.is-active {
    background: var(--color-primary-light);
    color: var(--color-text-inverse);
}

.c-tab:hover {
    transform: translateY(-2px);
}

/* ---- Bottom sheet ---- */
.sheet-root {
    position: fixed;
    inset: 0;
    z-index: var(--z-drawer);
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.70);
    opacity: 0;
    transition: opacity var(--transition);
}

.sheet {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    margin-inline: auto;
    max-width: 440px;
    max-height: 88dvh;
    background: var(--color-card);
    border-radius: 24px 24px 0 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.25, 0.6, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sheet.is-open {
    transform: none;
}

.sheet.is-open ~ .sheet-backdrop {
    opacity: 1;
}

.sheet-handle {
    width: 32px;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-border-strong);
    margin: var(--space-3) auto var(--space-1);
    flex-shrink: 0;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-5);
}

.sheet-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0;
}

.sheet-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
}

.sheet-body {
    padding: var(--space-4) var(--space-5) calc(var(--space-5) + var(--safe-bottom));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Sheet steps */
.c-steps {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.c-step {
    flex: 1;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-border);
}

.c-step.is-active {
    background: var(--color-primary);
}

.c-step.is-done {
    background: var(--color-success);
}

/* ---- Forms ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
}

.form-input {
    width: 100%;
    height: var(--input-height);
    background: var(--color-input-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 0 var(--space-4);
    font-size: var(--fs-base);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
}

.form-input.is-invalid {
    border-color: var(--color-danger-text);
    box-shadow: var(--shadow-danger);
}

.form-error {
    font-size: var(--fs-xs);
    color: var(--color-danger-text);
    margin: 0;
}

.form-select {
    width: 100%;
    height: var(--input-height);
    background: var(--color-input-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 0 var(--space-4);
    font-size: var(--fs-sm);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2398a4b8' d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left var(--space-3) center;
    padding-left: var(--space-8);
}

.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
}

.c-search-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.c-search-form .form-input {
    width: 100%;
}

.c-search-form .btn {
    width: 100%;
}

.c-search-filters {
    display: flex;
    gap: var(--space-2);
}

.c-filter-select {
    flex: 1;
    min-width: 0;
}

.form-hint {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin: 0;
}

/* ---- Summary card ---- */
.c-summary {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.c-summary-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    font-size: var(--fs-sm);
}

.c-summary-row span {
    color: var(--color-text-secondary);
}

.c-summary-row b {
    color: var(--color-text);
    font-weight: var(--fw-semibold);
    text-align: end;
}

.c-summary-divider {
    border: none;
    border-top: 1px dashed var(--color-border-strong);
    margin: var(--space-1) 0;
}

/* ---- Booking / queue ticket card ---- */
.c-ticket {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.c-ticket-hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.c-ticket-label {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    opacity: 0.9;
    margin: 0;
}

.c-ticket-num {
    font-size: clamp(3.5rem, 20vw, 5.5rem);
    font-weight: var(--fw-extrabold);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Customer full name in the ticket hero.
   .c-ticket inherits `word-break: break-word` from the mobile media query,
   which lets a browser fragment Arabic names character-by-character into a
   vertical column. These rules opt this element out: the name stays on one
   horizontal line and only ellipsizes when it is genuinely too long. */
.c-ticket-customer {
    font-size: clamp(1.05rem, 4.4vw, 1.4rem);
    font-weight: var(--fw-bold);
    line-height: 1.3;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Same opt-out for the name value inside the .c-summary block, so the name
   never fragments there either. */
.c-summary-value-name {
    min-width: 0;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-ticket-status {
    background: var(--color-overlay-mid);
    color: #ffffff;
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
}

.c-ticket-body {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-ticket-qr {
    align-self: center;
    width: 168px;
    height: 168px;
    padding: var(--space-3);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.c-ticket-qr canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.c-ticket-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.c-ticket-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.c-ticket-actions .btn-sm {
    width: 100%;
}

.c-ticket-cancel {
    border-top: 1px solid var(--color-border);
    padding: var(--space-4);
}

/* ---- Customer Turn Card (queue screen hero) ----
   The server-issued turn number is the primary element; the
   business identity (logo/name/open status) is secondary meta. */
.c-turn-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-turn-head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.c-turn-meta {
    flex: 1;
    min-width: 0;
}

.c-turn-shop {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-1);
}

.c-turn-tagline {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-2);
}

.c-turn-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.c-turn-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.c-turn-label {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    opacity: 0.9;
    margin: 0;
}

.c-turn-num {
    font-size: clamp(3.5rem, 20vw, 5.5rem);
    font-weight: var(--fw-extrabold);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
}

.c-turn-hero .c-pill {
    background: var(--color-overlay-mid);
    color: #ffffff;
    border: 0;
}

.c-turn-ahead {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: 0;
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    text-align: center;
}

.c-turn-ahead.is-now {
    color: var(--color-success);
    background: var(--color-success-light);
    border-color: var(--color-success);
    font-size: var(--fs-lg);
}

.c-turn-proceed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: -0.25rem 0 0;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-success);
}

/* ---- Progress ring ---- */
.c-ring-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: var(--space-5);
    display: flex;
    justify-content: center;
}

.c-ring-wrap {
    position: relative;
    width: 240px;
    height: 240px;
    margin-inline: auto;
}

.c-ring {
    width: 100%;
    height: 100%;
    display: block;
}

.c-ring-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 12;
}

.c-ring-fg {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 300ms cubic-bezier(0.25, 0.6, 0.3, 1);
}

.c-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    text-align: center;
}

.c-ring-center b {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-extrabold);
    color: var(--color-text);
}

.c-ring-center span {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.c-ring-center .c-ring-note {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-success);
    background: var(--color-success-light);
    border-radius: var(--radius-pill);
    padding: var(--space-1) var(--space-3);
}

/* ---- Timeline ---- */
.c-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.c-timeline-item {
    position: relative;
    display: flex;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
}

.c-timeline-item:last-child {
    padding-bottom: 0;
}

.c-timeline-item::before {
    content: "";
    position: absolute;
    inset-block-start: 34px;
    inset-inline-start: 19px;
    width: 2px;
    bottom: -4px;
    background: var(--color-border);
}

.c-timeline-item:last-child::before {
    display: none;
}

.c-timeline-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--color-border);
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.c-timeline-item.is-done .c-timeline-icon {
    background: var(--color-success-light);
    color: var(--color-success);
}

.c-timeline-item.is-current .c-timeline-icon {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-accent);
}

.c-timeline-item.is-pending .c-timeline-icon {
    background: var(--color-bg);
}

.c-timeline-item.is-done::before {
    background: var(--color-success);
}

.c-timeline-body {
    padding-top: var(--space-1);
}

.c-timeline-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    margin: 0;
}

.c-timeline-item.is-pending .c-timeline-title {
    color: var(--color-text-muted);
}

.c-timeline-time {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin: var(--space-1) 0 0;
}

/* ---- Queue screen: status banner, ring state, hints ---- */
.c-status-banner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    line-height: var(--line-height);
    box-shadow: var(--shadow-accent);
}

.c-status-banner i {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.c-status-banner.is-serving {
    background: var(--color-success);
    box-shadow: var(--shadow-success);
}

.c-ring-card.is-serving .c-ring-fg {
    stroke: var(--color-success);
}

.c-inperson-ahead {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-align: center;
    font-size: 1.15rem;
    font-weight: var(--fw-extrabold);
    line-height: 1.4;
    color: var(--color-danger-text);
    background: var(--color-danger-light);
    border-radius: var(--radius-pill);
    padding: var(--space-3) var(--space-4);
    margin: 0;
}

.c-sync-hint {
    align-self: center;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-warning-text);
    background: var(--color-warning-light);
    border-radius: var(--radius-pill);
    padding: var(--space-1) var(--space-3);
    margin: 0;
}

.c-ticket-progress .c-stat b {
    font-size: var(--fs-lg);
}

/* ---- Notification cards ---- */
.c-notice {
    display: flex;
    gap: var(--space-4);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
}

.c-notice-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
}

.c-notice-icon-success { background: var(--color-success-light); color: var(--color-success); }
.c-notice-icon-warning { background: var(--color-warning-light); color: var(--color-warning); }
.c-notice-icon-accent { background: var(--color-primary-light); color: var(--color-accent); }
.c-notice-icon-danger { background: var(--color-danger-light); color: var(--color-danger-text); }

.c-notice-body {
    flex: 1;
    min-width: 0;
}

.c-notice-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    margin: 0 0 var(--space-1);
}

.c-notice-text {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height);
    margin: 0 0 var(--space-2);
}

.c-notice-time {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin: 0;
}

/* ---- Profile ---- */
.c-profile-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
    padding: var(--space-5) var(--space-4);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

.c-profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    display: grid;
    place-items: center;
    font-size: 2.25rem;
    box-shadow: var(--shadow-primary);
}

.c-profile-name {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0;
}

.c-profile-sub {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin: 0;
}

.c-profile-list {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.c-profile-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--fs-base);
    color: var(--color-text);
    text-align: start;
    width: 100%;
    cursor: pointer;
}

.c-profile-row:last-child {
    border-bottom: none;
}

.c-profile-row .bi-chevron-left {
    margin-inline-start: auto;
    color: var(--color-text-muted);
}

.c-profile-row-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-accent);
    font-size: 1.2rem;
}

/* ---- Toggle switch ---- */
.c-switch {
    position: relative;
    width: 52px;
    height: 32px;
    flex-shrink: 0;
}

.c-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.c-switch-track {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    background: var(--color-border-strong);
    transition: background var(--transition-fast);
}

.c-switch-track::after {
    content: "";
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.c-switch input:checked + .c-switch-track {
    background: var(--color-success);
}

.c-switch input:checked + .c-switch-track::after {
    transform: translateX(-20px);
}

/* ---- Snackbar ---- */
.snackbar-root {
    position: fixed;
    inset-inline: 0;
    bottom: calc(var(--safe-bottom) + var(--space-5) + 96px);
    z-index: var(--z-drawer);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    pointer-events: none;
    padding-inline: var(--space-4);
}

.snackbar {
    max-width: 440px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
    color: var(--color-text);
    pointer-events: auto;
    animation: c-snack-in 300ms cubic-bezier(0.25, 0.6, 0.3, 1);
}

.snackbar .bi {
    font-size: 1.25rem;
}

.snackbar-success .bi { color: var(--color-success); }
.snackbar-danger .bi { color: var(--color-danger-text); }
.snackbar-warning .bi { color: var(--color-warning); }

@keyframes c-snack-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ---- Dialog ---- */
.dialog-root {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-drawer) + 10);
    display: grid;
    place-items: center;
    padding: var(--space-5);
}

.dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.70);
}

.dialog {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    animation: c-fade-up 300ms cubic-bezier(0.25, 0.6, 0.3, 1);
}

.dialog-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0;
}

.dialog-text {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    line-height: var(--line-height);
    margin: 0;
}

.dialog-actions {
    display: flex;
    gap: var(--space-3);
}

.dialog-actions .btn {
    flex: 1;
}

/* ---- Empty states ---- */
.c-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
    padding: var(--space-6) var(--space-4);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
}

.c-empty-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-accent);
    font-size: 2rem;
}

.c-shopcard-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    box-shadow: var(--shadow-sm);
}

.c-shopcard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.c-empty-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0;
}

.c-empty-text {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height);
    margin: 0;
}

/* ---- Install banner ---- */
.c-install-banner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-3);
}

.c-install-banner .bi-x {
    margin-inline-start: auto;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1.25rem;
}

/* ---- Home quick actions (scan QR + favorites) ---- */
.c-home-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.c-home-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 52px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-card);
    color: var(--color-primary-tint-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.c-home-action:hover {
    box-shadow: var(--shadow-md);
}

.c-home-action:active {
    transform: scale(0.97);
}

/* ---- Header notification badge (appbar) ---- */
.pwa-notif-btn {
    position: relative;
}

.c-badge {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--color-danger-solid);
    color: var(--color-text-inverse);
    font-size: 0.7rem;
    font-weight: var(--fw-bold);
    line-height: 1;
}

/* ---- Home search bar ---- */
.c-search-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    height: 52px;
    padding: 0 var(--space-4);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: var(--color-input-bg);
    color: var(--color-text-muted);
    font-size: var(--fs-base);
    text-align: start;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.c-search-bar:hover {
    border-color: var(--color-accent);
}

.c-search-bar .bi {
    color: var(--color-accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.c-search-bar-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Home active booking card ---- */
.c-bookingcard {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-bookingcard-flag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.c-bookingcard-title {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: var(--fw-extrabold);
}

.c-bookingcard-main {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--space-4);
}

.c-bookingcard-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
}

.c-bookingcard-shop {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
}

.c-bookingcard-sub {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.c-bookingcard-number {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 108px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--color-primary-light);
    text-align: center;
}

.c-bookingcard-number-label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.c-bookingcard-number-value {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-extrabold);
    color: var(--color-primary-tint-text);
    line-height: 1.1;
}

.c-bookingcard-number-ahead {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.c-bookingcard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.c-eta-chip {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-success-light);
    color: var(--color-success);
}

.c-eta-chip-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--color-success-light);
    font-size: 1rem;
}

.c-eta-chip-body {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.c-eta-chip-body span {
    font-size: var(--fs-xs);
}

.c-eta-chip-body b {
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    white-space: nowrap;
}

/* ---- Home favorites (visited shops) ---- */
.c-favhome-row {
    display: flex;
    align-items: stretch;
    gap: var(--space-2);
}

.c-favhome {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-3) var(--space-4);
    text-align: start;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.c-favhome:hover {
    box-shadow: var(--shadow-md);
}

.c-favhome:active {
    transform: scale(0.98);
}

.c-favhome:disabled {
    opacity: 0.7;
    cursor: default;
}

.c-favhome-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.c-favhome-body b {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-favhome-body span {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-favhome .c-pill {
    flex-shrink: 0;
}

/* ---- Reserved ad area (hidden until an ad source fills it) ---- */
.c-ad-area {
    min-height: 120px;
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-card);
}

/* ---- Home: favorite places section ---- */
.c-favsection .c-section-title {
    align-items: center;
}

.c-placecard {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.c-placecard-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.c-placecard-mark {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-pill);
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    font-size: 1.4rem;
    box-shadow: var(--shadow-sm);
}

.c-placecard-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.c-placecard-meta {
    flex: 1;
    min-width: 0;
}

.c-placecard-name {
    margin: 0 0 2px;
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-placecard-sub {
    margin: 0;
    font-size: var(--fs-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-placecard-sub .bi {
    color: var(--color-accent);
}

.c-placecard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.c-placecard-chips .c-pill {
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
}

.c-placecard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.c-placecard-queue {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-placecard-queue .bi {
    color: var(--color-accent);
    flex-shrink: 0;
}

.c-heart-btn-sm {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
}

/* ---- Schedule view (medical clinic) ---- */
.c-sched-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.c-sched-back {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.c-sched-back:hover {
    background: var(--color-accent-light);
}

.c-sched-back:active {
    transform: scale(0.94);
}

.c-sched-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) var(--space-4) var(--space-2);
}

.c-sched-title {
    margin: 0 0 var(--space-3);
    font-size: var(--fs-md);
    font-weight: var(--fw-extrabold);
}

.c-sched-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
}

.c-sched-mark {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    font-size: 1.4rem;
    box-shadow: var(--shadow-sm);
}

.c-sched-head-meta {
    flex: 1;
    min-width: 0;
}

.c-sched-clinic {
    margin: 0 0 2px;
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
}

.c-sched-sub {
    margin: 0;
    font-size: var(--fs-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-sched-sub .bi {
    color: var(--color-accent);
}

.c-sched-empty {
    margin: 0 0 var(--space-3);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.c-sched-days {
    display: flex;
    flex-direction: column;
}

.c-sched-day {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3) 0;
    border-top: 1px solid var(--color-border);
}

.c-sched-days .c-sched-day:first-child {
    border-top: none;
}

.c-sched-day.is-today {
    background: var(--color-primary-light);
    margin-inline: calc(-1 * var(--space-2));
    padding-inline: var(--space-2);
    border-radius: var(--radius-sm);
}

.c-sched-day-name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-text);
}

.c-sched-today {
    padding: 2px var(--space-2);
    font-size: var(--fs-xs);
}

.c-sched-session {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-inline-start: var(--space-4);
    font-size: var(--fs-sm);
}

.c-sched-session b {
    color: var(--color-text);
    white-space: nowrap;
}

.c-sched-session-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--color-text-secondary);
}

.c-sched-session-morning .bi {
    color: var(--color-warning);
}

.c-sched-session-evening .bi {
    color: var(--color-accent);
}

.c-sched-closed {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

.c-sched-reason {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Bottom nav: raised center scan FAB (circular chip around the
   icon; the label stays below it like the other tabs) ---- */
.c-tab-scan {
    background: transparent;
}

.c-tab-scan .bi {
    width: 54px;
    height: 54px;
    margin-top: -30px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border: 4px solid var(--color-card);
    box-shadow: var(--shadow-primary);
    color: var(--color-text-inverse);
    font-size: 1.4rem;
    box-sizing: border-box;
}

/* ---- Heart (favorite toggle) ---- */
.c-heart-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.c-heart-btn:active {
    transform: scale(0.9);
}

.c-heart-btn.is-fav {
    color: var(--color-danger-text);
    background: var(--color-danger-light);
}

/* ---- Favorites screen ---- */
.c-favcard {
    position: relative;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-favcard-foot {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.c-shopcard-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.c-text-danger {
    color: var(--color-danger-text);
}

/* ---- In-app QR scanner overlay ---- */
.c-scanner {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* Explicit offsets (not the `inset` shorthand): some older mobile
       WebViews/browsers don't support `inset`, and without offsets a fixed
       element drops to its static position — a small card at the bottom of
       the page with the app still visible behind it. */
    z-index: var(--z-overlay);
    background: #0B0B0B; /* functional: camera surface stays dark for contrast */
    color: var(--color-text-inverse);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: calc(var(--safe-top) + var(--space-4)) var(--space-4) calc(var(--safe-bottom) + var(--space-4));
}

/* Scanner mode: while the overlay is open the whole page behind it is
   hidden and inert — no visible content, no scroll, no clickable buttons. */
body.scanner-active {
    overflow: hidden;
    height: 100%;
}

body.scanner-active .pwa-appbar,
body.scanner-active .pwa-main,
body.scanner-active .c-appbar,
body.scanner-active .customer-main {
    visibility: hidden;
}

.c-scanner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.c-scanner-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    margin: 0;
}

.c-scanner-view {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
}

.c-scanner-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c-scanner-frame {
    position: relative;
    width: min(64vw, 260px);
    aspect-ratio: 1;
    border-radius: 28px;
}

.c-scanner-status {
    min-height: 1.5em;
    margin: 0;
    text-align: center;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.82);
    line-height: var(--line-height);
}

.c-scanner-status.is-error {
    color: var(--color-warning);
    font-weight: var(--fw-semibold);
}

.c-scanner-fallback {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--color-overlay-faint);
    border: 1px solid var(--color-overlay);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.c-scanner-fallback .form-input {
    background: var(--color-input-bg);
}

.c-scanner-hint {
    margin: 0;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.82);
    line-height: var(--line-height);
}

/* Close button sits in the header row ABOVE the camera and must stay
   clearly visible on the dark scanner surface (the base .sheet-close is
   styled for light sheets). */
.c-scanner .sheet-close {
    background: var(--color-overlay-soft);
    color: #ffffff;
}

/* ---- Queue screen: in-page tab navigation ---- */
.c-tabs-nav {
    display: flex;
    gap: var(--space-2);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.c-tabs-nav::-webkit-scrollbar {
    display: none;
}

.c-tab-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-3);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-secondary);
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.c-tab-btn .bi {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.c-tab-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.c-tab-btn.is-active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-primary);
}

.c-tab-btn.is-active:hover {
    background: var(--color-primary-hover);
}

.c-tabs-panel {
    display: none;
    flex-direction: column;
    gap: var(--space-5);
}

.c-tabs-panel.is-active {
    display: flex;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   § Multi-booking hint (home)
   ============================================================ */
.c-bookingmulti-hint {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-md, 12px) var(--space-lg, 16px);
    text-align: center;
}
.c-bookingmulti-hint p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm, 8px);
}

/* ============================================================
   § Booking row (bookings list)
   ============================================================ */
.c-bookingrow {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-md, 12px) var(--space-lg, 16px);
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}
.c-bookingrow:hover,
.c-bookingrow:focus-visible {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    outline: none;
}
.c-bookingrow-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm, 8px);
    margin-bottom: var(--space-sm, 8px);
}
.c-bookingrow-info {
    flex: 1;
    min-width: 0;
}
.c-bookingrow-shop {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
}
.c-bookingrow-number {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.c-bookingrow-ahead {
    text-align: center;
    min-width: 3rem;
}
.c-bookingrow-ahead b {
    display: block;
    font-size: 1.2rem;
}
.c-bookingrow-ahead span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}
.c-bookingrow-chips {
    display: flex;
    gap: var(--space-sm, 8px);
    margin-bottom: var(--space-sm, 8px);
    flex-wrap: wrap;
}
.c-bookingrow-actions {
    display: flex;
    gap: var(--space-sm, 8px);
}

/* ---- In-app login (PWA) ---- */
.c-login-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-5, 20px);
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 12px);
}
.c-login-title {
    margin: 0;
    text-align: center;
    font-size: var(--fs-lg, 1.2rem);
    font-weight: var(--fw-bold, 700);
}
.c-login-error {
    margin: 0;
    padding: var(--space-2, 8px) var(--space-3, 12px);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-danger-light);
    color: var(--color-danger-text);
    font-size: var(--fs-sm, 0.85rem);
    text-align: center;
}
.c-login-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1, 4px);
}
.c-login-label {
    font-size: var(--fs-sm, 0.85rem);
    font-weight: var(--fw-medium, 500);
    color: var(--color-text-secondary);
}
.c-login-input {
    width: 100%;
    padding: var(--space-3, 12px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 6px);
    font-size: var(--fs-base, 1rem);
    background: var(--color-card);
    color: var(--color-text);
    box-sizing: border-box;
}
.c-login-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}
/* Password field: keeps the show/hide affordance inside the input box. Logical
   properties only, so the icon sits at the inline-end in both RTL and LTR. */
.c-login-passwrap {
    position: relative;
}
.c-login-passwrap .c-login-input {
    padding-inline-end: 44px;
}
.c-login-passtoggle {
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
}
.c-login-passtoggle:hover {
    color: var(--color-primary-tint-text);
}
.c-login-passtoggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

/* ============================================================
   § Business Dashboard (c-biz)
   ============================================================ */
.c-biz { padding: var(--space-md, 16px); }

.c-biz-head { margin-bottom: var(--space-md, 16px); }

.c-biz-profile {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    margin-bottom: var(--space-sm, 8px);
}
.c-biz-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
/* Business logo inside the dashboard avatar: fills the circle without
   distortion; the initial letter stays when no logo is set. */
.c-biz-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.c-biz-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}
.c-biz-type {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin: 2px 0 0;
}

.c-biz-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm, 8px);
    margin-bottom: var(--space-md, 16px);
}
.c-stat-card {
    background: var(--color-card);
    border-radius: var(--radius-md, 10px);
    padding: var(--space-sm, 8px) var(--space-md, 16px);
    text-align: center;
}
.c-stat-card--accent {
    background: var(--color-primary-light);
}
.c-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.c-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.c-biz-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: var(--space-md, 16px) 0 var(--space-sm, 8px);
}

.c-biz-queue-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
}

/* ---- Business dashboard: queue summary + today's activity ------------- */
/* Block wrapper for the statistics block: it holds one .c-biz-stats grid
   followed by a heading and a collapsible, which must stack. */
.c-biz-stats-wrap {
    display: block;
}

.c-biz-summary-body {
    background: var(--color-card);
    border-radius: var(--radius-md, 10px);
    padding: var(--space-sm, 8px) var(--space-md, 16px);
}

/* One label/value row. `flex-wrap` plus a `min-width: 0` value keeps a long
   number or a wide label from forcing horizontal overflow at 320px. */
.c-biz-summary-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm, 8px);
    flex-wrap: wrap;
    min-height: 40px;
    padding: var(--space-xs, 4px) 0;
    border-bottom: 1px solid var(--color-border);
}

.c-biz-summary-line:last-child {
    border-bottom: 0;
}

.c-biz-summary-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* `min-width: 0` + `overflow-wrap` lets a long number break instead of
   pushing the row wider than the viewport. */
.c-biz-summary-value {
    font-weight: 700;
    font-size: 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: end;
}

.c-biz-summary-value.is-muted {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.c-biz-today-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 4px);
}

/* A today row is a single grid line that may wrap: name truncates, the
   number and the status stay on their own lines rather than overlap. */
.c-biz-today-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-sm, 8px);
    min-height: 40px;
    padding: var(--space-xs, 4px) var(--space-sm, 8px);
    background: var(--color-card);
    border-radius: var(--radius-sm, 6px);
}

.c-biz-today-num {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary-tint-text);
    white-space: nowrap;
}

.c-biz-today-name {
    font-size: 0.9rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c-biz-today-people,
.c-biz-today-status {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.c-biz-today-empty {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: var(--space-sm, 8px) 0;
}

/* ---- Business settings: services + weekly schedule ------------------ */
.c-bizset {
    padding: var(--space-md, 16px);
}

.c-bizset-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 16px);
}

.c-bizset-card {
    background: var(--color-card);
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-md, 16px);
}

.c-bizset-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--space-sm, 8px);
}

.c-bizset-count {
    margin-inline-start: auto;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
    border-radius: 999px;
    padding: 2px 10px;
}

.c-bizset-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
}

.c-bizset-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    overflow: hidden;
}

/* A hidden service stays listed and editable — dimming marks it as not shown
   to customers, it does not hide the row from the owner. */
.c-bizset-row.is-inactive .c-bizset-row-name,
.c-bizset-row.is-inactive .c-bizset-row-meta {
    opacity: 0.6;
}

/* Name/meta on the left, actions on the right, wrapping rather than squeezing:
   a long service name must not push the action buttons off a 320px screen. */
.c-bizset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm, 8px);
    flex-wrap: wrap;
    padding: var(--space-sm, 8px) var(--space-md, 16px);
    min-height: 44px;
}

.c-bizset-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 160px;
}

.c-bizset-row-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c-bizset-row-meta {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.c-bizset-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    padding: 0 8px;
}

.c-bizset-row-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs, 4px);
    flex: 0 0 auto;
}

/* 44px square: a thumb-sized target, since these are the only way to reorder
   a service from a phone. */
.c-bizset-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-md, 10px);
    background: transparent;
    color: var(--color-text);
    font-size: 1.1rem;
    cursor: pointer;
}

.c-bizset-icon-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.c-bizset-icon-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.c-bizset-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
    padding: var(--space-md, 16px);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

.c-bizset-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.c-bizset-label {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.c-bizset-hint {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.c-bizset-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    min-height: 44px;
}

/* ---- Scalars: the business-details form above the services list ------- */

/* Column of fields inside the card. Own class rather than .c-bizset-form:
   that one adds the subtle fill and the top border that separate a service
   editor from the list above it, neither of which applies here — the card
   already provides the padding and the background. */
.c-bizset-scalars {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
}

/* The announcement is a paragraph: a textarea that grows a little with its
   content, but never past the point where the save button leaves the screen
   on a short viewport. */
.c-bizset-textarea {
    min-height: 76px;
    height: auto;
    padding: var(--space-3) var(--space-4);
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

/* Server-rejected values with no control of their own (the image URLs, the
   round-tripped opening_hours) still have to be reported somewhere, and a
   toast alone disappears before it has been read. */
.c-bizset-error-banner {
    margin: 0;
    padding: var(--space-sm, 8px) var(--space-3, 12px);
    border: 1px solid var(--color-danger);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-danger-subtle);
    color: var(--color-danger-text);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Hint on the start side, live character count on the end side — they belong
   to the same fact, so they share one line instead of stacking. */
.c-bizset-submeta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm, 8px);
}

.c-bizset-counter {
    flex: none;
    font-size: var(--fs-xs, 0.75rem);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

/* A titled group of toggles inside the form, separated from the text fields
   above it so "one section, three switches" reads as a unit. */
.c-bizset-toggles {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 4px);
    margin-top: var(--space-sm, 8px);
    padding-top: var(--space-sm, 8px);
    border-top: 1px solid var(--color-border);
}

.c-bizset-subtitle {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Toggle rows here carry a label AND a sentence of explanation, so they are
   top-aligned and the whole row stays one 44px+ tap target. */
.c-bizset-toggles .c-bizset-check {
    align-items: flex-start;
    padding: var(--space-xs, 4px) 0;
    cursor: pointer;
}

.c-bizset-toggles .c-bizset-check input[type='checkbox'] {
    flex: none;
    margin-top: 2px;
    width: 20px;
    height: 20px;
}

.c-bizset-check-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.c-bizset-check-label {
    font-size: 0.85rem;
    color: var(--color-text);
}

/* Keyboard parity with the rest of the form: a checkbox is only 20px, so the
   ring has to be drawn on the row the finger and the keyboard both hit. */
.c-bizset-check:has(input:focus-visible) {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm, 6px);
}

/* The currency arrow belongs on the inline end of the control. The global
   .form-select rule pins it left for the search filters, so this is scoped to
   the new select rather than silently moving it under those screens. */
.c-bizset-select {
    background-position: right var(--space-3, 12px) center;
    padding-left: var(--space-4, 16px);
    padding-right: var(--space-8, 32px);
}

[dir='rtl'] .c-bizset-select {
    background-position: left var(--space-3, 12px) center;
    padding-left: var(--space-8, 32px);
    padding-right: var(--space-4, 16px);
}

.c-bizset-empty {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.c-bizset-days {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
}

/* Day label and its two time inputs stack on narrow screens: three columns of
   controls do not fit a 320px viewport legibly. */
.c-bizset-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm, 8px);
    flex-wrap: wrap;
    padding: var(--space-sm, 8px) 0;
    border-bottom: 1px solid var(--color-border);
}

.c-bizset-day:last-child {
    border-bottom: 0;
}

.c-bizset-day-name {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    min-height: 44px;
    cursor: pointer;
    font-weight: 600;
}

.c-bizset-times {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
}

.c-bizset-time {
    width: auto;
    min-width: 104px;
}

/* Matches the PC behaviour: a closed day dims its inputs so it is obvious the
   stored times are not currently in effect. */
.c-bizset-times.is-disabled {
    opacity: 0.5;
}

.c-bizset-dash {
    color: var(--color-text-secondary);
}

.c-bizset-save {
    width: 100%;
    margin-top: var(--space-md, 16px);
    min-height: 44px;
}


/* ---- Business password change --------------------------------------
   Mirrors the PC form: three password fields, each with a visibility
   toggle. The toggle is the only reason the input needs a wrapper — it
   is absolutely positioned inside it, so the control must never be
   narrower than the toggle or the two would overlap. Logical properties
   only (inline-start/end), so RTL needs no extra rules. */
.c-bizpass {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 16px);
}

.c-bizpass-card,
.c-bizpass-head {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
}

.c-bizpass-head {
    align-items: flex-start;
}

.c-bizpass-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-tint-text);
    font-size: 1.15rem;
}

.c-bizpass-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.c-bizpass-text,
.c-bizpass-hint {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.c-bizpass-notice {
    margin: 0;
    padding: var(--space-sm, 8px) var(--space-md, 12px);
    border-radius: var(--radius-md, 10px);
    background: var(--color-warning-soft);
    color: var(--color-warning);
    font-size: 0.875rem;
    line-height: 1.6;
}

.c-bizpass-fatal {
    padding: var(--space-md, 16px);
    border-radius: var(--radius-md, 10px);
    background: var(--color-danger-soft);
    color: var(--color-danger-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.c-bizpass-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 16px);
}

.c-bizpass-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 6px);
    /* Long localized labels and the toggle must never push the row wider
       than the viewport at 320px. */
    min-width: 0;
}

.c-bizpass-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs, 6px);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.c-bizpass-label-icon {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    flex: 0 0 auto;
}

/* The toggle sits inside the field box, so the input keeps its own
   inline-end padding to make room for it. */
.c-bizpass-wrap {
    position: relative;
    display: flex;
    min-width: 0;
}

.c-bizpass-input {
    width: 100%;
    min-width: 0;
    padding-inline-end: 48px;
    min-height: 48px;
}

.c-bizpass-toggle {
    position: absolute;
    inset-inline-end: 2px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 44px minimum touch target, per the platform guidelines. */
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm, 8px);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    cursor: pointer;
}

.c-bizpass-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.c-bizpass-error {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-danger-text);
}

.c-bizpass-hint.is-mismatch {
    color: var(--color-danger-text);
}

/* Requirements checklist. Purely informational: it is aria-hidden and
   never gates the submit button, because the server owns the policy. */
.c-bizpass-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs, 6px) var(--space-sm, 10px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.c-bizpass-check-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.c-bizpass-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    line-height: 1;
}

.c-bizpass-check-item.is-met {
    color: var(--color-success);
}

.c-bizpass-check-item.is-met .c-bizpass-check {
    background: var(--color-success-solid);
    color: #ffffff;
}

.c-bizpass-status {
    margin: 0;
    min-height: 1.2em;
    font-size: 0.875rem;
    line-height: 1.5;
}

.c-bizpass-status.is-muted {
    color: var(--color-text-secondary);
}

.c-bizpass-status.is-danger {
    color: var(--color-danger-text);
}

.c-bizpass-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm, 8px);
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}

.c-bizpass-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm, 8px);
    padding: var(--space-lg, 24px);
}

/* ============================================================
   Business profile — mobile port of PC /business/profile
   Same tokens and rhythm as the other business screens; no new
   design system. Every rule here is layout-only: no colour or
   type is redefined.
   ============================================================ */

.c-bizprof {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 16px);
}

.c-bizprof-head {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    min-width: 0;
}

.c-bizprof-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-tint-text);
    font-size: 1.15rem;
}

.c-bizprof-title {
    margin: 0;
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.c-bizprof-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
    padding: var(--space-md, 16px);
    border-radius: var(--radius-md, 10px);
    background: var(--color-card);
}

.c-bizprof-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 16px);
}

.c-bizprof-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 16px);
}

.c-bizprof-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 6px);
    /* A long localized label must never push the row wider than the
       viewport at 320px. */
    min-width: 0;
}

.c-bizprof-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.c-bizprof-input {
    width: 100%;
    /* Without this a grid/flex child refuses to shrink below its content
       width and the field overflows the viewport. */
    min-width: 0;
    min-height: 48px;
}

.c-bizprof-static {
    margin: 0;
    min-width: 0;
    padding: var(--space-sm, 8px) var(--space-md, 12px);
    border-radius: var(--radius-md, 10px);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    /* The type label is server-supplied and can be long; break it rather
       than let it push the layout sideways. */
    overflow-wrap: anywhere;
}

.c-bizprof-hint,
.c-bizprof-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    overflow-wrap: anywhere;
}

.c-bizprof-error {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-danger-text);
    overflow-wrap: anywhere;
}

.c-bizprof-fatal {
    margin: 0;
    padding: var(--space-md, 16px);
    border-radius: var(--radius-md, 10px);
    background: var(--color-danger-soft);
    color: var(--color-danger-text);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.c-bizprof-save {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm, 8px);
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}

.c-bizprof-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm, 8px);
    width: 100%;
    min-height: 48px;
    text-align: center;
}

.c-bizprof-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
}

.c-bizprof-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm, 8px);
    padding: var(--space-lg, 24px);
}


.c-qrow {
    background: var(--color-card);
    border-radius: var(--radius-md, 10px);
    padding: var(--space-sm, 8px) var(--space-md, 16px);
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
}
.c-qrow--serving {
    border-inline-start: 3px solid var(--color-success);
}
.c-qrow-num {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 36px;
    text-align: center;
    color: var(--color-primary-tint-text);
}
.c-qrow-name {
    flex: 1;
    font-size: 0.95rem;
}
.c-qrow-status {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}
.c-qrow-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-sm {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}
.btn-success {
    background: var(--color-success-solid);
    color: #ffffff;
}
.btn-warning {
    background: var(--color-warning);
    color: #000;
}
.btn-danger-outline {
    background: transparent;
    border-color: var(--color-danger-text);
    color: var(--color-danger-text);
}
.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

/* Subscription badge */
.c-biz-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
}
.c-biz-badge--trial {
    background: var(--color-warning-light);
    color: var(--color-warning-text);
}
.c-biz-badge--active {
    background: var(--color-success-light);
    color: var(--color-success-text);
}
.c-biz-badge--expired {
    background: var(--color-danger-light);
    color: var(--color-danger-text);
}

/* Queue action bar */
.c-biz-controls {
    margin-bottom: var(--space-md, 16px);
}
.c-biz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm, 8px);
}
.c-biz-actions .btn {
    flex: 1;
}

/* Bold, always-visible sign-out footer for the operator dashboards */
.c-biz-logout {
    padding-top: var(--space-md, 16px);
    margin-top: var(--space-md, 16px);
    border-top: 1px solid var(--color-border);
}
.c-biz-logout .btn {
    color: var(--color-danger-text);
    background: var(--color-danger-light);
    box-shadow: none;
}

/* Collapsible sections */
.c-collapsible {
    margin-bottom: var(--space-md, 16px);
}
.c-collapsible-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    /*background: var(--color-card);*/
    border: none;
    border-radius: var(--radius-md, 10px);
    padding: var(--space-sm, 8px) var(--space-md, 16px);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: start;
}
.c-collapsible-toggle span {
    flex: 1;
}
.c-collapsible-body {
    padding: var(--space-sm, 8px) 0;
}

/* In-person form */
.c-biz-inperson-form {
    padding: 0 var(--space-sm, 8px);
}
.c-biz-inperson-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
    margin-bottom: var(--space-sm, 8px);
}

/* QR panel */
.c-biz-qr-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm, 8px);
    padding: var(--space-sm, 8px);
}
.c-biz-qr-img {
    max-width: 200px;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--color-border);
}

.c-biz-error {
    text-align: center;
    color: var(--color-danger-text);
    padding: var(--space-md, 16px);
}

.c-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm, 8px);
    padding: var(--space-xl, 32px) 0;
    color: var(--color-text-secondary);
}
.c-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Global Turn Alert (ahead 3 → 2 → 1 → 0 + called)
   Fixed, top-layer surface mounted OUTSIDE #app-root so the banners
   are visible from every screen without any navigation. Every banner
   is role="alert" (assertive) and auto-dismisses after 30s; manual
   dismiss never cancels the stage cycle (state decides the stages).
   ============================================================ */

.c-turnalert-root {
    --turnalert-orange: #F0913A;
    --turnalert-orange-light: rgba(240, 145, 58, 0.16);
    position: fixed;
    top: calc(var(--appbar-min-h, 64px) + var(--space-2));
    inset-inline: var(--space-3);
    z-index: calc(var(--z-drawer) + 10);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;      /* the surface never blocks the page */
}

/* Stage colors — one tint per stage, critical = red. */
.c-turnalert {
    --turnalert-color: var(--color-accent);
    --turnalert-bg: var(--color-accent-light);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    background: var(--turnalert-bg);
    color: var(--turnalert-color);
    box-shadow: var(--shadow-md);
    border: 1px solid transparent;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    opacity: 0;
    transform: translateY(-10px);
}

.c-turnalert.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.c-turnalert.is-hiding {
    opacity: 0;
    transform: translateY(-10px);
}

/* 3 — entered the queue (informative, calm) */
.c-turnalert--s3 {
    --turnalert-color: var(--color-success);
    --turnalert-bg: var(--color-success-light);
}

/* 2 — almost your turn (warning) */
.c-turnalert--s2 {
    --turnalert-color: var(--color-warning);
    --turnalert-bg: var(--color-warning-light);
}

/* 1 — one person left (strong orange) */
.c-turnalert--s1 {
    --turnalert-color: var(--turnalert-orange);
    --turnalert-bg: var(--turnalert-orange-light);
}

/* 0 / called — your turn now (critical) */
.c-turnalert--s0 {
    --turnalert-color: var(--color-danger-text);
    --turnalert-bg: var(--color-danger-light);
    border-color: rgba(229, 72, 77, 0.40);
}

.c-turnalert-dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-pill);
    background: currentColor;
}

.c-turnalert--s0 .c-turnalert-dot {
    animation: turnAlertDotPulse 1.6s ease-in-out infinite;
}

.c-turnalert-body {
    flex: 1;
    min-width: 0;
}

.c-turnalert-title {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    line-height: 1.35;
}

.c-turnalert-text {
    margin: var(--space-1) 0 0;
    font-size: var(--fs-xs);
    line-height: 1.5;
    opacity: 0.92;
}

.c-turnalert-meta {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin: var(--space-1) 0 0;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    opacity: 0.9;
}

.c-turnalert-dismiss {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: currentColor;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1rem;
}

.c-turnalert-dismiss:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.10);
}

@keyframes turnAlertDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .c-turnalert,
    .c-turnalert--s0 .c-turnalert-dot {
        animation: none;
        transition: none;
    }
}

/* ============================================================
   Entry Screen
   ============================================================ */
.c-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: var(--space-xl, 32px);
    text-align: center;
    gap: var(--space-lg, 24px);
}
.c-entry-icon {
    font-size: 3rem;
    color: var(--color-primary-tint-text);
    opacity: 0.9;
}
.c-entry-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.c-entry-sub {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin: 0;
}
.c-entry .btn {
    min-width: 260px;
}

/* ============================================================
   Phase 4 — Discover customer view
   Entry card on Home + feed/detail cards inside #/discover.
   Mirrors the schedule-view nav and card tokens; no new deps.
   ============================================================ */
.c-discover-entry {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-card);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    text-align: start;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.c-discover-entry:hover {
    box-shadow: var(--shadow-md);
}

.c-discover-entry:active {
    transform: scale(0.99);
}

.c-discover-entry-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-accent);
    font-size: 1.3rem;
}

.c-discover-entry-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.c-discover-entry-body b {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--color-text);
}

.c-discover-entry-body span {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.c-discover-entry > i:last-child {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ---- Discover screen nav ---- */
.c-discover-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.c-discover-back {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.c-discover-back:hover {
    background: var(--color-accent-light);
}

.c-discover-back:active {
    transform: scale(0.94);
}

/* ---- Discover cards ---- */
.c-discover-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.c-discover-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Short-video rows render a <video class="c-discover-media"> (only
   short_video produces a video element, so the override can never
   touch image cards). The video becomes a vertical Reels/Shorts
   frame; object-fit: cover crops non-vertical sources instead of
   distorting them. */
video.c-discover-media {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    max-width: 440px;
    margin-inline: auto;
}

/* ---- Short-video Reels-style scrollbar hiding (visual only) ----
   The 9:16 videos are tall, so while a short_video is on the Discover
   screen the page — which is the container that actually scrolls the
   videos — shows its browser scrollbar right beside the frame. We hide
   that scrollbar's VISUAL ONLY when a short-video surface is present;
   scroll/gesture are untouched, and every other route keeps its
   scrollbar (they never contain a video.c-discover-media element). */

/* 1. The video surface itself must never render its own scrollbar
   (mirrors the .pwa-switcher-strip theme, all three browser families). */
video.c-discover-media {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

video.c-discover-media::-webkit-scrollbar {
    display: none;
}

/* 2. Reels look: the page scrollbar disappears only while a short
   video (feed or detail) is on the Discover screen — html:has() is the
   pure-CSS scoping (Chrome 105+, Firefox 121+, Safari 15.4+; engines
   without :has simply keep the scrollbar — no breakage). */
@supports selector(:has(*)) {
    html:has(video.c-discover-media) {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    html:has(video.c-discover-media)::-webkit-scrollbar {
        display: none;
    }
}

.c-discover-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
}

.c-discover-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.c-discover-type {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-secondary);
}

.c-discover-sponsor {
    font-size: var(--fs-xs);
    padding: var(--space-1) var(--space-3);
}

.c-discover-sponsor .bi {
    font-size: 0.8rem;
}

.c-discover-title {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: var(--fw-extrabold);
    color: var(--color-text);
    line-height: 1.4;
}

.c-discover-text {
    margin: 0;
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    line-height: 1.75;
}

/* Feed cards clamp the text to a fixed box (3 lines); the dynamic
   "More" chip appears only when it actually overflows this height.
   The detail view shares bodyContent WITHOUT the clamp, so the full
   text always renders on the detail page. */
.c-discover-text-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.c-discover-actions {
    margin-top: var(--space-1);
}

.c-discover-open {
    padding: 0 var(--space-4) var(--space-3);
}

/* Discover detail affordance: one compact "More" chip for every
   content type (tip / did_you_know / info / offer / sponsored /
   short_video), replacing the old full-width outline button. It hugs
   its label — auto width, never stretching across the card — and
   mirrors the discover outline treatment (transparent fill, primary
   text). Generated by discover.js for every card. */
.c-discover-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    min-height: 40px;
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-strong);
    background: transparent;
    color: var(--color-primary-tint-text);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    text-align: center;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.c-discover-more:active {
    transform: scale(0.98);
}

.c-discover-more .bi {
    font-size: 0.8rem;
}

/* ============================================================
   Business drawer — the PWA counterpart of the PC dashboard sidebar.

   The item list is served by GET /api/business/nav (config/navigation.php);
   this block only styles the shell. It mirrors the PC pattern
   (assets/css/dashboard.css .dash-side / .dash-scrim): a fixed inline-start
   panel that slides in, a scrim behind it, and a scrim-lift above the app bar
   so the toggle stays reachable while the drawer is open.

   Direction-safe by construction: positioned with `inset-inline-start` and
   translated on the logical axis, so RTL needs no override.
   ============================================================ */

.c-biznav-scrim {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-drawer) + 1);
    background: rgba(0, 0, 0, 0.70);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.c-biznav-scrim.is-open {
    opacity: 1;
    visibility: visible;
}

.c-biznav {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: calc(var(--z-drawer) + 2);
    width: min(300px, 84vw);
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    color: var(--color-text);
    box-shadow: var(--shadow-lg);
    /* LTR default: parked off the inline-start (left) edge. */
    transform: translateX(-100%);
    transition: transform var(--transition);
    /* The shell already reserves the app bar; keep the list clear of it. */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: contain;
}

/* The shell is dir="rtl" by default, so the panel parks off the right edge.
   `translateX` is physical, not logical — the same override the PC sidebar
   uses in assets/css/dashboard.css. */
html[dir="rtl"] .c-biznav {
    transform: translateX(100%);
}

.c-biznav.is-open,
html[dir="rtl"] .c-biznav.is-open {
    transform: translateX(0);
}

/* Head ------------------------------------------------------------ */

.c-biznav-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.c-biznav-head-text {
    min-width: 0;
}

.c-biznav-eyebrow {
    margin: 0 0 2px;
    color: var(--color-text-muted);
    font-size: var(--fs-xs, 0.75rem);
    font-weight: var(--fw-semibold);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c-biznav-title {
    margin: 0;
    font-size: var(--fs-lg, 1.125rem);
    font-weight: var(--fw-bold);
}

.c-biznav-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.c-biznav-close:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

/* List ------------------------------------------------------------ */

.c-biznav-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-3) var(--space-3) var(--space-5);
}

.c-biznav-group {
    margin: var(--space-4) var(--space-2) var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs, 0.75rem);
    font-weight: var(--fw-bold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.c-biznav-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.c-biznav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    /* 44px min target, as required for touch. */
    min-height: 44px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium, 500);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.c-biznav-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary-tint-text);
}

.c-biznav-link.is-active {
    background: var(--color-primary-light);
    color: var(--color-primary-tint-text);
    font-weight: var(--fw-semibold);
}

.c-biznav-link > .bi {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.c-biznav-link-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c-biznav-badge {
    position: static;
    flex: 0 0 auto;
}

.c-biznav-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-4);
    color: var(--color-text-muted);
    text-align: center;
}

.c-biznav-status p {
    margin: 0;
}

/* Foot ------------------------------------------------------------ */

.c-biznav-foot {
    flex: 0 0 auto;
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* The scrim deliberately covers the app bar: the drawer is a modal surface.
   It closes via the scrim, Escape, or the close button — the toggle is not
   re-raised above it, so the panel never competes with the app bar. */

@media (prefers-reduced-motion: reduce) {
    .c-biznav,
    .c-biznav-scrim {
        transition: none;
    }
}

/* ============================================================
   BASE TEXT COLOUR
   ------------------------------------------------------------
   variables.css set no body colour, so every element that did
   not declare its own inherited BLACK onto a near-black surface.
   This is the safety net for that whole class of bug.
   ============================================================ */
html,
body {
    color: var(--color-text);
}

::selection {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* ============================================================
   BUTTON SYSTEM - one source of truth for every variant/state.

   Two bugs this fixes, both found by measuring computed colours
   in a real browser rather than by reading the source:

   1. Only .btn-primary had a hover background. The other six
      variants fell back to .btn:active's scale() alone, so they
      gave the user no pressable feedback at all.
   2. Hover must never move the FOREGROUND away from the surface.
      Hover only shifts the background; text stays cream.

   Disabled is a neutral surface rather than a faded oxblood:
   an oxblood button at 0.6 opacity still reads as the primary
   action, which is exactly the "looks active" defect.
   ============================================================ */
.btn-secondary:hover:not(:disabled) {
    background: var(--color-surface-alt);
    border-color: var(--color-border-strong);
}
.btn-secondary:active:not(:disabled) {
    background: var(--color-bg-subtle);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary-light);
    border-color: var(--color-accent);
}
.btn-outline:active:not(:disabled) {
    background: var(--color-primary-soft);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--color-overlay-soft);
    color: var(--color-text);
}
.btn-ghost:active:not(:disabled) {
    background: var(--color-overlay);
}

.btn-danger:hover:not(:disabled) {
    background: #B32B31;
}
.btn-danger:active:not(:disabled) {
    background: #8E1B21;
}
.btn-danger-outline:hover:not(:disabled) {
    background: var(--color-danger-light);
}
.btn-success:hover:not(:disabled) {
    background: #1D8553;
}
.btn-success:active:not(:disabled) {
    background: #12593A;
}
.btn-warning:hover:not(:disabled) {
    background: #F0B75C;
}
.btn-warning:active:not(:disabled) {
    background: #D18F2C;
}

/* --- disabled: inert surface, readable text, no elevation --- */
.btn:disabled,
.btn[disabled] {
    opacity: 1;
    background: var(--color-muted);
    color: var(--color-text-muted);
    border-color: var(--color-border);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
.btn:disabled .bi,
.btn[disabled] .bi {
    color: inherit;
}

/* ============================================================
   LONG-TEXT GUARDS
   ------------------------------------------------------------
   Every selector below already sets `white-space: nowrap` AND
   sits inside a flex/grid row, AND can receive a string the
   business actually typed (a doctor specialty, a place name, a
   status sentence).

   nowrap removes the only thing that would have broken the line,
   and without `min-width: 0` a flex item refuses to shrink below
   its content, so a single long word pushed the row past the
   right edge of a 320px phone. `min-width: 0` lets it shrink,
   ellipsis degrades instead of clipping mid-glyph.
   ============================================================ */
.pwa-brand-tagline {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-bookingcard-number-label {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-biz-today-people {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-biz-today-status {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Barber waiting-list (PWA #/barber) — PHASE PWA-BARBER-UI-FIX-1
   ------------------------------------------------------------
   The barber view (js/views/barber.js) renders waiting rows as
   .c-queue-row inside section.c-card cards with .c-btn-group action
   groups, but no rules existed for these three classes (staff rows
   use the separate .c-qrow system, owner sections use .c-biz-*).
   Scope rationale (verified, do not broaden without re-checking):
   - .c-queue-row is used ONLY by the barber view.
   - .c-stack > section.c-card matches ONLY barber cards: owner
     sections (business.js) never sit inside .c-stack, and booking
     .c-btn-group instances sit inside .form-group, never directly
     under section.c-card.
   Tokens only (with spec-hex fallbacks); no fixed heights so long
   names wrap instead of clipping; button colors/sizes/states
   untouched (btn* bases + :hover/:focus-visible/:disabled live
   elsewhere and keep applying).
   ============================================================ */
.c-stack > section.c-card {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e5eaf2);
    border-radius: var(--radius-md, 10px);
    padding: var(--space-md, 16px);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 8px);
    min-width: 0;
}

.c-stack > section.c-card > h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text, #17325c);
}

.c-queue-row {
    background: var(--color-card, #ffffff);
    border: 1px solid var(--color-border, #e5eaf2);
    border-radius: var(--radius-md, 10px);
    padding: var(--space-sm, 8px) var(--space-md, 16px);
    display: flex;
    align-items: center;
    gap: var(--space-sm, 8px);
    flex-wrap: wrap;
    min-width: 0;
}

.c-queue-row > b {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 2.25rem;
    text-align: center;
    color: var(--color-accent, #2f80ed);
    flex-shrink: 0;
}

.c-queue-row > span {
    flex: 1 1 8rem;
    min-width: 0;
    font-size: 0.95rem;
    color: var(--color-text, #17325c);
    overflow-wrap: anywhere;
}

.c-stack > section.c-card > .c-btn-group,
.c-queue-row .c-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.c-queue-row .c-btn-group {
    margin-inline-start: auto;
}