:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d9dee8;
  --brand: #2563eb;
  --brand-dark: #1e3a8a;
  --ok: #0f766e;
  --yellow-bg: #fff7d6;
  --yellow-line: #d99a00;
  --red-bg: #ffe1df;
  --red-line: #c7362f;
  --soft-blue: #eaf2ff;
  --shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

body.shell-admin,
body.shell-operator,
body.shell-auth {
  background: var(--bg);
}

a {
  color: var(--brand-dark);
}

body.shell-admin a,
body.shell-operator a,
body.shell-auth a {
  color: var(--brand-dark);
}

body.shell-admin .public-button,
body.shell-operator .public-button,
body.shell-auth .public-button {
  color: #ffffff;
}

.public-placeholder {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.public-shell {
  width: min(680px, calc(100vw - 32px));
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 40px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.admin-header h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-user {
  display: grid;
  align-content: center;
  justify-items: end;
  color: var(--muted);
}

.admin-user span {
  color: var(--ink);
  font-weight: 700;
}

.admin-nav {
  display: flex;
  gap: 8px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: #eef2ff;
  border-bottom: 1px solid var(--line);
}

.admin-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--panel);
}

.admin-main {
  padding: 24px clamp(16px, 4vw, 40px);
}

.auth-main {
  display: grid;
  min-height: 58vh;
  place-items: start center;
}

.auth-panel {
  width: min(560px, 100%);
}

.auth-form {
  margin-top: 14px;
}

.auth-account-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-account-list legend,
.auth-password-label span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-account-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
}

.auth-account-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--soft-blue);
}

.auth-account-option strong,
.auth-account-option small,
.auth-account-summary strong,
.auth-account-summary span {
  display: block;
}

.auth-account-option small,
.auth-account-summary span {
  margin-top: 3px;
  color: var(--muted);
}

.auth-password-label {
  display: grid;
  gap: 6px;
}

.auth-account-summary {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.notification-enable {
  justify-content: flex-start;
}

.notification-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.notification-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
}

.notification-choice:has(input:checked) {
  border-color: var(--brand);
  background: var(--soft-blue);
}

.notification-choice strong,
.notification-choice small {
  display: block;
}

.notification-choice small {
  margin-top: 3px;
  color: var(--muted);
}

.notification-email-field,
.notification-email-field .admin-search {
  width: min(420px, 100%);
}

.notification-log-table .events-table-head,
.notification-log-table .event-list-row {
  grid-template-columns: minmax(110px, 0.55fr) minmax(180px, 0.9fr) minmax(90px, 0.45fr) minmax(150px, 0.8fr) minmax(260px, 1.2fr) minmax(120px, 0.6fr);
}

.operator-notification-log-table .events-table-head,
.operator-notification-log-table .event-list-row {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.65fr) minmax(150px, 0.75fr) minmax(90px, 0.45fr) minmax(180px, 0.9fr) minmax(260px, 1.2fr);
}

.operator-admin-reminder-row {
  grid-template-columns: minmax(190px, 1fr) minmax(90px, 0.4fr) minmax(220px, 1fr) minmax(70px, 0.3fr) minmax(70px, 0.3fr) auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.account-list {
  display: grid;
  gap: 12px;
}

.account-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #fbfcff;
}

.account-row.is-suspended-account {
  border-left-color: var(--yellow-line);
  background: #fffdf3;
}

.account-row.is-archived-account {
  border-left-color: #64748b;
  background: #f4f6f9;
  opacity: 0.82;
}

.account-row-form {
  grid-template-columns: minmax(130px, 0.8fr) repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
}

.account-row-form,
.account-reset-form {
  display: grid;
  gap: 10px;
}

.account-row-form label,
.account-reset-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-row-form input,
.account-row-form select,
.account-reset-form input {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.account-reset-form {
  grid-template-columns: minmax(220px, 0.6fr) auto;
  align-items: end;
  justify-content: end;
}

.account-detail-panel {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.account-detail-panel summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 900;
}

.account-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.account-detail-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.account-management-actions {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.account-state-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.account-state-actions form {
  margin: 0;
}

.button-link.danger-action {
  border-color: var(--red-line);
  background: var(--red-bg);
  color: #7f1d1d;
}

.shell-admin .public-header,
.shell-operator .public-header,
.shell-auth .public-header {
  z-index: 90;
}

.backend-rail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.backend-rail-link,
.backend-account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.backend-account-chip {
  color: var(--ink);
}

.backend-account-chip span {
  margin-left: 5px;
  color: var(--muted);
  text-transform: capitalize;
}

.backend-rail-link:hover,
.backend-account-chip:hover {
  background: var(--soft-blue);
}

.backend-tab-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  width: min(1180px, calc(100vw - 32px));
  margin: -4px auto 0;
  padding: 0 0 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scroll-padding-inline: 16px;
  scroll-snap-type: x proximity;
}

.backend-tab-nav a {
  flex: 1 0 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 150px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--brand-dark);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  scroll-snap-align: center;
  white-space: nowrap;
}

.backend-tab-nav a:hover,
.backend-tab-nav a.active,
.backend-tab-nav a[aria-current="page"] {
  border-color: #9fb8ee;
  background: var(--soft-blue);
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
}

.backend-tab-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--brand), 0 8px 18px rgba(31, 41, 55, 0.08);
}

.backend-page-swipe-nav a[data-page-key] {
  border-bottom-width: 4px;
  background: #ffffff;
}

.backend-page-swipe-nav a[data-page-key="dashboard"] {
  border-bottom-color: #2563eb;
}

.backend-page-swipe-nav a[data-page-key="operations"] {
  border-bottom-color: var(--yellow-line);
  background: #fffdf3;
}

.backend-page-swipe-nav a[data-page-key="calendar"] {
  border-bottom-color: #0f766e;
  background: #f2fdf9;
}

.backend-page-swipe-nav a[data-page-key="events"] {
  border-bottom-color: #7c3aed;
  background: #f8f4ff;
}

.backend-page-swipe-nav a[data-page-key="leads"] {
  border-bottom-color: #0891b2;
  background: #eefcff;
}

.backend-page-swipe-nav a[data-page-key="notifications"] {
  border-bottom-color: #d97706;
  background: #fff8ed;
}

.backend-page-swipe-nav a[data-page-key="accounts"] {
  border-bottom-color: #475569;
  background: #f8fafc;
}

.backend-page-swipe-nav a[data-page-key="equipment"] {
  border-bottom-color: #16a34a;
  background: #f0fdf4;
}

.backend-page-swipe-nav a[data-page-key="payments"] {
  border-bottom-color: var(--red-line);
  background: #fff5f4;
}

.backend-tab-nav-compact a {
  flex-basis: 120px;
}

.account-nav-link {
  border-color: var(--line);
  color: var(--muted);
  font-size: 13px;
}

.backend-page-title {
  padding: 20px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  border-top: 4px solid #2563eb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 255, 0.96) 100%);
}

.admin-page-operations .backend-page-title {
  border-top-color: var(--yellow-line);
}

.admin-page-calendar .backend-page-title {
  border-top-color: var(--ok);
}

.admin-page-events .backend-page-title {
  border-top-color: #7c3aed;
}

.admin-page-leads .backend-page-title {
  border-top-color: #0891b2;
}

.admin-page-notifications .backend-page-title {
  border-top-color: #d97706;
}

.admin-page-accounts .backend-page-title {
  border-top-color: #475569;
}

.admin-page-equipment .backend-page-title {
  border-top-color: #16a34a;
}

.admin-page-payments .backend-page-title {
  border-top-color: var(--red-line);
}

.backend-page-title .public-section-inner {
  width: min(1180px, 100%);
}

.backend-page-title h1 {
  margin: 2px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.05;
}

.backend-page-title p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-v0 {
  align-items: start;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.dashboard-toolbar h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.toolbar-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.search-wrap {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.primary-action {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #ffffff;
}

.primary-action:hover {
  background: var(--brand);
  color: #ffffff;
}

.button-link:hover,
.context-link:hover {
  background: var(--soft-blue);
}

.button-link.primary-action:hover {
  background: var(--brand);
  color: #ffffff;
}

.big-button-grid,
.person-tile-grid,
.gear-tile-grid,
.status-tile-grid,
.money-tile-grid,
.three-state-group,
.quick-action-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.quick-action-panel {
  margin-top: 12px;
}

.big-action-button,
.person-tile,
.gear-tile,
.status-tile,
.money-tile,
.three-state-button,
.big-checklist-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.person-tile,
.gear-tile,
.status-tile,
.money-tile {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.tile-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
}

.tile-title,
.tile-meta {
  display: block;
}

.tile-title {
  color: var(--ink);
}

.tile-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.big-action-button:hover,
.person-tile:hover,
.gear-tile:hover,
.status-tile:hover,
.money-tile:hover,
.three-state-button:hover,
.big-checklist-row:hover {
  border-color: #8aa8e8;
  background: var(--soft-blue);
}

.big-action-button.is-selected,
.person-tile.is-selected,
.gear-tile.is-selected,
.status-tile.is-selected,
.money-tile.is-selected,
.three-state-button.is-selected {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #ffffff;
}

.is-selected .tile-avatar {
  background: #ffffff;
}

.is-selected .tile-title,
.is-selected .tile-meta {
  color: #ffffff;
}

.quick-save-state {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.quick-save-state.is-saving {
  color: var(--brand-dark);
}

.quick-save-state.is-saved {
  color: var(--ok);
}

.quick-save-state.is-error {
  color: var(--red-line);
}

.advanced-details-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.panel {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-header h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.card-next {
  border-color: #9fb8ee;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.card-payment {
  border-color: #f0c665;
}

.panel-tall {
  align-self: stretch;
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.record-title {
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.25;
}

.record-row p {
  margin: 0;
  color: var(--muted);
}

.context-link {
  color: var(--brand-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.context-link-strong {
  font-weight: 800;
}

.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 700;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.payment-badge {
  border-color: #d99a00;
  background: #fff8df;
}

.status-ok {
  border-color: var(--ok);
  color: var(--ok);
}

.status-risk,
.severity-red {
  border-color: var(--red-line);
  color: var(--red-line);
}

.severity-yellow {
  border-color: var(--yellow-line);
  color: #7a5200;
  background: var(--yellow-bg);
}

.needs-action {
  align-items: flex-start;
}

.needs-yellow {
  border-color: var(--yellow-line);
  background: var(--yellow-bg);
}

.needs-red {
  border-color: var(--red-line);
  background: var(--red-bg);
}

.need-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.severity-red {
  background: var(--red-bg);
}

.badge-row,
.missing-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.missing-stack {
  margin-top: 10px;
}

.next-event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
}

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

.facts-grid > div,
.inline-note-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.facts-grid > div:hover,
.detail-grid > div:hover,
.payment-item:hover,
.equipment-item:hover,
.attention-item:hover,
.warning-item:hover,
.quick-note:hover,
.ops-row:hover {
  border-color: #b7c7ef;
}

.fact-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.facts-grid strong,
.facts-grid small {
  display: block;
}

.facts-grid small {
  margin-top: 3px;
  color: var(--muted);
}

.next-event-side {
  display: grid;
  align-content: start;
  gap: 10px;
}

.assigned-gear {
  margin-top: 14px;
}

.gear-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 4px 6px 0 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.gear-chip span {
  color: var(--muted);
  font-size: 12px;
}

.attention-item,
.warning-item,
.payment-item,
.equipment-item,
.quick-note {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.payment-item {
  border-left: 5px solid var(--yellow-line);
}

.equipment-item {
  border-left: 5px solid #9fb8ee;
}

.attention-item {
  grid-template-columns: auto minmax(0, 1fr);
}

.attention-topline,
.payment-line,
.payment-meta,
.equipment-topline,
.quick-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.warning-item {
  grid-template-columns: auto minmax(0, 1fr);
}

.compact-list {
  max-height: 480px;
  overflow: auto;
  padding-right: 2px;
}

.ops-table {
  display: grid;
  gap: 8px;
}

.ops-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.8fr) minmax(110px, 0.5fr) minmax(170px, 0.8fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.events-toolbar {
  align-items: end;
}

.events-table {
  display: grid;
  gap: 8px;
}

.leads-table {
  display: grid;
  gap: 8px;
}

.events-table-head,
.event-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(140px, 0.8fr) minmax(160px, 0.9fr) minmax(90px, 0.5fr);
  gap: 12px;
  align-items: center;
}

.leads-table-head,
.lead-list-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.55fr) minmax(230px, 1.2fr) minmax(220px, 1fr) minmax(110px, 0.6fr) minmax(150px, 0.8fr) minmax(100px, 0.55fr);
  gap: 12px;
  align-items: center;
}

.events-table-head {
  padding: 0 12px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.leads-table-head {
  padding: 0 12px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-list-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.lead-list-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.event-list-row:hover {
  border-color: #b7c7ef;
}

.lead-list-row:hover {
  border-color: #b7c7ef;
}

.lead-list-row.needs-yellow {
  border-color: var(--yellow-line);
  background: #fffdf0;
}

.lead-list-row.needs-red {
  border-color: var(--red-line);
  background: #fff5f4;
}

.event-main-cell {
  min-width: 0;
}

.event-main-cell p,
.event-list-row p,
.lead-list-row p {
  margin: 0;
  color: var(--muted);
}

.event-list-row > div,
.lead-list-row > div {
  min-width: 0;
}

.needs-cell {
  display: grid;
  justify-items: start;
}

.ops-primary {
  min-width: 0;
}

.ops-row p,
.payment-item p,
.equipment-item p,
.warning-item p {
  margin: 0;
  color: var(--muted);
}

.stacked-controls {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.event-detail-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.event-command-hero {
  border-color: #9fb8ee;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.detail-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-grid-single {
  grid-template-columns: 1fr;
}

.detail-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-note-block {
  margin-top: 10px;
}

.detail-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-notes-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.payment-instruction-block {
  border-color: #f0c665;
  background: #fffdf3;
}

.equipment-command-row {
  align-items: flex-start;
}

.equipment-command-row .status-pill {
  flex: 0 0 auto;
}

.equipment-manager-list {
  gap: 12px;
}

.equipment-custody-board {
  display: grid;
  gap: 16px;
}

.equipment-holder-group {
  display: grid;
  gap: 12px;
}

.equipment-holder-header {
  align-items: flex-start;
}

.equipment-manager-row {
  align-items: flex-start;
}

.custody-equipment-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.equipment-manager-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.equipment-custody-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.equipment-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f6f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.equipment-manager-row.is-inactive-equipment {
  opacity: 0.72;
  background: #f4f6f9;
}

.equipment-assignment-form {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.equipment-assignment-list {
  margin-top: 12px;
}

.quick-note.is-resolved-note {
  opacity: 0.7;
  background: #f4f6f9;
}

.quick-note.is-resolved-note .note-edit {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: #9ca3af;
}

.inline-edit {
  cursor: pointer;
  border: 1px dashed #9fb8ee;
  border-radius: 6px;
  background: #f6f9ff;
  color: var(--brand-dark);
  padding: 2px 5px;
  outline: 0;
  text-decoration: none;
  transition: box-shadow 120ms ease, background 120ms ease;
}

.inline-edit:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  background: #eaf2ff;
}

.inline-edit.is-editing {
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.inline-pair {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.inline-textarea {
  display: block;
  width: 100%;
  color: var(--ink);
  padding: 7px 8px;
}

.inline-editor-input,
.inline-editor-textarea,
.inline-editor-select {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.inline-editor-textarea {
  min-height: 76px;
  resize: vertical;
}

.inline-save-state {
  display: inline-flex;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inline-save-state.is-saving {
  color: var(--brand-dark);
}

.inline-save-state.is-saved {
  color: var(--ok);
}

.inline-save-state.is-error {
  color: var(--red-line);
}

.inline-edit.save-error {
  box-shadow: 0 0 0 2px rgba(199, 54, 47, 0.22);
}

.focus-target-highlight {
  outline: 3px solid rgba(217, 154, 0, 0.75);
  outline-offset: 3px;
  background: #fff7d6 !important;
  transition: outline-color 180ms ease;
}

.focus-target-needed {
  box-shadow: 0 0 0 3px rgba(217, 154, 0, 0.26);
}

.needs-red .inline-edit,
.needs-red.inline-edit,
.operator-danger-box .inline-edit {
  border-color: var(--red-line);
  background: #fff4f2;
  color: #8a211b;
}

.needs-yellow .inline-edit,
.needs-yellow.inline-edit,
.operator-warning-box .inline-edit {
  border-color: var(--yellow-line);
  background: #fff9e6;
  color: #6f4a00;
}

[data-card-href] {
  cursor: pointer;
}

[data-card-href]:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

.resolve-toggle {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 700;
}

.resolve-toggle[data-value="1"] {
  color: var(--ok);
}

.admin-search {
  width: min(280px, 100%);
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-select,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.admin-select {
  width: min(230px, 100%);
}

.admin-form {
  display: grid;
  gap: 16px;
}

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

.form-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  color: var(--ink);
  font-weight: 400;
}

.form-wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-form button {
  font: inherit;
}

.empty-state {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
}

.calendar-toolbar {
  align-items: end;
}

.calendar-actions,
.calendar-filter-actions {
  align-items: end;
}

.calendar-filter-panel {
  margin-bottom: 16px;
}

.view-toggle {
  display: inline-flex;
  min-height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.view-toggle a {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 800;
}

.view-toggle a.active {
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(31, 41, 55, 0.12);
}

.checkbox-filter {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.calendar-board {
  overflow-x: auto;
}

.calendar-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-weekdays span {
  padding: 0 8px 8px;
}

.month-grid {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.month-day {
  min-height: 148px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.month-day.is-outside-month {
  background: #f2f4f8;
}

.month-day.is-today,
.week-day.is-today {
  box-shadow: inset 0 0 0 2px #9fb8ee;
}

.day-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.day-number strong,
.week-day header em {
  color: var(--brand-dark);
  font-style: normal;
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-day-add {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 7px;
  padding: 4px 7px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.calendar-day-add:hover,
.calendar-day-add:focus {
  border-color: #8aa8e8;
  background: var(--soft-blue);
}

.day-events,
.week-events,
.agenda-list {
  display: grid;
  gap: 7px;
}

.calendar-event-item {
  min-width: 0;
}

.event-pill,
.week-event-block,
.agenda-card {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  text-decoration: none;
}

.event-pill {
  display: grid;
  gap: 3px;
  padding: 7px;
  font-size: 12px;
}

.event-pill:hover,
.week-event-block:hover,
.agenda-card:hover {
  border-color: #8aa8e8;
  background: #f6f9ff;
}

.event-pill-title {
  overflow: hidden;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.event-pill-meta {
  color: var(--muted);
  line-height: 1.25;
}

.event-pill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.mini-warning {
  border-color: var(--yellow-line);
  background: var(--yellow-bg);
  color: #7a5200;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 10px;
}

.week-day {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.week-day header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.week-day header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.week-event-block {
  display: grid;
  gap: 5px;
  padding: 10px;
  font-size: 13px;
}

.week-event-block > span:not(.record-title):not(.badge-row) {
  color: var(--muted);
}

.calendar-agenda {
  display: grid;
  gap: 14px;
}

.content-card-subnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding-inline: 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.content-card-subnav::-webkit-scrollbar {
  display: none;
}

.content-card-subnav a {
  flex: 1 0 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  scroll-snap-align: center;
  white-space: nowrap;
}

.content-card-subnav a[href="#ops-summary"] {
  border-bottom-color: #2563eb;
  background: #f5f8ff;
}

.content-card-subnav a[href="#ops-filters"] {
  border-bottom-color: #0891b2;
  background: #eefcff;
}

.content-card-subnav a[href="#ops-needs"] {
  border-bottom-color: var(--yellow-line);
  background: #fff9df;
}

.content-card-subnav a[href="#ops-schedule"] {
  border-bottom-color: var(--ok);
  background: #edfdf8;
}

.content-card-subnav a:hover,
.content-card-subnav a.is-active,
.content-card-subnav a[aria-current="true"] {
  border-color: var(--brand);
  border-bottom-color: var(--brand);
  box-shadow: inset 0 3px 0 var(--brand), 0 6px 14px rgba(31, 41, 55, 0.09);
}

[data-content-section] {
  scroll-margin-top: 82px;
}

.operations-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ops-summary-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #9fb8ee;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ops-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #9fb8ee;
}

.ops-summary-events {
  border-left-color: #2563eb;
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 68%);
}

.ops-summary-events::before {
  background: #2563eb;
}

.ops-summary-needs {
  border-left-color: var(--yellow-line);
  background: linear-gradient(180deg, #fff9df 0%, #ffffff 72%);
}

.ops-summary-needs::before {
  background: var(--yellow-line);
}

.ops-summary-payment {
  border-left-color: var(--red-line);
  background: linear-gradient(180deg, #fff2f0 0%, #ffffff 72%);
}

.ops-summary-payment::before {
  background: var(--red-line);
}

.ops-summary-progress {
  border-left-color: #7c3aed;
  background: linear-gradient(180deg, #f6f1ff 0%, #ffffff 72%);
}

.ops-summary-progress::before {
  background: #7c3aed;
}

.ops-summary-complete {
  border-left-color: var(--ok);
  background: linear-gradient(180deg, #edfdf8 0%, #ffffff 72%);
}

.ops-summary-complete::before {
  background: var(--ok);
}

.ops-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ops-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1;
}

.operations-board {
  display: grid;
  gap: 16px;
}

.operations-needs-panel {
  margin-bottom: 16px;
  border-color: #f0c665;
  background: #fffdf3;
}

.operations-needs-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.operations-need-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow-line);
  border-radius: 8px;
  background: #fffdf3;
  color: var(--ink);
  text-decoration: none;
}

.operations-need-item:has(.severity-red) {
  border-left-color: var(--red-line);
  background: #fff6f5;
}

.operations-need-item strong,
.operations-need-item span,
.operations-need-item small {
  min-width: 0;
}

.operations-need-item small {
  color: var(--muted);
  font-weight: 700;
}

.operations-day {
  display: grid;
  gap: 10px;
}

.operations-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.operations-day-header h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.operations-day-list {
  display: grid;
  gap: 10px;
}

.operations-empty-day {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.operations-event-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(170px, 0.7fr) minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #9fb8ee;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.operations-event-card.ops-card-needs {
  border-left-color: var(--yellow-line);
  background: linear-gradient(90deg, #fff9df 0%, #ffffff 18%);
}

.operations-event-card.ops-card-payment {
  border-left-color: var(--red-line);
  background: linear-gradient(90deg, #fff2f0 0%, #ffffff 18%);
}

.operations-event-card.ops-card-progress {
  border-left-color: #7c3aed;
  background: linear-gradient(90deg, #f6f1ff 0%, #ffffff 18%);
}

.operations-event-card.ops-card-complete {
  border-left-color: var(--ok);
  background: linear-gradient(90deg, #edfdf8 0%, #ffffff 18%);
}

.operations-event-card.ops-card-ready {
  border-left-color: #2563eb;
  background: linear-gradient(90deg, #f5f8ff 0%, #ffffff 18%);
}

.operations-event-main p,
.operations-readiness p {
  margin: 4px 0 0;
  color: var(--muted);
}

.operations-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.operations-times span {
  min-width: 0;
  color: var(--muted);
}

.operations-times strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.operations-status,
.operations-progress,
.operations-readiness,
.operations-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.operations-progress-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.operations-actions {
  justify-content: flex-end;
}

.agenda-day h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.agenda-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) minmax(180px, 0.8fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
}

.agenda-card p {
  margin: 0;
  color: var(--muted);
}

.agenda-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.agenda-facts span {
  min-width: 0;
  color: var(--muted);
}

.agenda-facts strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.operator-color-1 {
  border-left-color: #2563eb;
}

.operator-color-2 {
  border-left-color: #0f766e;
}

.operator-color-3 {
  border-left-color: #b45309;
}

.operator-color-4 {
  border-left-color: #7c3aed;
}

.operator-color-5 {
  border-left-color: #be123c;
}

.operator-color-6 {
  border-left-color: #047857;
}

.operator-color-unassigned {
  border-left-color: var(--yellow-line);
  background: #fffdf0;
}

.status-tentative {
  border-style: dashed;
}

.status-completed,
.status-canceled {
  opacity: 0.72;
  background: #f4f6f9;
}

.status-needs-operator,
.status-needs-equipment-check,
.status-follow-up-needed {
  background: #fffdf0;
}

.detail-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.notice {
  padding: 10px;
  border-radius: 6px;
}

.notice-red {
  background: var(--red-bg);
  border: 1px solid var(--red-line);
}

.notice-green {
  background: #e8f7f3;
  border: 1px solid var(--ok);
  color: var(--ok);
}

.admin-footer {
  padding: 16px clamp(16px, 4vw, 40px) 32px;
  color: var(--muted);
}

.is-hidden {
  display: none;
}

@media (max-width: 760px) {
  body.shell-admin,
  body.shell-operator {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .admin-header,
  .panel-header,
  .dashboard-toolbar,
  .card-header,
  .record-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-user {
    justify-items: start;
  }

  .admin-nav {
    overflow-x: auto;
  }

  .backend-page-title {
    padding: 16px;
  }

  .backend-page-title h1 {
    font-size: 28px;
  }

  .shell-admin .public-header,
  .shell-operator .public-header {
    padding-bottom: 0;
  }

  .shell-admin .public-header-inner,
  .shell-operator .public-header-inner {
    min-height: 70px;
  }

  .backend-rail-actions {
    flex: 0 1 auto;
    gap: 6px;
  }

  .backend-rail-link {
    display: none;
  }

  .backend-account-chip {
    max-width: min(44vw, 190px);
    overflow: hidden;
    padding-inline: 9px;
    text-overflow: ellipsis;
  }

  .backend-account-chip span {
    display: none;
  }

  .backend-tab-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(23, 32, 51, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 30px rgba(31, 41, 55, 0.14);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  .backend-tab-nav::-webkit-scrollbar {
    display: none;
  }

  .backend-tab-nav a {
    flex: 0 0 28%;
    min-width: 96px;
    max-width: none;
    min-height: 52px;
    border-color: var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-size: 12px;
  }

  .backend-tab-nav-compact a {
    flex-basis: 30%;
  }

  .backend-tab-nav a[aria-current="page"] {
    box-shadow: inset 0 3px 0 var(--brand), 0 6px 15px rgba(31, 41, 55, 0.1);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .search-wrap,
  .admin-search {
    width: 100%;
  }

    .next-event-layout,
    .facts-grid,
    .ops-row,
    .events-table-head,
    .event-list-row,
    .leads-table-head,
    .lead-list-row,
    .event-detail-shell,
    .detail-grid,
  .detail-notes-grid,
  .detail-notes-grid-two,
  .quick-notes-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .events-table-head {
    display: none;
  }

  .leads-table-head {
    display: none;
  }

  .events-toolbar {
    align-items: flex-start;
  }

  .admin-select {
    width: 100%;
  }

  .calendar-toolbar,
  .calendar-filter-actions {
    align-items: flex-start;
  }

  .calendar-actions,
  .calendar-filter-actions,
  .view-toggle {
    width: 100%;
  }

  .calendar-actions .button-link,
  .view-toggle a {
    justify-content: center;
    flex: 1 1 auto;
  }

  .operations-summary,
  .operations-needs-list,
  .operations-event-card,
  .operations-times,
  .calendar-weekdays,
  .month-grid,
  .week-grid,
  .agenda-card,
  .agenda-facts,
    .notification-choice-grid,
    .account-row-form,
    .account-reset-form,
    .account-management-actions,
    .account-detail-grid {
    grid-template-columns: 1fr;
  }

  .week-grid {
    min-width: 0;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button-link {
    justify-content: center;
    width: 100%;
  }

  .attention-topline,
  .payment-line,
  .payment-meta,
  .equipment-topline,
  .quick-note-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Big Button Mode visual refresh: backend only. Public pages do not load this layer. */
body.shell-admin,
body.shell-operator,
body.shell-auth {
  --bg: #24312b;
  --panel: #f4f0df;
  --ink: #172019;
  --muted: #536158;
  --line: #8d9b8d;
  --brand: #2368d5;
  --brand-dark: #173d7a;
  --ok: #17745d;
  --yellow-bg: #ffe39a;
  --yellow-line: #b77900;
  --red-bg: #ffd6cd;
  --red-line: #b33a2d;
  --soft-blue: #dcecff;
  --shadow: 0 11px 0 rgba(23, 32, 25, 0.34), 0 24px 34px rgba(7, 12, 9, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 227, 154, 0.12) 0 14%, transparent 14% 100%),
    linear-gradient(180deg, #314238 0%, #202c27 44%, #18231f 100%);
}

body.shell-admin .app-shell-header,
body.shell-operator .app-shell-header,
body.shell-auth .app-shell-header {
  border-bottom: 4px solid #111914;
  background:
    linear-gradient(180deg, #fff7d8 0%, #f0cd76 100%);
  box-shadow: 0 8px 0 rgba(17, 25, 20, 0.36);
}

body.shell-admin .public-header-inner,
body.shell-operator .public-header-inner,
body.shell-auth .public-header-inner {
  min-height: 82px;
}

body.shell-admin .brand-copy strong,
body.shell-operator .brand-copy strong,
body.shell-auth .brand-copy strong {
  color: #141914;
}

body.shell-admin .brand-copy span,
body.shell-operator .brand-copy span,
body.shell-auth .brand-copy span {
  color: #4a3a14;
  font-weight: 900;
}

.backend-rail-link,
.backend-account-chip {
  min-height: 46px;
  border: 2px solid #19231d;
  border-bottom-width: 5px;
  background: linear-gradient(180deg, #fffef4 0%, #d8e8d6 100%);
  color: #142018;
  box-shadow: 0 5px 0 rgba(25, 35, 29, 0.24);
}

.backend-rail-link:hover,
.backend-account-chip:hover {
  transform: translateY(1px);
  background: linear-gradient(180deg, #e9f5ff 0%, #b8d7ff 100%);
  box-shadow: 0 3px 0 rgba(25, 35, 29, 0.28);
}

.backend-page-title {
  margin: 12px auto 16px;
  width: min(1180px, calc(100vw - 22px));
  padding: 14px 16px;
  border: 3px solid #101814;
  border-top-width: 3px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #d8ecff 0%, #91bfe8 100%);
  box-shadow: 0 9px 0 rgba(9, 15, 12, 0.36);
}

.backend-page-title h1 {
  color: #111914;
  font-size: clamp(28px, 5vw, 44px);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
}

.backend-page-title p:last-child,
.backend-page-title .eyebrow {
  color: #203026;
}

.admin-main,
.operator-main {
  padding-top: 10px;
}

.dashboard-toolbar,
.panel,
.card,
.operator-intro,
.operator-job-card,
.operator-section,
.operator-hero,
.operator-empty,
.operator-inventory-controls,
.operator-inventory-card,
.public-shell,
.auth-panel {
  border: 3px solid #162019;
  border-bottom-width: 7px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbf6df 0%, #e1eadb 100%);
  box-shadow: var(--shadow);
}

.panel:nth-of-type(3n),
.card:nth-of-type(3n),
.operator-section:nth-of-type(3n),
.operator-inventory-card:nth-of-type(3n) {
  background: linear-gradient(180deg, #eff7ff 0%, #d6e8f6 100%);
}

.panel:nth-of-type(3n + 1),
.card:nth-of-type(3n + 1),
.operator-section:nth-of-type(3n + 1),
.operator-inventory-card:nth-of-type(3n + 1) {
  background: linear-gradient(180deg, #fff4cc 0%, #f4dc9b 100%);
}

.panel:nth-of-type(3n + 2),
.card:nth-of-type(3n + 2),
.operator-section:nth-of-type(3n + 2),
.operator-inventory-card:nth-of-type(3n + 2) {
  background: linear-gradient(180deg, #e9f8e6 0%, #cbe5c4 100%);
}

.event-command-hero,
.card-next,
.operator-hero {
  background:
    linear-gradient(180deg, #dff1ff 0%, #92c4ee 100%);
}

.card-payment,
.payment-item,
.payment-instruction-block {
  background:
    linear-gradient(180deg, #ffe8aa 0%, #f0bf5d 100%);
}

.record-row,
.lead-list-row,
.event-list-row,
.ops-row,
.attention-item,
.warning-item,
.equipment-item,
.quick-note,
.facts-grid > div,
.detail-grid > div,
.inline-note-block,
.operator-facts div,
.operator-big-facts div,
.operator-info-block,
.operator-note,
.operator-list-item,
.account-row,
.month-day,
.week-day,
.event-pill,
.week-event-block,
.agenda-card {
  border: 2px solid rgba(22, 32, 25, 0.82);
  border-bottom-width: 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf0 0%, #ece7d0 100%);
  box-shadow: 0 5px 0 rgba(22, 32, 25, 0.2);
}

.record-row:hover,
.lead-list-row:hover,
.event-list-row:hover,
.attention-item:hover,
.warning-item:hover,
.equipment-item:hover,
.quick-note:hover,
.ops-row:hover,
.facts-grid > div:hover,
.detail-grid > div:hover {
  transform: translateY(1px);
  border-color: #173d7a;
  box-shadow: 0 3px 0 rgba(22, 32, 25, 0.25);
}

.button-link,
.public-button,
.operator-home-link,
.operator-primary-action,
.operator-secondary-action,
.operator-filter-tab,
.calendar-day-add,
.resolve-toggle,
.view-toggle a,
.content-card-subnav a,
.big-action-button,
.person-tile,
.gear-tile,
.status-tile,
.money-tile,
.three-state-button,
.operator-action-card,
.recipient-card {
  min-height: 58px;
  border: 3px solid #111914;
  border-bottom-width: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf0 0%, #dce8d8 100%);
  color: #132018;
  box-shadow: 0 8px 0 rgba(17, 25, 20, 0.26);
  font-weight: 950;
}

.button-link:hover,
.public-button:hover,
.operator-home-link:hover,
.operator-primary-action:hover,
.operator-secondary-action:hover,
.operator-filter-tab:hover,
.calendar-day-add:hover,
.resolve-toggle:hover,
.view-toggle a:hover,
.content-card-subnav a:hover,
.big-action-button:hover,
.person-tile:hover,
.gear-tile:hover,
.status-tile:hover,
.money-tile:hover,
.three-state-button:hover,
.operator-action-card:hover,
.recipient-card:hover {
  transform: translateY(2px);
  background: linear-gradient(180deg, #e7f4ff 0%, #a7cdf2 100%);
  box-shadow: 0 5px 0 rgba(17, 25, 20, 0.32);
}

.primary-action,
.operator-primary-action,
.button-link.primary-action,
.big-action-button.is-selected,
.person-tile.is-selected,
.gear-tile.is-selected,
.status-tile.is-selected,
.money-tile.is-selected,
.three-state-button.is-selected,
.operator-action-card.is-complete,
.operator-filter-tab.is-active {
  border-color: #0d1712;
  background: linear-gradient(180deg, #3aa67e 0%, #17634e 100%);
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.status-pill,
.need-badge,
.count-pill,
.mini-badge,
.operations-progress-state,
.gear-chip,
.equipment-type-chip {
  min-height: 34px;
  border: 2px solid #172019;
  border-bottom-width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffaf0 0%, #ddd8c4 100%);
  color: #172019;
  box-shadow: 0 3px 0 rgba(17, 25, 20, 0.18);
}

.payment-badge {
  background: linear-gradient(180deg, #ffe39a 0%, #d9981c 100%);
  color: #211704;
}

.status-ok {
  background: linear-gradient(180deg, #dff8d5 0%, #6cbd75 100%);
  color: #092414;
}

.needs-yellow,
.operator-warning-box,
.operator-alert-yellow,
.severity-yellow,
.status-needs-operator,
.status-needs-equipment-check,
.status-follow-up-needed {
  border-color: #5b3f00;
  background: linear-gradient(180deg, #fff0a9 0%, #e0b84c 100%);
  color: #251a00;
}

.needs-red,
.operator-danger-box,
.operator-alert-red,
.severity-red {
  border-color: #5e1b14;
  background: linear-gradient(180deg, #ffd9cf 0%, #df7868 100%);
  color: #2a0c08;
}

.admin-search,
.admin-select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.operator-search-wrap input,
.operator-closeout-form select,
.operator-closeout-form textarea,
.operator-form-field input,
.operator-action-note textarea,
.inline-editor-input,
.inline-editor-textarea,
.inline-editor-select {
  min-height: 50px;
  border: 3px solid #172019;
  border-bottom-width: 6px;
  border-radius: 10px;
  background: #fffaf0;
  color: #111914;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.1);
  font-weight: 800;
}

.backend-tab-nav,
.content-card-subnav,
.operator-filter-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  overflow: visible;
  overscroll-behavior-x: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  touch-action: auto;
}

.backend-tab-nav {
  width: min(1180px, calc(100vw - 22px));
  margin: 12px auto 0;
  padding: 0 0 12px;
}

.backend-tab-nav a,
.content-card-subnav a,
.operator-filter-tab {
  flex: initial;
  max-width: none;
  min-height: 72px;
  white-space: normal;
  scroll-snap-align: none;
}

.backend-page-swipe-nav a[data-page-key],
.content-card-subnav a {
  border-bottom-width: 8px;
}

.backend-tab-nav a[aria-current="page"],
.backend-tab-nav a.active,
.content-card-subnav a[aria-current="true"],
.content-card-subnav a.is-active {
  background: linear-gradient(180deg, #67b7ff 0%, #2368d5 100%);
  color: #ffffff;
  box-shadow: 0 8px 0 rgba(17, 25, 20, 0.34);
}

.big-button-grid,
.person-tile-grid,
.gear-tile-grid,
.status-tile-grid,
.money-tile-grid,
.quick-action-panel {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
}

.person-tile,
.gear-tile,
.status-tile,
.money-tile,
.operator-action-card,
.recipient-card {
  min-height: 112px;
  padding: 16px;
}

.tile-avatar {
  border: 2px solid #111914;
  border-bottom-width: 5px;
  background: linear-gradient(180deg, #fff6c5 0%, #e4b844 100%);
  box-shadow: 0 4px 0 rgba(17, 25, 20, 0.2);
}

.tile-title,
.operator-action-card strong {
  font-size: 18px;
}

.operator-actions-grid,
.operator-checklist-grid {
  gap: 14px;
}

.operator-inventory-card .three-state-group {
  gap: 10px;
}

.operator-inventory-card .three-state-button {
  min-height: 78px;
}

.app-shell-footer {
  border-top: 5px solid #111914;
  background: #18231f;
  color: #f4f0df;
}

body.shell-admin .app-shell-footer a,
body.shell-operator .app-shell-footer a,
body.shell-auth .app-shell-footer a {
  color: #fff0a9;
}

@media (max-width: 760px) {
  body.shell-admin,
  body.shell-operator {
    padding-bottom: calc(182px + env(safe-area-inset-bottom));
  }

  .admin-main,
  .operator-main {
    padding-inline: 10px;
  }

  .backend-page-title {
    width: calc(100vw - 20px);
    margin-top: 10px;
    margin-bottom: 12px;
    padding: 12px;
  }

  .backend-page-title h1 {
    font-size: 30px;
  }

  .backend-tab-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    justify-content: initial;
    width: 100%;
    max-height: none;
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
    border-top: 4px solid #111914;
    background: linear-gradient(180deg, #ffe39a 0%, #b77900 100%);
    box-shadow: 0 -9px 0 rgba(17, 25, 20, 0.28);
    overflow: visible;
  }

  .backend-tab-nav a {
    min-width: 0;
    min-height: 66px;
    padding: 8px 6px;
    font-size: 12px;
    line-height: 1.05;
  }

  .backend-tab-nav-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .backend-tab-nav-compact a {
    flex-basis: auto;
  }

  .dashboard-toolbar,
  .panel,
  .card,
  .operator-intro,
  .operator-job-card,
  .operator-section,
  .operator-hero,
  .operator-empty,
  .operator-inventory-controls,
  .operator-inventory-card {
    padding: 12px;
    border-bottom-width: 6px;
  }

  .big-button-grid,
  .person-tile-grid,
  .gear-tile-grid,
  .status-tile-grid,
  .money-tile-grid,
  .quick-action-panel,
  .operator-actions-grid,
  .operator-checklist-grid,
  .recipient-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .person-tile,
  .gear-tile,
  .status-tile,
  .money-tile,
  .recipient-card,
  .operator-action-card {
    min-height: 96px;
    padding: 10px;
  }

  .tile-title,
  .operator-action-card strong {
    font-size: 15px;
  }

  .tile-meta,
  .operator-action-card small {
    font-size: 11px;
  }

  .tile-avatar {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
  }

  .operator-inventory-card .three-state-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content-card-subnav,
  .operator-filter-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-card-subnav a,
  .operator-filter-tab {
    min-height: 62px;
  }
}

@media (max-width: 430px) {
  .big-button-grid,
  .person-tile-grid,
  .gear-tile-grid,
  .status-tile-grid,
  .money-tile-grid,
  .quick-action-panel,
  .operator-actions-grid,
  .operator-checklist-grid,
  .recipient-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operator-inventory-card .three-state-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Shared route-level tab mirror, adapted for BubbleTower backend pages. */
.shell-dom-nav {
  position: fixed;
  top: 150px;
  left: 50%;
  z-index: 85;
  width: min(1120px, calc(100vw - 24px));
  transform: translateX(-50%);
  padding: 8px;
  border: 2px solid rgba(255, 229, 153, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 25, 22, 0.9), rgba(19, 25, 22, 0.74));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.shell-dom-nav[hidden],
[data-dom-tab-nav][hidden],
[data-dom-tab-panel][hidden] {
  display: none !important;
}

.shell-dom-nav > div {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}

.shell-dom-nav button,
.content-card-subnav button,
.operator-route-tabs button {
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  color: #fff7dc;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  min-height: 40px;
  padding: 10px 14px;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.shell-dom-nav button {
  flex: 1 1 124px;
  max-width: 220px;
}

.shell-dom-nav button:hover,
.content-card-subnav button:hover,
.operator-route-tabs button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 229, 153, 0.62);
}

.shell-dom-nav button[aria-current="true"],
.shell-dom-nav button.is-active,
.content-card-subnav button[aria-selected="true"],
.content-card-subnav button.is-active,
.operator-route-tabs button[aria-selected="true"],
.operator-route-tabs button.is-active {
  border-color: #ffd76a;
  background: linear-gradient(180deg, #fff0a9 0%, #f5be3f 52%, #b97713 100%);
  color: #19140a;
  font-weight: 1000;
  box-shadow: 0 0 0 2px rgba(255, 215, 106, 0.22), 0 0 24px rgba(245, 190, 63, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.is-shell-nav-source {
  margin: 0 !important;
}

body.has-shell-dom-nav.shell-admin .backend-page-title,
body.has-shell-dom-nav.shell-operator .backend-page-title {
  margin-top: 86px;
}

[data-route-host].is-dom-swipe-left {
  animation: dom-swipe-left 220ms ease-out;
}

[data-route-host].is-dom-swipe-right {
  animation: dom-swipe-right 220ms ease-out;
}

@keyframes dom-swipe-left {
  0% {
    opacity: 0.82;
    transform: translateX(18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes dom-swipe-right {
  0% {
    opacity: 0.82;
    transform: translateX(-18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 760px), (pointer: coarse) {
  .shell-dom-nav {
    top: calc(84px + env(safe-area-inset-top));
    width: calc(100vw - 18px);
    padding: 7px;
    border-radius: 14px;
  }

  .shell-dom-nav > div {
    justify-content: flex-start;
    min-height: 40px;
  }

  .shell-dom-nav button {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
    min-height: 38px;
    padding: 9px 10px;
  }

  body.has-shell-dom-nav.shell-admin .backend-page-title,
  body.has-shell-dom-nav.shell-operator .backend-page-title {
    margin-top: 72px;
  }
}

@media (max-width: 420px) {
  .shell-dom-nav button {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell-dom-nav button,
  .content-card-subnav button,
  .operator-route-tabs button {
    transition: none;
  }

  [data-route-host].is-dom-swipe-left,
  [data-route-host].is-dom-swipe-right {
    animation: none;
  }
}

/* Backend rail cleanup: complete main menu, compact route tabs, no mobile overlay. */
body.shell-admin .backend-tab-nav,
body.shell-operator .backend-tab-nav {
  position: static;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  align-items: stretch;
  width: min(1180px, calc(100vw - 22px));
  margin: 12px auto 0;
  padding: 0 0 12px;
  gap: 10px;
  overflow: visible;
}

body.shell-admin .backend-tab-nav a,
body.shell-operator .backend-tab-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 66px;
  padding: 10px 8px;
  border: 3px solid #162019;
  border-bottom-width: 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f9f8ef 0%, #dfe9d7 100%);
  color: #09275c;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 7px 0 rgba(17, 25, 20, 0.28);
}

body.shell-admin .backend-tab-nav a[aria-current="page"],
body.shell-admin .backend-tab-nav a.active,
body.shell-operator .backend-tab-nav a[aria-current="page"],
body.shell-operator .backend-tab-nav a.active {
  background: linear-gradient(180deg, #67b7ff 0%, #2368d5 100%);
  color: #ffffff;
  border-color: #154eb4;
}

.shell-dom-nav {
  position: sticky;
  top: 0;
  left: auto;
  z-index: 70;
  width: min(1120px, calc(100vw - 22px));
  margin: 0 auto 14px;
  transform: none;
}

.shell-dom-nav > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  align-items: stretch;
}

.shell-dom-nav button {
  max-width: none;
}

body.has-shell-dom-nav.shell-admin .backend-page-title,
body.has-shell-dom-nav.shell-operator .backend-page-title {
  margin-top: 12px;
}

.operator-inventory-card {
  gap: 9px;
}

.operator-inventory-card .operator-card-top {
  align-items: center;
}

.operator-inventory-card h3 {
  margin-top: 0;
}

.operator-inventory-meta {
  border: 2px solid rgba(22, 32, 25, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  padding: 0;
}

.operator-inventory-meta summary {
  cursor: pointer;
  min-height: 44px;
  padding: 11px 12px;
  color: #102016;
  font-weight: 950;
}

.operator-inventory-meta > div {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

@media (max-width: 760px), (pointer: coarse) {
  body.shell-admin,
  body.shell-operator {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  body.shell-admin .public-header-inner,
  body.shell-operator .public-header-inner {
    min-height: 54px;
    width: calc(100vw - 18px);
    padding: 4px 0;
  }

  body.shell-admin .public-brand,
  body.shell-operator .public-brand {
    gap: 6px;
  }

  body.shell-admin .public-brand img,
  body.shell-operator .public-brand img {
    width: 48px;
    height: 36px;
  }

  body.shell-admin .public-brand strong,
  body.shell-operator .public-brand strong {
    font-size: 15px;
    line-height: 1.05;
  }

  body.shell-admin .brand-copy span,
  body.shell-operator .brand-copy span {
    font-size: 12px;
    line-height: 1.05;
  }

  body.shell-admin .backend-tab-nav,
  body.shell-operator .backend-tab-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100vw - 18px);
    margin-top: 4px;
    padding: 0 0 5px;
    gap: 5px;
  }

  body.shell-operator .backend-tab-nav-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.shell-admin .backend-tab-nav a,
  body.shell-operator .backend-tab-nav a {
    min-height: 42px;
    padding: 6px 4px;
    border-width: 2px;
    border-bottom-width: 5px;
    border-radius: 7px;
    font-size: 11px;
  }

  .shell-dom-nav {
    top: 0;
    width: calc(100vw - 18px);
    margin-bottom: 8px;
    padding: 6px;
  }

  .shell-dom-nav > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .shell-dom-nav button {
    min-height: 34px;
    padding: 7px 6px;
    font-size: 11px;
    white-space: normal;
  }

  body.has-shell-dom-nav.shell-admin .backend-page-title,
  body.has-shell-dom-nav.shell-operator .backend-page-title {
    margin-top: 10px;
  }

  .operator-inventory-card .operator-card-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .operator-inventory-card h3 {
    font-size: 22px;
  }

  .operator-inventory-card .operator-badges {
    gap: 6px;
  }

  body.shell-admin .backend-rail-actions,
  body.shell-operator .backend-rail-actions {
    max-width: 38vw;
    justify-content: flex-end;
  }

  body.shell-admin .backend-rail-link,
  body.shell-operator .backend-rail-link {
    display: none;
  }

  body.shell-admin .backend-account-chip,
  body.shell-operator .backend-account-chip {
    max-width: 100%;
    min-height: 44px;
    padding: 8px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0;
  }

  body.shell-admin .backend-account-chip::before,
  body.shell-operator .backend-account-chip::before {
    content: "Logout";
    font-size: 13px;
    font-weight: 950;
  }

  .operator-filter-tab,
  body.shell-admin .backend-tab-nav a,
  body.shell-operator .backend-tab-nav a {
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

/* Mobile operations UI v1: cleaner command-board shell for private backend. */
:root {
  --bt-navy: #083b73;
  --bt-navy-900: #06284d;
  --bt-blue: #2f7edb;
  --bt-blue-soft: #e8f3ff;
  --bt-cream: #fffaf0;
  --bt-surface: #ffffff;
  --bt-surface-warm: #fff8e4;
  --bt-gold: #f4b83f;
  --bt-gold-soft: #fff3cc;
  --bt-green: #29b873;
  --bt-green-soft: #dcf8e9;
  --bt-red: #d94848;
  --bt-red-soft: #fff0f0;
  --bt-ink: #102033;
  --bt-muted: #5e6b75;
  --bt-border: #d9e1e8;
  --bt-radius-sm: 10px;
  --bt-radius-md: 16px;
  --bt-radius-lg: 22px;
  --bt-radius-xl: 28px;
  --bt-shadow-soft: 0 8px 24px rgba(8, 59, 115, 0.10);
  --bt-shadow-card: 0 12px 32px rgba(8, 59, 115, 0.14);
  --bt-space-1: 0.25rem;
  --bt-space-2: 0.5rem;
  --bt-space-3: 0.75rem;
  --bt-space-4: 1rem;
  --bt-space-5: 1.5rem;
  --bt-space-6: 2rem;
  --bt-tap-min: 52px;
  --bt-tile-min: 76px;
  --bt-bottom-bar-height: 92px;
}

.bt-mobile-only,
.bt-bottom-actions {
  display: none;
}

.bt-event-thumb {
  display: block;
  width: 132px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(8, 59, 115, 0.12);
  border-radius: var(--bt-radius-sm);
  box-shadow: var(--bt-shadow-soft);
}

@media (max-width: 720px) {
  body.shell-admin,
  body.shell-operator {
    min-width: 0;
    padding-bottom: calc(var(--bt-bottom-bar-height) + 14px);
    color: var(--bt-ink);
    background:
      linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(248, 252, 255, 0.98)),
      var(--bt-cream);
  }

  body.shell-admin .app-shell-header,
  body.shell-operator .app-shell-header {
    position: static;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.shell-admin .public-header-inner,
  body.shell-operator .public-header-inner {
    min-height: 70px;
    padding: 10px 16px 6px;
    gap: 10px;
    background: transparent;
  }

  body.shell-admin .public-brand,
  body.shell-operator .public-brand {
    min-width: 0;
    gap: 10px;
  }

  body.shell-admin .public-brand img,
  body.shell-operator .public-brand img {
    width: 76px;
    height: 54px;
    object-fit: contain;
  }

  body.shell-admin .brand-copy strong,
  body.shell-operator .brand-copy strong {
    color: var(--bt-ink);
    font-size: 13px;
    line-height: 1.1;
  }

  body.shell-admin .brand-copy span,
  body.shell-operator .brand-copy span {
    color: var(--bt-muted);
    font-size: 11px;
    line-height: 1.25;
  }

  body.shell-admin .backend-rail-actions,
  body.shell-operator .backend-rail-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0;
  }

  body.shell-admin .backend-rail-link,
  body.shell-operator .backend-rail-link {
    display: none;
  }

  body.shell-admin .backend-account-chip,
  body.shell-operator .backend-account-chip {
    display: grid;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--bt-navy-900);
    background: #fff2d8;
    box-shadow: none;
    text-decoration: none;
  }

  body.shell-admin .backend-account-chip::before,
  body.shell-operator .backend-account-chip::before {
    content: none;
  }

  body.shell-admin .backend-account-avatar,
  body.shell-operator .backend-account-avatar {
    display: block;
    font-size: 13px;
    font-weight: 900;
  }

  body.shell-admin .backend-account-copy,
  body.shell-operator .backend-account-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  body.shell-admin .backend-page-title,
  body.shell-operator .backend-page-title {
    display: none;
  }

  body.shell-admin .admin-main,
  body.shell-operator .admin-main {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 10px 14px calc(var(--bt-bottom-bar-height) + 18px);
  }

  body.shell-admin .backend-tab-nav,
  body.shell-operator .backend-tab-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 6px 14px 10px;
    gap: 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  body.shell-operator .backend-tab-nav-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  body.shell-admin .backend-tab-nav a,
  body.shell-operator .backend-tab-nav a {
    display: grid;
    min-width: 0;
    min-height: 68px;
    padding: 8px 6px 9px;
    place-items: center;
    align-content: center;
    gap: 5px;
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: 10px;
    color: var(--bt-ink);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 12px rgba(8, 59, 115, 0.06);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.12;
    text-align: center;
    text-transform: none;
    white-space: normal;
  }

  body.shell-operator .backend-tab-nav a {
    min-height: 52px;
    padding: 6px 4px;
    font-size: 10px;
  }

  body.shell-admin .backend-tab-nav a::before,
  body.shell-operator .backend-tab-nav a::before {
    content: attr(data-bt-icon);
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: var(--bt-navy);
    background: var(--bt-blue-soft);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="home"]::before,
  body.shell-operator .backend-tab-nav a[data-bt-icon="home"]::before {
    content: "Dashboard";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="board"]::before {
    content: "Board";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="calendar"]::before {
    content: "Cal";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="gigs"]::before,
  body.shell-operator .backend-tab-nav a[data-bt-icon="gigs"]::before {
    content: "Gig";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="quotes"]::before {
    content: "Quote";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="tools"]::before,
  body.shell-operator .backend-tab-nav a[data-bt-icon="tools"]::before {
    content: "Tool";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="gear"]::before,
  body.shell-operator .backend-tab-nav a[data-bt-icon="gear"]::before {
    content: "Gear";
  }

  body.shell-admin .backend-tab-nav a[data-bt-icon="money"]::before {
    content: "$";
  }

  body.shell-admin .backend-tab-nav a[aria-current="page"],
  body.shell-admin .backend-tab-nav a.active,
  body.shell-operator .backend-tab-nav a[aria-current="page"],
  body.shell-operator .backend-tab-nav a.active {
    border-color: rgba(47, 126, 219, 0.45);
    color: var(--bt-navy);
    background: #eaf4ff;
    box-shadow: inset 0 0 0 1px rgba(47, 126, 219, 0.18), 0 6px 16px rgba(8, 59, 115, 0.09);
  }

  .shell-dom-nav {
    top: 0;
    width: min(100%, 430px);
    margin: 0 auto 10px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .shell-dom-nav > div {
    display: flex;
    gap: 0;
    padding: 4px;
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 6px 18px rgba(8, 59, 115, 0.06);
    overflow-x: auto;
  }

  .shell-dom-nav button {
    flex: 1 0 max(92px, 24%);
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--bt-muted);
    background: transparent;
    box-shadow: none;
    font-size: 11px;
    font-weight: 900;
    text-transform: none;
  }

  .shell-dom-nav button[aria-current="true"],
  .shell-dom-nav button.is-active {
    border-color: rgba(244, 184, 63, 0.62);
    color: var(--bt-navy-900);
    background: linear-gradient(180deg, #fff9e8, var(--bt-gold-soft));
    box-shadow: 0 4px 12px rgba(244, 184, 63, 0.18);
  }

  .dashboard-toolbar,
  .card,
  .panel,
  .operations-event-card,
  .operations-need-item,
  .operator-intro,
  .operator-job-card,
  .operator-section {
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: var(--bt-radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--bt-shadow-soft);
  }

  .dashboard-toolbar {
    margin: 0 0 12px;
    padding: 12px;
  }

  .dashboard-toolbar h2,
  .card-header h2 {
    color: var(--bt-navy-900);
    font-size: 16px;
    line-height: 1.2;
  }

  .bt-dashboard-search {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .bt-dashboard-search > div:first-child {
    display: none;
  }

  .bt-dashboard-search .toolbar-actions {
    display: block;
  }

  .bt-dashboard-search .toolbar-actions > a {
    display: none;
  }

  .search-wrap {
    display: block;
    min-width: 0;
  }

  .search-wrap > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .admin-search,
  .admin-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(8, 59, 115, 0.14);
    border-radius: 14px;
    color: var(--bt-ink);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
    font-size: 14px;
  }

  .bt-mobile-only {
    display: block;
  }

  .bt-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 12px;
  }

  .bt-summary-card {
    display: grid;
    min-height: 86px;
    padding: 11px 10px;
    align-content: space-between;
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: 12px;
    color: var(--bt-navy-900);
    background: var(--bt-surface);
    box-shadow: 0 5px 14px rgba(8, 59, 115, 0.07);
    text-decoration: none;
  }

  .bt-summary-card span {
    color: var(--bt-muted);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
  }

  .bt-summary-card strong {
    font-size: 25px;
    line-height: 1;
  }

  .bt-summary-danger {
    background: var(--bt-red-soft);
    border-color: rgba(217, 72, 72, 0.20);
  }

  .bt-summary-warning {
    background: var(--bt-gold-soft);
    border-color: rgba(244, 184, 63, 0.28);
  }

  .bt-summary-info {
    background: var(--bt-blue-soft);
    border-color: rgba(47, 126, 219, 0.20);
  }

  .bt-summary-success {
    background: var(--bt-green-soft);
    border-color: rgba(41, 184, 115, 0.24);
  }

  .dashboard-grid {
    display: grid;
    gap: 12px;
  }

  .card {
    padding: 13px;
  }

  .card-next {
    border-color: rgba(8, 59, 115, 0.12);
    background: rgba(255, 255, 255, 0.96);
  }

  .card-next .card-header,
  .event-command-hero .card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
  }

  .card-next .card-header .status-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .next-event-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 10px;
    align-items: start;
  }

  .next-event-side {
    grid-column: 2;
    grid-row: 1;
  }

  .card-next .facts-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .card-next .assigned-gear,
  .card-next .missing-stack,
  .card-next .inline-note-block {
    display: none;
  }

  .bt-event-thumb {
    width: 100px;
    min-width: 100px;
    border-radius: 10px;
  }

  .status-pill,
  .need-badge,
  .count-pill,
  .gear-chip {
    min-height: 26px;
    border-width: 1px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 11px;
    font-weight: 900;
  }

  .status-ok,
  .bt-chip-success {
    color: #10734a;
    background: var(--bt-green-soft);
    border-color: rgba(41, 184, 115, 0.26);
  }

  .payment-badge,
  .severity-yellow,
  .bt-chip-warning {
    color: #7c5510;
    background: var(--bt-gold-soft);
    border-color: rgba(244, 184, 63, 0.30);
  }

  .severity-red,
  .bt-chip-danger {
    color: #a42c2c;
    background: var(--bt-red-soft);
    border-color: rgba(217, 72, 72, 0.28);
  }

  .bt-command-topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 58px;
    min-height: 48px;
    margin: 0 0 10px;
    align-items: center;
    gap: 8px;
  }

  .bt-command-topbar strong {
    color: #111827;
    font-size: 15px;
    text-align: center;
  }

  .bt-command-back,
  .bt-command-edit {
    display: grid;
    min-height: 44px;
    place-items: center;
    border-radius: 12px;
    color: var(--bt-navy);
    font-weight: 900;
    text-decoration: none;
  }

  .bt-command-edit {
    justify-self: end;
    font-size: 13px;
  }

  .event-detail-shell {
    display: grid;
    gap: 12px;
  }

  .event-command-hero {
    margin-top: 0;
  }

  .event-command-hero .eyebrow,
  .event-command-hero .button-link,
  .event-command-hero .detail-subtitle,
  .event-command-hero .quick-action-panel {
    display: none;
  }

  .event-command-hero h2 {
    color: var(--bt-navy-900);
    font-size: 20px;
    line-height: 1.18;
  }

  .event-command-hero .badge-row {
    margin-top: 8px;
  }

  .bt-command-facts {
    padding: 0;
  }

  .bt-info-list {
    display: grid;
  }

  .bt-info-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid rgba(8, 59, 115, 0.08);
  }

  .bt-info-row:last-child {
    border-bottom: 0;
  }

  .bt-info-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: var(--bt-navy);
    background: var(--bt-blue-soft);
    font-size: 9px;
    font-weight: 900;
  }

  .bt-info-row strong,
  .bt-info-row small {
    display: block;
  }

  .bt-info-row small {
    margin-top: 2px;
    color: var(--bt-muted);
  }

  .operations-route {
    display: grid;
    gap: 12px;
  }

  .operations-toolbar {
    margin-top: 0;
  }

  .operations-toolbar .toolbar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .operations-summary-card {
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 5px 14px rgba(8, 59, 115, 0.07);
  }

  .operations-need-item {
    border-color: rgba(217, 72, 72, 0.20);
    background: var(--bt-red-soft);
  }

  .operations-event-card {
    padding: 13px;
    background: rgba(255, 255, 255, 0.95);
  }

  .operations-event-main,
  .operations-status,
  .operations-progress,
  .operations-readiness,
  .operations-actions {
    gap: 8px;
  }

  .operations-actions {
    grid-template-columns: 1fr;
  }

  .equipment-holder-group,
  .equipment-manager-row {
    border-radius: var(--bt-radius-md);
  }

  .equipment-manager-row {
    padding: 12px;
  }

  .app-shell-footer.public-footer {
    display: none;
  }

  .bt-bottom-actions {
    position: fixed;
    z-index: 40;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(410px, calc(100vw - 20px));
    min-height: var(--bt-bottom-bar-height);
    margin: 0 auto;
    padding: 10px 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: var(--bt-navy);
    box-shadow: 0 14px 32px rgba(6, 40, 77, 0.28);
  }

  .bt-bottom-action {
    display: grid;
    min-width: 0;
    min-height: 70px;
    place-items: center;
    align-content: center;
    gap: 5px;
    border-radius: 16px;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
  }

  .bt-bottom-action:focus-visible,
  .backend-tab-nav a:focus-visible,
  .shell-dom-nav button:focus-visible,
  .bt-summary-card:focus-visible {
    outline: 3px solid rgba(47, 126, 219, 0.42);
    outline-offset: 2px;
  }

  .bt-bottom-action-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
  }

  .bt-bottom-action-plus {
    color: var(--bt-navy);
    background: #ffffff;
    font-size: 24px;
    line-height: 1;
  }

  body.shell-admin .backend-tab-nav a::before,
  body.shell-operator .backend-tab-nav a::before {
    content: "" !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bt-bottom-actions,
  .bt-bottom-action,
  .bt-summary-card,
  .backend-tab-nav a {
    transition: none;
  }
}

@media (max-width: 720px) {
  body.shell-admin .backend-tab-nav a::before,
  body.shell-operator .backend-tab-nav a::before {
    display: none;
  }

  .bt-nav-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: var(--bt-navy);
    background: var(--bt-blue-soft);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
  }

  .event-command-hero,
  .event-command-hero.card,
  .event-detail-shell > .card.event-command-hero {
    background: rgba(255, 255, 255, 0.96);
  }

  .button-link,
  .primary-action,
  .danger-action {
    min-height: 44px;
    border-width: 1px;
    border-radius: 12px;
    border-bottom-width: 1px;
    color: var(--bt-navy);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 12px rgba(8, 59, 115, 0.07);
  }

  .operations-toolbar .button-link {
    min-height: 46px;
    font-size: 13px;
  }
}

/* Mobile workflow navigation v2: bottom primary dock + reason drawers. */
.backend-more-toggle,
.backend-more-sheet {
  display: none;
}

@media (max-width: 720px) {
  body.shell-admin,
  body.shell-operator {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  body.shell-admin .public-header-inner,
  body.shell-operator .public-header-inner {
    min-height: 76px;
    align-items: center;
  }

  body.shell-admin .backend-rail-actions,
  body.shell-operator .backend-rail-actions {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 6px;
    max-width: 54vw;
  }

  body.shell-admin .backend-rail-link,
  body.shell-operator .backend-rail-link {
    display: inline-grid;
    min-height: 34px;
    padding: 7px 9px;
    place-items: center;
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: 999px;
    color: var(--bt-navy);
    background: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
  }

  body.shell-admin .backend-rail-link[href*="/operator/"],
  body.shell-operator .backend-rail-link[href*="/admin/"] {
    display: none;
  }

  body.shell-admin .backend-account-chip,
  body.shell-operator .backend-account-chip {
    display: inline-flex;
    width: auto;
    max-width: 34vw;
    min-width: 0;
    height: auto;
    min-height: 40px;
    padding: 6px 9px 6px 6px;
    gap: 7px;
    justify-content: flex-start;
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: 999px;
  }

  body.shell-admin .backend-account-avatar,
  body.shell-operator .backend-account-avatar {
    display: grid;
    width: 28px;
    height: 28px;
    min-width: 28px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
  }

  body.shell-admin .backend-account-copy,
  body.shell-operator .backend-account-copy {
    position: static;
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    overflow: hidden;
    clip: auto;
    color: var(--bt-navy-900);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.shell-admin .backend-account-copy span,
  body.shell-operator .backend-account-copy span {
    display: block;
    color: var(--bt-muted);
    font-size: 10px;
    font-weight: 800;
  }

  body.shell-admin .backend-tab-nav,
  body.shell-operator .backend-tab-nav {
    position: fixed;
    z-index: 95;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    min-height: calc(74px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: rgba(8, 59, 115, 0.86);
    box-shadow: 0 -16px 36px rgba(6, 40, 77, 0.26);
    backdrop-filter: blur(16px);
  }

  body.shell-operator .backend-tab-nav-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.shell-admin .backend-tab-nav a,
  body.shell-admin .backend-more-toggle,
  body.shell-operator .backend-tab-nav a,
  body.shell-operator .backend-more-toggle {
    display: grid;
    min-width: 0;
    min-height: 58px;
    padding: 5px 3px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    white-space: normal;
  }

  body.shell-admin .backend-tab-nav a[data-mobile-secondary="true"],
  body.shell-operator .backend-tab-nav a[data-mobile-secondary="true"] {
    display: none;
  }

  body.shell-admin .backend-tab-nav a[aria-current="page"],
  body.shell-admin .backend-tab-nav a.active,
  body.shell-admin .backend-more-toggle.active,
  body.shell-admin .backend-more-toggle[aria-expanded="true"],
  body.shell-operator .backend-tab-nav a[aria-current="page"],
  body.shell-operator .backend-tab-nav a.active,
  body.shell-operator .backend-more-toggle[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  body.shell-admin .backend-tab-nav .bt-nav-icon,
  body.shell-admin .backend-more-toggle .bt-nav-icon,
  body.shell-operator .backend-tab-nav .bt-nav-icon,
  body.shell-operator .backend-more-toggle .bt-nav-icon {
    width: 27px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
  }

  body.shell-admin .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
  body.shell-admin .backend-tab-nav a.active .bt-nav-icon,
  body.shell-admin .backend-more-toggle.active .bt-nav-icon,
  body.shell-admin .backend-more-toggle[aria-expanded="true"] .bt-nav-icon,
  body.shell-operator .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
  body.shell-operator .backend-tab-nav a.active .bt-nav-icon,
  body.shell-operator .backend-more-toggle[aria-expanded="true"] .bt-nav-icon {
    color: var(--bt-navy);
    background: #ffffff;
  }

  .backend-more-sheet {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: grid;
    align-items: end;
    padding: 0 10px calc(82px + env(safe-area-inset-bottom));
    background: rgba(6, 40, 77, 0.22);
  }

  .backend-more-sheet[hidden] {
    display: none !important;
  }

  .backend-more-panel {
    display: grid;
    max-height: min(70vh, 560px);
    overflow: auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 24px;
    color: #ffffff;
    background: rgba(8, 59, 115, 0.92);
    box-shadow: 0 24px 44px rgba(6, 40, 77, 0.34);
    backdrop-filter: blur(18px);
  }

  .backend-more-header,
  .backend-more-panel section {
    display: grid;
    gap: 8px;
  }

  .backend-more-header {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .backend-more-header strong,
  .backend-more-panel h2 {
    margin: 0;
    color: #ffffff;
  }

  .backend-more-panel h2 {
    font-size: 11px;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0.72;
  }

  .backend-more-panel a,
  .backend-more-panel button {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.10);
    font-weight: 900;
    text-align: left;
    text-decoration: none;
  }

  .backend-more-header button {
    min-height: 34px;
    padding: 7px 10px;
    text-align: center;
  }

  .bt-mobile-drawer {
    display: block;
    border: 1px solid rgba(8, 59, 115, 0.10);
    border-radius: var(--bt-radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--bt-shadow-soft);
    overflow: clip;
  }

  .bt-mobile-drawer + .bt-mobile-drawer {
    margin-top: 10px;
  }

  .bt-mobile-drawer-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 56px;
    padding: 12px 14px;
    align-items: center;
    color: var(--bt-navy-900);
    cursor: pointer;
    font-weight: 950;
  }

  .bt-mobile-drawer-summary::-webkit-details-marker {
    display: none;
  }

  .bt-mobile-drawer-summary::after {
    content: "+";
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    color: var(--bt-navy);
    background: var(--bt-blue-soft);
    font-weight: 950;
  }

  .bt-mobile-drawer[open] .bt-mobile-drawer-summary::after {
    content: "-";
  }

  .bt-mobile-drawer-summary strong {
    margin-right: 30px;
    color: var(--bt-muted);
    font-size: 11px;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
  }

  .bt-mobile-drawer-body {
    padding: 0 10px 10px;
  }

  .bt-mobile-drawer-body > .card,
  .bt-mobile-drawer-body > .operator-section,
  .bt-mobile-drawer-body > .equipment-holder-group {
    border: 0;
    border-radius: 14px;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  body.shell-admin .public-header-inner,
  body.shell-operator .public-header-inner {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 10px 16px 8px;
    row-gap: 8px;
  }

  body.shell-admin .public-brand,
  body.shell-operator .public-brand {
    width: 100%;
  }

  body.shell-admin .brand-copy strong,
  body.shell-operator .brand-copy strong {
    font-size: 14px;
  }

  body.shell-admin .backend-rail-actions,
  body.shell-operator .backend-rail-actions {
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    max-width: none;
  }

  body.shell-admin .backend-account-chip,
  body.shell-operator .backend-account-chip {
    max-width: none;
    justify-self: stretch;
  }

  body.shell-admin .backend-account-copy,
  body.shell-operator .backend-account-copy {
    white-space: normal;
  }
}

/* Backend compact masthead + context search modal. */
body.shell-admin .app-shell-header,
body.shell-operator .app-shell-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(8, 59, 115, 0.10);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: 0 8px 20px rgba(8, 59, 115, 0.08);
  backdrop-filter: none;
}

body.shell-admin .public-header-inner,
body.shell-operator .public-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 6px 14px;
  gap: 10px;
}

body.shell-admin .public-brand,
body.shell-operator .public-brand {
  width: auto;
  min-width: 0;
}

body.shell-admin .public-brand img,
body.shell-operator .public-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

body.shell-admin .backend-rail-actions,
body.shell-operator .backend-rail-actions {
  display: flex;
  width: auto;
  max-width: none;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 7px;
}

body.shell-admin .backend-rail-link,
body.shell-operator .backend-rail-link,
body.shell-admin .backend-account-chip,
body.shell-operator .backend-account-chip {
  min-height: 34px;
  border-radius: 999px;
  font-size: 12px;
}

body.shell-admin .backend-rail-link,
body.shell-operator .backend-rail-link {
  padding: 7px 10px;
}

body.shell-admin .backend-account-chip,
body.shell-operator .backend-account-chip {
  appearance: none;
  display: inline-flex;
  width: auto;
  max-width: min(54vw, 260px);
  min-width: 0;
  padding: 4px 9px 4px 4px;
  gap: 7px;
  border: 1px solid rgba(8, 59, 115, 0.12);
  color: var(--bt-navy-900);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

body.shell-admin .backend-account-avatar,
body.shell-operator .backend-account-avatar {
  display: grid;
  width: 26px;
  height: 26px;
  min-width: 26px;
  margin: 0;
  place-items: center;
  border-radius: 999px;
  color: var(--bt-navy);
  background: var(--bt-blue-soft);
  font-size: 11px;
  font-weight: 950;
}

body.shell-admin .backend-account-copy,
body.shell-operator .backend-account-copy {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--bt-navy-900);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.shell-admin .backend-account-copy span,
body.shell-operator .backend-account-copy span {
  display: block;
  margin: 0;
  color: var(--bt-muted);
  font-size: 9px;
  font-weight: 850;
}

.backend-context-search,
.backend-account-dialog {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  padding: 64px 12px 18px;
  background: rgba(6, 40, 77, 0.25);
}

.backend-context-search {
  align-items: start;
}

.backend-account-dialog {
  align-items: start;
  justify-items: end;
}

.backend-context-search[hidden],
.backend-account-dialog[hidden] {
  display: none !important;
}

.backend-context-search-panel,
.backend-account-dialog-panel {
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 20px;
  background: rgba(8, 59, 115, 0.92);
  box-shadow: 0 24px 44px rgba(6, 40, 77, 0.28);
  backdrop-filter: blur(18px);
}

.backend-context-search-panel {
  width: min(680px, 100%);
  margin: 0 auto;
  color: #ffffff;
  overflow: hidden;
}

.backend-context-search-header,
.backend-account-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
}

.backend-context-search-header span,
.backend-account-dialog-header span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.backend-context-search-header strong,
.backend-account-dialog-header strong {
  color: #ffffff;
}

.backend-context-search-header button,
.backend-account-dialog-actions button,
.backend-account-dialog-actions a {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.backend-context-search-body {
  display: grid;
  gap: 10px;
  max-height: min(68vh, 560px);
  overflow: auto;
  padding: 0 14px 14px;
}

.backend-context-search-control {
  display: block;
}

.backend-context-search-control .search-wrap,
.backend-context-search-control .operator-search-wrap,
.backend-context-search-control .checkbox-filter {
  display: grid;
  width: 100%;
  gap: 6px;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

.backend-context-search-control .checkbox-filter {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.backend-context-search-control span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 850;
}

.backend-context-search-control input,
.backend-context-search-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  color: var(--bt-ink);
  background: rgba(255, 255, 255, 0.96);
}

.backend-account-dialog-panel {
  width: min(330px, calc(100vw - 24px));
  color: #ffffff;
}

.backend-account-dialog-header {
  grid-template-columns: auto minmax(0, 1fr);
}

.backend-account-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.backend-account-dialog-actions a {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff0a9 0%, #f5be3f 100%);
  color: #19140a;
}

.shell-dom-nav.has-context-search > div {
  align-items: center;
}

.shell-dom-search-button {
  position: relative;
  flex: 0 0 42px !important;
  width: 42px;
  max-width: 42px !important;
  min-height: 40px;
  padding: 0 !important;
  border-color: rgba(244, 184, 63, 0.62) !important;
  background: rgba(255, 243, 204, 0.92) !important;
  box-shadow: 0 4px 12px rgba(244, 184, 63, 0.16) !important;
}

.shell-dom-search-button::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid var(--bt-navy);
  border-radius: 999px;
  transform: translate(-2px, -2px);
}

.shell-dom-search-button::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: var(--bt-navy);
  transform: translate(8px, 8px) rotate(45deg);
}

@media (max-width: 720px) {
  body.shell-admin .app-shell-header,
  body.shell-operator .app-shell-header {
    position: sticky;
    top: 0;
    min-height: 0;
    backdrop-filter: none;
  }

  body.shell-admin .public-header-inner,
  body.shell-operator .public-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 46px;
    padding: 5px 10px;
    row-gap: 0;
  }

  body.shell-admin .public-brand,
  body.shell-operator .public-brand {
    width: auto;
  }

  body.shell-admin .public-brand img,
  body.shell-operator .public-brand img {
    width: 34px;
    height: 34px;
  }

  body.shell-admin .backend-rail-actions,
  body.shell-operator .backend-rail-actions {
    display: flex;
    width: auto;
    max-width: none;
    justify-content: flex-end;
    gap: 6px;
  }

  body.shell-admin .backend-rail-link,
  body.shell-operator .backend-rail-link {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 11px;
  }

  body.shell-admin .backend-account-chip,
  body.shell-operator .backend-account-chip {
    max-width: 48vw;
    min-height: 32px;
    padding: 3px 8px 3px 3px;
  }

  body.shell-admin .backend-account-avatar,
  body.shell-operator .backend-account-avatar {
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 10px;
  }

  body.shell-admin .backend-account-copy,
  body.shell-operator .backend-account-copy {
    font-size: 10px;
  }

  body.shell-admin .backend-account-copy span,
  body.shell-operator .backend-account-copy span {
    font-size: 8px;
  }

  body.shell-admin .backend-page-title,
  body.shell-operator .backend-page-title {
    display: none;
  }

  .shell-dom-nav {
    top: calc(46px + env(safe-area-inset-top));
    z-index: 115;
    width: 100%;
    padding: 4px 8px;
  }

  .shell-dom-nav > div {
    flex-wrap: nowrap;
    min-height: 38px;
    padding: 3px;
    overflow-x: auto;
  }

  .shell-dom-nav button:not(.shell-dom-search-button) {
    flex: 0 0 auto;
    min-width: 84px;
    min-height: 36px;
    padding: 7px 9px;
  }

  .shell-dom-search-button {
    flex-basis: 38px !important;
    width: 38px;
    max-width: 38px !important;
    min-width: 38px !important;
    min-height: 36px;
  }

  body.has-shell-dom-nav.shell-admin .admin-main,
  body.has-shell-dom-nav.shell-operator .admin-main {
    padding-top: 54px;
  }

  .backend-context-search,
  .backend-account-dialog {
    padding-top: calc(54px + env(safe-area-inset-top));
  }
}

/* Operations shell v3: mobile design becomes the backend/auth baseline. */
body.shell-admin,
body.shell-operator,
body.shell-auth {
  background:
    radial-gradient(circle at 18% 0%, rgba(232, 243, 255, 0.95), transparent 34rem),
    linear-gradient(180deg, var(--bt-cream) 0%, #f6fbff 46%, #ffffff 100%);
}

body.shell-admin .app-shell-header,
body.shell-operator .app-shell-header,
body.shell-auth .app-shell-header {
  position: sticky;
  top: 0;
  z-index: 130;
  padding: 0;
  border-bottom: 1px solid rgba(8, 59, 115, 0.10);
  background: rgba(255, 250, 240, 0.94);
  box-shadow: 0 10px 24px rgba(8, 59, 115, 0.08);
}

body.shell-admin .public-header-inner,
body.shell-operator .public-header-inner,
body.shell-auth .public-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 48px;
  padding: 5px clamp(10px, 2vw, 18px);
  gap: 10px;
  align-items: center;
}

body.shell-admin .public-brand img,
body.shell-operator .public-brand img,
body.shell-auth .public-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

body.shell-admin .backend-tab-nav,
body.shell-operator .backend-tab-nav,
body.shell-auth .backend-tab-nav {
  display: grid;
  width: min(1180px, calc(100vw - 24px));
  min-height: 64px;
  margin: 0 auto 8px;
  padding: 8px;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  align-items: stretch;
  justify-content: stretch;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(8, 59, 115, 0.90);
  box-shadow: 0 18px 34px rgba(6, 40, 77, 0.20);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.shell-auth .backend-auth-nav {
  width: min(460px, calc(100vw - 24px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.shell-admin .backend-tab-nav a,
body.shell-admin .backend-more-toggle,
body.shell-operator .backend-tab-nav a,
body.shell-operator .backend-more-toggle,
body.shell-auth .backend-tab-nav a {
  display: grid;
  min-width: 0;
  max-width: none;
  min-height: 48px;
  padding: 7px 6px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.84);
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

body.shell-admin .backend-tab-nav a[aria-current="page"],
body.shell-admin .backend-tab-nav a.active,
body.shell-operator .backend-tab-nav a[aria-current="page"],
body.shell-operator .backend-tab-nav a.active,
body.shell-auth .backend-tab-nav a[aria-current="page"],
body.shell-auth .backend-tab-nav a.active {
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.shell-admin .backend-tab-nav .bt-nav-icon,
body.shell-admin .backend-more-toggle .bt-nav-icon,
body.shell-operator .backend-tab-nav .bt-nav-icon,
body.shell-operator .backend-more-toggle .bt-nav-icon,
body.shell-auth .backend-tab-nav .bt-nav-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font-size: 10px;
  font-weight: 950;
}

body.shell-admin .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-admin .backend-tab-nav a.active .bt-nav-icon,
body.shell-operator .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-operator .backend-tab-nav a.active .bt-nav-icon,
body.shell-auth .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-auth .backend-tab-nav a.active .bt-nav-icon {
  color: var(--bt-navy);
  background: #ffffff;
}

body.shell-admin .backend-more-toggle,
body.shell-operator .backend-more-toggle {
  display: none;
}

body.shell-admin .shell-dom-nav,
body.shell-operator .shell-dom-nav {
  top: 132px;
  z-index: 120;
}

body.shell-auth .auth-main {
  display: grid;
  min-height: calc(100vh - 150px);
  padding-top: clamp(18px, 5vw, 44px);
  place-items: start center;
}

body.shell-auth .auth-panel {
  width: min(560px, calc(100vw - 24px));
  border: 1px solid rgba(8, 59, 115, 0.12);
  border-radius: var(--bt-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--bt-shadow-card);
}

body.shell-auth .auth-account-option {
  min-height: 58px;
  border-radius: 16px;
}

@media (min-width: 721px) {
  body.shell-admin,
  body.shell-operator {
    padding-bottom: 0;
  }

  body.shell-admin .admin-main,
  body.shell-operator .admin-main {
    padding-top: 28px;
  }

  body.has-shell-dom-nav.shell-admin .admin-main,
  body.has-shell-dom-nav.shell-operator .admin-main {
    padding-top: 82px;
  }
}

@media (max-width: 720px) {
  body.shell-admin .backend-tab-nav,
  body.shell-operator .backend-tab-nav {
    position: fixed;
    z-index: 95;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: calc(74px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
  }

  body.shell-operator .backend-tab-nav-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.shell-admin .backend-tab-nav a[data-mobile-secondary="true"],
  body.shell-operator .backend-tab-nav a[data-mobile-secondary="true"] {
    display: none;
  }

  body.shell-admin .backend-more-toggle,
  body.shell-operator .backend-more-toggle {
    display: grid;
  }

  body.shell-admin .shell-dom-nav,
  body.shell-operator .shell-dom-nav {
    top: calc(46px + env(safe-area-inset-top));
  }

  body.shell-auth .backend-tab-nav {
    width: calc(100vw - 20px);
    min-height: 54px;
    margin-bottom: 6px;
    padding: 6px;
    border-radius: 18px;
  }
}

/* Workflow drawers: gear-page pattern applied across backend pages. */
body.shell-admin .bt-mobile-drawer,
body.shell-operator .bt-mobile-drawer {
  display: block;
  margin: 0 0 12px;
  border: 1px solid rgba(8, 59, 115, 0.12);
  border-radius: var(--bt-radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--bt-shadow-soft);
  overflow: clip;
}

body.shell-admin .bt-mobile-drawer[hidden],
body.shell-operator .bt-mobile-drawer[hidden] {
  display: none !important;
}

body.shell-admin .bt-mobile-drawer-summary,
body.shell-operator .bt-mobile-drawer-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 12px 14px;
  gap: 10px;
  align-items: center;
  color: var(--bt-navy-900);
  cursor: pointer;
  font-weight: 950;
  list-style: none;
}

body.shell-admin .bt-mobile-drawer-summary::-webkit-details-marker,
body.shell-operator .bt-mobile-drawer-summary::-webkit-details-marker {
  display: none;
}

body.shell-admin .bt-mobile-drawer-summary::after,
body.shell-operator .bt-mobile-drawer-summary::after {
  content: "+";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--bt-navy);
  background: var(--bt-blue-soft);
  font-weight: 950;
}

body.shell-admin .bt-mobile-drawer[open] .bt-mobile-drawer-summary::after,
body.shell-operator .bt-mobile-drawer[open] .bt-mobile-drawer-summary::after {
  content: "-";
}

body.shell-admin .bt-mobile-drawer-summary > span,
body.shell-operator .bt-mobile-drawer-summary > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.shell-admin .bt-mobile-drawer-summary strong,
body.shell-operator .bt-mobile-drawer-summary strong {
  margin-right: 30px;
  color: var(--bt-muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

body.shell-admin .bt-mobile-drawer-body,
body.shell-operator .bt-mobile-drawer-body {
  padding: 0 10px 10px;
}

body.shell-admin .bt-mobile-drawer-body > .card,
body.shell-admin .bt-mobile-drawer-body > .panel,
body.shell-admin .bt-mobile-drawer-body > .operator-section,
body.shell-admin .bt-mobile-drawer-body > .operator-job-card,
body.shell-admin .bt-mobile-drawer-body > .equipment-holder-group,
body.shell-admin .bt-mobile-drawer-body > .operations-day,
body.shell-operator .bt-mobile-drawer-body > .card,
body.shell-operator .bt-mobile-drawer-body > .panel,
body.shell-operator .bt-mobile-drawer-body > .operator-section,
body.shell-operator .bt-mobile-drawer-body > .operator-job-card,
body.shell-operator .bt-mobile-drawer-body > .equipment-holder-group,
body.shell-operator .bt-mobile-drawer-body > .operations-day {
  margin: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

@media (min-width: 721px) {
  body.shell-admin .bt-mobile-drawer,
  body.shell-operator .bt-mobile-drawer {
    border-radius: var(--bt-radius-lg);
  }

  body.shell-admin .bt-mobile-drawer-summary,
  body.shell-operator .bt-mobile-drawer-summary {
    min-height: 62px;
    padding: 14px 16px;
  }
}

/* Backend entropy reduction v1: hierarchy and calmer shared components. */
body.shell-admin .backend-tab-nav,
body.shell-operator .backend-tab-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.shell-operator .backend-tab-nav-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.shell-admin .backend-tab-nav a[data-mobile-secondary="true"],
body.shell-operator .backend-tab-nav a[data-mobile-secondary="true"] {
  display: none;
}

body.shell-admin .backend-more-toggle,
body.shell-operator .backend-more-toggle {
  display: grid;
}

.backend-more-toggle {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.backend-more-sheet {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  align-items: start end;
  padding: 118px 16px 16px;
  background: rgba(6, 40, 77, 0.18);
}

.backend-more-sheet[hidden] {
  display: none !important;
}

.backend-more-panel {
  display: grid;
  width: min(380px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  overflow: auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  color: #ffffff;
  background: rgba(8, 59, 115, 0.94);
  box-shadow: 0 24px 44px rgba(6, 40, 77, 0.28);
}

.backend-more-header,
.backend-more-panel section {
  display: grid;
  gap: 8px;
}

.backend-more-header {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.backend-more-header strong,
.backend-more-panel h2 {
  margin: 0;
  color: #ffffff;
}

.backend-more-panel h2 {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.72;
}

.backend-more-panel a,
.backend-more-panel button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.10);
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: none;
}

.backend-rail-link {
  opacity: 0.82;
}

.dashboard-v0 > .card-next {
  order: 1;
}

.dashboard-v0 > [data-testid="needs-attention-card"] {
  order: 2;
  grid-column: 1 / -1;
}

.dashboard-v0 > .dashboard-missing-fields {
  order: 3;
}

.dashboard-v0 > .card-payment {
  order: 4;
}

.dashboard-v0 > [data-testid="equipment-card"] {
  order: 5;
}

.dashboard-v0 > [data-testid="quote-requests-card"] {
  order: 6;
}

.dashboard-v0 > [data-testid="upcoming-events-card"] {
  order: 7;
}

.dashboard-v0 > .dashboard-quick-notes {
  order: 8;
}

.dashboard-primary-actions,
.command-inline-action {
  margin-top: 8px;
}

.dashboard-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-primary-actions .button-link {
  flex: 1 1 92px;
  justify-content: center;
}

.card,
.panel,
.dashboard-toolbar,
.operator-intro,
.operator-job-card,
.operator-section,
.operator-hero,
.operator-empty,
.operator-inventory-controls,
.operator-inventory-card {
  border-width: 1px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(8, 59, 115, 0.07);
}

.button-link,
.primary-action,
.danger-action,
.operator-primary-action,
.operator-secondary-action,
.operator-home-link,
.operator-filter-tab,
.operator-action-card,
.recipient-card,
.operator-closeout-form button {
  border-width: 1px;
  border-bottom-width: 1px;
  border-radius: 8px;
  box-shadow: none;
  text-shadow: none;
}

.primary-action,
.operator-primary-action,
.operator-filter-tab.is-active,
.operator-action-card.is-complete {
  border-color: var(--bt-navy);
  background: var(--bt-navy);
  color: #ffffff;
}

.button-link:hover,
.operator-primary-action:hover,
.operator-secondary-action:hover,
.operator-home-link:hover,
.operator-filter-tab:hover,
.operator-action-card:hover,
.recipient-card:hover {
  transform: none;
  box-shadow: none;
}

.status-pill,
.need-badge,
.count-pill,
.gear-chip {
  border-radius: 999px;
  box-shadow: none;
}

.needs-yellow,
.operator-alert-yellow,
.operator-warning-box,
.payment-badge,
.severity-yellow {
  border-color: rgba(217, 154, 0, 0.45);
  background: var(--yellow-bg);
  color: #684500;
}

.needs-red,
.operator-alert-red,
.operator-danger-box,
.status-risk,
.severity-red {
  border-color: rgba(199, 54, 47, 0.45);
  background: var(--red-bg);
  color: #8a201c;
}

.status-ok,
.operator-alert-green {
  border-color: rgba(15, 118, 110, 0.42);
  background: #e8f6f3;
  color: var(--ok);
}

.event-detail-shell {
  display: grid;
  gap: 14px;
}

.event-detail-shell > .event-command-hero {
  order: 1;
}

.event-detail-shell > [data-testid="mobile-event-facts-card"] {
  order: 2;
}

.event-detail-shell > [data-testid="event-timing-card"] {
  order: 3;
}

.event-detail-shell > [data-testid="event-location-card"] {
  order: 4;
}

.event-detail-shell > [data-testid="event-contacts-card"] {
  order: 5;
}

.event-detail-shell > [data-testid="event-operator-card"] {
  order: 6;
}

.event-detail-shell > [data-testid="event-gear-requirements-card"] {
  order: 7;
}

.event-detail-shell > [data-testid="event-equipment-card"] {
  order: 8;
}

.event-detail-shell > [data-testid="event-tank-readiness-card"] {
  order: 9;
}

.event-detail-shell > [data-testid="event-payment-card"] {
  order: 10;
}

.event-detail-shell > [data-testid="event-logistics-card"] {
  order: 11;
}

.event-detail-shell > [data-testid="event-services-card"] {
  order: 12;
}

.event-detail-shell > [data-testid="admin-operator-actions-card"],
.event-detail-shell > [data-testid="admin-operator-checklist-card"],
.event-detail-shell > [data-testid="admin-operator-closeout-card"] {
  order: 13;
}

.event-detail-shell > [data-testid="event-overview-card"] {
  order: 14;
}

.event-detail-shell > [data-testid="event-needs-action-card"] {
  order: 15;
}

.operator-job-detail {
  display: grid;
  gap: 14px;
}

.operator-job-detail > .operator-hero {
  order: 1;
}

.operator-job-detail > [data-testid="operator-timing-section"] {
  order: 2;
}

.operator-job-detail > [data-testid="operator-location-section"] {
  order: 3;
}

.operator-job-detail > [data-testid="operator-contacts-section"] {
  order: 4;
}

.operator-job-detail > [data-testid="operator-equipment-section"] {
  order: 5;
}

.operator-job-detail > [data-testid="operator-tank-readiness-section"] {
  order: 6;
}

.operator-job-detail > [data-testid="operator-payment-section"] {
  order: 7;
}

.operator-job-detail > [data-testid="operator-actions-section"] {
  order: 8;
}

.operator-job-detail > [data-testid="operator-checklist-section"] {
  order: 9;
}

.operator-job-detail > [data-testid="operator-field-notes-section"] {
  order: 10;
}

.operator-job-detail > [data-testid="operator-closeout-section"] {
  order: 11;
}

.operator-job-detail > [data-testid="operator-needs-section"] {
  order: 12;
}

body.shell-operator .operator-intro,
body.shell-operator .operator-job-card,
body.shell-operator .operator-section,
body.shell-operator .operator-hero,
body.shell-operator .operator-empty,
body.shell-operator .operator-inventory-controls,
body.shell-operator .operator-inventory-card {
  background: rgba(255, 255, 255, 0.94);
}

body.shell-operator .operator-hero,
body.shell-operator .operator-field-report,
body.shell-operator .operator-closeout-section,
body.shell-operator .operator-checklist-section {
  background: #f5f9ff;
}

.owner-action-grid,
.sysadmin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.owner-action-card,
.sysadmin-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(16, 35, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--bt-navy);
  text-decoration: none;
  box-shadow: none;
}

.owner-action-card span,
.sysadmin-card span {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--bt-blue);
}

.owner-action-card strong,
.owner-action-card > span,
.sysadmin-card strong {
  font-size: 1.08rem;
}

.owner-action-card small,
.sysadmin-card small {
  color: var(--muted);
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(16, 35, 67, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--bt-navy);
  font-weight: 700;
  text-decoration: none;
}

.admin-page-prospecting .backend-page-title {
  border-top-color: #0f766e;
}

.backend-page-swipe-nav a[data-page-key="prospecting"] {
  border-bottom-color: #0f766e;
  background: #f2fdf9;
}

.prospecting-dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.prospecting-metric-card {
  display: grid;
  gap: 6px;
  min-height: 128px;
  color: var(--ink);
  text-decoration: none;
}

.prospecting-metric-card strong {
  font-size: 34px;
  line-height: 1;
}

.prospecting-metric-card span,
.detail-subtitle,
.prospect-note-preview {
  color: var(--muted);
}

.prospect-filter-panel {
  margin-bottom: 14px;
}

.prospect-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(140px, 0.8fr));
  gap: 10px;
  align-items: end;
}

.prospect-filter-checks,
.prospect-tag-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.prospect-filter-checks label,
.prospect-tag-checks label,
.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.prospect-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prospect-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.prospect-card .card-header {
  margin-bottom: 0;
}

.prospect-card h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.prospect-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prospect-card-facts > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.prospect-card-facts strong,
.prospect-card-facts span {
  overflow-wrap: anywhere;
}

.prospect-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.prospect-action-grid form,
.prospect-quick-actions form {
  display: contents;
}

.prospect-action-grid .button-link,
.prospect-quick-actions .big-action-button {
  width: 100%;
  justify-content: center;
}

.prospect-tags {
  margin-top: 0;
}

.prospect-tag-fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.prospect-tag-fieldset legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prospect-mini-form {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.prospect-touch-list {
  margin-top: 14px;
}

.prospect-import-shell-form {
  opacity: 0.78;
}

.sysadmin-main .panel,
.sysadmin-console {
  background: #ffffff;
}

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

.sysadmin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.sysadmin-table th,
.sysadmin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16, 35, 67, 0.12);
  text-align: left;
  vertical-align: top;
}

.sysadmin-table th {
  color: var(--bt-navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sysadmin-table code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
}

.small-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(16, 35, 67, 0.18);
  border-radius: 7px;
  background: #f8fbff;
  color: var(--bt-navy);
  font-weight: 800;
  text-decoration: none;
}

body.shell-sysadmin .backend-tab-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.shell-sysadmin .backend-tab-nav a[data-mobile-secondary="true"] {
  display: none;
}

body.shell-sysadmin .backend-more-toggle {
  display: grid;
}

@media (max-width: 720px) {
  body.shell-admin .backend-tab-nav,
  body.shell-operator .backend-tab-nav,
  body.shell-sysadmin .backend-tab-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.shell-operator .backend-tab-nav-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-v0 > [data-testid="needs-attention-card"],
  .dashboard-v0 > .dashboard-missing-fields {
    grid-column: auto;
  }

  .prospecting-dashboard-grid,
  .prospect-card-grid,
  .prospecting-dashboard-lists,
  .prospect-detail-secondary {
    grid-template-columns: 1fr;
  }

  .prospect-filter-grid,
  .prospect-card-facts,
  .prospect-action-grid {
    grid-template-columns: 1fr;
  }

  .event-detail-shell > [data-testid="mobile-event-facts-card"] {
    display: none;
  }
}

@media (min-width: 721px) {
  body.shell-admin .backend-tab-nav a[data-mobile-secondary="true"],
  body.shell-operator .backend-tab-nav a[data-mobile-secondary="true"],
  body.shell-sysadmin .backend-tab-nav a[data-mobile-secondary="true"] {
    display: grid;
  }

  body.shell-admin .backend-more-toggle,
  body.shell-operator .backend-more-toggle,
  body.shell-sysadmin .backend-more-toggle {
    display: none;
  }
}

/* Three-persona repair: sysadmin must render as a real console, not raw links. */
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  width: min(1180px, calc(100vw - 24px));
  margin: 10px auto 14px;
  padding: 8px;
  border: 1px solid rgba(16, 35, 67, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(16, 35, 67, 0.12);
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a,
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle {
  display: grid;
  min-height: 58px;
  place-items: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  color: var(--bt-navy);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a[aria-current="page"],
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a.active,
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle.active {
  border-color: rgba(222, 166, 21, 0.38);
  background: #fff7d8;
  color: var(--bt-navy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .bt-nav-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #eaf4ff;
  color: var(--bt-blue);
  font-size: 0.72rem;
  font-weight: 900;
}

body.shell-sysadmin .sysadmin-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

body.shell-sysadmin .sysadmin-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card {
  display: grid !important;
  gap: 7px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(16, 35, 67, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: var(--bt-navy);
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(16, 35, 67, 0.08);
}

body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card span,
body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card strong,
body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card small {
  display: block;
}

body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card span {
  color: var(--bt-blue);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card strong {
  color: var(--bt-navy);
  font-size: 1.05rem;
  line-height: 1.2;
}

body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.persona-preview-banner {
  background: #0b3d66;
  color: #ffffff;
}

.persona-preview-banner .public-section-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.persona-preview-banner strong,
.persona-preview-banner span {
  display: block;
}

.persona-preview-banner span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.persona-preview-banner .small-action {
  background: #ffffff;
  color: var(--bt-navy);
}

@media (max-width: 720px) {
  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav {
    position: fixed;
    z-index: 95;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: auto;
    margin: 0;
    padding: 6px;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    background: rgba(8, 59, 115, 0.97);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  }

  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a {
    min-height: 58px;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
  }

  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a[data-mobile-secondary="true"] {
    display: none !important;
  }

  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a[data-mobile-primary="true"],
  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle {
    display: grid !important;
  }

  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a[aria-current="page"],
  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a.active,
  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle.active {
    background: #ffffff;
    color: var(--bt-navy);
  }

  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .bt-nav-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
  }

  body.shell-sysadmin .admin-main {
    padding-bottom: 116px;
  }

  body.shell-sysadmin .sysadmin-card-grid {
    grid-template-columns: 1fr;
  }

  .persona-preview-banner .public-section-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Backend UI Unification v1
   Current backend surfaces use admin.css as the single private UI layer.
   Older page-specific rules above remain for compatibility, but this block is the active visual contract. */
body.shell-admin,
body.shell-operator,
body.shell-sysadmin,
body.shell-auth {
  --backend-bg: #f5f7fb;
  --backend-surface: #ffffff;
  --backend-surface-warm: #fffaf0;
  --backend-surface-blue: #f4f9ff;
  --backend-ink: #172033;
  --backend-muted: #64748b;
  --backend-line: rgba(23, 32, 51, 0.14);
  --backend-line-strong: rgba(23, 32, 51, 0.26);
  --backend-primary: #0b3b73;
  --backend-primary-strong: #082f5f;
  --backend-accent: #d89a18;
  --backend-green: #0f766e;
  --backend-amber: #b7791f;
  --backend-red: #b42318;
  --backend-shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
  --backend-shadow-soft: 0 6px 18px rgba(23, 32, 51, 0.06);
  min-height: 100vh;
  background: var(--backend-bg);
  color: var(--backend-ink);
}

body.shell-admin a,
body.shell-operator a,
body.shell-sysadmin a,
body.shell-auth a {
  color: var(--backend-primary);
}

body.shell-admin .app-shell-header,
body.shell-operator .app-shell-header,
body.shell-sysadmin .app-shell-header,
body.shell-auth .app-shell-header {
  position: sticky;
  top: 0;
  z-index: 130;
  border-bottom: 1px solid var(--backend-line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.shell-admin .backend-context-search,
body.shell-admin .backend-account-dialog,
body.shell-operator .backend-context-search,
body.shell-operator .backend-account-dialog,
body.shell-sysadmin .backend-context-search,
body.shell-sysadmin .backend-account-dialog {
  z-index: 180;
}

body.shell-admin .public-header-inner,
body.shell-operator .public-header-inner,
body.shell-sysadmin .public-header-inner,
body.shell-auth .public-header-inner {
  min-height: 68px;
}

body.shell-admin .backend-rail-link,
body.shell-admin .backend-account-chip,
body.shell-operator .backend-rail-link,
body.shell-operator .backend-account-chip,
body.shell-sysadmin .backend-rail-link,
body.shell-sysadmin .backend-account-chip,
body.shell-auth .backend-rail-link,
body.shell-auth .backend-account-chip {
  min-height: 42px;
  border: 1px solid var(--backend-line);
  border-radius: 8px;
  background: var(--backend-surface);
  color: var(--backend-primary);
  box-shadow: none;
  font-weight: 800;
}

body.shell-admin .backend-rail-link:hover,
body.shell-admin .backend-account-chip:hover,
body.shell-operator .backend-rail-link:hover,
body.shell-operator .backend-account-chip:hover,
body.shell-sysadmin .backend-rail-link:hover,
body.shell-sysadmin .backend-account-chip:hover,
body.shell-auth .backend-rail-link:hover,
body.shell-auth .backend-account-chip:hover {
  transform: none;
  border-color: var(--backend-primary);
  background: var(--backend-surface-blue);
  box-shadow: none;
}

body.shell-admin .backend-page-title,
body.shell-operator .backend-page-title,
body.shell-sysadmin .backend-page-title {
  width: min(1180px, calc(100vw - 24px));
  margin: 14px auto 16px;
  padding: 16px 18px;
  border: 1px solid var(--backend-line);
  border-left: 6px solid var(--backend-primary);
  border-radius: 8px;
  background: var(--backend-surface);
  box-shadow: var(--backend-shadow-soft);
}

body.shell-admin .backend-page-title h1,
body.shell-operator .backend-page-title h1,
body.shell-sysadmin .backend-page-title h1 {
  margin: 2px 0;
  color: var(--backend-ink);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  text-shadow: none;
}

body.shell-admin .backend-page-title .eyebrow,
body.shell-admin .backend-page-title p,
body.shell-operator .backend-page-title .eyebrow,
body.shell-operator .backend-page-title p,
body.shell-sysadmin .backend-page-title .eyebrow,
body.shell-sysadmin .backend-page-title p {
  color: var(--backend-muted);
}

body.shell-admin .admin-main,
body.shell-operator .admin-main,
body.shell-operator .operator-main,
body.shell-sysadmin .admin-main,
body.shell-auth .auth-main {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 10px 0 40px;
}

body.shell-operator .operator-main {
  max-width: 920px;
}

body.shell-admin .backend-tab-nav,
body.shell-operator .backend-tab-nav,
body.shell-sysadmin .backend-tab-nav,
body.shell-auth .backend-tab-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  width: min(1180px, calc(100vw - 24px));
  margin: 10px auto 14px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(8, 59, 115, 0.96);
  box-shadow: var(--backend-shadow);
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(8, 59, 115, 0.96);
  box-shadow: var(--backend-shadow);
}

body.shell-admin .backend-tab-nav a,
body.shell-admin .backend-more-toggle,
body.shell-operator .backend-tab-nav a,
body.shell-operator .backend-more-toggle,
body.shell-sysadmin .backend-tab-nav a,
body.shell-sysadmin .backend-more-toggle,
body.shell-auth .backend-tab-nav a {
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a,
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

body.shell-admin .backend-tab-nav a[aria-current="page"],
body.shell-admin .backend-tab-nav a.active,
body.shell-admin .backend-more-toggle.active,
body.shell-operator .backend-tab-nav a[aria-current="page"],
body.shell-operator .backend-tab-nav a.active,
body.shell-operator .backend-more-toggle.active,
body.shell-sysadmin .backend-tab-nav a[aria-current="page"],
body.shell-sysadmin .backend-tab-nav a.active,
body.shell-sysadmin .backend-more-toggle.active,
body.shell-auth .backend-tab-nav a[aria-current="page"],
body.shell-auth .backend-tab-nav a.active {
  background: #ffffff;
  color: var(--backend-primary);
  box-shadow: none;
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a[aria-current="page"],
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a.active,
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle.active {
  background: #ffffff;
  color: var(--backend-primary);
  box-shadow: none;
}

body.shell-admin .backend-tab-nav .bt-nav-icon,
body.shell-admin .backend-more-toggle .bt-nav-icon,
body.shell-operator .backend-tab-nav .bt-nav-icon,
body.shell-operator .backend-more-toggle .bt-nav-icon,
body.shell-sysadmin .backend-tab-nav .bt-nav-icon,
body.shell-sysadmin .backend-more-toggle .bt-nav-icon,
body.shell-auth .backend-tab-nav .bt-nav-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 900;
}

body.shell-admin .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-admin .backend-tab-nav a.active .bt-nav-icon,
body.shell-admin .backend-more-toggle.active .bt-nav-icon,
body.shell-operator .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-operator .backend-tab-nav a.active .bt-nav-icon,
body.shell-operator .backend-more-toggle.active .bt-nav-icon,
body.shell-sysadmin .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-sysadmin .backend-tab-nav a.active .bt-nav-icon,
body.shell-sysadmin .backend-more-toggle.active .bt-nav-icon,
body.shell-auth .backend-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-auth .backend-tab-nav a.active .bt-nav-icon {
  background: #eaf4ff;
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .bt-nav-icon {
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}

body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a[aria-current="page"] .bt-nav-icon,
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav a.active .bt-nav-icon,
body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav .backend-more-toggle.active .bt-nav-icon {
  background: #eaf4ff;
}

body.shell-admin .shell-dom-nav,
body.shell-operator .shell-dom-nav,
body.shell-sysadmin .shell-dom-nav {
  z-index: 90;
  width: min(1180px, calc(100vw - 24px));
  margin: 12px auto 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

body.shell-admin .shell-dom-nav > div,
body.shell-operator .shell-dom-nav > div,
body.shell-sysadmin .shell-dom-nav > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  border: 1px solid var(--backend-line);
  border-radius: 8px;
  background: var(--backend-surface);
  box-shadow: var(--backend-shadow-soft);
}

body.shell-admin .shell-dom-nav button,
body.shell-operator .shell-dom-nav button,
body.shell-sysadmin .shell-dom-nav button {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 220px;
  min-height: 38px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid var(--backend-line-strong);
  border-radius: 8px;
  background: var(--backend-surface);
  color: var(--backend-primary);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: nowrap;
}

body.shell-admin .shell-dom-nav button:hover,
body.shell-operator .shell-dom-nav button:hover,
body.shell-sysadmin .shell-dom-nav button:hover {
  border-color: var(--backend-primary);
  background: var(--backend-surface-blue);
  transform: none;
  box-shadow: none;
}

body.shell-admin .shell-dom-nav button[aria-current="true"],
body.shell-admin .shell-dom-nav button.is-active,
body.shell-operator .shell-dom-nav button[aria-current="true"],
body.shell-operator .shell-dom-nav button.is-active,
body.shell-sysadmin .shell-dom-nav button[aria-current="true"],
body.shell-sysadmin .shell-dom-nav button.is-active {
  border-color: rgba(216, 154, 24, 0.42);
  background: #fff7dc;
  color: var(--backend-ink);
}

body.shell-admin .shell-dom-search-button,
body.shell-operator .shell-dom-search-button,
body.shell-sysadmin .shell-dom-search-button {
  flex: 0 0 42px;
  width: 42px;
  max-width: 42px;
  border-color: var(--backend-line-strong) !important;
  background: var(--backend-surface-blue) !important;
  box-shadow: none !important;
}

body.shell-admin .panel,
body.shell-admin .card,
body.shell-admin .dashboard-toolbar,
body.shell-admin .auth-panel,
body.shell-operator .panel,
body.shell-operator .card,
body.shell-operator .operator-intro,
body.shell-operator .operator-job-card,
body.shell-operator .operator-section,
body.shell-operator .operator-hero,
body.shell-operator .operator-empty,
body.shell-operator .operator-inventory-controls,
body.shell-operator .operator-inventory-card,
body.shell-sysadmin .panel,
body.shell-sysadmin .card,
body.shell-sysadmin .sysadmin-console,
body.shell-auth .panel,
body.shell-auth .card,
body.shell-auth .auth-panel {
  border: 1px solid var(--backend-line);
  border-radius: 8px;
  background: var(--backend-surface);
  box-shadow: var(--backend-shadow-soft);
}

body.shell-admin .event-command-hero,
body.shell-admin .card-next,
body.shell-operator .operator-hero,
body.shell-sysadmin .sysadmin-console {
  background: var(--backend-surface-blue);
}

body.shell-admin .record-row,
body.shell-admin .lead-list-row,
body.shell-admin .event-list-row,
body.shell-admin .ops-row,
body.shell-admin .attention-item,
body.shell-admin .warning-item,
body.shell-admin .equipment-item,
body.shell-admin .quick-note,
body.shell-admin .facts-grid > div,
body.shell-admin .detail-grid > div,
body.shell-admin .inline-note-block,
body.shell-admin .account-row,
body.shell-admin .month-day,
body.shell-admin .week-day,
body.shell-admin .event-pill,
body.shell-admin .week-event-block,
body.shell-admin .agenda-card,
body.shell-operator .operator-facts div,
body.shell-operator .operator-big-facts div,
body.shell-operator .operator-info-block,
body.shell-operator .operator-note,
body.shell-operator .operator-list-item,
body.shell-sysadmin .record-row,
body.shell-sysadmin .lead-list-row,
body.shell-sysadmin .event-list-row,
body.shell-sysadmin .account-row,
body.shell-sysadmin .summary-card {
  border: 1px solid var(--backend-line);
  border-radius: 8px;
  background: var(--backend-surface);
  box-shadow: none;
}

body.shell-admin .record-row:hover,
body.shell-admin .lead-list-row:hover,
body.shell-admin .event-list-row:hover,
body.shell-admin .attention-item:hover,
body.shell-admin .warning-item:hover,
body.shell-admin .equipment-item:hover,
body.shell-admin .quick-note:hover,
body.shell-admin .ops-row:hover,
body.shell-admin .facts-grid > div:hover,
body.shell-admin .detail-grid > div:hover {
  transform: none;
  border-color: var(--backend-primary);
  box-shadow: var(--backend-shadow-soft);
}

body.shell-admin .button-link,
body.shell-admin .public-button,
body.shell-admin .calendar-day-add,
body.shell-admin .resolve-toggle,
body.shell-admin .view-toggle a,
body.shell-admin .content-card-subnav a,
body.shell-admin .big-action-button,
body.shell-admin .person-tile,
body.shell-admin .gear-tile,
body.shell-admin .status-tile,
body.shell-admin .money-tile,
body.shell-admin .three-state-button,
body.shell-admin .recipient-card,
body.shell-operator .button-link,
body.shell-operator .public-button,
body.shell-operator .operator-home-link,
body.shell-operator .operator-primary-action,
body.shell-operator .operator-secondary-action,
body.shell-operator .operator-filter-tab,
body.shell-operator .operator-action-card,
body.shell-operator .three-state-button,
body.shell-operator .recipient-card,
body.shell-sysadmin .button-link,
body.shell-sysadmin .public-button,
body.shell-sysadmin .small-action,
body.shell-auth .button-link,
body.shell-auth .public-button {
  min-height: 44px;
  border: 1px solid var(--backend-line-strong);
  border-radius: 8px;
  background: var(--backend-surface);
  color: var(--backend-primary);
  box-shadow: none;
  font-weight: 800;
  text-shadow: none;
}

body.shell-admin .button-link:hover,
body.shell-admin .public-button:hover,
body.shell-admin .calendar-day-add:hover,
body.shell-admin .resolve-toggle:hover,
body.shell-admin .view-toggle a:hover,
body.shell-admin .content-card-subnav a:hover,
body.shell-admin .big-action-button:hover,
body.shell-admin .person-tile:hover,
body.shell-admin .gear-tile:hover,
body.shell-admin .status-tile:hover,
body.shell-admin .money-tile:hover,
body.shell-admin .three-state-button:hover,
body.shell-admin .recipient-card:hover,
body.shell-operator .button-link:hover,
body.shell-operator .public-button:hover,
body.shell-operator .operator-home-link:hover,
body.shell-operator .operator-primary-action:hover,
body.shell-operator .operator-secondary-action:hover,
body.shell-operator .operator-filter-tab:hover,
body.shell-operator .operator-action-card:hover,
body.shell-operator .three-state-button:hover,
body.shell-operator .recipient-card:hover,
body.shell-sysadmin .button-link:hover,
body.shell-sysadmin .public-button:hover,
body.shell-sysadmin .small-action:hover,
body.shell-auth .button-link:hover,
body.shell-auth .public-button:hover {
  transform: none;
  border-color: var(--backend-primary);
  background: var(--backend-surface-blue);
  box-shadow: none;
}

body.shell-admin .primary-action,
body.shell-admin .button-link.primary-action,
body.shell-admin .big-action-button.is-selected,
body.shell-admin .person-tile.is-selected,
body.shell-admin .gear-tile.is-selected,
body.shell-admin .status-tile.is-selected,
body.shell-admin .money-tile.is-selected,
body.shell-admin .three-state-button.is-selected,
body.shell-operator .operator-primary-action,
body.shell-operator .operator-action-card.is-complete,
body.shell-operator .operator-filter-tab.is-active,
body.shell-operator .three-state-button.is-selected,
body.shell-sysadmin .button-link.primary-action,
body.shell-auth .button-link.primary-action {
  border-color: var(--backend-primary);
  background: var(--backend-primary);
  color: #ffffff;
}

body.shell-admin .status-pill,
body.shell-admin .need-badge,
body.shell-admin .count-pill,
body.shell-admin .mini-badge,
body.shell-admin .operations-progress-state,
body.shell-admin .gear-chip,
body.shell-admin .equipment-type-chip,
body.shell-admin .payment-badge,
body.shell-operator .status-pill,
body.shell-operator .need-badge,
body.shell-operator .operator-alert,
body.shell-sysadmin .status-pill,
body.shell-sysadmin .count-pill,
body.shell-sysadmin .mini-badge {
  min-height: 30px;
  border: 1px solid var(--backend-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--backend-ink);
  box-shadow: none;
  font-weight: 800;
}

body.shell-admin .status-ok,
body.shell-admin .status-ready,
body.shell-admin .status-paid,
body.shell-operator .operator-alert-green,
body.shell-sysadmin .status-ok,
body.shell-sysadmin .status-ready {
  border-color: rgba(15, 118, 110, 0.32);
  background: #e8f6f3;
  color: var(--backend-green);
}

body.shell-admin .needs-yellow,
body.shell-admin .operator-warning-box,
body.shell-admin .severity-yellow,
body.shell-admin .payment-badge,
body.shell-admin .status-needs-operator,
body.shell-admin .status-needs-equipment-check,
body.shell-admin .status-follow-up-needed,
body.shell-operator .operator-warning-box,
body.shell-operator .operator-alert-yellow,
body.shell-sysadmin .needs-yellow {
  border-color: rgba(183, 121, 31, 0.34);
  background: #fff7dc;
  color: #70480f;
}

body.shell-admin .needs-red,
body.shell-admin .operator-danger-box,
body.shell-admin .severity-red,
body.shell-operator .operator-danger-box,
body.shell-operator .operator-alert-red,
body.shell-sysadmin .needs-red {
  border-color: rgba(180, 35, 24, 0.34);
  background: #fff0ee;
  color: var(--backend-red);
}

body.shell-admin .admin-search,
body.shell-admin .admin-select,
body.shell-admin .admin-form input,
body.shell-admin .admin-form select,
body.shell-admin .admin-form textarea,
body.shell-admin .inline-editor-input,
body.shell-admin .inline-editor-textarea,
body.shell-admin .inline-editor-select,
body.shell-operator .operator-search-wrap input,
body.shell-operator .operator-closeout-form select,
body.shell-operator .operator-closeout-form textarea,
body.shell-operator .operator-form-field input,
body.shell-operator .operator-action-note textarea,
body.shell-operator .inline-editor-input,
body.shell-operator .inline-editor-textarea,
body.shell-operator .inline-editor-select,
body.shell-sysadmin .admin-search,
body.shell-sysadmin .admin-select,
body.shell-sysadmin input,
body.shell-sysadmin select,
body.shell-sysadmin textarea,
body.shell-auth input,
body.shell-auth select,
body.shell-auth textarea {
  min-height: 44px;
  border: 1px solid var(--backend-line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--backend-ink);
  box-shadow: none;
  font-weight: 700;
}

body.shell-operator .operator-inventory-grid,
body.shell-operator .operator-actions-grid,
body.shell-operator .operator-checklist-grid,
body.shell-admin .owner-action-grid,
body.shell-sysadmin .sysadmin-card-grid {
  gap: 12px;
}

body.shell-sysadmin .sysadmin-card-grid > a.sysadmin-card,
body.shell-admin .owner-action-card {
  border: 1px solid var(--backend-line);
  border-radius: 8px;
  background: var(--backend-surface);
  box-shadow: var(--backend-shadow-soft);
}

body.shell-sysadmin .sysadmin-table {
  border-collapse: separate;
  border-spacing: 0;
}

body.shell-sysadmin .sysadmin-table th,
body.shell-sysadmin .sysadmin-table td {
  border-bottom: 1px solid var(--backend-line);
}

@media (max-width: 720px) {
  body.shell-admin .admin-main,
  body.shell-operator .admin-main,
  body.shell-operator .operator-main,
  body.shell-sysadmin .admin-main {
    width: min(100%, calc(100vw - 20px));
    padding-bottom: 118px;
  }

  body.shell-admin .backend-page-title,
  body.shell-operator .backend-page-title,
  body.shell-sysadmin .backend-page-title {
    width: min(100%, calc(100vw - 20px));
    margin-top: 10px;
    padding: 14px;
  }

  body.shell-admin .backend-tab-nav,
  body.shell-operator .backend-tab-nav,
  body.shell-sysadmin .backend-tab-nav {
    position: fixed;
    z-index: 95;
    top: auto;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: auto;
    margin: 0;
    padding: 6px;
    border-radius: 18px;
    background: rgba(8, 59, 115, 0.97);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  }

  body.shell-operator .backend-tab-nav-compact,
  body.shell-sysadmin .backend-tab-nav.sysadmin-tab-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.shell-admin .backend-tab-nav a[data-mobile-secondary="true"],
  body.shell-operator .backend-tab-nav a[data-mobile-secondary="true"],
  body.shell-sysadmin .backend-tab-nav a[data-mobile-secondary="true"] {
    display: none !important;
  }

  body.shell-admin .backend-more-toggle,
  body.shell-operator .backend-more-toggle,
  body.shell-sysadmin .backend-more-toggle {
    display: grid !important;
  }

  body.shell-admin .panel,
  body.shell-admin .card,
  body.shell-operator .operator-intro,
  body.shell-operator .operator-job-card,
  body.shell-operator .operator-section,
  body.shell-operator .operator-hero,
  body.shell-operator .operator-empty,
  body.shell-operator .operator-inventory-controls,
  body.shell-operator .operator-inventory-card,
  body.shell-sysadmin .panel,
  body.shell-sysadmin .card {
    border-radius: 8px;
  }
}

body.shell-auth .backend-tab-nav,
body.shell-auth .backend-auth-nav {
  position: static;
  width: min(620px, calc(100vw - 24px));
  margin: 10px auto 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
