.app-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: var(--vr-sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 100dvh;
  min-height: 640px;
  flex-direction: column;
  padding: 14px 12px;
  overflow: hidden;
  color: rgba(255,255,255,0.9);
  background: var(--vr-gradient-sidebar);
}

.brand { display: flex; min-height: 46px; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255,255,255,0.16); border-radius: 10px; color: #fff; background: linear-gradient(135deg, #2c77ec, #6b58d1); font-size: 15px; font-weight: 850; box-shadow: 0 7px 16px rgba(0,0,0,0.15); }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 15px; letter-spacing: -0.015em; }
.brand-copy small { margin-top: 1px; color: rgba(255,255,255,0.55); font-size: 9px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }

.tenant-card { display: flex; min-height: 64px; align-items: center; gap: 9px; margin-top: 12px; padding: 9px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; background: rgba(255,255,255,0.06); }
.tenant-card > span:last-child { min-width: 0; }
.tenant-card strong, .tenant-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-card strong { color: #fff; font-size: 11.5px; }
.tenant-card small { margin-top: 2px; color: rgba(255,255,255,0.56); }

.side-nav { display: grid; margin-top: 14px; gap: 4px; }
.nav-item { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 11px; padding: 5px 10px; border: 1px solid transparent; border-radius: 10px; color: rgba(255,255,255,0.72); text-align: left; background: transparent; font-size: 12px; font-weight: 650; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nav-copy { display: grid; min-width: 0; flex: 1; gap: 1px; }
.nav-item .nav-label { display: block; }
.nav-availability { display: block; overflow: hidden; color: rgba(255,255,255,0.62); font-size: 10.5px; font-weight: 750; letter-spacing: 0.01em; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:not(:disabled):hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-item:disabled { cursor: not-allowed; opacity: 1; color: rgba(255,255,255,0.62); }
.nav-item:disabled svg { opacity: 0.7; }
.nav-item.is-active { border-color: rgba(104,159,255,0.28); color: #fff; background: linear-gradient(90deg, rgba(45,114,232,0.38), rgba(45,114,232,0.16)); box-shadow: inset 3px 0 #69a2ff; }

.sidebar-footer { display: grid; margin-top: auto; gap: 7px; }
.live-pill, .user-menu { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid rgba(255,255,255,0.1); border-radius: 11px; color: rgba(255,255,255,0.84); text-align: left; background: rgba(255,255,255,0.055); }
.live-pill:hover, .user-menu:hover { background: rgba(255,255,255,0.09); }
.live-pill > span:last-child, .user-menu > span:nth-child(2) { min-width: 0; flex: 1; }
.live-pill strong, .live-pill small, .user-menu strong, .user-menu small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-pill strong, .user-menu strong { color: #fff; font-size: 10.5px; }
.live-pill small, .user-menu small { margin-top: 1px; color: rgba(255,255,255,0.53); font-size: 9.5px; }
.user-menu > svg { width: 16px; height: 16px; }

.workspace { min-width: 0; }
.topbar {
  position: sticky;
  z-index: 25;
  top: 0;
  display: grid;
  min-height: var(--vr-topbar);
  grid-template-columns: auto auto minmax(30px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--vr-border);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
}
.page-heading { min-width: 120px; }
.page-heading .eyebrow { display: none; }
.date-control { display: flex; align-items: center; gap: 3px; }
.date-button { display: flex; min-height: var(--vr-control-md); align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--vr-border); border-radius: var(--vr-radius-md); color: var(--vr-text-secondary); background: var(--vr-surface); font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.date-button svg { width: 16px; height: 16px; }
.topbar-status { display: flex; align-items: center; justify-self: end; }
.sync-state { display: flex; min-height: 34px; align-items: center; gap: 6px; padding: 0 8px; border: 0; border-radius: var(--vr-radius-md); color: var(--vr-success); background: var(--vr-success-bg); font-size: 10.5px; font-weight: 800; }
.sync-state small { color: #4f7665; }
.sync-state.is-preview { color: #765014; background: var(--vr-warning-bg); }
.sync-state.is-preview small { color: #80622f; }
.active-users { display: flex; min-height: 36px; align-items: center; margin-left: 6px; padding: 0 5px; border: 0; border-radius: var(--vr-radius-md); background: transparent; }
.active-users .avatar + .avatar { margin-left: -8px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.dashboard-main { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 14px 16px 20px; }
.dashboard-main > * { min-width: 0; }
.preview-banner { display: flex; min-height: 38px; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e7d59e; border-radius: var(--vr-radius-md); color: #684b1c; background: linear-gradient(90deg, #fff9e9, #fffdf8); font-size: 11px; }
.preview-badge { padding: 4px 7px; border-radius: var(--vr-radius-pill); color: #68450c; background: #fbe8ad; font-size: 9.5px; font-weight: 850; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.personal-time-strip { display: grid; min-height: 62px; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--vr-border); border-radius: var(--vr-radius-lg); background: linear-gradient(90deg, var(--vr-primary-50), var(--vr-surface) 42%); box-shadow: var(--vr-shadow-xs); }
.personal-time-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--vr-primary-700); background: #fff; box-shadow: var(--vr-shadow-xs); }
.personal-time-icon svg, .personal-time-strip .button svg { width: 19px; height: 19px; }
.personal-time-copy { display: grid; min-width: 0; gap: 1px; }
.personal-time-copy small { color: var(--vr-primary-700); font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.personal-time-copy strong { color: var(--vr-text); font-size: 14px; font-weight: 750; }
.personal-time-copy > span { overflow: hidden; color: var(--vr-text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.status-heading-row h2 { margin-top: 2px; }
.result-summary { color: var(--vr-text-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }

.dashboard-grid {
  --dashboard-calendar-row: clamp(570px, 68vh, 640px);
  --dashboard-work-row: clamp(310px, 38vh, 380px);
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 2.15fr) minmax(350px, .85fr);
  align-items: stretch;
  gap: 12px;
}
.dashboard-primary-stack, .dashboard-side-stack {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-rows: var(--dashboard-calendar-row) var(--dashboard-work-row);
  align-content: start;
  gap: 12px;
}
.dashboard-primary-stack > *, .dashboard-side-stack > * { min-width: 0; max-width: 100%; }
.schedule-panel, .inbox-panel, .request-folder, .mira-workbox { min-width: 0; height: 100%; overflow: hidden; }
.schedule-panel, .request-folder, .mira-workbox { display: flex; min-height: 0; flex-direction: column; }
.schedule-panel .schedule-scroll { width: 100%; max-width: 100%; height: auto; min-width: 0; min-height: 0; flex: 1 1 auto; }
.inbox-panel { display: flex; min-height: 0; flex-direction: column; }
.inbox-list { flex: 1; }

.map-mode { overflow: hidden; }

@media (max-width: 1480px) {
  .topbar { grid-template-columns: auto auto minmax(8px, 1fr) auto; }
  .topbar-status { display: none; }
}

@media (max-width: 1370px) {
  :root { --vr-sidebar: 210px; }
  .topbar { grid-template-columns: auto auto minmax(8px, 1fr) auto auto; gap: 9px; padding-inline: 13px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .button { padding-inline: 10px; }
  .topbar-actions .button-ghost kbd { display: none; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(330px, .9fr); }
  .schedule-driver-filter span { display: none; }
  .schedule-driver-filter select { min-width: 116px; }
}

@media (max-width: 1160px) {
  :root { --vr-sidebar: 76px; }
  .sidebar { padding-inline: 8px; }
  .brand { justify-content: center; padding: 0; }
  .brand-copy, .tenant-card > span:last-child, .nav-item span, .live-pill > span:last-child, .user-menu > span:nth-child(2), .user-menu > svg { display: none; }
  .tenant-card { justify-content: center; padding: 7px; }
  .nav-item { position: relative; min-height: 48px; justify-content: center; padding: 0 0 10px; }
  .nav-item .nav-copy { display: none; }
  .nav-item:disabled::after { position: absolute; top: 8px; right: 11px; width: 8px; height: 8px; border: 2px solid #18315f; border-radius: 50%; background: #a9cbff; box-shadow: 0 0 0 1px rgba(255,255,255,0.28); content: ""; }
  .nav-item.is-active { box-shadow: inset 0 -3px #69a2ff; }
  .live-pill, .user-menu { justify-content: center; padding: 7px; }
  .topbar { grid-template-columns: auto auto minmax(8px, 1fr) auto; }
  .topbar-status { display: none; }
  .topbar-actions .button-icon-label span:not(.count-badge) { display: none; }
  .topbar-actions .button { width: 38px; min-width: 38px; padding: 0; }
  .topbar-actions .button-primary { width: auto; padding-inline: 10px; }
  .topbar-actions .button-primary span { display: inline !important; }
  .topbar-actions .tablet-inbox-action { display: inline-flex; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-side-stack { display: block; }
  .dashboard-primary-stack { grid-template-rows: none; }
  .schedule-panel, .request-folder { height: auto; }
  .mira-workbox { display: none; }
  .inbox-panel {
    position: fixed;
    z-index: 75;
    top: var(--vr-topbar);
    right: 0;
    bottom: 0;
    width: min(430px, calc(100vw - var(--vr-sidebar)));
    max-height: none;
    min-height: 0;
    border-radius: var(--vr-radius-lg) 0 0 0;
    box-shadow: var(--vr-shadow-md);
    transform: translateX(105%);
    transition: transform var(--vr-duration) var(--vr-ease);
  }
  .inbox-panel.is-open { transform: translateX(0); }
  .inbox-close { display: inline-flex; }
  .schedule-scroll { height: min(61vh, 560px); }
  .map-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .booking-drawer { width: min(980px, calc(100vw - 100px)); }
  .booking-edit-body { grid-template-columns: minmax(0,1fr) 250px; }
}

@media (min-width: 761px) and (max-width: 820px) {
  .topbar {
    gap: 5px;
    padding-inline: 9px;
  }
  .topbar-actions .dispo-shell-notification-count { right: 0; }
  .status-grid {
    display: flex;
    min-width: 0;
    max-width: 100%;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .status-grid::-webkit-scrollbar { display: none; }
  .status-card {
    width: 145px;
    min-width: 145px;
    flex: 0 0 145px;
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  .booking-api-review li { grid-template-columns: 1fr; gap: 3px; }
  :root { --vr-topbar: 64px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); background: var(--vr-surface); }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 5px;
    padding: 8px 12px;
  }
  .page-heading { min-width: 0; }
  .page-heading .eyebrow {
    display: block;
    font-size: var(--vr-type-meta-size);
    font-weight: var(--vr-weight-semibold);
    line-height: var(--vr-type-meta-line);
  }
  .page-heading h1 {
    margin-top: 1px;
    font-size: 28px;
    font-weight: var(--vr-weight-bold);
    line-height: 34px;
  }
  .date-control { justify-self: end; }
  .date-control > .icon-button { display: none; }
  .date-button { min-height: 40px; padding: 0 8px; }
  .date-button span { max-width: 94px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { justify-self: end; }
  .topbar-actions > * { display: none; }
  .topbar-actions [data-action="search"], .topbar-actions [data-action="filters"] { display: inline-flex; width: 40px; min-width: 40px; height: 40px; padding: 0; }
  .topbar-actions [data-shell-notifications] { display: inline-grid; }
  .topbar-actions .tablet-inbox-action { display: none; }
  .topbar-actions [data-action="search"] kbd { display: none; }
  .dashboard-main { width: 100%; max-width: 100%; gap: 11px; padding: 10px 12px 16px; overflow-x: clip; }
  .dashboard-main > *, .dashboard-grid, .schedule-panel, .mobile-agenda { width: 100%; max-width: 100%; min-width: 0; }
  .mobile-action-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
  .personal-time-strip { min-height: 68px; grid-template-columns: 38px minmax(0, 1fr) 40px; padding: 9px; }
  .personal-time-strip .button { width: 40px; min-width: 40px; height: 40px; padding: 0; }
  .personal-time-strip .button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .personal-time-copy > span { font-size: 10.5px; }
  .preview-banner { min-height: 42px; align-items: flex-start; flex-direction: column; gap: 3px; font-size: 10.5px; }
  .quick-action { min-width: 0; min-height: 48px; flex-direction: column; gap: 3px; padding: 4px; border-color: var(--vr-border); color: var(--vr-text-secondary); background: var(--vr-surface); font-size: 9.5px; }
  .quick-action svg { width: 17px; height: 17px; }
  .quick-action.is-primary { border-color: var(--vr-primary-600); color: #fff; background: var(--vr-gradient-primary); }
  .status-heading-row { display: none; }
  .status-grid { display: flex; width: calc(100% + 24px); max-width: calc(100% + 24px); margin-inline: -12px; padding: 0 12px 3px; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .status-grid::-webkit-scrollbar { display: none; }
  .status-card { width: 145px; min-width: 145px; min-height: 72px; grid-template-columns: 34px 1fr; gap: 8px; padding: 9px; scroll-snap-align: start; }
  .status-icon { width: 34px; height: 34px; border-radius: 10px; }
  .status-value { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; margin-top: -2px; font-size: 20px; }
  .status-copy { grid-column: 1 / -1; display: grid; grid-template-columns: 34px 1fr; }
  .status-copy strong { grid-column: 2; margin-top: -22px; }
  .status-copy small { display: none; }
  .active-filter-row { margin-top: 4px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .mobile-view-switch { display: grid; min-height: 52px; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid var(--vr-border); border-radius: var(--vr-radius-md); background: var(--vr-surface-soft); }
  .mobile-view-switch button { min-height: 44px; border: 0; border-radius: 8px; color: var(--vr-text-muted); background: transparent; font-size: 11.5px; font-weight: 750; }
  .mobile-view-switch button.is-active { color: var(--vr-primary-900); background: var(--vr-surface); box-shadow: var(--vr-shadow-xs); }
  .dashboard-grid { display: block; }
  .dashboard-primary-stack { display: block; }
  .request-folder { margin-top: 11px; }
  .schedule-panel { border: 0; border-radius: 0; box-shadow: none; }
  .schedule-panel-header, .schedule-scroll, .schedule-footer { display: none; }
  .mobile-agenda { display: block; }
  .mobile-driver-strip { display: flex; width: calc(100% + 24px); max-width: calc(100% + 24px); margin-inline: -12px; padding: 1px 12px 8px; gap: 7px; overflow-x: auto; scrollbar-width: none; }
  .mobile-driver-strip::-webkit-scrollbar { display: none; }
  .driver-chip { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--vr-border); border-radius: var(--vr-radius-pill); color: var(--vr-text-secondary); background: var(--vr-surface); white-space: nowrap; }
  .driver-chip.is-active { border-color: var(--vr-primary-500); color: var(--vr-primary-900); background: var(--vr-primary-50); }
  .driver-chip.is-unassigned { border-color: #e4c879; color: #795014; background: var(--vr-warning-bg); }
  .driver-chip .presence-dot { width: 7px; height: 7px; border: 0; box-shadow: none; }
  .mobile-agenda-header { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
  .mobile-agenda-header h2 { font-size: 14px; }
  .mobile-agenda-list { position: relative; display: grid; gap: 8px; padding-left: 48px; }
  .mobile-agenda-list::before { content: ""; position: absolute; top: 0; bottom: 0; left: 37px; width: 1px; background: var(--vr-border); }
  .agenda-card { position: relative; min-height: 96px; padding: 10px; border: 1px solid var(--vr-border); border-left: 3px solid var(--agenda-color); border-radius: var(--vr-radius-md); text-align: left; background: var(--agenda-bg); }
  .agenda-time { position: absolute; top: 10px; right: calc(100% + 12px); width: 42px; color: var(--vr-text-secondary); text-align: right; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .agenda-time::after { content: ""; position: absolute; top: 3px; right: -16px; width: 7px; height: 7px; border: 2px solid var(--agenda-color); border-radius: 50%; background: #fff; }
  .agenda-card.ride-outbound { --agenda-color: var(--vr-info); --agenda-bg: var(--vr-info-bg); }
  .agenda-card.ride-return { --agenda-color: var(--vr-return); --agenda-bg: var(--vr-return-bg); }
  .agenda-card.ride-wait { --agenda-color: var(--vr-wait); --agenda-bg: var(--vr-wait-bg); }
  .agenda-card.ride-warning, .agenda-card.ride-unassigned { --agenda-color: var(--vr-warning); --agenda-bg: var(--vr-warning-bg); }
  .agenda-card.ride-conflict { --agenda-color: var(--vr-danger); --agenda-bg: var(--vr-danger-bg); }
  .agenda-card strong, .agenda-card small { display: block; }
  .agenda-card > strong { font-size: 13px; }
  .agenda-route { margin-top: 4px; color: var(--vr-text-secondary); font-size: 11px; }
  .agenda-badges { display: flex; margin-top: 8px; flex-wrap: wrap; gap: 5px; }
  .agenda-badges span { padding: 3px 6px; border-radius: var(--vr-radius-pill); color: var(--vr-text-secondary); background: rgba(255,255,255,0.7); font-size: 9px; font-weight: 700; }
  .inbox-panel {
    position: static;
    display: none;
    width: 100%;
    max-height: none;
    min-height: 430px;
    border-radius: var(--vr-radius-lg);
    box-shadow: var(--vr-shadow-xs);
    transform: none;
  }
  .app-shell[data-mobile-view="inbox"] .schedule-panel { display: none; }
  .app-shell[data-mobile-view="inbox"] .inbox-panel { display: flex; }
  .inbox-close { display: none; }
  .inbox-list { max-height: none; }
  .inbox-tab, .item-actions .button { min-height: 44px; }
  .request-folder { border-radius: 12px; }
  .request-folder-header { align-items: flex-start; flex-direction: column; padding: 13px; }
  .request-folder-title { align-items: flex-start; }
  .request-folder-title p:last-child { font-size: 11px; }
  .request-folder-meta { width: 100%; justify-content: space-between; }
  .request-source-badge { display: none; }
  .request-folder-meta .button { min-height: 44px; }
  .request-folder-tabs { width: calc(100% + 24px); margin-inline: -12px; padding-inline: 12px; }
  .request-folder-tab { min-height: 44px; }
  .request-folder-list { padding: 10px; }
  .request-worktable-head { display: none; }
  .dashboard-request-card { min-width: 0; min-height: 188px; grid-template-columns: 1fr 1fr; align-items: start; gap: 9px; padding: 12px; border: 1px solid var(--vr-border); border-left: 3px solid #4a7bd4; border-radius: 12px; }
  .request-card-person { grid-column: 1 / -1; }
  .request-card-trip { grid-column: 1 / -1; }
  .request-card-tags { grid-column: 1 / -1; }
  .request-card-actions { grid-column: 1 / -1; justify-content: stretch; padding-top: 8px; border-top: 1px solid var(--vr-border); }
  .request-card-actions .button { flex: 1; }
  .request-card-actions .button { min-height: 44px; }
  .drawer.request-detail-drawer, .drawer.return-review-drawer { inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
  .request-detail-actions { grid-template-columns: 1fr; }
  .request-detail-actions .button:last-child { grid-column: auto; }
  .return-review-hero { align-items: flex-start; flex-direction: column; }
  .return-requested-time { text-align: left; }
  .return-decision-grid { grid-template-columns: 1fr; }
  .return-decision-grid label { min-height: 58px; }
  .return-chain { grid-template-columns: 1fr 1fr; }
  .return-review-actions { grid-template-columns: 1fr; }
  .request-award-panel .button { min-height: 44px; }
  .request-award-confirm-actions { grid-template-columns: 1fr; }
  .request-decision-actions { grid-template-columns: 1fr; }
  .map-mode { border: 0; border-radius: 0; box-shadow: none; }
  .map-layout { display: flex; min-height: 0; flex-direction: column; }
  .demo-map { min-height: 360px; border: 1px solid var(--vr-border); border-radius: var(--vr-radius-lg); }
  .map-driver-list { order: -1; padding: 10px 0; background: transparent; }
  .mobile-bottom-nav { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; min-height: calc(62px + env(safe-area-inset-bottom)); grid-template-columns: repeat(4,1fr); padding: 5px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--vr-border); background: rgba(255,255,255,0.96); backdrop-filter: blur(14px); box-shadow: 0 -4px 18px rgba(21,38,67,0.06); }
  .mobile-bottom-nav button { display: flex; min-height: 52px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; border: 0; border-radius: var(--vr-radius-md); color: var(--vr-text-muted); background: transparent; font-size: 9.5px; font-weight: 700; }
  .mobile-bottom-nav button svg { width: 19px; height: 19px; }
  .mobile-bottom-nav button.is-active { color: var(--vr-primary-700); background: var(--vr-primary-50); }
  .mobile-bottom-nav button:disabled { cursor: not-allowed; opacity: 1; color: var(--vr-text-muted); background: var(--vr-surface-subtle); }
  .mobile-nav-status { color: var(--vr-text-muted); font-size: 9px; font-weight: 750; letter-spacing: -0.015em; line-height: 1; white-space: nowrap; }
  .filter-popover { top: 74px; right: 12px; }
  .search-palette { top: max(12px, env(safe-area-inset-top)); width: calc(100vw - 24px); }
  .drawer { top: auto; bottom: 0; width: 100%; height: min(88dvh, 760px); border: 0; border-radius: 20px 20px 0 0; }
  .drawer-wide { height: 94dvh; }
  .booking-drawer { inset: 0; width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .booking-header { min-height: 76px; padding: max(12px, env(safe-area-inset-top)) 14px 10px; }
  .booking-header h2 { font-size: 19px; }
  .booking-header p:not(.section-kicker) { display: none; }
  .booking-drawer .icon-button { width: 44px; min-width: 44px; height: 44px; }
  .booking-form { height: calc(100dvh - 76px); }
  .booking-edit-body { display: block; overflow: auto; }
  .booking-main { padding: 10px 10px 18px; }
  .booking-section { padding: 11px; }
  .booking-section input:not([type="radio"]):not([type="checkbox"]), .booking-section select { min-height: 44px; }
  .booking-summary { display: none; }
  .choice-segment, .return-choice { grid-template-columns: 1fr; }
  .choice-segment label, .return-choice label { min-height: 44px; }
  .recurrence-default-row { grid-template-columns: 1fr; }
  .recurrence-toggle { width: 100%; justify-content: center; }
  .weekday-picker { grid-template-columns: repeat(4,minmax(44px,1fr)); }
  .form-with-action { grid-template-columns: 1fr; }
  .form-with-action .button { min-height: 44px; }
  .patient-autofill:not(:empty), .form-row { grid-template-columns: 1fr; }
  .inline-create-head { align-items: flex-start; flex-direction: column; }
  .booking-footer { padding: 9px 10px max(10px,env(safe-area-inset-bottom)); display: grid; }
  #booking-edit-actions { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
  #booking-review-actions { grid-template-columns: 1fr 1fr; }
  #booking-review-actions .button:last-child { grid-column: 1 / -1; }
  .booking-footer .button { min-height: 46px; }
  .booking-review { padding: 14px 10px 18px; }
  .booking-review-grid { grid-template-columns: 1fr; }
  .mira-panel { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .mira-header { min-height: calc(66px + env(safe-area-inset-top)); padding-top: calc(10px + env(safe-area-inset-top)); }
  .mira-content { flex: 1; }
  .mira-thread { max-height: 32dvh; }
  .mira-quick-prompts button { min-height: 44px; }
  .mira-actions { align-items: stretch; flex-direction: column-reverse; }
  .mira-actions .button, .mira-review .button { min-height: 44px; }
  .mira-stale { grid-template-columns: auto minmax(0, 1fr); }
  .mira-stale .button { grid-column: 1 / -1; min-height: 44px; }
  .confirm-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .confirm-facts > div { grid-template-columns: 1fr; gap: 3px; }
  .confirm-actions { align-items: stretch; flex-direction: column-reverse; }
  .confirm-actions .button { min-height: 44px; }
  .toast-region { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .form-status, .form-actions { grid-column: auto; }
}

body.has-mira-modal { overflow: hidden; }

@media (max-width: 390px) {
  .topbar { padding-inline: 10px; }
  .dashboard-main { padding-inline: 10px; }
  .status-grid, .mobile-driver-strip { margin-inline: -10px; padding-inline: 10px; }
  .date-button span { max-width: 78px; }
}
