@layer host {
/* ============================================
   ScoutBadger Public — Selector Overrides

   Radzen deep overrides, shell customizations,
   and feature-specific styles that cannot be
   expressed as pure CSS custom property overrides.

   Loaded AFTER public-tokens.css.
   ============================================ */

/* ═══════════════════════════════════════════════════════════════════
   1. SHELL OVERRIDES
   Public app glassmorphic shell. Where available, token variables
   are overridden instead of raw properties so shell.css consumes
   them automatically.
   ═══════════════════════════════════════════════════════════════════ */

/* Desktop background wash */
body {
    background-color: var(--app-color-primary-light);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(var(--app-primary-rgb), 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(var(--app-primary-dark-rgb), 0.08), transparent 25%),
        radial-gradient(var(--app-chip-active-bg) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 24px 24px;
    background-attachment: fixed;
}

/* Shell container — token overrides + non-tokenizable properties */
.public-shell {
    --shell-border: 1px solid rgba(255, 255, 255, 0.8);
    --shell-shadow:
        0 24px 48px -12px rgba(var(--app-primary-rgb), 0.15),
        0 12px 24px -8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    --shell-radius: 1.75rem;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: var(--sb-space-4);
    height: calc(100dvh - env(safe-area-inset-top) - (var(--sb-space-4) * 2));
    max-height: calc(100dvh - env(safe-area-inset-top) - (var(--sb-space-4) * 2));
}

.public-shell__content {
    padding: 0 var(--sb-space-4);
}

/* Top bar — token overrides + non-tokenizable */
.public-shell__header {
    --topbar-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(var(--app-primary-rgb), 0.10));
    --topbar-border: 1px solid rgba(255, 255, 255, 0.78);
    --topbar-radius: 1.15rem;
    --topbar-shadow:
        0 8px 20px -10px rgba(var(--app-primary-rgb), 0.25),
        inset 0 1px 0 var(--app-color-glass-strong);
    --topbar-padding: var(--sb-space-4);

    position: relative;
    overflow: visible;
}

.public-shell__header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--app-gradient-shimmer);
    border-radius: 0 0 1.15rem 1.15rem;
    pointer-events: none;
}

.public-shell__heading h1,
.public-shell__heading h2,
.public-shell__heading h3,
.public-shell__heading .rz-label {
    background: linear-gradient(135deg, var(--app-color-primary), var(--app-color-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.public-shell__subtitle {
    color: var(--app-color-text-muted);
    font-weight: 500;
}

.public-shell__nav-toggle {
    border-radius: 0.85rem;
    background: linear-gradient(180deg, var(--app-color-primary-light), var(--app-color-primary-light));
    color: var(--app-color-success);
    border: 1px solid rgba(var(--app-primary-rgb), 0.18);
    box-shadow: 0 6px 12px -8px rgba(var(--app-primary-rgb), 0.5);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, background-color 220ms ease;
}

.public-shell__nav-toggle:hover {
    background: linear-gradient(180deg, var(--app-color-primary-light), var(--app-chip-active-bg));
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 18px -10px rgba(var(--app-primary-rgb), 0.6);
}

/* Top bar action buttons */
.public-shell__actions .app-btn.icon-button,
.public-shell__header .notification-menu-popup__trigger,
.public-shell__header .profile-menu-popup__trigger,
.public-shell__header .active-context-popup__trigger {
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 8px 14px -10px var(--app-color-overlay);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, background-color 220ms ease;
}

.public-shell__actions .app-btn.icon-button:hover,
.public-shell__header .notification-menu-popup__trigger:hover,
.public-shell__header .profile-menu-popup__trigger:hover,
.public-shell__header .active-context-popup__trigger:hover {
    background: linear-gradient(180deg, var(--app-color-primary-light), var(--app-color-primary-light));
    color: var(--app-color-success);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 12px 20px -12px rgba(var(--app-primary-rgb), 0.52);
}

/* Bottom nav (mobile) — token overrides */
.public-bottom-nav {
    --bottom-nav-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.92));
    --bottom-nav-border: 1px solid rgba(255, 255, 255, 0.88);
    --bottom-nav-shadow:
        0 20px 36px -12px var(--app-color-overlay-soft),
        0 12px 24px -14px rgba(var(--app-primary-rgb), 0.32),
        inset 0 1px 0 var(--app-color-glass-strong);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    margin: 0 0.9rem calc(env(safe-area-inset-bottom, 0.5rem) + 0.45rem) 0.9rem;
    padding: 0.38rem;
    border-radius: 1.35rem;
    width: auto;
}

.public-bottom-nav .shell-bottom-nav__list { gap: 0.25rem; }

.public-bottom-nav .shell-bottom-nav__item {
    border-radius: 1rem;
    margin: 0 0.1rem;
    padding: 0.52rem 0.2rem;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
    color: var(--app-color-text-muted);
}

.public-bottom-nav .shell-bottom-nav__icon {
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), color 220ms ease;
}

.public-bottom-nav .shell-bottom-nav__label { letter-spacing: 0.01em; }
.public-bottom-nav .shell-bottom-nav__item:active { transform: scale(0.95); }

/* Bottom nav — active item (merged from multiple passes) */
.public-bottom-nav .shell-bottom-nav__item.is-active {
    background: linear-gradient(135deg, rgba(var(--app-primary-rgb), 0.16), rgba(var(--app-primary-dark-rgb), 0.11));
    color: var(--app-color-primary);
    font-weight: 700;
    box-shadow: inset 0 1px 0 var(--app-color-glass-subtle);
    border-radius: 0.85rem;
}

.public-bottom-nav .shell-bottom-nav__item.is-active .shell-bottom-nav__icon {
    color: var(--app-color-primary);
    transform: scale(1.28);
    transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.public-bottom-nav .shell-bottom-nav__item.is-active .shell-bottom-nav__label {
    color: var(--app-color-primary);
    font-weight: 700;
}

/* Side nav (desktop) — token overrides */
.public-side-nav {
    --nav-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(248, 250, 252, 0.9));
    --nav-border: 1px solid rgba(255, 255, 255, 0.8);
    --nav-radius: 1.2rem;

    padding: 0.45rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 10px 22px -14px var(--app-color-overlay);
}

.public-side-nav__menu .rz-navigation-item,
.public-side-nav__menu .rz-panel-menu-item {
    border-radius: 0.95rem;
    margin: 0.22rem 0.25rem;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease, background-color 220ms ease, color 220ms ease;
    border: 1px solid transparent;
}

.public-side-nav__menu .rz-navigation-item-link,
.public-side-nav__menu .rz-panel-menu-item > .rz-navigation-item-link {
    border-radius: 0.88rem;
    min-height: 42px;
    align-items: center;
    padding-inline: 0.65rem;
    color: var(--app-color-text-strong);
    font-weight: 600;
}

.public-side-nav__menu .rz-navigation-item.rz-state-active > .rz-navigation-item-link,
.public-side-nav__menu .rz-panel-menu-item.is-active > .rz-navigation-item-link {
    background: linear-gradient(135deg, var(--app-color-primary), var(--app-color-primary-dark)) !important;
    color: var(--app-color-surface) !important;
    font-weight: 600;
    box-shadow:
        0 10px 18px -10px rgba(var(--app-primary-rgb), 0.68),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transform: translateX(3px);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.public-side-nav__menu .rz-navigation-item.rz-state-active > .rz-navigation-item-link .rzi,
.public-side-nav__menu .rz-panel-menu-item.is-active > .rz-navigation-item-link .rzi {
    color: var(--app-color-surface) !important;
}

.public-side-nav__menu .rz-navigation-item:hover:not(.rz-state-active) > .rz-navigation-item-link,
.public-side-nav__menu .rz-panel-menu-item:hover:not(.is-active) > .rz-navigation-item-link {
    background-color: var(--app-color-primary-light) !important;
    transform: translateX(2px);
    color: var(--app-color-primary-dark) !important;
}

.public-side-nav__menu .rz-navigation-item:hover .rzi,
.public-side-nav__menu .rz-panel-menu-item:hover .rzi {
    transform: scale(1.07);
    transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.public-side-nav__menu .rz-navigation-item:active > .rz-navigation-item-link,
.public-side-nav__menu .rz-panel-menu-item:active > .rz-navigation-item-link {
    transform: scale(0.98);
}

/* Mobile shell overrides */
/* Mobile overrides */
@media (max-width: 768px) {
    body {
        background: #f8fafc; /* Very light slate for mobile */
        background-image: none;
    }
    
    .public-shell {
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        margin: 0;
        border: none;
        height: calc(100dvh - env(safe-area-inset-top));
        max-height: calc(100dvh - env(safe-area-inset-top));
    }
    
    .public-shell__header {
        border-radius: 0 0 1.15rem 1.15rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.94));
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.86);
        border-top: none;
        box-shadow: 0 10px 20px -14px var(--app-color-overlay-soft);
        padding-top: max(var(--sb-space-3), env(safe-area-inset-top));
        padding-bottom: var(--sb-space-3);
    }

    .public-shell__heading h1,
    .public-shell__heading h2,
    .public-shell__heading h3,
    .public-shell__heading .rz-label {
        -webkit-text-fill-color: initial;
        color: var(--app-color-text-deep);
        background: none;
    }

    .public-bottom-nav {
        border-radius: 1.2rem;
        margin: 0 0.7rem calc(env(safe-area-inset-bottom, 0.5rem) + 0.3rem) 0.7rem;
        padding: 0.3rem;
    }

    .public-bottom-nav .shell-bottom-nav__item {
        min-height: 40px;
        padding: 0.4rem 0.2rem;
    }

    .public-bottom-nav .shell-bottom-nav__label {
        font-size: 0.79rem;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   2. COMPONENT ENHANCEMENTS
   Lightweight micro-interactions for a youthful feel.
   ═══════════════════════════════════════════════════════════════════ */

/* Progress bar gradient fill */
.sb-progress-fill,
.progress-bar__fill {
    background: linear-gradient(90deg, var(--app-color-primary), var(--app-color-primary-dark));
    border-radius: var(--sb-radius-full);
}

/* Filter chip smooth transitions */
.sb-filter-chip {
    transition: background var(--sb-transition-fast), border-color var(--sb-transition-fast), color var(--sb-transition-fast), box-shadow var(--sb-transition-fast);
}

.sb-filter-chip:active { transform: scale(0.96); }


/* ═══════════════════════════════════════════════════════════════════
   3. TYPOGRAPHY & GLOBAL
   ═══════════════════════════════════════════════════════════════════ */

h1, h2, h3 {
    font-family: var(--app-font-family-heading);
    letter-spacing: -0.01em;
}

a:not([class]) {
    color: var(--app-color-primary);
    text-decoration-color: rgba(var(--app-primary-rgb), 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--sb-transition-fast);
}

a:not([class]):hover {
    text-decoration-color: var(--app-color-primary);
}

::selection {
    background: rgba(var(--app-primary-rgb), 0.18);
    color: inherit;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--app-primary-rgb), 0.20); border-radius: var(--sb-radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--app-primary-rgb), 0.35); }
/* ═══════════════════════════════════════════════════════════════════
   4. FEATURE OVERRIDES
   Feature-specific styles. These override scoped component CSS
   from the design system and will be migrated to per-feature CSS
   in future phases. Selectors are Public-app-only.
   ═══════════════════════════════════════════════════════════════════ */


/* ── 4a. Review Catalog View ─────────────────────────────────────── */
/* ── Group Headers ── */
.review-catalog-view__group-header {
    background: var(--app-color-glass-subtle);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--app-color-glass-subtle);
    border-radius: var(--app-radius-m);
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.02), 
        0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.review-catalog-view__group-header:hover {
    background: var(--app-color-glass);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.04);
}

.review-catalog-view__group-title {
    font-family: var(--app-font-family-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--app-color-text);
    letter-spacing: 0.01em;
}

.review-catalog-view__group-count {
    background: var(--app-color-primary);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    height: 1.5rem;
    min-width: 1.5rem;
    border-radius: 0.5rem; /* Squircle */
    box-shadow: 0 2px 4px rgba(var(--app-primary-rgb), 0.25);
}

/* ── Item Wrapper (The Button) ── */
.review-catalog-view__item-button {
    margin-bottom: 0.65rem;
    border-radius: 1.25rem;
}

.review-catalog-view__item-button:focus-visible {
    outline: 2px solid var(--app-color-primary);
    outline-offset: 4px;
}

/* ── The Review Card Itself ── */
.review-catalog-card {
    background: var(--app-color-surface);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1.25rem; /* Match new corner radius */
    padding: 1rem;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 1px 2px rgba(0, 0, 0, 0.01);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* Add a subtle highlight line on the left instead of the default border */
.review-catalog-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--app-color-border);
    opacity: 0.5;
    transition: background 0.2s ease;
}

.review-catalog-view__item-button:hover .review-catalog-card {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 
        0 12px 24px -6px rgba(0, 0, 0, 0.06),
        0 4px 8px -4px rgba(0, 0, 0, 0.03);
    border-color: rgba(var(--app-primary-rgb), 0.15);
}

.review-catalog-view__item-button:hover .review-catalog-card::after {
    background: var(--app-color-primary);
    opacity: 1;
}

/* ── Avatar / Image ── */
.review-catalog-card__avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem; /* Squircle avatar */
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid white;
}

.review-catalog-card__avatar-img {
    border-radius: 0.8rem;
}

/* ── Typography & Layout ── */
.review-catalog-card__title {
    font-family: var(--app-font-family-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.review-catalog-card__scout {
    display: none; /* Users view their own reviews — "Scout:" is redundant */
}

/* The requirement path */
.review-catalog-card__requirement {
    font-size: 0.8125rem;
    background: var(--app-color-surface-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    margin-top: 0.25rem;
    display: inline-block;
}

.review-catalog-card__requirement-parent {
    font-weight: 500;
}

.review-catalog-card__requirement-separator {
    color: var(--app-color-primary);
    font-weight: bold;
    font-size: 0.9em;
}

/* ── Metadata (Date, Attachment) ── */
.review-catalog-card__meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--app-color-border);
}

.review-catalog-card__meta-item {
    background: var(--app-color-surface-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--app-color-text-secondary);
}

.review-catalog-card__meta-item .rzi {
    font-size: 0.9rem;
    color: var(--app-color-text-muted);
}

.review-catalog-card__date {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--app-color-text-muted);
}

/* Chevron */
.review-catalog-card__chevron {
    background: var(--app-color-surface-muted);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.review-catalog-view__item-button:hover .review-catalog-card__chevron {
    background: var(--app-color-primary-light);
    color: var(--app-color-primary);
    transform: translateX(2px);
}

/* ── 4b. Review Tabs & Chat ──────────────────────────────────────── */

/* ─── Review Tabs Polish ─────────────────────────────────────── */

/* ── Review page tab overrides (Public) ── */
.review-page-tabs {
    --app-tabs-gap: 0.5rem;
    --app-tabs-bg: var(--app-color-surface-alt);
    --app-tabs-border: none;
    --app-tabs-padding: 0.375rem;
    --app-tabs-tab-padding: 0.75rem 1rem;
    --app-tabs-tab-margin: 0;
    --app-tabs-tab-bg: transparent;
    --app-tabs-tab-underline: none;
    --app-tabs-tab-color: var(--app-color-text-muted);
    --app-tabs-tab-font-weight: 600;
    --app-tabs-tab-font-size: 0.95rem;
    --app-tabs-tab-radius: 1rem;
    --app-tabs-tab-transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --app-tabs-tab-hover-color: var(--app-color-text);
    --app-tabs-tab-hover-bg: rgba(0,0,0,0.02);
    --app-tabs-tab-active-bg: var(--app-color-surface);
    --app-tabs-tab-active-color: var(--app-color-primary);
    --app-tabs-tab-active-shadow: 0 4px 12px rgba(var(--app-primary-rgb), 0.12), 0 1px 2px rgba(0,0,0,0.05);
    --app-tabs-tab-active-transform: translateY(-1px);
    --app-tabs-tab-active-border: transparent;
    --app-tabs-icon-size: 1.2rem;
    --app-tabs-icon-active-transform: scale(1.1);
    --app-tabs-badge-min-width: 1.45rem;
    --app-tabs-badge-bg: var(--app-color-primary);
    --app-tabs-badge-color: white;
    --app-tabs-badge-radius: 1rem;
    --app-tabs-badge-font-size: 0.75rem;
    --app-tabs-badge-padding: 0.15rem 0.5rem;
    --app-tabs-badge-shadow: 0 2px 4px rgba(var(--app-primary-rgb), 0.2);
    --app-tabs-badge-active-bg: var(--app-color-primary);
    --app-tabs-badge-active-color: white;
    --app-tabs-badge-active-shadow: 0 2px 4px rgba(var(--app-primary-rgb), 0.2);
    border-radius: 1.25rem;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}
.review-page-tabs::-webkit-scrollbar { display: none; }

.review-page-tabs .app-tabs__tab { flex: 1; justify-content: center; position: relative; z-index: 1; }

/* Inactive badge: blue info style */
.review-page-tabs .app-tabs__tab:not(.app-tabs__tab--active) .app-tabs__tab-badge {
    background: var(--app-color-info-muted);
    color: #075985;
    border: 1px solid rgba(2, 132, 199, 0.24);
    box-shadow: none;
}

/* ── 4c. Review Detail Layout ────────────────────────────────────── */

/* ─── Review Detail Page Layout Fixes ────────────────────────── */

.review-detail-page-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.review-detail-page-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── 4d. Review Overview Card ────────────────────────────────────── */

/* ─── Review Overview Card Polish ────────────────────────────── */

.review-overview-card {
    background: var(--app-color-surface);
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    overflow-y: auto;
    border: 1px solid var(--app-color-border);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.review-overview-card__header {
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: linear-gradient(145deg, var(--app-color-surface), var(--app-color-surface-alt));
    border-bottom: 1px solid var(--app-color-border);
}

.review-overview-card__image-wrapper {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 1.25rem;
    padding: 0.25rem;
    background: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border: 1px solid var(--app-color-border);
}

.review-overview-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 1rem;
}

.review-overview-card__title-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.review-overview-card__status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    display: inline-block;
}

.review-overview-card__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--app-color-text);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.review-overview-card__context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-color-text-muted);
}

.review-overview-card__context-badge {
    background: var(--app-color-surface-alt);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    color: var(--app-color-text);
    border: 1px solid var(--app-color-border);
}

.review-overview-card__context-icon {
    font-size: 1.1rem;
    opacity: 0.5;
}

.review-overview-card__context-req {
    color: var(--app-color-text-muted);
}

.review-overview-card__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
    padding: 1rem 1.5rem 0;
}

.review-overview-card__fact {
    background: linear-gradient(145deg, var(--app-color-surface), var(--app-color-surface-alt));
    border: 1px solid var(--app-color-border);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.review-overview-card__fact-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-color-text-muted);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.review-overview-card__fact-label .rzi {
    font-size: 1rem;
    color: var(--app-color-primary);
}

.review-overview-card__fact-value {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--app-color-text);
    line-height: 1.35;
    word-break: break-word;
}

.review-overview-card__body {
    padding: 1.5rem;
    background: var(--app-color-surface);
}

.review-overview-card__note-box {
    background: linear-gradient(145deg, var(--app-color-surface-alt), var(--app-color-surface-muted));
    border-radius: 1.25rem;
    padding: 1.25rem;
    border-left: 4px solid var(--app-color-primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.review-overview-card__note-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--app-color-primary-dark);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.review-overview-card__note-header .rzi {
    font-size: 1.2rem;
}

.review-overview-card__note-content {
    margin: 0;
    font-size: 1rem;
    color: var(--app-color-text);
    line-height: 1.6;
    white-space: pre-line;
}

@media (max-width: 768px) {
    .review-overview-card__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .review-overview-card__title-wrapper {
        align-items: center;
    }

    .review-overview-card__context {
        justify-content: center;
    }
}

/* ── 4e. Review Chat & Attachments ───────────────────────────────── */

/* ─── Review Attachments Polish ──────────────────────────────── */

.review-chat-tab-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: var(--app-color-surface);
    border-radius: 1.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--app-color-border);
}

.review-chat-tab-container .review-conversation {
    height: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.review-chat-tab-container .review-conversation__messages {
    padding: 1.25rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--app-color-surface-alt);
}

.review-chat-tab-container .review-conversation__input {
    padding: 1rem 1.25rem;
    background: var(--app-color-surface);
    border-top: 1px solid var(--app-color-border);
    margin-top: 0;
    /* Ensure input stays at bottom */
    position: sticky;
    bottom: 0;
    margin-top: auto;
    z-index: 2;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.02);
}

.review-chat-tab-container .review-conversation__input-field {
    border-radius: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--app-color-surface-alt);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.review-chat-tab-container .review-conversation__input-field:focus {
    background: var(--app-color-surface);
    border-color: var(--app-color-primary);
    box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), 0.15);
}

.review-chat-tab-container .btn-primary {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--app-primary-rgb), 0.25);
}

.review-chat-tab-container .btn-primary .rzi {
    font-size: 1.2rem;
    margin-left: 2px; /* Optical alignment for send icon */
}

/* ─── Review Attachments Polish ──────────────────────────────── */

.review-attachments-card {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.review-attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.review-attachments-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--app-color-text);
}

.review-upload-btn-wrapper .app-btn {
    border-radius: 1rem;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(var(--app-primary-rgb), 0.2);
    transition: all 0.2s ease;
}

.review-upload-btn-wrapper .app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--app-primary-rgb), 0.3);
}

.review-attachment-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-attachment-grid__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.review-attachment-card {
    transition: all 0.2s ease;
    border: 1px solid var(--app-color-border);
    border-radius: 1.25rem;
    overflow: hidden;
    background: var(--app-color-surface);
}

.review-attachment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    border-color: rgba(var(--app-primary-rgb), 0.2);
}

.review-attachment-card__row {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
}

.review-attachment-card__thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--app-color-surface-alt);
    border: 1px solid var(--app-color-border);
}

.review-attachment-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.review-attachment-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--app-color-surface-alt), var(--app-color-surface-muted));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--app-color-primary);
    border: 1px solid var(--app-color-border);
}

.review-attachment-card__icon .rzi {
    font-size: 1.5rem;
}

.review-attachment-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.review-attachment-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--app-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-attachment-card__meta {
    font-size: 0.8rem;
    color: var(--app-color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-attachment-card__actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.review-attachment-card__actions .icon-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-color-text-muted);
    transition: all 0.2s ease;
    background: transparent;
}

.review-attachment-card__actions .icon-button:hover {
    background: var(--app-color-surface-alt);
    color: var(--app-color-primary);
}

.review-attachment-card__actions .icon-button .rzi {
    font-size: 1.2rem;
}

/* ─── Image Preview Modal ──────────────────────────────────────── */

.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.image-preview-modal {
    background: var(--app-color-surface);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.image-preview-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--app-color-border);
    background: var(--app-color-surface-alt);
}

.image-preview-modal__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--app-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-preview-modal__close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--app-color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-modal__close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--app-color-text);
}

.image-preview-modal__content {
    flex: 1;
    overflow: auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-color-surface);
}

.image-preview-modal__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-preview-modal__unsupported {
    color: var(--app-color-text-muted);
    font-size: 1rem;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 4f. Notification Popup ──────────────────────────────────────── */

/* ─── Notification popup item override ──────────────────────────
   The list is a flex-column with max-height: 360px.  Without
   flex-shrink: 0 the items collapse because flex-shrink: 1 (default)
   lets them be crushed below their content height.                   */
.notification-menu-popup__item {
    flex-shrink: 0;
}

/* ── Notification inbox hero header redesign ─────────────────────── */

.notification-inbox__title-group {
    display: none;
}

.notification-inbox__header {
    justify-content: flex-end;
    background: linear-gradient(
        135deg,
        var(--app-color-primary) 0%,
        color-mix(in srgb, var(--app-color-primary), black 25%) 100%
    );
    border-radius: var(--sb-radius-lg, 1rem);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.notification-inbox__header::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Action button (white on orange hero) — merged from multiple passes */
.notification-inbox__action-btn {
    color: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--app-radius-full, 999px);
    background: rgba(255, 255, 255, 0.12);
}

.notification-inbox__action-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Unread badge */
.notification-inbox__unread-badge {
    background: var(--app-color-primary);
    color: #fff;
}

@media (max-width: 768px) {
    .notification-inbox__header {
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ── 4h. Dashboard ───────────────────────────────────────────────── */

/* Dashboard hero: vivid gradient */
.dashboard-page__hero {
    background: linear-gradient(135deg, var(--app-color-primary) 0%, var(--app-color-primary-dark) 60%, #b45309 100%) !important;
    border-left: none !important;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 12px 32px rgba(var(--app-primary-rgb), 0.28),
        0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.dashboard-page__hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Hero secondary CTA */
.dashboard-page__hero .dashboard-page__cta--secondary {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600 !important;
}

.dashboard-page__hero .dashboard-page__cta--secondary:hover {
    background: rgba(255, 255, 255, 0.30) !important;
    border-color: rgba(255, 255, 255, 0.90) !important;
    color: white !important;
}

/* Page entrance animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(var(--sb-distance-md, 14px));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shell-scroll-content > * {
    animation: slideUpFade var(--sb-duration-slow, 0.42s) var(--sb-ease-spring, cubic-bezier(0.22, 1, 0.36, 1)) backwards;
}

/* Review catalog cards — colored left accent per triage */
.triage-section:has(.triage-section__header--pending) .review-catalog-card::after {
    background: var(--app-review-accent-pending);
    opacity: 0.9;
}

.triage-section:has(.triage-section__header--approved) .review-catalog-card::after {
    background: var(--app-review-accent-approved);
    opacity: 0.9;
}

.triage-section:has(.triage-section__header--rejected) .review-catalog-card::after {
    background: var(--app-review-accent-rejected);
    opacity: 0.9;
}

/* Stat card icons: unique color per position (!important needed — scoped CSS) */
.dashboard-page .stat-card:nth-child(1) .stat-card__icon {
    background: var(--app-stat-icon-1-bg) !important;
    color: var(--app-stat-icon-1-color) !important;
}
.dashboard-page .stat-card:nth-child(2) .stat-card__icon {
    background: var(--app-stat-icon-2-bg) !important;
    color: var(--app-stat-icon-2-color) !important;
}
.dashboard-page .stat-card:nth-child(3) .stat-card__icon {
    background: var(--app-stat-icon-3-bg) !important;
    color: var(--app-stat-icon-3-color) !important;
}

/* Stat card colored gradients */
.dashboard-page .stat-card:nth-child(1) {
    background: linear-gradient(145deg, rgba(var(--app-primary-rgb), 0.07), rgba(var(--app-primary-rgb), 0.03));
    border-color: rgba(var(--app-primary-rgb), 0.22);
}

.dashboard-page .stat-card:nth-child(2) {
    background: linear-gradient(145deg, rgba(2, 132, 199, 0.07), rgba(2, 132, 199, 0.03));
    border-color: rgba(2, 132, 199, 0.22);
}

.dashboard-page .stat-card:nth-child(3) {
    background: linear-gradient(145deg, rgba(100, 116, 139, 0.07), rgba(100, 116, 139, 0.03));
    border-color: rgba(100, 116, 139, 0.22);
}

/* Bolder stat values (!important — scoped CSS override) */
.dashboard-page .stat-card__value {
    font-size: 28px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
}

.dashboard-page .stat-card:nth-child(1) .stat-card__value {
    color: var(--app-color-primary-dark) !important;
}

.dashboard-page .stat-card:nth-child(2) .stat-card__value {
    color: #0284c7 !important;
}

.dashboard-page .stat-card:nth-child(3) .stat-card__value {
    color: #475569 !important;
}

.dashboard-page .stat-card__label {
    font-weight: 600 !important;
    font-size: 10px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Nudge card: warmer styling (!important — scoped CSS override) */
.dashboard-page__nudge {
    background: linear-gradient(
        135deg,
        rgba(var(--app-primary-rgb), 0.06) 0%,
        var(--app-color-surface) 80%
    ) !important;
    border-color: rgba(var(--app-primary-rgb), 0.22) !important;
    border-style: solid !important;
}

.dashboard-page__nudge-title {
    color: var(--app-color-primary-dark) !important;
    font-size: 1.05rem !important;
}

/* ── 4i. Awards & Badges ─────────────────────────────────────────── */

/* Badge overview card header: warm accent (!important — scoped CSS) */
.badge-overview-card__header {
    background: linear-gradient(
        135deg,
        rgba(var(--app-primary-rgb), 0.06) 0%,
        var(--app-color-surface) 70%
    ) !important;
    border-bottom-color: rgba(var(--app-primary-rgb), 0.12) !important;
}

.badge-overview-card__image-wrapper {
    border-color: rgba(var(--app-primary-rgb), 0.25) !important;
    box-shadow: 0 4px 16px rgba(var(--app-primary-rgb), 0.15), 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* Review overview card header: status-tinted */
.review-overview-card__header {
    background: linear-gradient(
        135deg,
        rgba(var(--app-primary-rgb), 0.06) 0%,
        var(--app-color-surface) 65%
    ) !important;
    border-bottom-color: rgba(var(--app-primary-rgb), 0.12) !important;
}

/* Review detail status chip: bigger (!important — scoped CSS) */
.review-overview-card__status,
.review-sidebar-card__status {
    font-size: 0.8125rem !important;
    font-weight: 800 !important;
    padding: 0.35rem 1rem !important;
    letter-spacing: 0.04em !important;
    border-radius: 2rem !important;
}

/* Requirement tree: completed rows warm tint */
.awards-badge-requirements__row:has(.awards-badge-requirements__status-badge) {
    background: rgba(var(--app-primary-rgb), 0.04);
    border-radius: 0.625rem;
}

.awards-badge-requirements__row:has(.awards-badge-requirements__status-badge)
.awards-badge-requirements__title {
    color: var(--app-color-primary-dark);
    font-weight: 700;
}

/* Badge list item completed: green marker (!important — scoped CSS) */
.badge-list-item--completed {
    border-left: 4px solid var(--app-color-success) !important;
    background: linear-gradient(
        135deg,
        rgba(5, 150, 105, 0.04) 0%,
        var(--app-color-surface) 60%
    ) !important;
}

/* ── 4j. Settings & Account ──────────────────────────────────────── */

/* Settings menu: orange icons + primary group titles */
.settings-menu-item__icon {
    color: var(--app-color-primary);
    font-size: 1.6rem;
    width: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-menu-group__title {
    color: var(--app-color-primary);
    letter-spacing: 0.08em;
}

.settings-menu-item:hover,
.settings-menu-item:focus-visible {
    background: rgba(var(--app-primary-rgb), 0.05);
}

.settings-menu-item {
    padding: 1rem 1.25rem;
    min-height: 4.25rem;
}

.settings-menu-item__chevron {
    color: var(--app-color-primary);
    opacity: 0.55;
}

.settings-menu-item:focus-visible {
    border-left: 3px solid var(--app-color-primary);
}

.settings-menu-group__card {
    box-shadow: 0 2px 12px rgba(var(--app-primary-rgb), 0.1);
    border: 1px solid rgba(var(--app-primary-rgb), 0.12);
    overflow: hidden;
}

/* Account settings: Public theme overrides */
.account-settings__tabs {
    --app-tabs-tab-active-color: var(--app-color-primary);
    --app-tabs-tab-hover-color: var(--app-color-primary);
}

/* Active toggle: orange left border */
.account-setting-row:has(.setting-toggle--on) {
    border-left: 3px solid var(--app-color-primary);
    padding-left: calc(1rem - 3px);
    background: rgba(var(--app-primary-rgb), 0.025);
}

.setting-toggle--on .setting-toggle__track {
    box-shadow: 0 0 0 3px rgba(var(--app-primary-rgb), 0.18);
}

@media (max-width: 768px) {
    .settings-menu {
        padding-bottom: 2rem;
    }
}

/* ── 4k. Filter Chips & Triage ───────────────────────────────────── */

/* Active filter chips: more vivid (!important — scoped CSS) */
.filter-chip--active,
.filter-chip-bar .filter-chip--active,
.app-chip--active {
    font-weight: 800 !important;
    box-shadow: 0 3px 10px rgba(var(--app-primary-rgb), 0.28) !important;
    transform: translateY(-1px);
}

/* Triage count badges: bigger (!important — scoped CSS) */
.triage-section__count {
    font-size: 0.8125rem !important;
    height: 1.625rem !important;
    min-width: 1.625rem !important;
    font-weight: 800 !important;
}

/* Zero-count pills: muted */
.triage-section:not(.triage-section--open) .triage-section__count--approved,
.triage-section:not(.triage-section--open) .triage-section__count--rejected {
    background: var(--app-color-surface-muted) !important;
    color: var(--app-color-text-muted) !important;
    box-shadow: none !important;
}

/* Page heading boost (!important — scoped CSS may conflict) */
.content-page__title,
.page-header__title,
.section-header__title {
    letter-spacing: -0.025em !important;
    font-weight: 800 !important;
}

/* Filter chip bar: fade-out scroll hint (mobile) */
@media (max-width: 768px) {
    .filter-chip-bar {
        -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
        mask-image: linear-gradient(to right, black 80%, transparent 100%);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   5. MOBILE LAYOUT FIXES
   ═══════════════════════════════════════════════════════════════════ */

/* Mobile specific fixes for chat tab */
@media (max-width: 768px) {
    .review-page-tabs {
        border-radius: 1rem;
        padding: 0.375rem;
    }
    .review-page-tabs .app-tabs__tab-icon { display: none; }
    .review-page-tabs .app-tabs__tab {
        padding: 0.65rem 0.5rem;
        font-size: 0.88rem;
        gap: 0.3rem;
        min-height: 44px;
    }

    .review-overview-card__facts {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 0.9rem 1rem 0;
    }
}

/* ─── Mobile: Bottom-nav safe scroll padding ─────────────────── */
/* The fixed bottom nav covers the bottom ~70px of the viewport.
   Without this padding, the last content items on every page get
   hidden behind the nav bar when scrolled to the bottom.          */
@media (max-width: 768px) {
    .public-shell .shell-scroll-content {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* Review detail uses height:100% + overflow:hidden and manages its
       own internal scrolling.  Undo the shell padding so its 100% height
       fills the full scroll-content, then let its internal cards handle
       the bottom-nav inset via their own padding.                       */
    .public-shell .shell-scroll-content:has(.review-detail-page-container) {
        padding-bottom: 0;
    }

    /* Review detail — remove shell horizontal padding so the overview
       card fills edge-to-edge like a native app section.               */
    .public-shell__content:has(.review-detail-page-container) {
        padding-left: 0;
        padding-right: 0;
    }

    /* Tab bar: restore inset padding after shell is zeroed out.        */
    .review-page-tabs {
        margin: 0 var(--sb-space-4);
        width: calc(100% - 2 * var(--sb-space-4));
        box-sizing: border-box;
    }

    /* Review Info/Attachments cards: flat + edge-to-edge on mobile.    */
    .review-overview-card,
    .review-attachments-card {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
}

/* ─── Mobile: Dashboard hero bleeds edge-to-edge ─────────────── */
/* AppCard's root element is rendered by AppCard (child component),
   so it gets no DashboardPage scope attribute. Global rule needed.  */
@media (max-width: 768px) {
    .dashboard-page__hero {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}

/* Mobile topbar: icon-only back button + truncated title */
@media (max-width: 480px) {
    /* Hide back button label text — show arrow icon only (standard mobile pattern) */
    .topbar-context-header__back span {
        display: none;
    }

    /* Allow titles container to fill remaining space */
    .topbar-context-header__titles {
        flex: 1 1 0;
        min-width: 0;
    }

    /* Truncate long page titles with ellipsis */
    .topbar-context-header__title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Review catalog cards: mobile-native layout */
@media (max-width: 640px) {
    .review-catalog-card {
        padding: 0.875rem 0.875rem 0.875rem 1.125rem;
        border-radius: 1rem;
    }

    /* Top-align so avatar anchors to the title, not the card center */
    .review-catalog-card__row {
        align-items: flex-start;
        gap: 0.625rem;
    }

    /* Slightly larger, slightly nudged down to align with title baseline */
    .review-catalog-card__avatar {
        width: 3rem;
        height: 3rem;
        border-radius: 0.85rem;
        margin-top: 0.1rem;
        flex-shrink: 0;
    }

    /* Allow title to wrap — avoids hard truncation on narrow screens */
    .review-catalog-card__title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 1rem;
        line-height: 1.3;
    }

    /* Remove the formal dashed separator — meta flows naturally */
    .review-catalog-card__meta {
        margin-top: 0.45rem;
        padding-top: 0;
        border-top: none;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    /* Compact attachment/message chips: show icon+count only, hide the word label */
    .review-catalog-card__meta-label {
        display: none;
    }

    /* Date: style as pill to match the attachment chip (cohesive meta row) */
    .review-catalog-card__date {
        margin-left: 0; /* override components.css `margin-left: auto` that causes wrapping */
        background: var(--app-color-surface-muted);
        padding: 0.22rem 0.55rem;
        border-radius: 1rem;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--app-color-text-secondary);
    }

    /* Smaller chevron on mobile */
    .review-catalog-card__chevron {
        width: 1.75rem;
        height: 1.75rem;
        margin-top: 0.15rem;
    }
}

/* Badge description: left-aligned on mobile */
@media (max-width: 768px) {
    .badge-overview-card__description {
        text-align: left !important;
    }
}

/* Account page title: prevent truncation */
@media (max-width: 480px) {
    .content-page__title {
        white-space: normal !important;
        word-break: break-word !important;
        font-size: clamp(1rem, 4vw, 1.25rem) !important;
    }
}

/* Dashboard hero: edge-to-edge on mobile */
@media (max-width: 768px) {
    .dashboard-page__hero {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   7. RADZEN DEEP OVERRIDES
   Radzen internal DOM and CSS variable overrides that cannot be
   expressed as design tokens.
   ═══════════════════════════════════════════════════════════════════ */

/* Radzen CSS variable overrides (!important needed to beat Radzen's own :root) */
:root {
    --rz-text-font-family: "Poppins", sans-serif !important;
    --rz-panel-menu-item-color: #0066b2 !important;
    --rz-panel-menu-icon-color: #0066b2 !important;
    --rz-panel-menu-item-active-background-color: white !important;
    --rz-pager-numeric-button-selected-color: white !important;
    --rz-accordion-border-radius: 0px !important;
    --rz-tabs-padding: 0px !important;
    --rz-layout-body-padding: 0px !important;
}

/* Radzen data table cell wrapping */
.rz-datatable-data td .rz-cell-data,
.rz-grid-table td .rz-cell-data {
    white-space: normal !important;
}

/* Radzen tab nav */
.rz-tabview-nav {
    background-color: white;
}

.rz-tabview-title {
    font-family: "Poppins", sans-serif !important;
}

/* Radzen form field */
.rz-form-field-content {
    cursor: text;
}

.rz-form-field-content .rz-dropdown {
    width: 100%;
}

} /* end @layer host */
