/* Mobile shell (native phone) — bottom nav + connectivity banner */
:root {
    --mobile-bg: var(--metro-bg);
    --mobile-surface: var(--metro-surface);
    --mobile-text: var(--metro-text);
    --mobile-text-muted: var(--metro-text-muted);
    --mobile-border: var(--metro-border);
    --mobile-primary: var(--metro-primary);
    --mobile-bottom-h: 64px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    /* Breakpoints — also documented in MetroBreakpoints.cs and metroAsap.js */
    --metro-breakpoint-narrow: 768px;
    --metro-breakpoint-portal-nav: 900px;
    --metro-breakpoint-tablet-max: 991px;
    --metro-breakpoint-compact: 640px;
    --metro-breakpoint-xs: 480px;
    --metro-touch-target-min: 48px;
    --mobile-shell-content-pad: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 1rem);
    --mobile-radius-card: 16px;
    --mobile-radius-control: 12px;
    --mobile-radius-pill: 999px;
    --mobile-elev-ios: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.07);
    --mobile-elev-android: 0 1px 2px rgba(15, 23, 42, 0.14), 0 3px 8px rgba(15, 23, 42, 0.08);
    --mobile-elev-dark: 0 8px 24px rgba(0, 0, 0, 0.35);
    --mobile-space-page: 1rem;
    --mobile-page-gutter: clamp(0.875rem, 4vw, 1.25rem);
    --mobile-section-gap: 1rem;
    --mobile-card-gap: 0.75rem;
    --mobile-type-title: 1.55rem;
    --mobile-type-body: 0.95rem;
}

:root[data-theme="dark"] {
    --mobile-bg: var(--metro-bg);
    --mobile-surface: var(--metro-surface-raised);
    --mobile-text: var(--metro-text);
    --mobile-text-muted: var(--metro-text-muted);
    --mobile-border: var(--metro-border);
}

.mobile-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--mobile-bg);
    background-image: none !important;
    color: var(--mobile-text);
    /* Bottom clearance lives on .page-body via --mobile-shell-content-pad (avoid double pad). */
    padding-bottom: 0;
}

/* Auth / sign-in surfaces: no tab bar, so drop reserved bottom chrome. */
.mobile-shell--no-bottom-nav,
.mobile-shell:not(:has(.mobile-bottom-nav)) {
    --mobile-bottom-h: 0px;
}

.mobile-shell__body {
    flex: 1;
    min-height: 0;
}

.mobile-shell__content {
    min-height: 100%;
}

.mobile-shell__body--pull {
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
    padding-bottom: var(--mobile-safe-bottom);
    background: color-mix(in srgb, var(--mobile-surface) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--mobile-border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    isolation: isolate;
}

:root[data-theme="dark"] .mobile-bottom-nav {
    background: color-mix(in srgb, var(--mobile-surface) 88%, transparent);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
}

.mobile-bottom-nav__item {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--mobile-text-muted);
    font-size: 10px;
    font-weight: 600;
    min-width: 0;
    min-height: 48px;
    padding: 0 2px;
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--duration-press, 140ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
                color var(--duration-ui, 200ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

.mobile-bottom-nav__item:active {
    transform: scale(0.97);
}

.mobile-bottom-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bottom-nav__item i {
    font-size: 22px;
    line-height: 1;
}

.mobile-bottom-nav__item.active {
    color: var(--mobile-primary);
}

.mobile-bottom-nav__item.active::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 16px;
    height: 3px;
    border-radius: 99px;
    background: var(--mobile-primary);
    transform: translateX(-50%);
}

.mobile-bottom-nav-customize-btn {
    flex: 0 0 auto;
    align-self: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin: 0 8px 0 4px;
    border-radius: 10px;
    border: 1px solid var(--mobile-border);
    background: var(--mobile-bg);
    color: var(--mobile-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    z-index: auto;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-editor-preview {
    margin-bottom: 1rem;
}

.mobile-nav-editor-preview-bar {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    background: var(--mobile-bg, var(--bs-light, #f8f9fa));
    border: 1px solid var(--mobile-border, var(--bs-border-color, #dee2e6));
}

.mobile-nav-editor-preview-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    font-size: 10px;
    font-weight: 600;
    color: var(--mobile-text-muted, var(--bs-secondary, #6c757d));
    border-radius: 8px;
    background: var(--mobile-surface, #fff);
}

.mobile-nav-editor-preview-slot i {
    font-size: 18px;
}

.mobile-nav-editor-preview-slot--empty {
    opacity: .45;
    border: 1px dashed var(--bs-border-color, #dee2e6);
    background: transparent;
}

.mobile-nav-editor-preview-slot--menu {
    color: var(--bs-primary, #0d6efd);
}

.mobile-nav-editor-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(15, 23, 42, .45);
}

.mobile-nav-editor-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1310;
    max-height: min(100dvh, 44rem);
    background: var(--mobile-surface, var(--bs-body-bg, #fff));
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, .2);
    display: flex;
    flex-direction: column;
}

.mobile-nav-editor-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    flex-shrink: 0;
}

.mobile-nav-editor-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: calc(16px + var(--mobile-safe-bottom, 0px));
}

.mobile-connectivity-banner {
    position: sticky;
    top: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.mobile-connectivity-banner__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-connectivity-banner__count {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mobile-connectivity-banner--offline {
    background: #fdecea;
    color: #7a0e0e;
    border-bottom: 1px solid #f5c2c0;
}

.mobile-connectivity-banner--online {
    background: #d1e7dd;
    color: #0f5132;
    border-bottom: 1px solid #badbcc;
}

:root[data-theme="dark"] .mobile-connectivity-banner--offline {
    background: rgba(122, 14, 14, 0.35);
    color: #fca5a5;
}

:root[data-theme="dark"] .mobile-connectivity-banner--online {
    background: rgba(15, 81, 50, 0.35);
    color: #86efac;
}

.mobile-pull-hint {
    position: sticky;
    top: 0;
    z-index: 5;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--mobile-text-muted);
    padding: 8px 0 10px;
    background: linear-gradient(to bottom, var(--mobile-bg, #f3f4f6) 70%, transparent);
    transition: color 0.16s ease, transform 0.16s ease;
}

.mobile-pull-hint--armed {
    color: var(--mobile-primary);
}

/* Dock "More" button */
.dock-more-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: transparent;
    color: var(--mobile-text-muted);
    font-size: 11px;
    font-weight: 600;
    min-height: 48px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.dock-more-btn i {
    font-size: 22px;
    line-height: 1;
}

.dock-more-btn--open,
.dock-more-btn:active {
    color: var(--mobile-primary);
}

/* Dock "More" slide-up drawer */
.dock-more-drawer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    pointer-events: none;
}

.dock-more-drawer--open {
    pointer-events: auto;
}

.dock-more-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.dock-more-drawer--open .dock-more-drawer__backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.dock-more-drawer__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
    background: var(--mobile-surface);
    border-top: 1px solid var(--mobile-border);
    border-radius: 16px 16px 0 0;
    padding: 8px 0 env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 32px rgba(20, 33, 61, 0.12);
    max-height: calc(100dvh - var(--mobile-bottom-h) - var(--mobile-safe-bottom));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dock-more-drawer--open .dock-more-drawer__panel {
    transform: translateY(0);
}

.dock-more-drawer__handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--mobile-border);
    margin: 0 auto 8px;
}

.dock-more-drawer__item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: none;
    background: transparent;
    color: var(--mobile-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.dock-more-drawer__item:active {
    background: var(--mobile-bg);
}

.dock-more-drawer__icon {
    font-size: 22px;
    color: var(--mobile-primary);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* Staff mobile menu (all pages drawer) */
.staff-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1350;
    pointer-events: none;
}

.staff-mobile-menu--open {
    pointer-events: auto;
}

.staff-mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.staff-mobile-menu--open .staff-mobile-menu__backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.staff-mobile-menu__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
    top: max(var(--mobile-safe-top), 0.5rem);
    max-height: calc(100dvh - var(--mobile-bottom-h) - var(--mobile-safe-bottom) - max(var(--mobile-safe-top), 0.5rem));
    background: var(--mobile-surface);
    border-top: 1px solid var(--mobile-border);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 32px rgba(20, 33, 61, 0.12);
}

.staff-mobile-menu--open .staff-mobile-menu__panel {
    transform: translateY(0);
}

.staff-mobile-menu__handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--mobile-border);
    margin: 8px auto 0;
    flex-shrink: 0;
}

.staff-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 4px;
    flex-shrink: 0;
    gap: 8px;
}

.staff-mobile-menu__header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.staff-mobile-menu__edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.staff-mobile-menu__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.staff-mobile-menu__close {
    color: var(--mobile-text);
    text-decoration: none;
}

.staff-mobile-menu__search {
    display: flex;
    gap: 8px;
    padding: 0 16px 8px;
    flex-shrink: 0;
}

.staff-mobile-menu__entity-search {
    flex-shrink: 0;
}

.staff-mobile-menu__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-overflow-scrolling: touch;
}

.staff-mobile-menu__section {
    padding: 4px 0 8px;
}

.staff-mobile-menu__section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mobile-muted, #6c757d);
    padding: 8px 20px 4px;
}

.staff-mobile-menu__item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border: none;
    background: transparent;
    color: var(--mobile-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.staff-mobile-menu__item:active {
    background: var(--mobile-bg);
}

.staff-mobile-menu__item--group {
    justify-content: flex-start;
}

.staff-mobile-menu__item--group span {
    flex: 1;
}

.staff-mobile-menu__icon {
    font-size: 20px;
    color: var(--mobile-primary);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.staff-mobile-menu__chevron {
    font-size: 14px;
    color: var(--mobile-muted, #6c757d);
    margin-left: auto;
}

.mobile-shell .admin-users-search {
    width: 100%;
}

.mobile-shell .admin-users-mobile-list {
    border-top: 1px solid var(--bs-border-color);
}

.mobile-shell .admin-users-mobile-card {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--bs-border-color);
    background: transparent;
    color: inherit;
    text-align: left;
}

.mobile-shell .admin-users-mobile-card-main {
    -webkit-tap-highlight-color: transparent;
}

.mobile-shell .admin-users-mobile-card-main:active {
    opacity: 0.85;
}

/* ── Mobile shell active: bottom nav + layout chrome adjustments ── */
.mobile-shell .sidebar,
.mobile-shell .sidebar-backdrop {
    display: none !important;
}

.mobile-shell .page-body,
.mobile-shell .portal-main,
.mobile-shell .portal-body-container,
.mobile-shell .login-bg {
    padding-bottom: var(--mobile-shell-content-pad);
}

/* Extra room so Assist FAB (above bottom nav) does not cover page actions */
.mobile-shell:has(.metro-fab-stack) .page-body,
.mobile-shell:has(.metro-fab-stack) .portal-main,
.mobile-shell:has(.metro-fab-stack) .portal-body-container {
    padding-bottom: calc(var(--mobile-shell-content-pad) + var(--metro-fab-size) + var(--metro-fab-gap) + 0.5rem);
    scroll-padding-bottom: calc(var(--metro-fab-size) + var(--metro-fab-gap) + 0.5rem);
}

.mobile-shell .portal-footer,
.mobile-shell .metro-trust-footer {
    padding-bottom: calc(0.75rem + var(--mobile-bottom-h) + var(--mobile-safe-bottom));
}

.mobile-shell .portal-sidenav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    margin: 0 -0.75rem 0.75rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-shell .portal-sidenav::-webkit-scrollbar {
    display: none;
}

.mobile-shell .portal-sidenav .portal-sidenav-item {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
}

.mobile-shell .metro-fab-stack {
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 0.85rem);
    right: 0.85rem;
    gap: 0.65rem;
}

.mobile-shell .metro-assist-dock {
    bottom: auto;
    position: relative;
}

.mobile-shell .metro-fab-stack__request {
    display: none !important;
}

/* Staff: request lives in assist sheet. Portal users keep a compact FAB. */
.mobile-shell .metro-fab-stack:has(.metro-assist-dock) .metro-sys-notify-fab {
    display: none !important;
}

.mobile-shell .metro-sys-notify-fab {
    width: 2.75rem;
    height: 2.75rem;
}

.mobile-shell .metro-assist-fab,
.mobile-shell .metro-ai-fab,
.mobile-shell .metro-msg-fab {
    width: 3.25rem;
    height: 3.25rem;
    min-width: 3.25rem;
    min-height: 3.25rem;
}

.mobile-shell .metro-assist-sheet {
    margin-bottom: 0.5rem;
    max-width: min(20rem, calc(100vw - 2rem));
    border-radius: 14px;
    overflow: hidden;
}

.mobile-shell .metro-assist-sheet .list-group-item {
    min-height: var(--metro-touch-target-min, 48px);
    display: flex;
    align-items: center;
}

.mobile-shell .topbar {
    /* Single top inset: expand bar instead of squeezing fixed 56px content. */
    height: auto;
    min-height: calc(var(--topbar-height, 56px) + var(--mobile-safe-top));
    padding-top: var(--mobile-safe-top);
    box-sizing: border-box;
}

.mobile-shell .topbar-icon-btn,
.mobile-shell .topbar-pin-btn {
    min-width: var(--metro-touch-target-min, 48px);
    min-height: var(--metro-touch-target-min, 48px);
    width: var(--metro-touch-target-min, 48px);
    height: var(--metro-touch-target-min, 48px);
}

.mobile-shell .topbar-menu-btn {
    display: none !important;
}

.mobile-shell .metro-toast-container {
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 0.75rem);
}

.mobile-shell .page-body {
    overflow-y: visible;
}

.mobile-shell .main-content {
    margin-left: 0 !important;
    width: 100%;
    /* Do not keep metro.css overflow:hidden — it clips page content under the shell scroller. */
    overflow: visible !important;
}

.mobile-shell .metro-layout {
    --sidebar-width: 0px;
}

.mobile-shell .portal-header-inner {
    padding-top: calc(0.5rem + var(--mobile-safe-top));
}

.mobile-shell .portal-header-inner .h5 {
    font-size: 1rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-shell .login-bg {
    min-height: 100dvh;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.mobile-shell .login-bg .card,
.mobile-shell .public-branded-shell {
    max-width: 100%;
}

.mobile-shell input.form-control,
.mobile-shell input.form-select,
.mobile-shell select.form-select,
.mobile-shell textarea.form-control {
    font-size: max(16px, 1rem);
}

.mobile-shell .parks-portal-bottom-nav {
    display: none !important;
}

/* Compact staff top bar on mobile shell */
.mobile-shell .topbar-search {
    display: none !important;
}

.mobile-shell .topbar-desktop-chrome {
    display: none !important;
}

.mobile-shell .topbar-mobile-chrome {
    display: inline-flex !important;
}

.mobile-shell .topbar {
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.mobile-shell .topbar-actions {
    flex-wrap: nowrap !important;
    gap: 0.25rem !important;
    min-width: 0;
}

.mobile-shell .topbar-user-cluster .topbar-dept-scope-btn,
.mobile-shell .topbar-whats-new-btn,
.mobile-shell .topbar-pin-btn {
    display: none !important;
}

.mobile-shell .topbar-avatar-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--metro-touch-target-min, 48px);
    min-height: var(--metro-touch-target-min, 48px);
    padding: 0;
    border: 1px solid var(--mobile-border);
    border-radius: 14px;
    background: var(--mobile-surface);
    -webkit-tap-highlight-color: transparent;
}

.mobile-shell .topbar-avatar-trigger .topbar-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
}

/* Account sheet (mobile topbar overflow) */
.topbar-account-sheet {
    position: fixed;
    inset: 0;
    z-index: 1320;
    pointer-events: none;
}

.topbar-account-sheet--open {
    pointer-events: auto;
}

.topbar-account-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    transition: opacity .2s ease;
}

.topbar-account-sheet--open .topbar-account-sheet__backdrop {
    opacity: 1;
}

.topbar-account-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(100dvh, 640px);
    display: flex;
    flex-direction: column;
    background: var(--mobile-surface);
    color: var(--mobile-text);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, .2);
    padding-bottom: var(--mobile-safe-bottom);
    transform: translateY(100%);
    transition: transform .22s ease;
}

.topbar-account-sheet--open .topbar-account-sheet__panel {
    transform: translateY(0);
}

.topbar-account-sheet__handle {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--mobile-border);
    margin: 0.5rem auto 0;
    flex-shrink: 0;
}

.topbar-account-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.5rem;
    border-bottom: 1px solid var(--mobile-border);
    flex-shrink: 0;
}

.topbar-account-sheet__identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar-account-sheet__avatar {
    flex-shrink: 0;
}

.topbar-account-sheet__name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.topbar-account-sheet__role {
    font-size: 0.8rem;
    color: var(--mobile-text-muted);
}

.topbar-account-sheet__close {
    min-width: var(--metro-touch-target-min, 48px);
    min-height: var(--metro-touch-target-min, 48px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mobile-text-muted);
    text-decoration: none;
}

.topbar-account-sheet__body {
    overflow-y: auto;
    padding: 0.5rem 0 calc(0.75rem + var(--mobile-bottom-h, 64px));
    -webkit-overflow-scrolling: touch;
}

.topbar-account-sheet__section {
    padding: 0.5rem 1rem 0.75rem;
    border-bottom: 1px solid var(--mobile-border);
}

.topbar-account-sheet__section:last-child {
    border-bottom: none;
}

.topbar-account-sheet__section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mobile-text-muted);
    margin-bottom: 0.5rem;
}

.topbar-account-sheet__section .accessibility-quick-toggles {
    width: 100%;
}

.topbar-account-sheet__section .accessibility-quick-toggles > .btn {
    width: 100%;
    min-height: var(--metro-touch-target-min, 48px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.topbar-account-sheet__section .accessibility-quick-toggles > .btn .d-none,
.topbar-account-sheet__section .accessibility-quick-toggles > .btn .d-md-inline {
    display: inline !important;
}

.topbar-account-sheet__section .accessibility-quick-toggles__menu {
    width: 100%;
    min-width: 100%;
}

.topbar-account-sheet__section .accessibility-quick-toggles__option {
    min-height: var(--metro-touch-target-min, 48px);
    display: flex;
    align-items: center;
}

.topbar-account-sheet__portal,
.topbar-account-sheet__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.topbar-account-sheet__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: var(--metro-touch-target-min, 48px);
    padding: 0.65rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--mobile-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.topbar-account-sheet__item i {
    font-size: 1.15rem;
    width: 1.35rem;
    text-align: center;
    color: var(--mobile-text-muted);
}

.topbar-account-sheet__item:active {
    background: rgba(26, 86, 219, 0.06);
}

.topbar-account-sheet__item--danger {
    color: #b42318;
}

.topbar-account-sheet__item--danger i {
    color: #b42318;
}

.topbar-account-sheet__item .topbar-whats-new-badge {
    margin-left: auto;
}

/* Prevent horizontal overflow without creating a nested vertical scroller (clip ≠ hidden). */
.mobile-shell .page-body,
.mobile-shell .page-content {
    overflow-x: clip;
    overflow-y: visible;
    max-width: 100%;
}

/* Page headers and toolbars stack on narrow viewports */
@media (max-width: 768px) {
    .mobile-shell .modal.show {
        z-index: 1400;
        padding-bottom: max(0.5rem, var(--mobile-safe-bottom));
    }

    .mobile-shell .modal-backdrop {
        z-index: 1390;
    }

    .mobile-shell .page-body,
    .mobile-shell .page-content,
    .mobile-shell .portal-main,
    .mobile-shell .portal-body-container {
        padding-left: max(var(--mobile-page-gutter), env(safe-area-inset-left, 0px));
        padding-right: max(var(--mobile-page-gutter), env(safe-area-inset-right, 0px));
    }

    .mobile-shell .page-body > * + *,
    .mobile-shell .page-content > * + *,
    .mobile-shell .portal-main > * + * {
        margin-top: var(--mobile-section-gap);
    }

    .mobile-shell .row.g-3,
    .mobile-shell .row.g-4,
    .mobile-shell .metro-mobile-list,
    .mobile-shell .responsive-data-table__cards {
        --bs-gutter-y: var(--mobile-card-gap);
        row-gap: var(--mobile-card-gap);
    }

    .mobile-shell .dash-v2-card > .card-body > .dash-v2-card,
    .mobile-shell .card > .card-body > .card {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none !important;
    }

    .mobile-shell .page-header,
    .mobile-shell .metro-page-header,
    .mobile-shell .metro-page-shell-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem;
        margin-bottom: 1rem !important;
    }

    .mobile-shell .page-header h1,
    .mobile-shell .page-header h2,
    .mobile-shell .metro-page-header h1,
    .mobile-shell .metro-page-header h2 {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .mobile-shell .page-header-city-logo {
        width: auto;
        height: auto;
        max-width: 2.75rem;
        max-height: 2.75rem;
        object-fit: contain;
    }

    .mobile-shell .page-header-actions,
    .mobile-shell .metro-page-header__actions,
    .mobile-shell .page-header > .d-flex.flex-wrap,
    .mobile-shell .page-header > .d-flex.align-items-center.gap-2 {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }

    .mobile-shell .page-header-actions > .btn,
    .mobile-shell .page-header-actions > a.btn,
    .mobile-shell .metro-page-header__actions > .btn,
    .mobile-shell .metro-page-header__actions > a.btn,
    .mobile-shell .page-header > .d-flex.flex-wrap > .btn,
    .mobile-shell .page-header > .d-flex.flex-wrap > a.btn,
    .mobile-shell .page-header > .d-flex.align-items-center.gap-2 > .btn,
    .mobile-shell .page-header > .d-flex.align-items-center.gap-2 > a.btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        min-height: var(--metro-touch-target-min, 48px);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-shell .page-header-actions > .btn-group,
    .mobile-shell .page-header-actions > .dropdown,
    .mobile-shell .metro-page-header__actions > .btn-group,
    .mobile-shell .metro-page-header__actions > .dropdown,
    .mobile-shell .page-header > .d-flex.flex-wrap > .btn-group,
    .mobile-shell .page-header > .d-flex.flex-wrap > .dropdown,
    .mobile-shell .page-header > .d-flex.align-items-center.gap-2 > .btn-group,
    .mobile-shell .page-header > .d-flex.align-items-center.gap-2 > .dropdown {
        flex: 1 1 100%;
    }

    .mobile-shell .page-header-actions > .btn-group > .btn,
    .mobile-shell .page-header-actions > .dropdown > .btn,
    .mobile-shell .metro-page-header__actions > .btn-group > .btn,
    .mobile-shell .metro-page-header__actions > .dropdown > .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-shell .page-header > .d-flex.flex-wrap > .text-muted,
    .mobile-shell .page-header > .d-flex.align-items-center.gap-2 > .text-muted,
    .mobile-shell .page-header-actions > .text-muted {
        flex: 1 1 100%;
        margin-bottom: 0.15rem;
    }

    .mobile-shell .btn-toolbar,
    .mobile-shell .metro-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        max-width: 100%;
    }

    .mobile-shell .btn-toolbar .btn,
    .mobile-shell .metro-toolbar .btn {
        min-height: var(--metro-touch-target-min, 48px);
    }

    .mobile-shell .row.g-3 > [class*="col-md"],
    .mobile-shell .row.g-3 > [class*="col-lg"],
    .mobile-shell .row.g-2 > [class*="col-md"],
    .mobile-shell .row.g-2 > [class*="col-lg"],
    .mobile-shell .row.g-4 > [class*="col-md"],
    .mobile-shell .row.g-4 > [class*="col-lg"] {
        min-width: 0;
    }

    /* Awareness / alert banners */
    .mobile-shell .alert {
        padding: 0.85rem 0.95rem;
        border-radius: 12px;
    }

    .mobile-shell .alert .alert-heading {
        font-size: 1rem;
        line-height: 1.3;
    }

    .mobile-shell .action-center-awareness .alert,
    .mobile-shell .alert.shadow-sm {
        margin-bottom: 0.75rem !important;
    }

    .mobile-shell .alert > .d-flex.gap-3 {
        gap: 0.65rem !important;
    }

    .mobile-shell .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .mobile-shell .modal-content,
    .mobile-shell .offcanvas {
        max-height: calc(100dvh - 1rem);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-shell .modal-body,
    .mobile-shell .offcanvas-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-shell .modal-footer,
    .mobile-shell .offcanvas-footer,
    .mobile-shell .metro-sheet-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        flex: 0 0 auto;
        background: var(--mobile-surface);
        border-top: 1px solid var(--mobile-border);
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

    .mobile-shell .form-schema-submit-row,
    .mobile-shell .wizard-runner > .d-flex.flex-wrap.border-top {
        position: sticky;
        bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
        z-index: 20;
        margin-left: calc(-1 * var(--mobile-page-gutter));
        margin-right: calc(-1 * var(--mobile-page-gutter));
        padding: 0.75rem var(--mobile-page-gutter) max(0.75rem, env(safe-area-inset-bottom, 0px));
        background: var(--mobile-surface);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    }

    .mobile-shell .modal-dialog-centered {
        min-height: calc(100% - 1rem);
    }

    .mobile-shell .modal-dialog-scrollable .modal-body {
        max-height: min(70dvh, calc(100dvh - 12rem));
    }

    .mobile-shell .modal-fullscreen-sm-down .modal-body {
        max-height: none;
    }

    .mobile-shell .offcanvas-bottom {
        max-height: min(100dvh, 40rem);
        padding-bottom: var(--mobile-safe-bottom);
    }

    .mobile-shell .offcanvas-end.metro-sheet-capable,
    .mobile-shell .offcanvas-end.metro-filter-drawer {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100% !important;
        height: auto;
        max-height: min(100dvh, 40rem);
        --bs-offcanvas-width: 100%;
        --bs-offcanvas-height: auto;
        border-left: 0;
        border-top: 1px solid var(--metro-border, #e5e7eb);
        border-radius: var(--mobile-radius-card, 16px) var(--mobile-radius-card, 16px) 0 0;
        transform: none;
        padding-bottom: var(--mobile-safe-bottom, 0px);
    }

    .mobile-shell .offcanvas-end.metro-sheet-capable::before,
    .mobile-shell .offcanvas-end.metro-filter-drawer::before {
        content: "";
        display: block;
        width: 2.5rem;
        height: 0.28rem;
        margin: 0.45rem auto 0;
        border-radius: 999px;
        background: var(--metro-border-strong, #cbd5e1);
    }

    .mobile-shell .form-label {
        margin-bottom: 0.35rem;
    }

    .mobile-shell .card-body {
        padding: 0.9rem 1rem;
    }

    .mobile-shell .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.15rem;
    }

    .mobile-shell .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-shell .nav-tabs .nav-link {
        white-space: nowrap;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Sticky / fixed bottom CTAs clear the bottom nav */
.mobile-shell .mobile-shell-pad-bottom,
.mobile-shell .page-sticky-footer-actions,
.mobile-shell .metro-fixed-bottom-actions {
    padding-bottom: calc(0.75rem + var(--mobile-bottom-h) + var(--mobile-safe-bottom)) !important;
}

.mobile-shell .page-sticky-footer-actions,
.mobile-shell .metro-fixed-bottom-actions {
    position: sticky;
    bottom: 0;
    z-index: 50;
    background: linear-gradient(180deg, transparent, var(--mobile-bg) 28%);
    padding-top: 0.75rem;
}

.mobile-shell .table-responsive,
.mobile-shell .parks-admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.mobile-shell .mobile-connectivity-banner,
.tech-shell .mobile-connectivity-banner {
    white-space: nowrap;
}

.mobile-shell .mobile-connectivity-banner__text,
.tech-shell .mobile-connectivity-banner__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-shell .mobile-connectivity-banner__count,
.tech-shell .mobile-connectivity-banner__count {
    flex-shrink: 0;
    white-space: nowrap;
}

.mobile-shell .mobile-bottom-nav__item,
.mobile-shell .dock-more-btn {
    font-size: 12px;
}

/* Safety net: horizontal scroll for bare tables not wrapped in table-responsive */
.mobile-shell .page-body > table,
.mobile-shell .metro-card > table,
.mobile-shell .card > table,
.mobile-shell .card-body > table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-shell .page-body > table thead,
.mobile-shell .page-body > table tbody,
.mobile-shell .page-body > table tr,
.mobile-shell .metro-card > table thead,
.mobile-shell .metro-card > table tbody,
.mobile-shell .metro-card > table tr,
.mobile-shell .card > table thead,
.mobile-shell .card > table tbody,
.mobile-shell .card > table tr,
.mobile-shell .card-body > table thead,
.mobile-shell .card-body > table tbody,
.mobile-shell .card-body > table tr {
    display: table;
    width: 100%;
    table-layout: auto;
}

.mobile-shell .page-body > table,
.mobile-shell .metro-card > table,
.mobile-shell .card > table,
.mobile-shell .card-body > table {
    table-layout: auto;
}

/* Filter / offcanvas drawers on narrow viewports */
.offcanvas-end.metro-filter-drawer {
    --bs-offcanvas-width: min(480px, 95vw);
}

/* Tablet zone (769–991px): desktop shell — extra page padding */
@media (min-width: 769px) and (max-width: 991px) {
    .mobile-shell .page-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Public city landing hero — collapse height and stack CTAs on narrow viewports */
@media (max-width: 768px) {
    .city-landing-hero {
        min-height: 42vh;
    }

    .city-landing-hero__overlay {
        padding: 40px 16px;
    }

    .city-landing-hero__title {
        font-size: 1.85rem;
    }

    .city-landing-hero__cta {
        flex-direction: column;
        align-items: stretch;
    }

    .city-landing-hero__cta .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .city-landing-hero {
        min-height: 36vh;
    }

    .city-landing-hero__title {
        font-size: 1.5rem;
    }
}

/* ── Work orders — list + detail on narrow viewports ── */
@media (max-width: 768px) {
    .work-orders-index .page-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
        margin-bottom: 1rem !important;
    }

    .work-orders-index .page-header h2 {
        font-size: 1.35rem;
    }

    .work-orders-index .page-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .work-orders-index .page-header-actions .btn .btn-label {
        display: none;
    }

    .work-orders-index .work-orders-list-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
        padding: 0.85rem 1rem 1rem !important;
        background: var(--mobile-surface, #fff) !important;
    }

    .work-orders-index .work-orders-record-count {
        font-size: 0.78rem;
        font-weight: 750;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--mobile-text-muted, #6b7280);
    }

    .work-orders-index .work-orders-list-toolbar .btn-group {
        width: 100%;
    }

    .work-orders-index .work-orders-list-toolbar .btn-group .btn {
        flex: 1 1 0;
        min-height: var(--metro-touch-target-min, 48px);
    }

    .work-orders-index .work-orders-view-switch {
        background: var(--metro-surface-muted, #f1f5f9);
        border: 1px solid var(--mobile-border, #e5e7eb);
        border-radius: 14px;
        padding: 4px;
        overflow: hidden;
    }

    .work-orders-index .work-orders-view-switch .btn {
        border: 0 !important;
        border-radius: 10px !important;
        font-weight: 700;
        box-shadow: none !important;
    }

    .work-orders-index .work-orders-view-switch .btn-outline-primary {
        background: transparent;
        color: var(--mobile-text-muted, #6b7280);
    }

    .work-orders-index .work-orders-view-switch .btn-primary {
        background: var(--mobile-primary, #1a56db);
        color: #fff;
    }

    .work-orders-index .work-order-list-card {
        min-height: var(--metro-touch-target-min, 48px);
        transition: transform 0.12s ease, box-shadow 0.12s ease;
    }

    .work-orders-index .work-order-list-card:active {
        transform: scale(0.99);
    }

    .work-orders-index .work-order-list-card .card-body {
        padding: 1rem;
    }

    .work-orders-index .work-orders-filters .card-body {
        padding: 0.9rem 1rem;
    }

    .work-orders-index .work-orders-results {
        background: transparent;
        box-shadow: none !important;
    }

    .work-orders-index .work-orders-results > .card-header,
    .work-orders-index .work-orders-results > .card-footer {
        background: transparent !important;
        padding-left: 0;
        padding-right: 0;
    }

    .work-order-detail-page {
        --wo-visit-action-min: 56px;
        padding-top: 0.75rem !important;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .mobile-shell .work-order-detail-page {
        padding-bottom: var(--mobile-shell-content-pad, 1rem) !important;
    }

    .work-order-detail-page .work-order-detail-header-card .wo-detail-hero__body,
    .work-order-detail-page .work-order-detail-header-card .card-body {
        padding: 0.875rem 1rem 0.75rem !important;
    }

    .work-order-detail-page .work-order-detail-header-card .wo-detail-hero__title,
    .work-order-detail-page .work-order-detail-header-card h1.h3 {
        font-size: 1.15rem;
    }

    .work-order-detail-page .work-order-detail-header-card .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 0.35rem !important;
    }

    .work-order-detail-page .work-order-detail-header-actions {
        min-width: 0 !important;
        width: 100%;
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: stretch !important;
        gap: 0.5rem !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.15rem;
        scrollbar-width: none;
    }

    .work-order-detail-page .work-order-detail-header-actions::-webkit-scrollbar {
        display: none;
    }

    .work-order-detail-page .work-order-detail-header-actions > .d-flex {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
        width: max-content;
        max-width: none;
    }

    .work-order-detail-page .work-order-detail-header-actions .btn,
    .work-order-detail-page .work-order-detail-header-actions a.btn {
        flex: 0 0 auto;
        min-height: var(--metro-touch-target-min, 48px);
        padding: 0.5rem 0.9rem;
        border-radius: 999px;
        white-space: nowrap;
        font-weight: 600;
        font-size: 0.875rem;
    }

    .work-order-detail-page .work-order-detail-reload-btn {
        display: none;
    }

    .work-order-detail-tabs,
    .wo-detail-tabs .metro-tabs {
        position: sticky;
        top: var(--mobile-safe-top);
        z-index: 20;
        background: var(--bs-body-bg, #fff);
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
        margin-bottom: 0.75rem !important;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    .mobile-shell .wo-detail-overview__cta {
        bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
        padding-bottom: 0.5rem;
    }

    .mobile-shell .wo-detail-tabs,
    .mobile-shell .wo-detail-tabs .metro-tabs,
    .mobile-shell .work-order-detail-tabs {
        top: var(--mobile-safe-top);
    }

    .work-order-detail-tabs .nav-link,
    .wo-detail-tabs .metro-tab {
        min-height: var(--metro-touch-target-min, 48px);
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        font-size: 0.9rem;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .work-order-mobile-actions {
        display: flex;
        gap: 0.65rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.15rem 0.1rem 0.35rem;
        scrollbar-width: none;
    }

    .work-order-mobile-actions::-webkit-scrollbar {
        display: none;
    }

    .work-order-mobile-actions__btn {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        min-height: var(--metro-touch-target-min, 48px);
        padding: 0.5rem 0.85rem;
        border-radius: 999px;
        border: 1px solid var(--mobile-border, #e5e9f0);
        background: var(--mobile-surface, #fff);
        color: var(--mobile-text, #14213d);
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
    }

    .work-order-mobile-actions__btn--primary {
        background: var(--mobile-primary, #1a56db);
        border-color: var(--mobile-primary, #1a56db);
        color: #fff;
    }

    .work-order-mobile-actions__btn:active {
        opacity: 0.88;
    }
}

@media (min-width: 769px) {
    .work-order-detail-header-actions {
        min-width: 280px;
    }

    .work-order-mobile-actions {
        display: none;
    }
}

/* Fixed bottom action bars — pad above mobile shell bottom nav */
.mobile-shell-pad-bottom {
    padding-bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 12px);
}

/* Touch-first controls: keep tap targets ≥ 48px and relieve cramped clusters */
.mobile-shell .btn,
.mobile-shell .form-control,
.mobile-shell .form-select {
    min-height: var(--metro-touch-target-min, 48px);
}

.mobile-shell .btn-sm,
.mobile-shell .btn-xs,
.mobile-shell .btn-group-sm > .btn,
.mobile-shell .btn-group-sm > .btn-group > .btn {
    min-height: var(--metro-touch-target-min, 48px);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.25;
}

.mobile-shell .btn.py-0,
.mobile-shell .btn.px-1.py-0,
.mobile-shell .btn.btn-sm.py-0 {
    min-height: var(--metro-touch-target-min, 48px);
    min-width: var(--metro-touch-target-min, 48px);
    padding: 0.5rem 0.75rem !important;
}

.mobile-shell .btn-group,
.mobile-shell .btn-toolbar {
    gap: 0;
}

.mobile-shell .btn-toolbar {
    gap: 0.5rem;
}

.mobile-shell .btn-group-sm {
    gap: 0;
}

.mobile-shell .form-select-sm,
.mobile-shell .form-control-sm {
    min-height: var(--metro-touch-target-min, 48px);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: max(16px, 0.9375rem);
}

.mobile-shell .dropdown-item {
    min-height: var(--metro-touch-target-min, 48px);
    display: flex;
    align-items: center;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.mobile-shell .tech-btn.py-0,
.mobile-shell .tech-btn.btn-sm {
    min-height: var(--tech-tap, 56px);
    padding: 10px 16px !important;
}

.mobile-shell .d-grid.gap-1 {
    gap: 0.5rem !important;
}

.mobile-shell .d-flex.gap-1:has(> .btn),
.mobile-shell .d-flex.gap-1:has(> a.btn),
.mobile-shell .d-flex.flex-wrap.gap-1:has(> .btn) {
    gap: 0.5rem !important;
}

.mobile-shell .page-sticky-footer-actions,
.mobile-shell .metro-fixed-bottom-actions {
    position: sticky;
    bottom: calc(var(--mobile-bottom-h, 64px) + var(--mobile-safe-bottom, 0px));
    z-index: 100;
    padding: 0.75rem 0;
    padding-bottom: 0.75rem;
    margin-bottom: 0;
    background: linear-gradient(to top, var(--mobile-bg, #f3f5f8) 70%, transparent);
}

/* Messages full-page composer + mobile collect CTAs clear bottom nav */
.mobile-shell .metro-msg-panel--fullpage {
    min-height: calc(100dvh - var(--topbar-height, 56px) - var(--mobile-safe-top) - var(--mobile-shell-content-pad));
    padding-bottom: 0.5rem;
}

.mobile-shell .metro-msg-compose {
    position: sticky;
    bottom: calc(var(--mobile-bottom-h, 64px) + var(--mobile-safe-bottom, 0px));
    z-index: 90;
    background: var(--mobile-surface, #fff);
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

.mobile-shell .mobile-collect-page .d-grid.gap-2 > .btn {
    min-height: 48px;
}

.responsive-data-table__cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.responsive-data-table__cards .card {
    border-radius: 12px;
}

.responsive-data-table__cards .card-body {
    padding: 1rem;
}

/* ── Cross-batch shell polish (auth, admin, fire, parks, golf, LMS, GIS) ── */
.mobile-shell-error {
    margin: 1.5rem 1rem;
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
    background: var(--mobile-surface, #fff);
    border: 1px solid var(--mobile-border, #e5e7eb);
    text-align: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.mobile-shell-error__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, #dc2626 12%, transparent);
    color: #dc2626;
    font-size: 1.5rem;
}

.mobile-shell-error .btn {
    min-height: var(--metro-touch-target-min, 48px);
    min-width: 8rem;
}

@media (max-width: 768px) {
    .mobile-shell .login-page {
        /* Dead-centering a short card in a tall phone viewport (notch to home indicator)
           left a large empty band above it. Anchor right under the safe area instead.
           .login-bg (the outer wrapper) already supplies safe-area-aware padding and
           zeroes .login-page's own padding — re-adding padding here (mobile.css loads
           after metro.css, so it would win the cascade) doubled the top gap. */
        align-items: flex-start;
    }

    .mobile-shell .login-page,
    .mobile-shell .login-bg .card {
        margin-left: 0;
        margin-right: 0;
        border-radius: 14px;
    }

    .mobile-shell .login-page .btn,
    .mobile-shell .login-bg .btn {
        min-height: var(--metro-touch-target-min, 48px);
    }

    .mobile-shell .admin-page .row > [class*="col-md-"],
    .mobile-shell .admin-page .row > [class*="col-lg-"],
    .mobile-shell [class*="admin-"] .row.g-3 > [class*="col-md"],
    .mobile-shell [class*="admin-"] .row.g-3 > [class*="col-lg"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .mobile-shell .fire-cal-week,
    .mobile-shell .fire-cal-week-mobile,
    .mobile-shell [class*="fire-schedule"] {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-shell .lms-course-layout,
    .mobile-shell .lms-lesson,
    .mobile-shell [class*="lms-"] .row {
        max-width: 100%;
    }

    .mobile-shell .lms-lesson .btn,
    .mobile-shell [class*="lms-"] .btn {
        min-height: 44px;
    }

    .mobile-shell .map-toolbar,
    .mobile-shell .gis-toolbar,
    .mobile-shell .leaflet-control-container .leaflet-bar a {
        min-width: 40px;
        min-height: 40px;
    }

    .mobile-shell .legislative-workspace,
    .mobile-shell .grants-dashboard {
        padding-left: 0;
        padding-right: 0;
    }

    .mobile-shell .grants-dashboard .card,
    .mobile-shell .legislative-workspace .card {
        border-radius: 12px;
    }

    .mobile-shell .golf-member-portal .page-header,
    .mobile-shell .golf-admin .page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem;
    }

    .mobile-shell .checkin-shell,
    .mobile-shell .golf-pos-shell,
    .mobile-shell .embed-root {
        overflow-x: hidden;
        max-width: 100%;
    }

    .mobile-shell .checkin-shell .btn,
    .mobile-shell .golf-pos-shell .btn {
        min-height: 48px;
    }
}

.mobile-shell .action-center-awareness {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.mobile-shell .action-center-awareness > .alert {
    margin-bottom: 0 !important;
}

.mobile-shell .messages-page .page-header p {
    max-width: 40rem;
}

/* Overlays must clear the bottom nav (z-index 1200) and iOS/MAUI chrome. */
.mobile-shell .metro-slide-panel {
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: var(--mobile-safe-bottom);
}

.mobile-shell .metro-slide-panel .card-footer {
    flex-shrink: 0;
    padding-bottom: max(0.75rem, var(--mobile-safe-bottom));
}

.mobile-shell .card.position-fixed.top-0,
.mobile-shell .card.position-fixed.end-0.h-100 {
    z-index: 1300;
    height: 100dvh !important;
    max-height: 100dvh;
    padding-bottom: var(--mobile-safe-bottom);
    overflow-y: auto;
}

.mobile-shell .metro-map-detail-sheet-backdrop {
    z-index: 1250;
}

.mobile-shell .metro-map-detail-sheet {
    z-index: 1300;
    max-height: min(50dvh, calc(100dvh - var(--mobile-bottom-h) - var(--mobile-safe-bottom) - 4rem));
    padding: 12px 16px calc(12px + var(--mobile-safe-bottom));
}

.mobile-shell .metro-map-canvas {
    height: min(360px, 40dvh) !important;
    min-height: 0 !important;
    max-height: 40dvh;
}

.mobile-shell .portal-preview-banner-inner {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.mobile-shell .portal-preview-banner-actions {
    margin-left: 0;
}

.mobile-shell .dashboard-experience,
.mobile-shell .fire-dashboard-experience {
    flex-wrap: wrap;
    justify-content: space-between;
}

.mobile-shell .dashboard-experience__button,
.mobile-shell .fire-dashboard-experience__button {
    min-height: var(--metro-touch-target-min, 48px);
}

.mobile-shell .dash-v2-refresh,
.mobile-shell .dash-v2-hero-cta,
.mobile-shell .fire-v2-refresh,
.mobile-shell .insp-v2-refresh,
.mobile-shell .cd-v2-refresh {
    min-height: var(--metro-touch-target-min, 48px);
    min-width: var(--metro-touch-target-min, 48px);
}

/* ── Round 2: motion, chrome, empty/loading, type ─────────────────────────── */
@keyframes mobile-page-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes mobile-item-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes mobile-success-in {
    from { opacity: 0; transform: translateY(4px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.mobile-shell .page-body,
.mobile-shell .page-content,
.mobile-shell .login-page {
    animation: mobile-page-in 320ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both;
}

.mobile-shell .list-group-item,
.mobile-shell .responsive-data-table__cards .card,
.mobile-shell .tech-job-card {
    animation: mobile-item-in 280ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both;
}

.mobile-shell .list-group-item:nth-child(1),
.mobile-shell .responsive-data-table__cards .card:nth-child(1) { animation-delay: 30ms; }
.mobile-shell .list-group-item:nth-child(2),
.mobile-shell .responsive-data-table__cards .card:nth-child(2) { animation-delay: 60ms; }
.mobile-shell .list-group-item:nth-child(3),
.mobile-shell .responsive-data-table__cards .card:nth-child(3) { animation-delay: 90ms; }
.mobile-shell .list-group-item:nth-child(4),
.mobile-shell .responsive-data-table__cards .card:nth-child(4) { animation-delay: 120ms; }

.mobile-shell .alert-success {
    animation: mobile-success-in 280ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

.mobile-shell .btn:active:not(:disabled) {
    transform: scale(0.98);
}

.mobile-shell .btn:disabled,
.mobile-shell .btn.disabled {
    opacity: 0.45;
}

.mobile-shell .btn:focus-visible,
.mobile-shell .form-control:focus-visible,
.mobile-shell .form-select:focus-visible,
.mobile-shell .mobile-bottom-nav__item:focus-visible,
.mobile-shell .dock-more-btn:focus-visible {
    outline: 2px solid var(--mobile-primary);
    outline-offset: 2px;
}

.mobile-bottom-nav__item i {
    padding: 4px 11px;
    border-radius: 12px;
    transition: background-color var(--duration-ui, 200ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

.mobile-bottom-nav__item.active i {
    background: color-mix(in srgb, var(--mobile-primary) 16%, transparent);
}

.mobile-pull-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-pull-hint__spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--mobile-border);
    border-top-color: var(--mobile-primary);
    opacity: 0.35;
    transform: scale(calc(0.7 + (var(--pull-progress, 0) * 0.45)));
}

.mobile-pull-hint--armed .mobile-pull-hint__spinner,
.mobile-pull-hint--refreshing .mobile-pull-hint__spinner {
    opacity: 1;
}

.mobile-pull-hint--refreshing .mobile-pull-hint__spinner {
    animation: metro-spin 0.65s linear infinite;
}

.mobile-shell .metro-empty {
    padding: 2.75rem 1.25rem;
}

.mobile-shell .metro-empty .empty-icon,
.mobile-shell .metro-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    background: color-mix(in srgb, var(--mobile-primary) 12%, transparent);
    color: var(--mobile-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 1;
}

.mobile-shell .metro-empty .empty-icon i,
.mobile-shell .metro-empty__icon i {
    font-size: 1.85rem;
    line-height: 1;
}

.mobile-shell .metro-empty__title,
.mobile-shell .metro-empty .fw-semibold {
    color: var(--mobile-text);
    font-size: 1.05rem;
}

.mobile-shell .metro-empty .btn,
.mobile-shell .metro-empty .btn-sm {
    min-height: var(--metro-touch-target-min, 48px);
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.mobile-shell .metro-loading-spinner .spinner-border {
    width: 2.35rem;
    height: 2.35rem;
    border-width: 0.22rem;
}

.mobile-shell .metro-load-error {
    border-radius: 14px;
}

.mobile-shell .metro-skeleton-bar {
    border-radius: 8px;
}

.mobile-shell .metro-card-skeleton-card {
    border-radius: 16px;
}

.mobile-shell .dash-v2--refreshing,
.mobile-shell .fire-my-schedule--refreshing {
    opacity: 0.94;
}

.mobile-shell .card {
    border-radius: 14px;
}

.mobile-shell--ios .card:not([class*="border-"]) {
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.07);
}

.mobile-shell--android .card:not([class*="border-"]) {
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14), 0 3px 8px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .mobile-shell--ios .card:not([class*="border-"]),
:root[data-theme="dark"] .mobile-shell--android .card:not([class*="border-"]) {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: var(--mobile-surface);
}

.mobile-shell .list-group-item {
    border-left: none;
    border-right: none;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.mobile-shell .list-group-item:first-child {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.mobile-shell .list-group-item:last-child {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.mobile-nav-editor-sheet-header::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: var(--mobile-border);
    margin: 0 auto 8px;
}

.mobile-nav-editor-sheet-header::before {
    position: absolute;
    left: 50%;
    top: 8px;
    margin: 0;
    transform: translateX(-50%);
}

.mobile-nav-editor-sheet-header {
    position: relative;
    padding-top: 18px;
}

@media (max-width: 768px) {
    .mobile-shell .page-header h1,
    .mobile-shell .page-header h2,
    .mobile-shell .metro-page-header h1,
    .mobile-shell .metro-page-header h2 {
        font-size: 1.55rem;
        font-weight: 750;
        letter-spacing: -0.03em;
        color: var(--mobile-text);
    }

    .mobile-shell .page-header p,
    .mobile-shell .page-header .text-muted,
    .mobile-shell .metro-page-header p {
        font-size: 0.92rem;
        line-height: 1.4;
    }

    .mobile-shell .login-card {
        padding: 28px 22px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-shell .page-body,
    .mobile-shell .page-content,
    .mobile-shell .login-page,
    .mobile-shell .list-group-item,
    .mobile-shell .responsive-data-table__cards .card,
    .mobile-shell .tech-job-card,
    .mobile-shell .alert-success {
        animation: none;
    }

    .mobile-shell .btn:active:not(:disabled) {
        transform: none;
    }

    .mobile-shell .wo-mobile-row {
        animation: none;
    }

    .mobile-shell *,
    .mobile-shell *::before,
    .mobile-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ── Mobile visual language: records list + dashboard (MAUI / phone shell) ── */
.wo-list-number {
    color: var(--metro-primary, #1a56db);
    background: none;
    font-family: inherit;
    font-weight: 750;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.mobile-shell .work-orders-index code {
    color: var(--metro-primary, #1a56db);
    background: none;
    font-family: inherit;
    font-weight: 750;
}

.mobile-shell .work-orders-index .table-danger > * {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    background-color: transparent !important;
    box-shadow: none !important;
}

.work-orders-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.15rem 0 0.35rem;
}

.work-orders-mobile-list--cards {
    gap: 0.85rem;
}

.wo-mobile-list__select-all {
    display: flex;
    align-items: center;
    min-height: var(--metro-touch-target-min, 48px);
    padding: 0 0.15rem;
}

.wo-mobile-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
    position: relative;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: var(--mobile-surface, #fff);
    border: 1px solid var(--mobile-border, #e5e7eb);
    color: var(--mobile-text, #111827);
    min-height: 72px;
    animation: mobile-item-in 280ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)) both;
}

.wo-mobile-row--card {
    grid-template-columns: 1fr;
    padding: 1.1rem 1.05rem 1.05rem;
}

.wo-mobile-row--overdue {
    border-color: color-mix(in srgb, #c81e1e 28%, var(--mobile-border, #e5e7eb));
    box-shadow: inset 3px 0 0 #c81e1e;
}

.wo-mobile-row--selected {
    border-color: color-mix(in srgb, var(--mobile-primary, #1a56db) 45%, var(--mobile-border, #e5e7eb));
    background: color-mix(in srgb, var(--mobile-primary, #1a56db) 6%, var(--mobile-surface, #fff));
}

.wo-mobile-row:active {
    transform: scale(0.992);
}

.wo-mobile-row__check {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 48px;
    min-height: 48px;
    margin: -0.25rem 0 0 -0.25rem;
    color: var(--mobile-text-muted, #6b7280);
    font-size: 0.82rem;
    font-weight: 650;
}

.wo-mobile-row__check--label {
    justify-content: flex-start;
    width: auto;
    margin: 0;
}

.wo-mobile-check {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.wo-mobile-check__box {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1.5px solid var(--mobile-border, #d1d5db);
    background: var(--mobile-surface, #fff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.wo-mobile-check:checked + .wo-mobile-check__box {
    background: var(--mobile-primary, #1a56db);
    border-color: var(--mobile-primary, #1a56db);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l2.8 2.8 6.2-6.4'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}

.wo-mobile-check:focus-visible + .wo-mobile-check__box {
    outline: 2px solid var(--mobile-primary, #1a56db);
    outline-offset: 2px;
}

.wo-mobile-row__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wo-mobile-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.wo-mobile-row__status {
    flex-shrink: 0;
}

.wo-mobile-row__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--mobile-text, #111827);
}

.wo-mobile-row__address {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    color: var(--mobile-text-muted, #6b7280);
    font-size: 0.86rem;
    line-height: 1.35;
}

.wo-mobile-row__address i {
    margin-top: 0.12rem;
    color: var(--mobile-primary, #1a56db);
}

.wo-mobile-row__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.wo-mobile-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wo-mobile-chip--overdue {
    background: #fef2f2;
    color: #991b1b;
}

.wo-mobile-row__footer {
    color: var(--mobile-text-muted, #6b7280);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.wo-mobile-row__restore {
    position: relative;
    z-index: 2;
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--mobile-border, #e5e7eb);
    background: var(--mobile-surface, #fff);
    color: #057a55;
}

.mobile-shell--ios .wo-mobile-row {
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.07);
}

.mobile-shell--android .wo-mobile-row {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14), 0 3px 8px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .wo-mobile-row {
    background: var(--mobile-surface, #141418);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .wo-mobile-chip--overdue {
    background: #3f1d1d;
    color: #fecaca;
}

:root[data-theme="dark"] .wo-mobile-row--selected {
    background: color-mix(in srgb, var(--mobile-primary, #1a56db) 16%, var(--mobile-surface, #141418));
}

.work-order-list-card--overdue {
    box-shadow: inset 3px 0 0 #c81e1e, var(--metro-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

/* Dashboard: force stacked premium cards on the native phone shell. */
.mobile-shell .dash-v2-grid-shell .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem;
}

.mobile-shell .dash-v2-grid-shell .dashboard-grid-item {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
}

.mobile-shell .dash-v2-grid-shell .dashboard-grid-item-inner {
    container-type: normal;
    overflow: visible;
}

.mobile-shell .dash-v2-hero {
    border-radius: 1.15rem;
    padding: 1.15rem 1.15rem 1.2rem;
    min-height: 0;
}

.mobile-shell .dash-v2-hero h1 {
    font-size: 1.7rem;
    line-height: 1.15;
}

.mobile-shell .dash-v2-hero__numbers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.mobile-shell .dash-v2-hero__numbers > div {
    min-width: 0;
    min-height: 64px;
}

.mobile-shell .dash-v2-card {
    border-radius: 1.05rem;
    padding: 1.1rem 1.05rem;
}

.mobile-shell .dash-v2-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.mobile-shell .dash-v2-shortcuts > a,
.mobile-shell .dash-v2-shortcuts > button {
    min-height: 84px;
    border-radius: 0.9rem;
    font-size: 0.78rem;
}

.mobile-shell .dash-v2-shortcuts span {
    display: block;
}

.mobile-shell .dash-v2-clear {
    min-height: 72px;
    border-radius: 0.9rem;
}

/* Mayor / executive: phone-first brief for on-the-move leadership. */
.mobile-shell .dash-v2--executive .dash-v2-hero__numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-shell .dash-v2--executive .dash-v2-hero__numbers > div {
    min-height: 72px;
}

.mobile-shell .dash-v2--executive .dash-v2-refresh--hero-secondary {
    display: none;
}

.mobile-shell .dash-v2--executive .dash-v2-quick-add-launch {
    min-height: var(--metro-touch-target-min, 48px);
    padding-inline: 0.85rem;
}

.mobile-shell .dash-v2--executive .dash-v2-action-list a {
    min-height: 64px;
    border-radius: 0.85rem;
}

.mobile-shell .dash-v2--executive .dash-v2-dept-row,
.mobile-shell .dash-v2--executive .dash-v2-rows > a {
    min-height: 60px;
}

.mobile-shell .dash-v2--executive .executive-positions-assign__field .form-select,
.mobile-shell .dash-v2--executive .executive-positions-assign__save {
    min-height: var(--metro-touch-target-min, 48px);
    font-size: 1rem;
}

.mobile-shell .dash-v2--executive .metro-map-canvas--embedded {
    height: min(40vh, 220px) !important;
}

.mobile-shell .dash-v2--executive .metro-map-filters-disclosure > summary {
    min-height: var(--metro-touch-target-min, 48px);
}

.mobile-shell .dash-v2--executive .dash-v2-chip-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.mobile-shell .dash-v2--executive .dash-v2-chip-row > a,
.mobile-shell .dash-v2--executive .dash-v2-chip-row > button {
    min-height: var(--metro-touch-target-min, 48px);
    justify-content: center;
    width: 100%;
}

.mobile-shell .dash-v2--executive .dashboard-grid-toolbar .btn {
    min-height: var(--metro-touch-target-min, 48px);
}

.mobile-shell .dashboard-experience {
    background: var(--mobile-surface, #fff);
    border: 1px solid var(--mobile-border, #e5e7eb);
    border-radius: 14px;
    padding: 0.4rem 0.5rem;
    margin: 0 0 1rem;
}

.mobile-shell .dashboard-experience__options {
    background: var(--metro-surface-muted, #f1f5f9);
}

.mobile-shell .dashboard-experience__button.is-active {
    background: var(--mobile-primary, #1a56db);
    color: #fff;
    box-shadow: none;
}

:root[data-theme="dark"] .mobile-shell .dashboard-experience {
    background: var(--mobile-surface, #141418);
}

@media (max-width: 768px) {
    .mobile-shell .page-header,
    .mobile-shell .metro-page-header {
        margin-bottom: 1.1rem !important;
        gap: 0.75rem;
    }

    .mobile-shell .page-body > .card.border-0.shadow-sm.mb-3,
    .mobile-shell .work-orders-filters {
        border-radius: var(--mobile-radius-card, 16px);
    }
}

/* ── Shared mobile design system (all .mobile-shell destinations) ─────────── */
.mobile-shell {
    --bs-border-radius: var(--mobile-radius-control, 12px);
}

.mobile-shell .page-body {
    font-size: var(--mobile-type-body, 0.95rem);
}

.mobile-shell .metro-page-shell-header h1,
.mobile-shell .inspection-page-header h2,
.mobile-shell .fire-page-header h2,
.mobile-shell .page-body > h2 {
    font-size: var(--mobile-type-title, 1.55rem);
    font-weight: 750;
    letter-spacing: -0.03em;
}

.mobile-shell .metro-page-shell-filters > .card,
.mobile-shell .catalog-list-filter-bar,
.mobile-shell .page-body > .card.border-0.shadow-sm {
    border-radius: var(--mobile-radius-card, 16px);
}

.mobile-shell .inspection-related-links,
.mobile-shell .fire-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mobile-shell .inspection-related-link,
.mobile-shell .fire-related-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.3rem 0.7rem;
    border-radius: var(--mobile-radius-pill, 999px);
    background: var(--metro-surface-muted, #f1f5f9);
    border: 1px solid var(--mobile-border, #e5e7eb);
    color: var(--mobile-text, #111827);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-shell .inspection-filter-chips,
.mobile-shell .metro-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--metro-surface-muted, #f1f5f9);
    border: 1px solid var(--mobile-border, #e5e7eb);
}

.mobile-shell .inspection-filter-chips .btn {
    border: 0 !important;
    border-radius: 10px !important;
    font-weight: 700;
    box-shadow: none !important;
}

.mobile-shell .nav-tabs {
    gap: 0.35rem;
    border-bottom: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.mobile-shell .nav-tabs .nav-link {
    border: 1px solid var(--mobile-border, #e5e7eb);
    border-radius: var(--mobile-radius-pill, 999px);
    min-height: 44px;
    padding: 0.45rem 0.9rem;
    white-space: nowrap;
    color: var(--mobile-text-muted, #6b7280);
    font-weight: 700;
}

.mobile-shell .nav-tabs .nav-link.active {
    background: var(--mobile-primary, #1a56db);
    border-color: var(--mobile-primary, #1a56db);
    color: #fff;
}

.mobile-shell .form-check {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.mobile-shell .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0;
}

.mobile-shell .offcanvas,
.mobile-shell .modal-content,
.mobile-shell .metro-filter-drawer {
    border-radius: var(--mobile-radius-card, 16px) var(--mobile-radius-card, 16px) 0 0;
}

.mobile-shell .kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

/* List-group → stacked cards (queue, meetings, open shifts, action center). */
.mobile-shell .list-group.list-group-flush {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: transparent;
}

.mobile-shell .list-group.list-group-flush .list-group-item {
    border: 1px solid var(--mobile-border, #e5e7eb);
    border-radius: var(--mobile-radius-card, 16px) !important;
    background: var(--mobile-surface, #fff);
    padding: 0.95rem 1rem !important;
}

.mobile-shell--ios .list-group.list-group-flush .list-group-item {
    border-color: transparent;
    box-shadow: var(--mobile-elev-ios);
}

.mobile-shell--android .list-group.list-group-flush .list-group-item {
    box-shadow: var(--mobile-elev-android);
}

.mobile-shell .card > .list-group.list-group-flush {
    padding: 0.65rem;
}

.mobile-shell .card:has(> .list-group.list-group-flush) {
    background: transparent;
    box-shadow: none !important;
}

.metro-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

/* Shared stacked row (records + legislative + generic lists). */
.metro-mobile-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: var(--mobile-radius-card, 16px);
    background: var(--mobile-surface, #fff);
    border: 1px solid var(--mobile-border, #e5e7eb);
    color: var(--mobile-text, #111827);
    min-height: 72px;
    cursor: pointer;
    text-align: left;
    appearance: none;
    font: inherit;
}

.metro-mobile-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.metro-mobile-row__title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.metro-mobile-row__meta {
    color: var(--mobile-text-muted, #6b7280);
    font-size: 0.86rem;
}

.metro-mobile-row__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.metro-mobile-row__chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.15rem 0.55rem;
    border-radius: var(--mobile-radius-pill, 999px);
    background: var(--metro-surface-muted, #f1f5f9);
    color: var(--mobile-text, #111827);
    font-size: 0.72rem;
    font-weight: 700;
}

.metro-mobile-row__chip--warn {
    background: #fef3c7;
    color: #92400e;
}

.metro-mobile-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.metro-mobile-row:active {
    transform: scale(0.992);
}

.mobile-shell--ios .metro-mobile-row,
.mobile-shell--ios .wo-mobile-row {
    border-color: transparent;
    box-shadow: var(--mobile-elev-ios);
}

.mobile-shell--android .metro-mobile-row,
.mobile-shell--android .wo-mobile-row {
    box-shadow: var(--mobile-elev-android);
}

/* Phone: stack list tables into cards. Calendars / vote grids / schedulers excluded. */
@media (max-width: 768px) {
    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])),
    .mobile-shell table.metro-stack-table {
        width: 100%;
    }

    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])) thead,
    .mobile-shell table.metro-stack-table thead {
        display: none;
    }

    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])),
    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])) tbody,
    .mobile-shell table.metro-stack-table,
    .mobile-shell table.metro-stack-table tbody {
        display: block;
        width: 100%;
    }

    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])) tbody tr,
    .mobile-shell table.metro-stack-table tbody tr {
        display: block;
        width: 100%;
        margin: 0 0 0.7rem;
        padding: 0.9rem 1rem;
        border: 1px solid var(--mobile-border, #e5e7eb);
        border-radius: var(--mobile-radius-card, 16px);
        background: var(--mobile-surface, #fff);
        box-shadow: var(--mobile-elev-ios);
    }

    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])) tbody td,
    .mobile-shell table.metro-stack-table tbody td {
        display: block;
        width: 100%;
        border: 0;
        padding: 0.18rem 0;
        background: transparent !important;
        box-shadow: none !important;
    }

    .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table):not(.legislative-agenda-grid):not(:has(input[type="radio"])) tbody td:first-child,
    .mobile-shell table.metro-stack-table tbody td:first-child {
        font-weight: 750;
        color: var(--mobile-text, #111827);
    }

    .mobile-shell .work-orders-desktop-table {
        display: none !important;
    }
}

:root[data-theme="dark"] .mobile-shell .list-group.list-group-flush .list-group-item,
:root[data-theme="dark"] .metro-mobile-row,
:root[data-theme="dark"] .mobile-shell table.metro-stack-table tbody tr {
    background: var(--mobile-surface, #141418);
    box-shadow: var(--mobile-elev-dark);
}

:root[data-theme="dark"] .metro-mobile-row__chip {
    background: var(--metro-surface-muted, #1a1a1f);
    color: var(--mobile-text, #f3f4f6);
}

:root[data-theme="dark"] .metro-mobile-row__chip--warn {
    background: #3f2e12;
    color: #fde68a;
}

:root[data-theme="dark"] .mobile-shell .inspection-related-link,
:root[data-theme="dark"] .mobile-shell .fire-related-link,
:root[data-theme="dark"] .mobile-shell .inspection-filter-chips,
:root[data-theme="dark"] .mobile-shell .metro-segmented {
    background: var(--metro-surface-muted, #1a1a1f);
}

@media (max-width: 768px) {
    :root[data-theme="dark"] .mobile-shell .table-responsive:not(.metro-keep-table):not(.metro-scheduler-scroll) > table.table:not(.metro-keep-table) tbody tr {
        background: var(--mobile-surface, #141418);
        box-shadow: var(--mobile-elev-dark);
    }
}

/* Forms, alerts, badges, sheets, search — shared language for every destination. */
.mobile-shell .form-control,
.mobile-shell .form-select,
.mobile-shell .input-group-text {
    border-radius: var(--mobile-radius-control, 12px);
    border-color: var(--mobile-border, #e5e7eb);
}

.mobile-shell .alert {
    border-radius: var(--mobile-radius-card, 16px);
    border: 0;
}

.mobile-shell .badge {
    border-radius: var(--mobile-radius-pill, 999px);
    font-weight: 700;
}

.mobile-shell .card-header {
    border-radius: var(--mobile-radius-card, 16px) var(--mobile-radius-card, 16px) 0 0;
    background: var(--mobile-surface, #fff);
}

.mobile-shell .page-body > .d-flex.flex-wrap.justify-content-between > .h4,
.mobile-shell .page-body > .d-flex.align-items-center.justify-content-between h4,
.mobile-shell .page-body > .d-flex.flex-wrap.justify-content-between h2,
.mobile-shell .page-header h2,
.mobile-shell .page-header .h4 {
    font-size: var(--mobile-type-title, 1.55rem);
    font-weight: 750;
    letter-spacing: -0.03em;
}

.mobile-shell .metro-command-palette-panel,
.mobile-shell .metro-slide-panel,
.mobile-shell .topbar-account-sheet {
    border-radius: var(--mobile-radius-card, 16px);
}

.mobile-shell .metro-command-palette-row,
.mobile-shell .metro-command-palette-input {
    min-height: var(--metro-touch-target-min, 48px);
}

.mobile-shell .mobile-shell-error {
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.mobile-shell .work-order-detail-header,
.mobile-shell .legislative-item-header {
    border-radius: var(--mobile-radius-card, 16px);
}

.mobile-shell .catalog-list-filter-bar input,
.mobile-shell input[type="search"] {
    border-radius: var(--mobile-radius-control, 12px);
}

:root[data-theme="dark"] .mobile-shell .card-header.bg-white,
:root[data-theme="dark"] .mobile-shell .card-footer.bg-white {
    background: var(--mobile-surface, #141418) !important;
}

/* Fire home + My Schedule — legislative-quality stacked chrome on the phone. */
.mobile-shell .fire-v2-stations,
.mobile-shell .fire-v2-name-list,
.mobile-shell .fire-v2-open-day__alerts {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mobile-shell .fire-v2-station,
.mobile-shell .fire-v2-open-row,
.mobile-shell .fire-v2-person-chip {
    min-height: 52px;
}

.mobile-shell .fire-page-header-actions {
    width: 100%;
}

.mobile-shell .fire-my-schedule-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.mobile-shell .fire-my-schedule-actions--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-shell .fire-page-header-actions > .btn,
.mobile-shell .fire-page-header-actions > a.btn,
.mobile-shell .fire-my-schedule-actions > .btn,
.mobile-shell .fire-my-schedule-actions > a.btn,
.mobile-shell .fire-my-schedule-more {
    width: 100%;
    min-width: 0;
}

.mobile-shell .fire-my-schedule-more > summary.btn {
    width: 100%;
}

.mobile-shell .fire-page-header-actions > .btn,
.mobile-shell .fire-my-schedule-actions > .btn,
.mobile-shell .fire-my-schedule-more > summary.btn {
    min-height: var(--metro-touch-target-min, 48px);
    border-radius: var(--mobile-radius-control, 12px);
    font-weight: 700;
}

.mobile-shell .fire-my-schedule-nav__controls {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mobile-shell .fire-my-view-modes,
.mobile-shell .fire-my-period-nav,
.mobile-shell .metro-segmented.fire-my-view-modes,
.mobile-shell .metro-segmented.fire-my-period-nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-shell .fire-my-view-modes > .btn,
.mobile-shell .fire-my-view-modes > .fire-my-view-more > summary.btn,
.mobile-shell .fire-my-period-nav > .btn {
    flex: 1 0 auto;
    min-height: var(--metro-touch-target-min, 48px);
    padding-inline: 0.7rem;
}

.mobile-shell .fire-my-view-more {
    position: relative;
    flex: 1 0 auto;
}

.mobile-shell .fire-my-view-more > summary.btn {
    width: 100%;
}

.mobile-shell .fire-my-day-time {
    font-size: 1.02rem;
    font-weight: 750;
}

.mobile-shell .fire-my-day-where {
    font-size: 0.92rem;
}

/* View-as: one compact bar. The in-page hint duplicates the sticky banner. */
.mobile-shell .portal-preview-banner-inner {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    gap: 0.4rem;
}

.mobile-shell .portal-preview-banner-text {
    font-size: 0.78rem;
    line-height: 1.3;
}

.mobile-shell .portal-preview-banner-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-left: 0;
}

.mobile-shell .portal-preview-banner-actions .btn {
    min-height: 40px;
    width: 100%;
    font-weight: 700;
}

.mobile-shell .preview-readonly-shell > .alert {
    display: none;
}

@media (max-width: 768px) {
    .file-drop-zone,
    .mobile-shell .file-drop-zone {
        min-height: var(--metro-touch-target-min, 48px);
        padding: 0.9rem 0.8rem;
        border-radius: var(--mobile-radius-control, 12px);
    }

    .file-drop-zone-hint,
    .mobile-shell .file-drop-zone-hint {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--mobile-text, var(--metro-text));
    }

    .file-drop-zone .form-control,
    .mobile-shell .file-drop-zone .form-control {
        min-height: var(--metro-touch-target-min, 48px);
    }

    .wo-public-status-facts {
        grid-template-columns: 1fr;
    }

    .wo-next-step {
        min-height: var(--metro-touch-target-min, 48px);
        padding-inline: 0.85rem;
        font-weight: 700;
    }

    .mobile-shell .fire-my-schedule-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}