:root {
  --canvas: #fafafa;
  --surface: #ffffff;
  --ink: #1d1d1b;
  --muted: #676963;
  --line: #e8e8e3;
  --line-strong: #d8d9d3;
  --teal: #189b9f;
  --teal-dark: #127d80;
  --teal-pale: #e7f6f5;
  --lime: #befb62;
  --lime-soft: #efffd7;
  --pink: #ff0086;
  --pink-soft: #fff0f7;
  --red: #d73027;
  --red-soft: #fff0ef;
  --orange: #f97316;
  --orange-soft: #fff3e9;
  --yellow: #f6c945;
  --shadow: 0 18px 55px rgba(29, 29, 27, 0.08);
  --shadow-soft: 0 8px 28px rgba(29, 29, 27, 0.07);
  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --sidebar-width: 260px;
  --font-body: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-display: "Sigmar", "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 0%, rgba(190, 251, 98, 0.12), transparent 24rem),
    var(--canvas);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.16;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--surface);
  background: var(--ink);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(24, 155, 159, 0.35);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 22px 18px 18px;
  overflow-y: auto;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 12px 0 48px rgba(29, 29, 27, 0.03);
}

.brand-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 14px rgba(24, 155, 159, 0.22));
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 23px;
  line-height: 1;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
}

.icon-button:active {
  transform: scale(0.96);
}

.sidebar-close {
  display: none;
}

.pilot-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 26px 0 22px;
  padding: 12px;
  border: 1px solid #d9f4b0;
  border-radius: 14px;
  background: var(--lime-soft);
}

.pilot-chip__dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(24, 155, 159, 0.13);
}

.pilot-chip span:last-child {
  display: grid;
}

.pilot-chip strong {
  font-size: 12px;
  font-weight: 800;
}

.pilot-chip small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.store-control {
  padding: 0 4px 18px;
}

.store-control label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  appearance: none;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.select-wrap select:hover,
.select-wrap select:focus {
  border-color: var(--teal);
}

.select-wrap > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--teal-dark);
  font-size: 18px;
  pointer-events: none;
  transform: translateY(-55%);
}

.store-control p {
  margin: 7px 1px 0;
  color: var(--muted);
  font-size: 10px;
}

.primary-nav {
  display: grid;
  min-width: 0;
  overflow: hidden;
  gap: 6px;
}

.nav-link {
  position: relative;
  display: flex;
  gap: 11px;
  min-height: 46px;
  padding: 9px 12px;
  align-items: center;
  border-radius: 12px;
  color: #51534e;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link:hover {
  color: var(--teal-dark);
  background: var(--teal-pale);
  transform: translateX(2px);
}

.nav-link.is-active {
  color: var(--ink);
  background: var(--lime);
}

.nav-link.is-active::after {
  position: absolute;
  top: 9px;
  right: 0;
  bottom: 9px;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: var(--teal);
  content: "";
}

.nav-icon {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(29, 29, 27, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.sidebar-spacer {
  min-height: 28px;
  flex: 1 1 auto;
}

.admin-link {
  display: flex;
  gap: 11px;
  padding: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--canvas);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.admin-link:hover,
.admin-link.is-active {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.admin-link > span:first-child {
  display: inline-grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--surface);
  background: var(--ink);
}

.admin-link > span:last-child {
  display: grid;
}

.admin-link strong {
  font-size: 11px;
}

.admin-link small {
  color: var(--muted);
  font-size: 9px;
}

.sidebar-footnote {
  margin: 12px 0 0;
  color: #a2a49d;
  font-size: 9px;
  text-align: center;
}

.drawer-backdrop {
  display: none;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.mobile-header {
  display: none;
}

#main-content {
  min-height: 100vh;
  padding: 36px clamp(24px, 4vw, 62px) 56px;
}

#app {
  width: min(100%, 1440px);
  margin: 0 auto;
}

body.map-selection-mode {
  overflow: hidden;
  background: var(--teal-pale);
}

body.map-selection-mode .sidebar,
body.map-selection-mode .mobile-header,
body.map-selection-mode .drawer-backdrop {
  display: none !important;
}

body.map-selection-mode .workspace {
  margin-left: 0;
}

body.map-selection-mode #main-content {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}

body.map-selection-mode #app {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
}

.map-selection {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #dbece7;
  isolation: isolate;
}

.real-pilot-map {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #dbece7;
  font-family: var(--font-body);
}

.real-pilot-map .leaflet-tile-pane {
  filter: saturate(0.82) contrast(0.96);
}

.map-selection__panel {
  position: absolute;
  z-index: 1100;
  top: 22px;
  left: 50%;
  display: grid;
  width: min(620px, calc(100% - 160px));
  min-width: 420px;
  padding: 14px 16px;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 16px 50px rgba(29, 29, 27, 0.16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.map-selection__brand {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--teal);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(24, 155, 159, 0.25);
}

.map-selection__brand span {
  color: var(--lime);
}

.map-selection__panel .eyebrow {
  margin-bottom: 2px;
  color: var(--teal-dark);
  font-size: 8px;
}

.map-selection__panel h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.map-selection__panel p:last-child {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.map-selection__count,
.map-selection__hint {
  border: 1px solid rgba(24, 155, 159, 0.16);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(231, 246, 245, 0.94);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.map-selection__count {
  padding: 7px 10px;
}

.map-selection__hint {
  position: absolute;
  z-index: 1100;
  bottom: 30px;
  left: 50%;
  margin: 0;
  padding: 9px 13px;
  box-shadow: 0 8px 24px rgba(29, 29, 27, 0.12);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.map-selection__hint {
  display: flex;
  gap: 12px;
  align-items: center;
}

.map-selection__hint > span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.map-selection__dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 0, 134, 0.12);
}

.map-selection__fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  gap: 7px;
  align-items: center;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
}

.map-selection__fallback span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.real-pilot-map .leaflet-control-zoom {
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  box-shadow: 0 8px 26px rgba(29, 29, 27, 0.14);
}

.real-pilot-map .leaflet-control-zoom a {
  width: 36px;
  height: 36px;
  border-color: var(--line);
  color: var(--teal-dark);
  font: 700 20px/36px var(--font-body);
}

.real-pilot-map .leaflet-control-attribution {
  color: #62655f;
  background: rgba(255, 255, 255, 0.82);
  font-size: 8px;
}

.bbot-map-marker-wrap {
  overflow: visible !important;
  border: 0;
  background: transparent;
}

.bbot-map-site-card {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 10px 11px 9px;
  flex-direction: column;
  border: 1px solid rgba(216, 217, 211, 0.96);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 26px rgba(29, 29, 27, 0.18);
  font-family: var(--font-body);
  line-height: 1.15;
  backdrop-filter: blur(12px);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bbot-map-site-card::before {
  position: absolute;
  bottom: -14px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 4px 10px rgba(29, 29, 27, 0.24), 0 0 0 4px rgba(255, 0, 134, 0.13);
  content: "";
}

.bbot-map-site-card[data-vertical="south"]::before {
  top: -14px;
  bottom: auto;
}

.bbot-map-site-card[data-align="west"]::before {
  right: 4px;
}

.bbot-map-site-card[data-align="east"]::before {
  left: 4px;
}

.bbot-map-site-card[data-align="center"]::before {
  left: 50%;
  transform: translateX(-50%);
}

.bbot-map-site-card[data-status="watch"]::before,
.bbot-map-site-card[data-status="watch"] .bbot-map-site-card__status i {
  background: var(--orange);
}

.bbot-map-site-card[data-status="action"]::before,
.bbot-map-site-card[data-status="assistance"]::before,
.bbot-map-site-card[data-status="action"] .bbot-map-site-card__status i,
.bbot-map-site-card[data-status="assistance"] .bbot-map-site-card__status i {
  background: var(--red);
}

.bbot-map-site-card__top,
.bbot-map-site-card__meta,
.bbot-map-site-card__metrics {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
}

.bbot-map-site-card__top {
  gap: 7px;
}

.bbot-map-site-card__top strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bbot-map-site-card__top > span {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.bbot-map-site-card__meta {
  margin-top: 3px;
  gap: 6px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bbot-map-site-card__status {
  display: flex;
  min-width: 0;
  gap: 4px;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bbot-map-site-card__status i {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
}

.bbot-map-site-card__metrics {
  margin-top: auto;
  padding-top: 7px;
  gap: 7px;
  border-top: 1px solid var(--line);
}

.bbot-map-site-card__metrics > span {
  display: flex;
  min-width: 0;
  gap: 2px;
  flex-direction: column;
}

.bbot-map-site-card__metrics small {
  color: var(--muted);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bbot-map-site-card__metrics strong {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
}

.leaflet-marker-icon:hover .bbot-map-site-card,
.leaflet-marker-icon:focus-visible .bbot-map-site-card {
  border-color: rgba(24, 155, 159, 0.52);
  box-shadow: 0 14px 34px rgba(18, 125, 128, 0.23);
  transform: translateY(-3px);
}

.leaflet-marker-icon:focus-visible {
  outline: none;
}

@media (max-width: 720px) {
  .bbot-map-site-card {
    padding: 7px 8px 6px;
    border-radius: 12px;
  }

  .bbot-map-site-card__top strong {
    font-size: 10px;
  }

  .bbot-map-site-card__top > span {
    display: none;
  }

  .bbot-map-site-card__meta {
    margin-top: 2px;
    font-size: 6px;
  }

  .bbot-map-site-card__metrics {
    padding-top: 5px;
    gap: 4px;
  }

  .bbot-map-site-card__metrics small {
    font-size: 5px;
  }

  .bbot-map-site-card__metrics strong {
    font-size: 8px;
  }
}

.page {
  animation: page-enter 320ms ease both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.page-header__copy {
  min-width: 0;
  max-width: 820px;
}

.eyebrow {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: var(--lime);
  content: "";
}

.page-title {
  max-width: 960px;
  margin-bottom: 7px;
  font-size: clamp(28px, 3.3vw, 48px);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.page-title .display-word {
  color: var(--teal);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.page-subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-actions,
.button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 16px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: var(--surface);
  background: var(--teal);
  box-shadow: 0 9px 18px rgba(24, 155, 159, 0.2);
}

.button--primary:hover {
  background: var(--teal-dark);
}

.button--dark {
  color: var(--surface);
  background: var(--ink);
}

.button--lime {
  color: var(--ink);
  background: var(--lime);
}

.button--ghost {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button--ghost:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
}

.button--small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 11px;
}

.button__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.context-strip {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d8ecea;
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.context-store {
  display: flex;
  gap: 11px;
  min-width: 0;
  align-items: center;
}

.store-avatar {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--surface);
  background: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.context-store__copy {
  display: grid;
  min-width: 0;
}

.context-store__copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-store__copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-meta {
  display: flex;
  gap: 13px;
  align-items: center;
}

.status-pill,
.source-badge,
.soft-badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  padding: 7px 10px;
  color: #176140;
  background: #e8f8ef;
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill[data-status="watch"] {
  color: #8a5b00;
  background: #fff6da;
}

.status-pill[data-status="action"],
.status-pill[data-status="assistance"] {
  color: var(--red);
  background: var(--red-soft);
}

.updated-at {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.card {
  min-width: 0;
  border: 1px solid rgba(29, 29, 27, 0.06);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card--padded {
  padding: 22px;
}

.card--flat {
  box-shadow: none;
}

.card-heading {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.card-heading h2,
.card-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.card-link {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.selector-heading {
  display: flex;
  gap: 28px;
  margin-bottom: 22px;
  align-items: flex-end;
  justify-content: space-between;
}

.selector-heading > div:first-child {
  max-width: 720px;
}

.selector-heading h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 4.3vw, 58px);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.selector-heading p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.selector-heading__summary {
  display: grid;
  min-width: 176px;
  padding: 16px 18px;
  border: 1px solid #bfe4e2;
  border-radius: 16px;
  background: var(--teal-pale);
}

.selector-heading__summary strong {
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.selector-heading__summary span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
}

.selector-heading__summary small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.site-selector-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.pilot-map-card,
.machine-selector {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.pilot-map-card {
  padding: 18px;
}

.pilot-map-card__heading,
.machine-selector__heading {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
}

.pilot-map-card__heading .eyebrow,
.machine-selector__heading .eyebrow {
  margin-bottom: 4px;
}

.pilot-map-card__heading h2,
.machine-selector__heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.map-count {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-size: 9px;
  font-weight: 800;
}

.pilot-map {
  position: relative;
  min-height: 486px;
  overflow: hidden;
  border: 1px solid #d8e5df;
  border-radius: 18px;
  background:
    linear-gradient(154deg, rgba(255, 255, 255, 0.55), transparent 34%),
    repeating-linear-gradient(28deg, transparent 0 48px, rgba(255, 255, 255, 0.64) 49px 52px, transparent 53px 102px),
    #dcefe9;
  isolation: isolate;
}

.pilot-map::before {
  position: absolute;
  z-index: -1;
  inset: 9% -5% -8% 18%;
  border: 1px solid rgba(94, 133, 101, 0.23);
  background:
    radial-gradient(circle at 20% 28%, rgba(190, 251, 98, 0.42), transparent 24%),
    radial-gradient(circle at 72% 64%, rgba(24, 155, 159, 0.12), transparent 30%),
    #f5f6e9;
  clip-path: polygon(7% 7%, 42% 0, 75% 9%, 94% 27%, 100% 58%, 86% 88%, 57% 100%, 22% 91%, 0 63%);
  content: "";
}

.pilot-map::after {
  position: absolute;
  z-index: -1;
  top: 17%;
  right: -15%;
  width: 82%;
  height: 2px;
  background: rgba(249, 115, 22, 0.24);
  box-shadow: 0 105px 0 rgba(249, 115, 22, 0.18), 0 238px 0 rgba(249, 115, 22, 0.16);
  content: "";
  transform: rotate(-13deg);
}

.pilot-map__water,
.pilot-map__region {
  position: absolute;
  z-index: 0;
  color: rgba(18, 125, 128, 0.5);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.pilot-map__water {
  top: 20px;
  left: 18px;
}

.pilot-map__region {
  right: 18px;
  bottom: 14px;
  color: rgba(103, 105, 99, 0.5);
}

.pilot-map__pin {
  position: absolute;
  z-index: 2;
  top: var(--map-y);
  left: var(--map-x);
  display: flex;
  padding: 0;
  align-items: center;
  border: 0;
  background: transparent;
  animation: map-pin-in 360ms ease both;
  animation-delay: var(--pin-delay);
  transform: translate(-10px, -10px);
}

.pilot-map__dot {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 5px solid var(--surface);
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 4px 13px rgba(29, 29, 27, 0.2), 0 0 0 4px rgba(255, 0, 134, 0.13);
  transition: transform 180ms ease, background 180ms ease;
}

.pilot-map__label {
  margin-left: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(216, 217, 211, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(29, 29, 27, 0.08);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.pilot-map__pin--west .pilot-map__label {
  position: absolute;
  right: 27px;
  margin-left: 0;
}

.pilot-map__pin:hover .pilot-map__dot,
.pilot-map__pin:focus-visible .pilot-map__dot {
  background: var(--teal);
  transform: scale(1.18);
}

@keyframes map-pin-in {
  from {
    opacity: 0;
    transform: translate(-10px, 4px);
  }
}

.pilot-map-card__note {
  margin: 11px 2px 0;
  color: var(--muted);
  font-size: 9px;
}

.pilot-map-card__note span {
  margin-right: 5px;
  color: var(--pink);
}

.machine-selector {
  padding: 18px;
}

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

.machine-select-card {
  display: flex;
  min-width: 0;
  min-height: 216px;
  padding: 16px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--canvas);
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.machine-select-card:hover,
.machine-select-card:focus-visible {
  border-color: #a9dcd9;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.machine-select-card__top {
  display: flex;
  gap: 8px;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
}

.machine-select-card__top .status-pill {
  min-width: 0;
  max-width: 100%;
  padding: 6px 8px;
  flex: 0 1 auto;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

.machine-select-card__top .status-pill::before {
  flex: 0 0 7px;
}

.machine-select-card__serial {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.machine-select-card__name {
  display: block;
  margin-top: 15px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.machine-select-card__address {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.machine-select-card__test-source {
  display: grid;
  gap: 1px;
  margin-top: 9px;
  padding: 7px 8px;
  border-radius: 9px;
  color: var(--teal-dark);
  background: var(--teal-pale);
}

.machine-select-card__test-source small {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.machine-select-card__test-source strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.machine-select-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 15px;
}

.machine-select-card__metrics > span {
  display: grid;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.machine-select-card__metrics strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.machine-select-card__metrics small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.machine-select-card__cta {
  display: flex;
  margin-top: auto;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
}

.machine-select-card__cta span {
  font-size: 16px;
  transition: transform 180ms ease;
}

.machine-select-card:hover .machine-select-card__cta span {
  transform: translateX(3px);
}

.text-back-link {
  display: inline-flex;
  gap: 7px;
  margin-bottom: 14px;
  align-items: center;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.text-back-link:hover {
  text-decoration: underline;
}

.store-dashboard__header {
  display: flex;
  gap: 28px;
  padding: clamp(22px, 4vw, 38px);
  align-items: flex-end;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  color: var(--surface);
  background: var(--teal);
  box-shadow: 0 18px 45px rgba(18, 125, 128, 0.17);
}

.store-dashboard__header .eyebrow {
  color: var(--lime);
}

.store-dashboard__header .eyebrow::before {
  background: var(--surface);
}

.store-dashboard__header h1 {
  margin-bottom: 8px;
  font-size: clamp(29px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.store-dashboard__header p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
}

.store-dashboard__test-source {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  font-size: 8px;
  font-weight: 800;
}

.store-dashboard__status {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.store-dashboard__status .status-pill {
  color: var(--ink);
  background: var(--surface);
}

.store-dashboard__status small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
}

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

.store-dashboard__metrics > div {
  display: flex;
  min-height: 70px;
  padding: 13px 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.store-dashboard__metrics small {
  color: var(--muted);
  font-size: 9px;
}

.store-dashboard__metrics strong {
  font-size: 17px;
}

.section-intro {
  display: flex;
  gap: 20px;
  margin: 28px 0 14px;
  align-items: end;
  justify-content: space-between;
}

.section-intro h2 {
  margin-bottom: 3px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.entry-card {
  position: relative;
  display: flex;
  min-height: 220px;
  padding: 22px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.entry-card:hover {
  border-color: var(--entry-color, var(--teal));
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.entry-card[data-entry="stats"] {
  --entry-color: var(--pink);
}

.entry-card[data-entry="ops"] {
  --entry-color: var(--teal);
}

.entry-card[data-entry="business"] {
  --entry-color: var(--orange);
}

.entry-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.entry-card__icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--surface);
  background: var(--entry-color);
  font-size: 20px;
  font-weight: 800;
}

.entry-card__number {
  color: #d9dad5;
  font-family: var(--font-display);
  font-size: 30px;
}

.entry-card h3 {
  margin: 25px 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.entry-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.entry-card__cta {
  display: flex;
  margin-top: auto;
  align-items: center;
  color: var(--entry-color);
  font-size: 11px;
  font-weight: 800;
}

.entry-card__cta span {
  margin-left: 7px;
  transition: transform 180ms ease;
}

.entry-card:hover .entry-card__cta span {
  transform: translateX(4px);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.kpi-card {
  position: relative;
  min-height: 126px;
  padding: 19px 18px 17px 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent, var(--teal));
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.kpi-card[data-tone="pink"] {
  --accent: var(--pink);
}

.kpi-card[data-tone="lime"] {
  --accent: #8ecb31;
}

.kpi-card[data-tone="orange"] {
  --accent: var(--orange);
}

.kpi-card[data-tone="red"] {
  --accent: var(--red);
}

.kpi-card__label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.kpi-card__value {
  display: block;
  font-size: clamp(24px, 2.7vw, 36px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.kpi-card__detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

.kpi-card__icon {
  position: absolute;
  top: 15px;
  right: 15px;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: #f5f5f1;
  font-size: 13px;
  font-weight: 800;
}

.store-roster {
  display: grid;
  gap: 8px;
}

.store-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) 100px 100px 80px;
  gap: 14px;
  padding: 12px 13px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--canvas);
  transition: border-color 180ms ease, background 180ms ease;
}

button.store-row {
  width: 100%;
  text-align: left;
}

.store-row:hover,
.store-row.is-selected {
  border-color: #c8e8e6;
  background: var(--teal-pale);
}

.store-row__name {
  display: flex;
  gap: 10px;
  min-width: 0;
  align-items: center;
}

.store-row__name .store-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 11px;
}

.store-row__name span:last-child {
  display: grid;
  min-width: 0;
}

.store-row__name strong,
.store-row__name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-row__name strong {
  font-size: 11px;
}

.store-row__name small,
.store-row__metric small {
  color: var(--muted);
  font-size: 9px;
}

.store-row__metric {
  display: grid;
}

.store-row__metric strong {
  font-size: 12px;
}

.source-band {
  display: flex;
  gap: 12px;
  margin: 15px 0 22px;
  padding: 10px 13px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.source-band__label {
  padding-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.source-badge {
  padding: 4px 8px;
  color: var(--teal-dark);
  border: 1px solid #c5e8e6;
  background: var(--teal-pale);
}

.source-badge[data-source="simulation"] {
  color: #885300;
  border-color: #f5dda4;
  background: #fff5d9;
}

.data-notice {
  margin: -8px 0 20px;
  overflow: hidden;
  border: 1px solid #efddb3;
  border-left: 4px solid var(--yellow);
  border-radius: 13px;
  background: #fffdf7;
}

.data-notice summary {
  display: grid;
  min-height: 54px;
  padding: 10px 13px 10px 11px;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.data-notice summary::-webkit-details-marker {
  display: none;
}

.data-notice summary:focus-visible {
  outline: 3px solid rgba(246, 201, 69, 0.34);
  outline-offset: -3px;
}

.data-notice__icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: #7b5102;
  background: #fff1c2;
  font-size: 12px;
  font-weight: 900;
}

.data-notice__copy {
  display: flex;
  min-width: 0;
  gap: 1px;
  flex-direction: column;
}

.data-notice__copy strong {
  color: #61440b;
  font-size: 11px;
}

.data-notice__copy small {
  overflow: hidden;
  color: #896b31;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-notice__action {
  color: #74530f;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.data-notice__action--close,
.data-notice[open] .data-notice__action--open {
  display: none;
}

.data-notice[open] .data-notice__action--close {
  display: inline;
}

.data-notice ul {
  display: grid;
  margin: 0;
  padding: 0 16px 13px 54px;
  gap: 5px;
  color: #745b2c;
  font-size: 9px;
}

.data-notice li::marker {
  color: #d69d1f;
}

.data-notice[data-accuracy="test"] {
  border-color: #efc4b3;
  border-left-color: var(--orange);
  background: #fff8f4;
}

.data-notice[data-accuracy="test"] .data-notice__icon {
  color: #953813;
  background: #ffe1d3;
}

.data-notice[data-accuracy="test"] .data-notice__copy strong {
  color: #7f2f10;
}

.data-notice[data-accuracy="test"] .data-notice__copy small,
.data-notice[data-accuracy="test"] .data-notice__action,
.data-notice[data-accuracy="test"] ul {
  color: #8f4a2e;
}

.data-notice[data-no-details] summary {
  cursor: default;
}

.warning-stack {
  display: grid;
  gap: 8px;
  margin: -8px 0 20px;
}

.warning-item,
.info-callout,
.success-callout,
.error-callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  align-items: flex-start;
  border-radius: 13px;
  font-size: 11px;
}

.warning-item {
  color: #7b5102;
  border: 1px solid #f3dda8;
  background: #fff8e6;
}

.info-callout {
  color: #145e61;
  border: 1px solid #c9e9e7;
  background: var(--teal-pale);
}

.emptying-estimate {
  margin-bottom: 12px;
}

.success-callout {
  color: #176140;
  border: 1px solid #ccebd8;
  background: #edf9f2;
}

.error-callout {
  color: #9f241e;
  border: 1px solid #f0c5c2;
  background: var(--red-soft);
}

.warning-item > span:first-child,
.info-callout > span:first-child,
.success-callout > span:first-child,
.error-callout > span:first-child {
  font-weight: 900;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 250px;
}

.line-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.line-chart__grid {
  stroke: #ecece7;
  stroke-width: 1;
}

.line-chart__area {
  fill: url("#chart-gradient");
}

.line-chart__line {
  fill: none;
  stroke: var(--pink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.line-chart__point {
  fill: var(--surface);
  stroke: var(--pink);
  stroke-width: 3;
}

.line-chart__label {
  fill: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
}

.chart-legend {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.chart-legend i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 99px;
  background: var(--pink);
}

.collection-mix {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.donut {
  --value: 50;
  --donut-color: var(--teal);
  position: relative;
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--donut-color) calc(var(--value) * 1%), #ecece7 0);
}

.donut::before {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.donut__value {
  position: relative;
  display: grid;
  text-align: center;
}

.donut__value strong {
  font-size: 23px;
  line-height: 1;
}

.donut__value small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.metric-list {
  display: grid;
  gap: 13px;
}

.metric-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.metric-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--metric-color, var(--teal));
}

.metric-item span {
  color: var(--muted);
  font-size: 10px;
}

.metric-item strong {
  font-size: 11px;
}

.benchmark-hero {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  align-items: center;
}

.rank-bubble {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 22px;
  color: var(--surface);
  background: var(--teal);
  box-shadow: 0 11px 24px rgba(24, 155, 159, 0.21);
}

.rank-bubble strong {
  font-size: 27px;
  line-height: 1;
}

.rank-bubble small {
  margin-top: -15px;
  font-size: 8px;
}

.benchmark-copy strong {
  display: block;
  font-size: 18px;
}

.benchmark-copy span {
  color: var(--muted);
  font-size: 10px;
}

.benchmark-bars {
  display: grid;
  gap: 14px;
}

.data-footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.bar-row__label span {
  color: var(--muted);
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #eeeee9;
}

.bar-track > span {
  display: block;
  width: var(--width, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--teal));
  transition: width 600ms ease;
}

.calendar-list {
  display: grid;
  gap: 9px;
}

.calendar-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  padding: 10px;
  align-items: center;
  border-radius: 12px;
  background: var(--canvas);
}

.calendar-date {
  display: grid;
  min-height: 46px;
  place-items: center;
  border-radius: 10px;
  color: var(--surface);
  background: var(--ink);
  line-height: 1;
  text-align: center;
}

.calendar-date strong {
  font-size: 17px;
}

.calendar-date small {
  margin-top: -8px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-item__copy strong {
  display: block;
  font-size: 10px;
}

.calendar-item__copy small {
  color: var(--muted);
  font-size: 8px;
}

.recommendation {
  position: relative;
  display: flex;
  gap: 15px;
  margin-bottom: 16px;
  padding: 20px;
  overflow: hidden;
  align-items: flex-start;
  border: 1px solid #cfeadd;
  border-left: 6px solid #38a36b;
  border-radius: var(--radius-md);
  background: #eefaf3;
}

.recommendation[data-level="watch"] {
  border-color: #f0dda9;
  border-left-color: var(--orange);
  background: #fff8e7;
}

.recommendation[data-level="action"] {
  border-color: #f0c6c3;
  border-left-color: var(--red);
  background: var(--red-soft);
}

.recommendation[data-level="routine"] {
  border-color: #c9e9e7;
  border-left-color: var(--teal);
  background: var(--teal-pale);
}

.recommendation__icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--surface);
  background: #38a36b;
  font-size: 19px;
  font-weight: 900;
}

.recommendation[data-level="watch"] .recommendation__icon {
  background: var(--orange);
}

.recommendation[data-level="action"] .recommendation__icon {
  background: var(--red);
}

.recommendation[data-level="routine"] .recommendation__icon {
  background: var(--teal);
}

.recommendation h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.recommendation p {
  margin: 0;
  color: #555752;
  font-size: 11px;
}

.bigbabs-panel {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(170px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 4px 8px 2px;
}

.bigbabs-visual {
  display: block;
  width: 100%;
  max-width: 430px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.bigbabs-shell {
  fill: #087e94;
  filter: drop-shadow(0 16px 20px rgba(8, 91, 103, 0.18));
}

.bigbabs-shell__inner {
  fill: #16b7bd;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 3;
}

.bigbabs-segment__base {
  fill: #f1f7ee;
}

.bigbabs-segment__fill {
  opacity: 0.96;
}

.bigbabs-segment__outline {
  fill: none;
  stroke: #16b7bd;
  stroke-linejoin: round;
  stroke-width: 8;
}

.bigbabs-segment.is-target .bigbabs-segment__outline,
.bigbabs-can.is-target .bigbabs-can__outline {
  stroke: var(--red);
  stroke-width: 7;
}

.bigbabs-label,
.bigbabs-value {
  fill: var(--ink);
  stroke: rgba(255, 255, 255, 0.84);
  stroke-linejoin: round;
  paint-order: stroke fill;
  font-family: var(--font-body);
  pointer-events: none;
}

.bigbabs-label {
  stroke-width: 4px;
  font-size: 15px;
  font-weight: 700;
}

.bigbabs-value {
  stroke-width: 5px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.bigbabs-can__outline {
  fill: none;
  stroke: #087e94;
  stroke-width: 5;
}

.bigbabs-can__tab {
  fill: rgba(255, 255, 255, 0.58);
  stroke: #087e94;
  stroke-width: 3;
}

.bigbabs-meta {
  display: grid;
  gap: 18px;
}

.bigbabs-legend {
  display: grid;
  gap: 10px;
}

.bigbabs-legend span {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #4d504b;
  font-size: 10px;
  font-weight: 700;
}

.bigbabs-legend i {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(29, 29, 27, 0.12);
}

.bigbabs-legend i[data-tone="normal"] {
  background: var(--lime);
}

.bigbabs-legend i[data-tone="watch"] {
  background: var(--orange);
}

.bigbabs-legend i[data-tone="urgent"] {
  background: var(--red);
}

.bigbabs-meta p {
  display: grid;
  margin: 0;
  padding: 13px 14px;
  gap: 3px;
  border: 1px solid rgba(24, 155, 159, 0.2);
  border-radius: 13px;
  color: var(--teal-dark);
  background: var(--teal-pale);
}

.bigbabs-meta p strong {
  font-size: 10px;
}

.bigbabs-meta p span {
  color: #565954;
  font-size: 9px;
}

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

.bin-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  padding: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--canvas);
}

.bin-card.is-target {
  border-color: #efb7b3;
  background: var(--red-soft);
  box-shadow: inset 0 0 0 1px rgba(215, 48, 39, 0.06);
}

.bin-vessel {
  position: relative;
  width: 52px;
  height: 76px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-top-width: 5px;
  border-radius: 8px 8px 13px 13px;
  background: var(--surface);
}

.bin-vessel::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--fill, 0) * 1%);
  background: var(--fill-color, var(--teal));
  content: "";
  transition: height 600ms ease;
}

.bin-vessel::after {
  position: absolute;
  top: -6px;
  left: 7px;
  width: 34px;
  height: 3px;
  border-radius: 4px;
  background: var(--ink);
  content: "";
}

.bin-copy {
  min-width: 0;
}

.bin-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.bin-percent {
  display: block;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.bin-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.procedure-list {
  display: grid;
  margin: 0;
  padding: 0;
  counter-reset: procedure;
  list-style: none;
}

.procedure-list li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  min-height: 54px;
  align-items: start;
  counter-increment: procedure;
}

.procedure-list li::before {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--surface);
  background: var(--teal);
  content: counter(procedure);
  font-size: 10px;
  font-weight: 800;
}

.procedure-list li:not(:last-child)::after {
  position: absolute;
  top: 29px;
  bottom: 0;
  left: 14px;
  width: 2px;
  background: #d7ecea;
  content: "";
}

.procedure-list span {
  padding-top: 5px;
  color: #50524d;
  font-size: 10px;
}

.history-list {
  display: grid;
  gap: 9px;
}

.history-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 11px;
  align-items: center;
  border-radius: 12px;
  background: var(--canvas);
}

.history-item__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-weight: 900;
}

.history-item__copy {
  display: grid;
}

.history-item__copy strong {
  font-size: 10px;
}

.history-item__copy small {
  color: var(--muted);
  font-size: 8px;
}

.history-item__fill {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.ticket-list {
  display: grid;
  gap: 9px;
}

.ticket-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ticket-item__head {
  display: flex;
  gap: 8px;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
}

.ticket-item__head strong {
  font-size: 10px;
}

.ticket-item > strong,
.ticket-item p,
.ticket-item small {
  overflow-wrap: anywhere;
}

.priority-badge {
  padding: 3px 7px;
  border-radius: 999px;
  color: #855600;
  background: #fff4d5;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.priority-badge[data-priority="urgent"] {
  color: var(--red);
  background: var(--red-soft);
}

.ticket-item p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 9px;
}

.ticket-item small {
  color: #92948e;
  font-size: 8px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  color: #555752;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 11px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 155, 159, 0.12);
}

.field small {
  color: var(--muted);
  font-size: 8px;
}

.checkbox-field {
  display: flex;
  gap: 9px;
  padding: 12px;
  align-items: flex-start;
  border-radius: 10px;
  background: var(--canvas);
}

.checkbox-field input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.checkbox-field span {
  display: grid;
  font-size: 10px;
  font-weight: 700;
}

.checkbox-field small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}

.form-footer {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  align-items: center;
  justify-content: space-between;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.form-feedback {
  margin-top: 12px;
}

.business-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: 24px;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid #d9edba;
  color: var(--ink);
  background: linear-gradient(135deg, var(--lime-soft) 0%, var(--teal-pale) 100%);
  box-shadow: var(--shadow);
}

.business-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 290px;
  height: 290px;
  border: 48px solid var(--lime);
  border-radius: 50%;
  opacity: 0.58;
  content: "";
}

.business-hero__copy {
  position: relative;
  z-index: 1;
}

.business-hero .eyebrow {
  color: var(--teal-dark);
}

.business-hero h2 {
  max-width: 700px;
  margin-bottom: 10px;
  font-size: clamp(25px, 3vw, 39px);
  letter-spacing: -0.04em;
}

.business-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.business-hero__metric {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 150px;
  padding: 20px;
  place-content: center;
  border: 1px solid rgba(18, 125, 128, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(18, 125, 128, 0.1);
  text-align: center;
}

.business-hero__metric strong {
  color: var(--teal-dark);
  font-size: clamp(31px, 4vw, 50px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.business-hero__metric span {
  margin-top: 7px;
  font-size: 10px;
  font-weight: 700;
}

.business-hero__metric small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.handling-fee-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  margin-top: 16px;
  padding: clamp(22px, 3vw, 32px);
  align-items: center;
  border: 1px solid rgba(24, 155, 159, 0.24);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff 0%, var(--teal-pale) 60%, var(--lime-soft) 100%);
  box-shadow: var(--shadow);
}

.handling-fee-highlight .eyebrow {
  margin-bottom: 5px;
  color: var(--teal-dark);
}

.handling-fee-highlight h2 {
  margin: 0;
  color: var(--teal-dark);
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.055em;
}

.handling-fee-highlight p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.handling-fee-highlight > span {
  max-width: 300px;
  padding: 10px 13px;
  border: 1px solid #ead49f;
  border-radius: 12px;
  color: #704c06;
  background: #fff8e8;
  font-size: 9px;
  font-weight: 700;
}

.commercial-contact-button {
  width: 100%;
  margin: 2px 0 8px;
}

.commercial-contact-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.formula-box {
  padding: 18px;
  border: 1px solid #d9edba;
  border-radius: 15px;
  background: var(--lime-soft);
}

.formula-box__label {
  display: block;
  margin-bottom: 9px;
  color: #52722c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.formula {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.formula strong {
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface);
  font-size: 15px;
}

.formula-result {
  margin: 12px 0 0;
  color: #52722c;
  font-size: 10px;
}

.economics-list {
  display: grid;
  gap: 13px;
}

.economic-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.economic-line__copy {
  display: grid;
}

.economic-line__copy span {
  font-size: 10px;
  font-weight: 700;
}

.economic-line__copy small {
  color: var(--muted);
  font-size: 8px;
}

.economic-line strong {
  font-size: 12px;
}

.economic-line.is-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.economic-line.is-total strong {
  color: var(--teal-dark);
  font-size: 17px;
}

.comparison {
  display: grid;
  gap: 16px;
}

.comparison-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.comparison-item span {
  color: var(--muted);
  font-size: 9px;
}

.comparison-item strong {
  font-size: 10px;
}

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

.assumption-item {
  min-width: 0;
  padding: 11px;
  border-radius: 11px;
  background: var(--canvas);
}

.assumption-item span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.assumption-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.admin-banner {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  padding: 19px;
  align-items: center;
  border-radius: var(--radius-md);
  color: var(--surface);
  background: var(--ink);
}

.admin-banner__icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  color: var(--ink);
  background: var(--lime);
  font-size: 20px;
}

.admin-banner h2 {
  margin: 0 0 3px;
  font-size: 15px;
}

.admin-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

.admin-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 5px;
  margin: 18px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-tab {
  min-height: 40px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--ink);
  background: var(--canvas);
}

.admin-tab.is-active {
  color: var(--surface);
  background: var(--teal);
  box-shadow: 0 7px 18px rgba(24, 155, 159, 0.2);
}

.admin-tab:focus-visible {
  outline: 3px solid rgba(24, 155, 159, 0.28);
  outline-offset: 2px;
}

.machine-admin-card {
  margin-top: 0;
}

.machine-mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.machine-mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr);
  gap: 14px;
  padding: 15px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--canvas);
}

.machine-mapping-row > label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.machine-mapping-row > label strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.machine-mapping-row > label small {
  color: var(--muted);
  font-size: 8px;
}

.machine-mapping-input {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
}

.machine-mapping-input:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(24, 155, 159, 0.12);
}

.machine-mapping-input span {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-size: 9px;
  font-weight: 800;
}

.machine-mapping-input input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.table-scroll:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(24, 155, 159, 0.28);
  outline-offset: 3px;
}

.data-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.data-table th {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table td {
  font-size: 10px;
}

.data-table tbody tr:hover {
  background: var(--canvas);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.projection-note {
  margin: -4px 0 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--canvas);
  font-size: 9px;
}

.projection-note strong {
  color: var(--ink);
}

.table-store {
  display: grid;
}

.table-store strong {
  font-size: 10px;
}

.table-store small {
  color: var(--muted);
  font-size: 8px;
}

.empty-state {
  display: grid;
  min-height: 150px;
  padding: 22px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  background: var(--canvas);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 9px;
  place-items: center;
  border-radius: 14px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-weight: 900;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.empty-state p {
  max-width: 330px;
  margin: 4px auto 0;
  font-size: 9px;
}

.page-loader {
  display: grid;
  min-height: calc(100vh - 100px);
  place-content: center;
  color: var(--muted);
  text-align: center;
}

.page-loader p {
  margin: 16px 0 0;
  font-size: 11px;
  font-weight: 600;
}

.loader-orbit {
  position: relative;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 4px solid #dceeed;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.loader-orbit::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  content: "";
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-page {
  display: grid;
  min-height: calc(100vh - 100px);
  place-items: center;
}

.error-panel {
  width: min(100%, 520px);
  padding: 32px;
  border: 1px solid #efc5c2;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-panel__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 18px;
  color: var(--surface);
  background: var(--red);
  font-size: 25px;
  font-weight: 900;
}

.error-panel h1 {
  margin-bottom: 7px;
  font-size: 23px;
}

.error-panel p {
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 11px;
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(380px, calc(100vw - 40px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  align-items: flex-start;
  border-left: 5px solid var(--teal);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 10px;
  animation: toast-in 240ms ease both;
}

.toast[data-tone="error"] {
  border-left-color: var(--red);
}

.toast strong {
  display: block;
  font-size: 11px;
}

.toast p {
  margin: 2px 0 0;
  color: var(--muted);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .site-selector-layout {
    grid-template-columns: 1fr;
  }

  .pilot-map {
    min-height: 400px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-card:last-child {
    grid-column: 1 / -1;
    min-height: 190px;
  }

  .bin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-row {
    grid-template-columns: minmax(180px, 1.5fr) 100px 100px 80px;
  }

  .store-row > :nth-child(2) {
    display: none;
  }
}

@media (max-width: 980px) {
  body.menu-open {
    overflow: hidden;
  }

  .sidebar {
    width: min(310px, calc(100vw - 48px));
    box-shadow: 18px 0 55px rgba(29, 29, 27, 0.18);
    transform: translateX(-105%);
    transition: transform 240ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-grid;
  }

  .drawer-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(29, 29, 27, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }

  body.menu-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace {
    margin-left: 0;
  }

  .mobile-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    height: 68px;
    padding: 10px 18px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
  }

  .mobile-brand {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    text-decoration: none;
  }

  .mobile-brand__mark {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: var(--surface);
    background: var(--teal);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.14em;
  }

  .mobile-brand__mark span {
    color: var(--ink);
  }

  .hamburger,
  .hamburger::before,
  .hamburger::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--ink);
  }

  .hamburger {
    position: relative;
  }

  .hamburger::before,
  .hamburger::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .hamburger::before {
    top: -6px;
  }

  .hamburger::after {
    top: 6px;
  }

  #main-content {
    min-height: calc(100vh - 68px);
    padding: 24px clamp(16px, 4vw, 34px) 45px;
  }

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

@media (max-width: 720px) {
  .data-table {
    min-width: 650px;
    table-layout: auto;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .button {
    flex: 1 1 auto;
  }

  .page-title {
    font-size: clamp(27px, 8vw, 38px);
  }

  .selector-heading,
  .store-dashboard__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .selector-heading__summary {
    width: 100%;
  }

  .machine-select-grid,
  .store-dashboard__metrics {
    grid-template-columns: 1fr;
  }

  .pilot-map {
    min-height: 380px;
  }

  .store-dashboard__status {
    justify-items: start;
    text-align: left;
  }

  .entry-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .entry-card:last-child {
    grid-column: auto;
    min-height: 220px;
  }

  .context-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .context-meta {
    width: 100%;
    justify-content: space-between;
  }

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

  .store-row > :nth-child(2),
  .store-row > :nth-child(3) {
    display: none;
  }

  .business-hero {
    grid-template-columns: 1fr;
  }

  .bigbabs-panel {
    grid-template-columns: 1fr;
  }

  .bigbabs-meta {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.75fr);
    align-items: end;
  }

  .business-hero::after {
    right: 0;
    opacity: 0.48;
  }

  .form-grid,
  .assumption-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .data-notice summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .data-notice__action {
    display: none !important;
  }

  .data-notice__copy small {
    white-space: normal;
  }

  .data-notice ul {
    padding-left: 47px;
  }

  .mobile-header {
    padding-inline: 12px;
  }

  .map-selection__panel {
    top: 12px;
    width: calc(100% - 24px);
    min-width: 0;
    padding: 11px 12px;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 17px;
  }

  .map-selection__brand {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    font-size: 16px;
  }

  .map-selection__panel h1 {
    font-size: 20px;
  }

  .map-selection__panel p:last-child {
    font-size: 9px;
  }

  .map-selection__count {
    grid-column: 2;
    width: max-content;
    padding: 4px 8px;
  }

  .map-selection__hint {
    bottom: 24px;
    max-width: calc(100% - 28px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #main-content {
    padding: 19px 12px 36px;
  }

  .mobile-brand strong {
    display: none;
  }

  .card--padded,
  .business-hero {
    padding: 18px;
  }

  .selector-heading h1 {
    font-size: clamp(32px, 11vw, 44px);
  }

  .pilot-map-card,
  .machine-selector {
    padding: 13px;
    border-radius: 18px;
  }

  .pilot-map {
    min-height: 340px;
  }

  .pilot-map__label {
    padding: 4px 5px;
    font-size: 7px;
  }

  .pilot-map__pin {
    transform: translate(-8px, -8px);
  }

  .pilot-map__dot {
    width: 17px;
    height: 17px;
    border-width: 4px;
  }

  .store-dashboard__header {
    padding: 21px;
  }

  .section-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .context-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .updated-at {
    white-space: normal;
  }

  .collection-mix {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .collection-mix .metric-list {
    width: 100%;
  }

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

  .bigbabs-panel {
    padding-inline: 0;
    gap: 12px;
  }

  .bigbabs-meta {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .form-footer .button {
    width: 100%;
  }

  .comparison-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .comparison-item strong {
    grid-column: 2;
  }

  .source-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

.account-panel {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px 10px;
  margin-top: 12px;
  padding: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--canvas);
}

.account-panel__avatar,
.account-review__avatar {
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--surface);
  background: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.account-panel__avatar {
  width: 34px;
  height: 34px;
}

.account-panel__copy {
  display: grid;
  min-width: 0;
}

.account-panel__copy strong,
.account-panel__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-panel__copy strong {
  font-size: 9px;
}

.account-panel__copy small {
  color: var(--muted);
  font-size: 8px;
}

.account-panel__logout {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  text-align: left;
}

.map-selection__session {
  display: flex;
  gap: 8px;
  align-items: center;
}

.map-selection__session button {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  color: var(--surface);
  background: var(--ink);
  font-size: 9px;
  font-weight: 800;
}

body.auth-mode {
  overflow: auto;
  background: var(--canvas);
}

body.auth-mode .sidebar,
body.auth-mode .mobile-header,
body.auth-mode .drawer-backdrop {
  display: none !important;
}

body.auth-mode .workspace {
  margin-left: 0;
}

body.auth-mode #main-content,
body.auth-mode #app {
  min-height: 100vh;
  padding: 0;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(300px, 0.85fr) minmax(480px, 1.15fr);
  background: var(--surface);
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100%;
  padding: clamp(36px, 6vw, 84px);
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  color: var(--surface);
  background:
    radial-gradient(circle at 78% 18%, rgba(190, 251, 98, 0.95) 0 13%, transparent 13.4%),
    radial-gradient(circle at 65% 35%, rgba(255, 0, 134, 0.72), transparent 29%),
    linear-gradient(145deg, #147f83, #189b9f 50%, #0c5e61);
}

.auth-visual::after {
  position: absolute;
  right: -110px;
  bottom: 9%;
  width: 330px;
  height: 330px;
  border: 48px solid rgba(190, 251, 98, 0.92);
  border-radius: 50%;
  content: "";
}

.auth-visual__brand {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 30px;
}

.auth-visual__brand span,
.auth-card__brand span span {
  color: var(--lime);
}

.auth-visual > div {
  position: relative;
  z-index: 1;
  max-width: 470px;
}

.auth-visual p {
  margin-bottom: 8px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-visual strong {
  display: block;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-card {
  width: min(720px, calc(100% - 48px));
  margin: auto;
  padding: clamp(30px, 5vw, 68px) 0;
}

.auth-card__brand {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 40px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}

.auth-card__brand > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--surface);
  background: var(--teal);
  font-family: var(--font-display);
  font-size: 18px;
}

.auth-card h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.05em;
}

.auth-card__subtitle {
  max-width: 580px;
  margin-bottom: 28px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 18px;
}

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

.auth-field-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.auth-field-heading a {
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.auth-field-heading a:hover {
  text-decoration: underline;
}

.remember-check {
  display: flex;
  width: fit-content;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink);
  cursor: pointer;
}

.remember-check input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--teal);
}

.remember-check span {
  display: grid;
  gap: 2px;
}

.remember-check strong {
  font-size: 10px;
}

.remember-check small {
  color: var(--muted);
  font-size: 8px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-switch {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.auth-switch a {
  color: var(--teal-dark);
  font-weight: 800;
}

.auth-store-picker,
.account-access {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.auth-store-picker legend,
.account-access legend {
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
}

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

.account-access__toolbar > span {
  color: var(--muted);
  font-size: 9px;
}

.auth-store-picker > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 9px;
}

.auth-store-picker__grid,
.account-access__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.store-check {
  display: flex;
  min-width: 0;
  gap: 9px;
  padding: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--canvas);
  cursor: pointer;
}

.store-check:has(input:checked) {
  border-color: #9dd9d6;
  background: var(--teal-pale);
}

.store-check input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.store-check span {
  display: grid;
  min-width: 0;
}

.store-check strong,
.store-check small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-check strong {
  font-size: 10px;
}

.store-check small {
  color: var(--muted);
  font-size: 8px;
}

.admin-accounts {
  margin-top: 16px;
}

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

.account-review {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--canvas);
}

.account-review__head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.account-review__avatar {
  width: 42px;
  height: 42px;
}

.account-review__identity {
  display: grid;
  min-width: 0;
}

.account-review__identity strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.account-review__identity small,
.account-review__requested > span {
  color: var(--muted);
  font-size: 9px;
}

.account-status {
  padding: 6px 9px;
  border-radius: 999px;
  color: #7b5102;
  background: #fff5d9;
  font-size: 9px;
  font-weight: 800;
}

.account-status[data-status="active"] {
  color: #176140;
  background: #e8f8ef;
}

.account-status[data-status="rejected"] {
  color: var(--red);
  background: var(--red-soft);
}

.account-review__requested {
  display: flex;
  gap: 10px;
  align-items: center;
}

.account-review__requested > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.account-review__requested .soft-badge,
.admin-accounts > .card-heading .soft-badge {
  padding: 5px 8px;
  color: var(--teal-dark);
  background: var(--teal-pale);
}

.account-review__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr);
  gap: 12px;
}

.account-review__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.account-review__footer .form-feedback {
  flex: 1;
}

.admin-secondary-grid {
  grid-template-columns: minmax(300px, 0.75fr) minmax(480px, 1.25fr);
}

@media (max-width: 850px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 210px;
    padding: 28px;
  }

  .auth-visual > div {
    margin-top: 42px;
  }

  .auth-visual strong {
    font-size: 34px;
  }

  .auth-card {
    width: min(100% - 32px, 720px);
    padding-block: 34px;
  }

  .auth-form__columns,
  .auth-store-picker__grid,
  .account-access__grid,
  .account-review__fields {
    grid-template-columns: 1fr;
  }

  .account-review__head {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .account-status {
    grid-column: 2;
    width: max-content;
  }

  .account-review__requested,
  .account-review__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .machine-mapping-grid {
    grid-template-columns: 1fr;
  }

  .machine-mapping-row {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    width: 100%;
  }

  .admin-tab {
    flex: 1 1 0;
  }

  .account-access__toolbar,
  .handling-fee-highlight {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-direction: column;
  }

  .map-selection__session {
    grid-column: 2;
    flex-wrap: wrap;
  }
}

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

@media print {
  .sidebar,
  .mobile-header,
  .page-actions,
  .toast-region,
  .drawer-backdrop {
    display: none !important;
  }

  .workspace {
    margin: 0;
  }

  #main-content {
    padding: 0;
  }

  .card,
  .kpi-card,
  .business-hero {
    break-inside: avoid;
    box-shadow: none;
  }
}
