@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("nunito-sans-regular.133309a676a9.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("nunito-sans-bold.917b35679c26.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --brand: #1e7881;
  --brand-dark: #155c63;
  --ink: #101616;
  --text: #283232;
  --muted: #687373;
  --surface: #fff;
  --soft: #f3f6f5;
  --soft-strong: #e8efed;
  --line: #d8e1df;
  --line-strong: #b9c8c5;
  --warning: #9b5b0b;
  --warning-soft: #fff4df;
  --success: #226b4f;
  --success-soft: #e9f5ef;
  --danger: #9a3030;
  --danger-soft: #fff0ef;
  --white: #fff;
  --action: #155c63;
  --solid: #101616;
  --info: #2563b8;
  --font-body: "Nunito Sans", Arial, sans-serif;
  --radius: 16px;
  --radius-control: 12px;
  --radius-dialog: 22px;
  --shadow-menu: 0 18px 50px rgb(16 22 22 / 16%);
  --shadow-surface: 0 8px 24px rgb(16 22 22 / 5%);
  --motion-fast: 140ms;
  --motion-base: 200ms;
  --motion-slow: 280ms;
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #7acbd0;
  --brand-dark: #9fdee1;
  --ink: #f0f5f3;
  --text: #d8e3df;
  --muted: #a5b6b0;
  --surface: #1b1b1b;
  --soft: #111111;
  --soft-strong: #292929;
  --line: #383838;
  --line-strong: #686868;
  --warning: #f0be70;
  --warning-soft: #382c1b;
  --success: #88d4ad;
  --success-soft: #183b2d;
  --danger: #ffaaa3;
  --danger-soft: #3e2424;
  --info: #92bbff;
  --action: #236d75;
  --solid: #303030;
  --shadow-menu: 0 18px 50px rgb(0 0 0 / 35%);
}

body { background: var(--soft); }
::selection { background: var(--brand); color: var(--soft); }
html { scrollbar-color: var(--line-strong) var(--soft); }
input, textarea { caret-color: var(--brand); }
.theme-toggle { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--soft); color: var(--text); font-weight: 700; cursor: pointer; }
.workspace-actions > .theme-toggle-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); }
.theme-toggle-icon:hover { background: var(--soft-strong); }
.theme-toggle-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle-icon .theme-sun, [data-theme="dark"] .theme-toggle-icon .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle-icon .theme-sun { display: block; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; color: var(--muted); }
.shop-list-row { color: var(--text); text-decoration: none; }
[data-theme="dark"] .user-menu summary { background: var(--solid); color: var(--white); }
[data-theme="dark"] .map-locate,
[data-theme="dark"] .map-zero-state { background: var(--surface); }
[data-theme="dark"] .workspace-brand img { filter: invert(1); }
[data-theme="dark"] .workspace-header,
[data-theme="dark"] .workspace-brand { border-color: var(--line); }
[data-theme="dark"] .workspace-header.is-logo-centred .workspace-brand { background: var(--surface); }
[data-theme="dark"] .workspace-body textarea { background: var(--surface); }
[data-theme="dark"] .manifest-row-button:hover { background: var(--soft-strong); }
[data-theme="dark"] .maplibregl-popup-content { background: var(--surface); color: var(--text); }
[data-theme="dark"] .maplibregl-ctrl-attrib { background: var(--surface) !important; }
[data-theme="dark"] .maplibregl-map .maplibregl-ctrl-group { background: var(--surface); }
[data-theme="dark"] .maplibregl-map .maplibregl-ctrl-attrib,
[data-theme="dark"] .maplibregl-map .maplibregl-ctrl-attrib a { color: var(--muted); }
[data-theme="dark"] .button-primary:hover { background: #2d7c85; }
[data-theme="dark"] .login-content button[type="submit"]:hover,
[data-theme="dark"] .workspace-card button:hover { background: #2d7c85; }

.login-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.login-tools > span { font-weight: 700; color: var(--brand); }
.login-content .theme-toggle { width: auto; min-height: 44px; margin: 0; background: var(--soft); border-color: var(--line); color: var(--text); font-size: .8rem; }
.login-content .theme-toggle:hover { background: var(--soft-strong); color: var(--text); }
.login-body .login-content h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.login-body .login-content input,
.login-body .login-content button { border-radius: var(--radius-control); }
@media (max-width: 760px) {
  .login-body .auth-shell { display: flex; flex-direction: column; background: var(--surface); }
  .login-body .brand-panel { min-height: auto; padding: 24px 24px 18px; background: var(--surface); }
  .login-body .brand-panel::before,
  .login-body .brand-panel::after,
  .login-body .brand-copy,
  .login-body .brand-footer { display: none; }
  .login-body .brand-logo { width: 76px; height: 46px; filter: invert(1); }
  [data-theme="dark"] .login-body .brand-logo { filter: none; }
  .login-body .login-panel { display: block; padding: 12px 24px 32px; }
  .login-body .login-content { margin-inline: auto; }
  .login-body .intro { margin-bottom: 24px; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

html { max-width: 100%; overflow-x: clip; scroll-behavior: smooth; }

@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: var(--motion-base); animation-timing-function: var(--ease-standard); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 1ms; }
}

body {
  margin: 0;
  min-width: 320px;
  max-width: 100%;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--font-body);
}

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

button,
a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 70%, white);
  outline-offset: 3px;
}

/* Authentication */

.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
}

.brand-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  background: var(--action);
  color: var(--white);
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
}

.brand-panel::before {
  background: url("bspot-health.463f2b611d1e.jpg") center / cover no-repeat;
  filter: grayscale(1);
  transform: scale(1.015);
}

.brand-panel::after {
  z-index: -1;
  background: linear-gradient(0deg, rgb(2 3 4 / 88%), rgb(30 120 129 / 58%));
}

.brand-logo {
  width: 132px;
  height: 90px;
  object-fit: contain;
  object-position: left center;
}

.brand-copy { width: min(100%, 720px); padding-block: 48px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow-light { color: var(--white); }

.brand-title {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(3rem, 5.4vw, 6.25rem);
  line-height: .94;
  letter-spacing: -.045em;
}

.brand-copy > p:last-child {
  max-width: 50ch;
  margin: 24px 0 0;
  color: rgb(255 255 255 / 84%);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
}

.brand-footer {
  margin: 0;
  color: rgb(255 255 255 / 76%);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-panel {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 96px);
  background: var(--surface);
}

.login-content { width: min(100%, 480px); }

.login-content h1,
.workspace-card h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.intro,
.workspace-card > p:not(.eyebrow) {
  margin: 16px 0 32px;
  color: var(--muted);
  line-height: 1.6;
}

.field { margin-top: 20px; }

label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

textarea { min-height: 96px; resize: vertical; }

select[multiple] { min-height: 132px; }

input:hover,
select:hover,
textarea:hover { border-color: var(--brand); }

.login-content input { min-height: 52px; background: var(--soft); }

.login-content button,
.workspace-card button {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  border: 1px solid var(--brand);
  border-radius: 5px;
  background: var(--action);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.form-error,
.errorlist {
  margin: 8px 0 0;
  padding: 10px 13px;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  line-height: 1.4;
  list-style: none;
}

.workspace-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--soft);
}

.workspace-card {
  width: min(100%, 480px);
  padding: clamp(28px, 6vw, 44px);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
}
.workspace-card h1 { font-size: clamp(1.75rem, 5vw, 2.4rem); line-height: 1.15; letter-spacing: -.025em; }

.workspace-card .button-primary { width: 100%; margin-top: 24px; text-decoration: none; }

/* Workspace selection */

.selector-body { background: #101616; }

.selector-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.selector-header {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 4vw, 56px);
  color: var(--white);
  pointer-events: none;
}

.selector-header img { width: 116px; height: 76px; object-fit: contain; object-position: left top; }
.selector-header > div { max-width: 440px; text-align: right; }
.selector-header h1 { margin: 0; font-family: var(--font-body); font-size: clamp(2rem, 3.3vw, 3.8rem); line-height: 1; letter-spacing: -.035em; }
.selector-header p:last-child { margin: 10px 0 0; color: rgb(255 255 255 / 76%); }

.role-selector {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(var(--role-count), minmax(0, 1fr));
}

.role-panel-form { min-width: 0; }

.role-panel {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(28px, 4vw, 58px);
  width: 100%;
  height: 100%;
  border-left: 1px solid rgb(255 255 255 / 18%);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.role-panel-form:first-child .role-panel { border-left: 0; }

.role-panel::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgb(9 18 18 / 22%) 26%, rgb(9 18 18 / 90%) 100%);
  transition: background-color var(--motion-base) var(--ease-standard);
}

.role-panel > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--motion-slow) var(--ease-out);
}

.role-panel:hover > img,
.role-panel:focus-visible > img { transform: scale(1.025); }
.role-panel:hover::after,
.role-panel:focus-visible::after { background-color: rgb(30 120 129 / 18%); }

.role-panel-copy { max-width: 340px; display: grid; gap: 8px; }
.role-panel-copy small { color: rgb(255 255 255 / 70%); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.role-panel-copy strong { font-family: var(--font-body); font-size: clamp(2.5rem, 4vw, 4.8rem); line-height: .95; letter-spacing: -.04em; }
.role-panel-copy > span { min-height: 3em; color: rgb(255 255 255 / 78%); line-height: 1.5; }
.role-panel-copy b { margin-top: 10px; font-size: .84rem; }
.role-panel-copy b span { display: inline-block; margin-left: 6px; transition: transform var(--motion-base) var(--ease-out); }
.role-panel:hover .role-panel-copy b span { transform: translateX(4px); }

/* Shared operational workspace */

.workspace-body { background: var(--soft); }

.workspace-page {
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.workspace-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgb(16 22 22 / 7%);
  background: var(--surface);
}

.workspace-brand {
  position: absolute;
  top: 15px;
  left: clamp(16px, 4vw, 56px);
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  transition: left var(--motion-base) var(--ease-out), top var(--motion-base) var(--ease-out), transform var(--motion-base) var(--ease-out);
}

.workspace-brand img { width: 42px; height: 42px; }
.workspace-context {
  margin-left: 58px;
  overflow: hidden;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity var(--motion-fast) var(--ease-standard), transform var(--motion-base) var(--ease-out);
}
.workspace-header.is-logo-centred .workspace-brand {
  position: fixed;
  z-index: 31;
  top: 10px;
  left: 50%;
  padding: 5px;
  border-radius: 12px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 4px 14px rgb(16 22 22 / 14%);
  transform: translateX(-50%);
}
.workspace-header.is-logo-centred .workspace-context { opacity: 0; transform: translateX(-8px); pointer-events: none; }
.workspace-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-menu,
.quick-actions { position: relative; }
.user-menu summary,
.quick-actions summary { list-style: none; }
.user-menu summary::-webkit-details-marker,
.quick-actions summary::-webkit-details-marker { display: none; }

.user-menu summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--solid);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.quick-actions summary {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

button,
.user-menu summary,
.quick-actions summary,
.button-primary,
.button-secondary,
.button-quiet,
.button-danger,
.add-row-button,
.remove-row-button,
.dialog-close,
.menu-switch,
.menu-logout,
.map-locate,
.store-picker-actions button,
.setup-link-box button,
.member-link button,
.floating-nav a,
.quick-actions-panel a,
.map-popup-actions a,
.text-link,
.back-link {
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-out);
}

.quick-actions-panel,
.user-menu-panel { transform-origin: top right; }

.quick-actions[open] > .quick-actions-panel,
.user-menu[open] > .user-menu-panel { animation: popover-in var(--motion-base) var(--ease-out) both; }

.quick-actions-panel {
  position: absolute;
  z-index: 2;
  top: 54px;
  right: 0;
  width: min(286px, calc(100vw - 32px));
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.quick-actions-panel > span {
  padding: 5px 8px 3px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.quick-actions-panel a {
  min-height: 60px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.quick-actions-panel a:hover { background: var(--soft); }
.quick-actions-panel strong { font-size: .88rem; }
.quick-actions-panel small { color: var(--muted); font-size: .72rem; }

.user-menu-panel {
  position: absolute;
  top: 54px;
  right: 0;
  width: min(292px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.user-menu-identity { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); }
.user-menu-identity > span:last-child { min-width: 0; display: grid; gap: 1px; }
.user-menu-identity small { color: var(--brand-dark); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.user-menu-identity strong { overflow: hidden; color: var(--ink); font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-identity em { color: var(--muted); font-size: .72rem; font-style: normal; }
.user-menu-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--solid); color: var(--white); font-weight: 800; }

.menu-switch,
.menu-logout {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
  padding-inline: 12px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--soft);
  color: var(--brand-dark);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.menu-switch,
.menu-logout { justify-content: space-between; }
.menu-switch svg,
.menu-logout svg { width: 18px; height: 18px; fill: none; stroke: currentcolor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-logout { background: transparent; color: var(--ink); }
.menu-switch:hover { background: color-mix(in srgb, var(--brand) 11%, white); }
.menu-logout:hover { background: var(--soft); color: var(--danger); }

.message-stack {
  position: fixed;
  z-index: 60;
  top: 76px;
  right: 18px;
  width: min(390px, calc(100% - 36px));
  margin: 0;
  pointer-events: none;
}

.message {
  min-height: 52px;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
  pointer-events: auto;
  animation: notice-in var(--motion-base) var(--ease-out) both;
}
.message::before { width: 5px; height: 28px; border-radius: 999px; background: var(--brand); content: ""; }
.message button { width: 45px; height: 45px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.message button:hover { background: var(--soft); color: var(--ink); }

.message.error::before { background: var(--danger); }
.message.success::before { background: var(--success); }
.message.is-leaving { animation: notice-out 220ms var(--ease-standard) both; }

.form-field input[type="datetime-local"] { width: 100%; min-width: 0; max-width: 100%; }

.workspace-main {
  width: min(1040px, calc(100% - 32px));
  margin-inline: auto;
  padding-block: 36px 52px;
}

.workspace-body:not(.map-workspace) .workspace-main,
.login-content,
.workspace-card { animation: content-in var(--motion-slow) var(--ease-out) both; }

.workspace-body input,
.workspace-body select,
.workspace-body textarea { border-radius: var(--radius-control); background: #fbfcfc; }

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 0 14px;
}

.page-heading h1,
.delivery-hero h1,
.hq-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.page-subtitle {
  max-width: 58ch;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.button-primary,
.button-secondary,
.button-quiet,
.button-danger,
.add-row-button {
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-control);
  background: var(--action);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.login-content button:hover,
.workspace-card button:hover,
.button-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary { border-color: var(--ink); background: var(--solid); }
.button-quiet { border-color: var(--line); background: var(--surface); color: var(--text); }
.button-danger { border-color: var(--danger); background: var(--danger); color: var(--surface); }
.compact-button { min-height: 44px; }

.text-link,
.back-link { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.text-link:hover,
.back-link:hover { text-decoration: underline; }

.date-navigator {
  min-height: 52px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.date-navigator a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 1.25rem;
  text-decoration: none;
}

.date-picker {
  position: relative;
  min-height: 44px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.date-picker button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.date-picker span {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
}
.date-picker svg { width: 17px; height: 17px; fill: none; stroke: var(--brand-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.date-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.manager-day-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 108px; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-surface); }
.day-metric { min-height: 108px; display: grid; align-content: space-between; padding: 18px; }
.day-metric + .day-metric { border-left: 1px solid var(--line); }
.day-metric strong { color: var(--metric-color); font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.day-metric span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.day-metric.scheduled { --metric-color: var(--warning); }
.day-metric.completed { --metric-color: var(--success); }
.day-metric.failed { --metric-color: var(--danger); }

.field-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 18px;
}

.field-overview-heading .eyebrow { margin-bottom: 4px; }
.field-overview-heading h1 { margin: 0; color: var(--ink); font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -.035em; }
.field-overview-heading > p { margin: 0; color: var(--muted); font-size: .82rem; text-transform: capitalize; }
.field-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.field-metric { min-height: 104px; display: grid; align-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-surface); }
.field-metric strong { color: var(--metric-color, var(--ink)); font-size: clamp(1.7rem, 4vw, 2.2rem); font-variant-numeric: tabular-nums; line-height: 1; }
.field-metric span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.field-metric.metric-planned { --metric-color: var(--warning); }
.field-metric.metric-in-progress { --metric-color: var(--brand); }
.field-metric.metric-completed { --metric-color: var(--success); }
.field-metric.metric-pending { --metric-color: var(--danger); }
.field-queue { margin-top: 28px; }

.content-section { margin-top: 24px; scroll-margin-top: 24px; }
.first-section { margin-top: 14px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.section-heading.compact { align-items: center; }

.section-heading h2,
.section-heading h3,
.detail-panel h2,
.team-member h3 {
  margin: 0;
  color: var(--ink);
}

.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
.section-heading h3 { font-size: 1.05rem; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
.manifest-list,
.store-directory {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-surface);
}

.manifest-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: 82px minmax(190px, 1.5fr) minmax(150px, 1fr) 124px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}

.manifest-row:last-child { border-bottom: 0; }
a.manifest-row:hover,
.manifest-row-button:hover { background: #f7faf9; }
.manifest-row-button { width: 100%; border-width: 0 0 1px; border-radius: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.manifest-row-button:last-child { border-bottom: 0; }
.manifest-row time { display: grid; color: var(--ink); font-size: .92rem; font-weight: 700; }
.manifest-row time span { color: var(--muted); font-size: .72rem; font-weight: 400; text-transform: uppercase; }
.manifest-main { display: grid; gap: 3px; min-width: 0; }
.manifest-main strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.manifest-main span,
.manifest-assignee { color: var(--muted); font-size: .84rem; }

.sync-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}
.sync-status::before { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentcolor; content: ""; }
.sync-status.is-pending { color: var(--warning); }
.sync-status.is-synced { color: var(--success); }

.status-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.status-badge::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 0 0 currentcolor;
  content: "";
}
.status-in_progress::before { animation: status-pulse 2.2s ease-out infinite; }
.status-planned,
.status-submitted { color: var(--info); }
.status-dispatched,
.status-in_progress { color: var(--warning); }
.status-delivered { color: var(--success); }
.status-failed,
.status-late { color: var(--danger); }
.status-cancelled { color: var(--muted); }
.field-manifest .status-badge { min-height: 0; font-size: .74rem; }
.status-badge i { display: none; }
.field-manifest .manifest-row { grid-template-columns: 82px minmax(0, 1fr) auto; }
.field-manifest .status-badge { justify-self: end; }

.store-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) minmax(160px, 1fr) minmax(140px, .9fr) minmax(130px, .8fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.store-row:last-child { border-bottom: 0; }
.store-row > div { min-width: 0; display: grid; gap: 4px; }
.store-row strong { overflow-wrap: anywhere; color: var(--ink); font-size: .86rem; }
.store-identity > strong { font-size: .95rem; }
.store-identity > span,
.data-label { color: var(--muted); font-size: .72rem; }
.sync-status { align-self: center; justify-self: end; }
.empty-state {
  min-height: 128px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong { color: var(--ink); }
.empty-state.compact { min-height: 104px; }

.floating-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(16 22 22 / 94%);
  box-shadow: 0 14px 40px rgb(16 22 22 / 22%);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  animation: nav-in var(--motion-slow) var(--ease-out) both;
  view-transition-name: workspace-navigation;
}

.floating-nav a {
  width: 52px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  color: rgb(255 255 255 / 72%);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.floating-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.floating-nav a:hover { color: var(--white); }
.floating-nav a[aria-current="page"] { background: var(--white); color: #101616; }
body:has(.workspace-dialog[open]) .floating-nav { visibility: hidden; opacity: 0; pointer-events: none; }

/* Field map and installation */

.map-workspace { overflow: hidden; }
.map-workspace .workspace-page { height: 100vh; height: 100svh; min-height: 0; padding-bottom: 0; }
.map-workspace .workspace-header { z-index: 1000; }
.map-workspace .floating-nav { z-index: 1000; }
.map-workspace .workspace-main { position: absolute; inset: 72px 0 0; width: 100%; padding: 0; }
.map-workspace .field-map-shell { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.map-workspace #field-map { height: 100%; min-height: 0; }
.map-workspace .map-feedback,
.map-workspace .map-zero-state { bottom: calc(86px + env(safe-area-inset-bottom)); }

.field-map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: #171918;
  box-shadow: var(--shadow-surface);
}

#field-map { min-height: clamp(520px, 68svh, 720px); }
.maplibregl-map { background: #171918; font-family: var(--font-body); }
.maplibregl-ctrl-group { border: 1px solid rgb(255 255 255 / 16%); background: #111; box-shadow: none; }
.maplibregl-ctrl-group button + button { border-top-color: rgb(255 255 255 / 16%); }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-attrib { border-radius: 0 8px 0 0; background: rgb(255 255 255 / 86%) !important; color: var(--muted); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--brand-dark); }
.maplibregl-ctrl-attrib-button { display: none !important; }
.maplibregl-popup-content { border-radius: var(--radius-control); box-shadow: var(--shadow-menu); }
.maplibregl-popup-close-button { min-width: 34px; min-height: 34px; color: var(--muted); font-size: 1.25rem; }

.map-locate {
  position: absolute;
  z-index: 500;
  bottom: calc(88px + env(safe-area-inset-bottom));
  right: 14px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(16 22 22 / 12%);
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  box-shadow: 0 8px 22px rgb(16 22 22 / 12%);
  cursor: pointer;
}
.map-locate svg { width: 22px; height: 22px; fill: none; stroke: currentcolor; stroke-width: 1.8; }

.map-feedback {
  position: absolute;
  z-index: 500;
  right: 14px;
  bottom: 24px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgb(16 22 22 / 82%);
  color: var(--white);
  font-size: .72rem;
}

.map-feedback:empty { display: none; }
.map-zero-state {
  position: absolute;
  z-index: 500;
  left: 50%;
  bottom: 24px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgb(16 22 22 / 10%);
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  box-shadow: 0 8px 22px rgb(16 22 22 / 10%);
  font-size: .76rem;
  font-weight: 700;
  transform: translateX(-50%);
}
.delivery-map-marker { background: transparent; border: 0; }
.delivery-map-marker > span { width: 34px; height: 34px; display: block; border: 5px solid var(--white); border-radius: 50% 50% 50% 6px; background: var(--brand); box-shadow: 0 7px 18px rgb(16 22 22 / 24%); transform: rotate(-45deg); }
.delivery-map-marker > span::after { width: 8px; height: 8px; display: block; margin: 8px; border-radius: 50%; background: var(--white); content: ""; }
.map-user-location { width: 18px; height: 18px; display: block; border: 3px solid var(--white); border-radius: 50%; background: var(--brand); box-shadow: 0 4px 14px rgb(0 0 0 / 45%); }

.delivery-map-popup { display: grid; gap: 5px; padding: 4px 2px 2px; }
.delivery-map-popup > strong { color: var(--ink); font-size: 1rem; }
.delivery-map-popup p { margin: 0; color: var(--muted); line-height: 1.35; }
.delivery-map-popup small { color: var(--muted); }

.scanner-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; }
.scanner-viewfinder { position: relative; overflow: hidden; height: min(44svh, 440px); border-radius: 24px; background: #111111; touch-action: none; }
.scanner-viewfinder video { width: 100%; height: 100%; display: block; object-fit: cover; }
.scanner-frame { position: absolute; top: 50%; left: 50%; width: 84%; aspect-ratio: 2.4 / 1; border: 2px solid rgb(255 255 255 / 88%); border-radius: 16px; box-shadow: 0 0 0 999px rgb(0 0 0 / 20%); transform: translate(-50%, -50%); }
.scanner-frame-qr { width: min(62%, 260px); aspect-ratio: 1; }
.scanner-controls { display: flex; gap: 10px; }
.scanner-controls button { flex: 1; }
.scanner-controls [hidden] { display: none; }
.map-popup-status { color: var(--brand-dark); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.map-popup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.map-popup-actions a { min-height: 40px; display: grid; place-items: center; padding: 5px 8px; border-radius: var(--radius-control); background: var(--soft); color: var(--brand-dark); font-size: .72rem; font-weight: 700; text-align: center; text-decoration: none; }
.map-popup-actions a:last-child { background: var(--action); color: var(--white); }
.install-dialog { width: min(500px, calc(100% - 28px)); }
.install-dialog-body { padding: 22px; }
.install-dialog-body > p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; }
.install-dialog-body .dialog-actions { margin-top: 20px; }

/* Forms, team, and delivery detail */

.operational-form { display: grid; gap: 18px; }
.detail-panel {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-surface);
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { min-width: 0; }
.form-field .helptext { display: block; margin-top: 6px; color: var(--muted); font-size: .72rem; }

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

.checkbox-grid > div { min-width: 0; }
.checkbox-grid label { min-height: 44px; display: flex; align-items: center; gap: 9px; margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--soft); font-size: .8rem; cursor: pointer; }
.checkbox-grid label { transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard); }
.checkbox-grid input { width: 18px; min-height: 18px; flex: 0 0 auto; accent-color: var(--brand); }

.item-list { display: grid; gap: 9px; }
.item-row { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(110px, .7fr) minmax(130px, .8fr) auto; align-items: end; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--soft); }
[data-formset-row][hidden] { display: none; }
.remove-row-button { min-height: 44px; padding: 0 11px; border-color: transparent; background: transparent; color: var(--danger); font-size: .76rem; font-weight: 700; }
.add-row-button { margin-top: 12px; border-color: var(--line-strong); background: var(--surface); color: var(--brand-dark); }
.delivery-state-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  margin-top: 12px;
}

.delivery-state-tabs a {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.delivery-state-tabs a:first-child { border-left: 0; }
.delivery-state-tabs a[aria-current="page"] { background: var(--solid); color: var(--white); }

.reveal-search-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentcolor; stroke-width: 2; stroke-linecap: round; }

.team-list { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-list > .empty-state { grid-column: 1 / -1; }
.team-heading { align-items: center; }
.reveal-search { display: flex; align-items: center; justify-content: end; gap: 8px; }
.reveal-search-field { width: 0; overflow: hidden; opacity: 0; transform: translateX(8px); transition: width var(--motion-base) var(--ease-standard), opacity var(--motion-fast) var(--ease-standard), transform var(--motion-base) var(--ease-standard); }
.reveal-search.is-open .reveal-search-field { width: min(300px, 42vw); opacity: 1; transform: translateX(0); }
.reveal-search-field input { width: 100%; min-height: 44px; }
.reveal-search-field input::-webkit-search-cancel-button { display: none; }
.reveal-search-toggle { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard); }
.reveal-search-toggle:hover { color: var(--brand-dark); transform: scale(1.04); }
.team-member-card { position: relative; display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-surface); }
.team-member { width: 100%; min-height: 88px; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border: 0; border-radius: 0; background: transparent; color: var(--text); font: inherit; text-align: left; box-shadow: none; cursor: pointer; }
.team-member h3 { font-size: 1.02rem; }
.member-status { display: inline-flex; align-items: center; gap: 8px; color: var(--success); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.member-status i { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; background: currentcolor; box-shadow: 0 0 0 5px var(--success-soft); }
.member-status.is-pending { color: var(--warning); }
.member-status.is-pending i { box-shadow: 0 0 0 5px var(--warning-soft); }
.member-identity { min-width: 0; }
.member-identity h3 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.member-store-count { display: inline-flex; align-items: baseline; gap: 4px; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.member-store-count strong { color: var(--ink); font-size: .95rem; }
.setup-link-box,
.member-link { padding: 12px; border: 1px solid #c7ded8; border-radius: var(--radius-control); background: var(--success-soft); }
.setup-link-box p { margin: 3px 0 12px; color: var(--muted); font-size: .82rem; }
.setup-link-box > div,
.member-link { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.member-link { grid-column: 1 / -1; }
.member-link > span { align-self: center; color: var(--success); font-size: .8rem; font-weight: 700; }
.setup-link-box > div { display: flex; justify-content: flex-end; }
.setup-link-box button,
.member-link button { min-height: 44px; padding-inline: 14px; border: 1px solid var(--brand); border-radius: var(--radius-control); background: var(--action); color: var(--white); font-weight: 700; cursor: pointer; }

.workspace-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(760px, calc(100svh - 28px));
  overflow: auto;
  padding: 0;
  border: 1px solid rgb(16 22 22 / 9%);
  border-radius: var(--radius-dialog);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 80px rgb(16 22 22 / 24%);
}

.workspace-dialog::backdrop { background: rgb(16 22 22 / 48%); backdrop-filter: blur(4px); }
.workspace-dialog .dialog-heading { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.workspace-dialog[open] { display: flex; flex-direction: column; overflow: hidden; animation: dialog-in var(--motion-base) var(--ease-out); }
.workspace-dialog > .dialog-heading { flex: 0 0 auto; }
.workspace-dialog > :not(.dialog-heading) { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.workspace-dialog > :is(.delivery-dialog-body, .shop-delivery-body, .shop-order-detail-body, .delivery-scan-body) { align-content: start; grid-auto-rows: max-content; }
.workspace-dialog .dialog-heading > div { min-width: 0; }
.workspace-dialog h2 { overflow-wrap: anywhere; }
.workspace-dialog > form,
.workspace-dialog > .setup-link-box { padding: 22px; }
.person-wizard-dialog { width: min(760px, calc(100% - 28px)); }
.person-wizard-dialog [data-wizard-step="1"] .form-field:last-child { grid-column: 1 / -1; }
.delivery-create-dialog { width: min(760px, calc(100% - 28px)); }
.delivery-wizard .wizard-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-create-dialog { width: min(660px, calc(100% - 28px)); }
.product-create-dialog .form-field.wide { grid-column: 1 / -1; }
.product-scanner-viewfinder { height: min(25svh, 210px); margin-bottom: 10px; border-radius: var(--radius); }
.product-scanner-controls { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; }
.product-scanner-controls span { justify-self: end; color: var(--muted); font-size: .76rem; font-weight: 700; }
.product-barcode-field { margin-top: 16px; }
.manual-entry-toggle { min-height: 45px; display: block; margin: 4px auto 0; padding: 4px 8px; border: 0; background: transparent; color: var(--brand-dark); font-size: .76rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.price-eur-field > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.price-eur-field > div { position: relative; }
.price-eur-field > div span { position: absolute; top: 50%; right: 14px; color: var(--muted); font-size: .82rem; font-weight: 800; transform: translateY(-50%); pointer-events: none; }
.price-eur-field input { padding-right: 40px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; color: var(--ink); font-size: 1.45rem; letter-spacing: -.025em; }
.dialog-heading .eyebrow { margin-bottom: 4px; }
.dialog-close { width: 45px; height: 45px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dialog-intro { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
.dialog-actions { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; margin-top: 22px; }
.dialog-actions > :only-child { margin-left: auto; }
.dialog-actions > * { min-height: 45px; }
.workspace-dialog > .dialog-actions { flex: 0 0 auto; margin: 0; padding: 16px 22px; border-top: 1px solid var(--line); }
.workspace-dialog > form > .dialog-actions { position: sticky; bottom: -22px; z-index: 1; padding-block: 14px; margin-bottom: -22px; background: var(--surface); border-top: 1px solid var(--line); }

.product-catalogue { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-surface); }
.product-catalogue-head,
.product-catalogue-row { display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .8fr) minmax(100px, .5fr); align-items: center; gap: 16px; padding: 12px 16px; }
.product-catalogue-head { min-height: 42px; border-bottom: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.product-catalogue-row { width: 100%; min-height: 72px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; cursor: pointer; transition: background-color var(--motion-fast) var(--ease-standard); }
.product-catalogue-row:hover { background: var(--soft); }
.product-catalogue-row:last-child { border-bottom: 0; }
.product-catalogue-copy { min-width: 0; display: grid; gap: 3px; }
.product-catalogue-row strong { color: var(--ink); }
.product-catalogue-row small { color: var(--muted); font-size: .8rem; }
.product-catalogue-row code { overflow: hidden; color: var(--brand-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.product-catalogue-head span:last-child,
.product-price { justify-self: end; text-align: right; }
.product-edit-dialog { width: min(620px, calc(100% - 28px)); }
.product-edit-code { display: grid; gap: 3px; margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius-control); background: var(--soft); }
.product-edit-code span,
.product-edit-code small { color: var(--muted); font-size: .72rem; }
.product-edit-code code { color: var(--ink); font-size: .82rem; }
.delivery-detail-dialog { width: min(680px, calc(100% - 28px)); }
.delivery-reassign-dialog { width: min(460px, calc(100% - 28px)); }
.delivery-reassign-form { display: grid; gap: 8px; padding: 22px; }
.delivery-reassign-form label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.delivery-reassign-form select { width: 100%; min-height: 50px; }
.delivery-reassign-form .dialog-actions { margin-top: 14px; }
.delivery-dialog-body { display: grid; gap: 20px; padding: 22px; }
.delivery-dialog-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.delivery-dialog-facts > div { min-width: 0; display: grid; gap: 4px; }
.delivery-dialog-facts span,
.delivery-dialog-note > span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.delivery-dialog-facts strong { overflow-wrap: anywhere; font-size: .86rem; }
.delivery-dialog-facts strong:not(.status-badge) { color: var(--ink); }
.delivery-dialog-products { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
.delivery-products-heading { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft); }
.delivery-products-heading h3 { margin: 0; font-size: .86rem; }
.delivery-products-heading > span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.delivery-dialog-product { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.delivery-dialog-product:last-child { border-bottom: 0; }
.delivery-dialog-product-copy { min-width: 0; display: grid; gap: 3px; }
.delivery-dialog-product-copy strong { color: var(--ink); font-size: .86rem; overflow-wrap: anywhere; }
.delivery-dialog-product-copy small { min-height: 1em; color: var(--muted); font-size: .72rem; }
.delivery-dialog-quantity { flex: 0 0 auto; color: var(--ink); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delivery-dialog-note { padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--soft); }
.delivery-dialog-note p { margin: 4px 0 0; color: var(--ink); }
.delivery-dialog-actions { width: 100%; margin-top: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.delivery-dialog-actions > :only-child { width: 100%; margin-left: 0; }
.delivery-dialog-primary-actions,
.delivery-recovery-actions { display: flex; align-items: stretch; gap: 10px; }
.delivery-dialog-primary-actions { width: 100%; }
.delivery-dialog-primary-actions > *,
.delivery-recovery-actions > * { min-height: 48px; }
.delivery-dialog-primary-actions > * { flex: 1 1 0; }
.delivery-dialog-primary-actions a { width: 100%; }
.delivery-recovery-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.delivery-recovery-actions > form,
.delivery-recovery-actions > button { width: 100%; }
.delivery-recovery-actions form { display: flex; flex: 1 1 0; gap: 8px; min-width: 0; }
.delivery-recovery-actions form:first-child { flex: 0 0 auto; }
.delivery-recovery-actions form:first-child button { min-width: 138px; }
.delivery-recovery-actions select { min-width: 0; flex: 1 1 auto; }
.delivery-recovery-actions form button { flex: 0 0 auto; }

.wizard-progress {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.wizard-progress li {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  transition: border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.wizard-progress li > span {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-strong);
  font-size: .68rem;
  transition: background-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), transform var(--motion-base) var(--ease-out);
}

.wizard-progress li[aria-current="step"] { border-color: var(--brand); color: var(--ink); }
.wizard-progress li[aria-current="step"] > span { background: var(--solid); color: var(--white); }
[data-wizard-step]:not([hidden]) { animation: content-in var(--motion-base) var(--ease-out) both; }
.wizard-step-heading { margin-bottom: 14px; }
.wizard-step-heading h3 { margin: 0; color: var(--ink); font-size: 1.08rem; }
.wizard-step-heading p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }

.store-picker { display: grid; gap: 10px; }
.store-picker-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.store-picker-toolbar label { margin: 0; }
.store-picker-toolbar input { min-height: 46px; }
.store-picker-toolbar > span { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.store-picker-toolbar strong { color: var(--ink); }
.store-picker-actions { display: flex; gap: 8px; }
.store-picker-actions button {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.store-picker-list { max-height: min(42vh, 380px); overflow-y: auto; padding-right: 3px; }
.store-picker-empty { margin: 0; padding: 20px; color: var(--muted); text-align: center; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes content-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes notice-in {
  from { opacity: 0; transform: translateX(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes notice-out {
  to { opacity: 0; transform: translateX(14px) scale(.98); }
}

@keyframes status-pulse {
  50% { box-shadow: 0 0 0 4px transparent; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (hover: hover) {
  .button-primary:hover,
  .login-content button:hover,
  .workspace-card button:hover,
  .button-secondary:hover,
  .button-quiet:hover,
  .button-danger:hover,
  .add-row-button:hover,
  .dialog-close:hover,
  .map-locate:hover,
  .store-picker-actions button:hover,
  .setup-link-box button:hover,
  .member-link button:hover { transform: translateY(-1px); }

  .button-quiet:hover,
  .add-row-button:hover,
  .dialog-close:hover,
  .menu-switch:hover,
  .menu-logout:hover,
  .store-picker-actions button:hover { border-color: var(--line-strong); background: var(--soft-strong); }

  .user-menu summary:hover { background: color-mix(in srgb, var(--ink) 88%, white); transform: scale(1.035); }
  .quick-actions summary:hover { transform: scale(1.1); }
  .floating-nav a:hover { transform: translateY(-1px); }
  .checkbox-grid label:hover { border-color: var(--line-strong); background: var(--soft-strong); }
}

.button-primary:active,
.button-secondary:active,
.button-quiet:active,
.button-danger:active,
.add-row-button:active,
.dialog-close:active,
.menu-switch:active,
.menu-logout:active,
.map-locate:active,
.store-picker-actions button:active,
.setup-link-box button:active,
.member-link button:active,
.user-menu summary:active,
.quick-actions summary:active,
.floating-nav a:active { transform: translateY(1px) scale(.985); }

.delivery-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line-strong); }
.delivery-hero-copy { min-width: 0; }
.delivery-hero h1 { margin: 0; }
.delivery-hero p { margin: 8px 0 0; color: var(--muted); }
.delivery-hero-meta { display: grid; justify-items: end; gap: 10px; }
.delivery-hero time { display: flex; align-items: baseline; gap: 8px; text-align: right; }
.delivery-hero time strong { color: var(--ink); font-size: 2.6rem; }
.delivery-hero time span { color: var(--muted); font-size: .72rem; text-transform: capitalize; }
.delivery-manifest-full { margin-top: 22px; }
.delivery-product-list { display: grid; gap: 10px; margin-top: 18px; }
.delivery-product-row { min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto 124px; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--soft); }
.delivery-product-row.is-verified { border-color: #abd1be; background: var(--success-soft); }
.delivery-product-copy,
.delivery-product-count { min-width: 0; display: grid; gap: 3px; }
.delivery-product-copy strong { color: var(--ink); }
.delivery-product-copy span,
.delivery-product-count span { color: var(--muted); font-size: .75rem; }
.delivery-product-count { min-width: 82px; text-align: right; }
.delivery-product-count strong { color: var(--ink); font-size: 1.05rem; }
.delivery-product-row:not(.is-verified) .delivery-product-count strong { color: var(--warning); }
.delivery-product-row.is-verified .delivery-product-count strong { color: var(--success); }
.product-scan-button { width: 124px; min-height: 44px; }
.product-scan-button:disabled { border-color: transparent; background: transparent; color: var(--success); opacity: 1; }
.status-actions { display: flex; gap: 8px; }
.delivery-status-actions { display: grid; gap: 10px; margin-top: 18px; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.delivery-status-actions > p { margin: 0; color: var(--muted); font-size: .8rem; }
.delivery-status-actions .status-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.delivery-status-actions .status-actions button,
.delivery-status-actions .status-actions a { width: 100%; min-height: 52px; margin: 0; }
.delivery-route-action { grid-column: 1 / -1; display: grid; place-items: center; background: var(--solid); color: var(--white); text-decoration: none; }
.delivery-status-actions form { grid-column: 1 / -1; display: flex; }
.delivery-status-dialog { width: min(480px, calc(100% - 28px)); }
.delivery-status-dialog form { padding: 18px 22px 22px; }
.delivery-status-dialog form > p { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.delivery-status-dialog textarea { min-height: 84px; }
.delivery-scan-dialog { width: min(620px, calc(100% - 28px)); }
.delivery-scan-body { display: grid; gap: 16px; padding: 22px; }
.delivery-scan-body .scanner-viewfinder { height: min(48svh, 390px); }
.delivery-scan-status { min-height: 24px; margin: 0; color: var(--muted); font-weight: 700; text-align: center; }
.delivery-scan-status.is-success { color: var(--success); }
.delivery-scan-status.is-error { color: var(--danger); }
.scan-success-dialog { width: min(420px, calc(100% - 28px)); }
.scan-success-body { display: grid; justify-items: center; gap: 12px; padding: 34px 24px 24px; text-align: center; }
.scan-success-body h2,
.scan-success-body p { margin: 0; }
.scan-success-body p { color: var(--muted); }
.scan-success-body .button-primary { width: 100%; margin-top: 8px; }
.scan-success-check { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 2rem; font-weight: 800; }

.hq-dashboard { display: grid; gap: 18px; }
.hq-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.hq-heading h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.6rem); letter-spacing: -.045em; }
.hq-heading time { color: var(--muted); font-size: .82rem; font-weight: 700; }
.hq-section { display: grid; gap: 10px; }
.hq-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.hq-section-heading h2 { margin: 0; color: var(--ink); font-size: 1.15rem; }
.hq-section-heading p { margin: 0; color: var(--muted); font-size: .78rem; }
.hq-status-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hq-status-rail article { min-height: 86px; display: grid; align-content: space-between; padding: 14px 16px; border-top: 4px solid var(--line-strong); }
.hq-status-rail article + article { border-left: 1px solid var(--line); }
.hq-status-rail .is-planned { border-top-color: var(--brand); }
.hq-status-rail .is-active { border-top-color: var(--warning); }
.hq-status-rail .is-complete { border-top-color: var(--success); }
.hq-status-rail .is-failed { border-top-color: var(--danger); }
.hq-status-rail strong { color: var(--ink); font-size: 2rem; font-variant-numeric: tabular-nums; }
.hq-status-rail span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.hq-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hq-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hq-panel .section-heading { margin-bottom: 10px; }
.hq-panel .section-heading h3 { font-size: 1.15rem; letter-spacing: -.015em; }
.hq-list { display: grid; border-top: 1px solid var(--line); }
.hq-list > a { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.hq-list > a > span:first-child { min-width: 0; display: grid; gap: 3px; }
.hq-list strong { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.hq-list small,
.hq-list time { color: var(--muted); font-size: .72rem; }
.hq-network { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hq-network div { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-inline: 16px; }
.hq-network div + div { border-left: 1px solid var(--line); }
.hq-network dt { color: var(--muted); font-size: .74rem; }
.hq-network dd { margin: 0; color: var(--ink); font-size: 1.15rem; font-weight: 800; }

.shop-overview { display: grid; gap: 18px; }
.shop-index { display: grid; gap: 28px; }
.shop-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.shop-metrics article { display: grid; gap: 4px; padding: 20px 22px; }
.shop-metrics article + article { border-left: 1px solid var(--line); }
.shop-metrics strong { color: var(--brand-dark); font-size: 1.9rem; }
.shop-metrics span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.shop-list,
.shop-index-list { display: grid; gap: 8px; }
.shop-list-row,
.shop-index-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 74px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
.shop-list-row > div,
.shop-index-row > div,
.shop-index-row time { display: grid; gap: 3px; }
.shop-index-row > div { min-width: 0; overflow-wrap: anywhere; }
.shop-list-row span:not(.status-badge),
.shop-index-row span:not(.status-badge) { color: var(--muted); font-size: .78rem; }
.compact-heading { min-height: 0; padding-bottom: 22px; }
.shop-index-row { grid-template-columns: 100px minmax(0, 1fr) auto; }
.shop-index-row { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.shop-delivery-dialog { width: min(680px, calc(100% - 28px)); }
.shop-delivery-body { display: grid; gap: 18px; padding: 20px 22px 22px; }
.shop-delivery-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.shop-delivery-facts div { min-width: 0; display: grid; align-content: start; gap: 4px; }
.shop-delivery-facts .wide { grid-column: 1 / -1; }
.shop-delivery-facts dt { color: var(--muted); font-size: .72rem; }
.shop-delivery-facts dd { margin: 0; color: var(--ink); font-weight: 700; }
.shop-delivery-body h3 { margin: 0 0 8px; font-size: 1rem; }
.shop-delivery-confirm { display: grid; gap: 12px; }
.shop-delivery-confirm > p,
.shop-delivery-waiting { margin: 0; color: var(--muted); font-size: .82rem; text-align: center; }
.shop-delivery-confirm > p.is-success { color: var(--success); }
.shop-delivery-confirm > p.is-error { color: var(--danger); }
.shop-delivery-confirm .scanner-viewfinder { height: min(32svh, 230px); }
.shop-order-history { width: 100%; min-height: 74px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard); }
.shop-order-history:hover { border-color: var(--line-strong); background: var(--soft); }
.shop-order-summary { min-width: 0; display: grid; gap: 3px; }
.shop-order-summary strong { color: var(--ink); }
.shop-order-summary > span { overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.shop-order-history > .status-badge { justify-self: end; }
.shop-order-detail-dialog { width: min(820px, calc(100% - 28px)); overflow: hidden; }
.shop-order-dialog-heading-actions { display: flex; align-items: center; gap: 18px; }
.shop-order-detail-body { min-height: 0; display: grid; gap: 20px; overflow-y: auto; overscroll-behavior: contain; padding: 22px; }
.shop-order-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-control); }
.shop-order-metrics > div { min-width: 0; display: grid; gap: 4px; padding: 14px 16px; }
.shop-order-metrics > div + div { border-left: 1px solid var(--line); }
.shop-order-metrics dt,
.shop-order-facts dt,
.shop-order-delivery dt { color: var(--muted); font-size: .7rem; }
.shop-order-metrics dd { margin: 0; color: var(--ink); font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; }
.shop-order-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.shop-order-facts > div { min-width: 0; display: grid; gap: 3px; }
.shop-order-facts dd { margin: 0; color: var(--ink); font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.shop-order-products h3,
.shop-order-delivery h3 { margin: 0; color: var(--ink); font-size: 1rem; }
.shop-order-products ul { margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.shop-order-products li { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(92px, auto); align-items: center; gap: 10px 22px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.shop-order-product-copy,
.shop-order-product-quantity { min-width: 0; display: grid; gap: 3px; }
.shop-order-product-copy > strong { color: var(--ink); font-size: .88rem; overflow-wrap: anywhere; }
.shop-order-product-copy span,
.shop-order-product-quantity span { color: var(--muted); font-size: .72rem; }
.shop-order-product-copy code { color: var(--brand-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.shop-order-product-quantity { text-align: right; }
.shop-order-product-quantity strong,
.shop-order-line-total { color: var(--ink); font-size: .82rem; white-space: nowrap; }
.shop-order-line-total { justify-self: end; font-variant-numeric: tabular-nums; }
.shop-order-delivery { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-control); background: var(--soft); }
.shop-order-delivery dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.shop-order-delivery dl > div { min-width: 0; display: grid; align-content: start; gap: 4px; }
.shop-order-delivery dd { margin: 0; color: var(--ink); font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.shop-order-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.shop-order-detail-actions form { margin-right: auto; }
.compact-scanner { gap: 12px; }
.compact-scanner .scanner-viewfinder { height: clamp(240px, 34vw, 370px); }
.compact-scanner .scanner-controls { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 10px; }
.compact-scanner .scanner-controls span { justify-self: end; color: var(--muted); font-size: .8rem; font-weight: 700; }
.shop-scan-lines { min-height: 42px; display: grid; gap: 6px; padding-top: 6px; }
.shop-scan-lines > span { padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-control); color: var(--muted); font-size: .75rem; }
.shop-scan-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--soft); }
.shop-scan-item > div { min-width: 0; display: grid; gap: 2px; }
.shop-scan-item strong { color: var(--ink); font-size: .78rem; }
.shop-scan-item span { color: var(--muted); font-size: .68rem; overflow-wrap: anywhere; }
.shop-scan-item b { flex: 0 0 auto; color: var(--success); font-size: .68rem; }
.shop-cart-lines { display: grid; gap: 8px; }
.shop-cart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 45px; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); }
.shop-cart-product { min-width: 0; display: grid; gap: 3px; }
.shop-cart-product strong,
.shop-cart-product span { overflow-wrap: anywhere; }
.shop-cart-product span,
.quantity-control label span { color: var(--muted); font-size: .7rem; }
.quantity-control { display: grid; grid-template-columns: 44px 82px 44px; align-items: center; gap: 4px; }
.quantity-control > button { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.shop-cart-row label { display: block; height: 44px; }
.shop-cart-row label input { min-width: 0; height: 44px; padding-inline: 10px; text-align: center; }
.shop-cart-remove { width: 45px; height: 45px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.35rem; cursor: pointer; }
.shop-cart-remove:hover { background: var(--soft); color: var(--danger); }
.shop-submit { width: 100%; }
.shop-submit:disabled { opacity: .42; cursor: not-allowed; }
.shop-order-dialog { width: min(720px, calc(100% - 28px)); }
.scan-confirm-dialog { width: min(420px, calc(100% - 28px)); }
.scan-confirm-body { display: grid; justify-items: center; gap: 12px; padding: 28px 24px 24px; text-align: center; }
.scan-confirm-check { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 1.8rem; font-weight: 800; }
.scan-confirm-product { display: grid; gap: 4px; }
.scan-confirm-product h3, .scan-confirm-product p { margin: 0; }
.scan-confirm-product h3 { color: var(--ink); font-size: 1.25rem; }
.scan-confirm-product p, .scan-confirm-product code, .scan-confirm-hint { color: var(--muted); font-size: .76rem; }
.scan-confirm-product code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-confirm-hint { margin: 2px 0 4px; }
.scan-confirm-actions { width: 100%; margin: 0; }
.scan-confirm-actions > * { flex: 1; }
.shop-order-wizard .compact-scanner .scanner-viewfinder { height: min(29svh, 245px); }
.shop-order-wizard .scanner-controls { grid-template-columns: 1fr auto; }
.shop-order-wizard .scanner-controls span { grid-column: 1 / -1; justify-self: start; }
.shop-order-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.shop-order-footer > strong { color: var(--muted); font-size: .72rem; }
.shop-order-footer .dialog-actions { margin: 0; }
.workspace-dialog:has([data-wizard-step])[open] { height: min(660px, calc(100svh - 28px)); }
.workspace-dialog > form:has([data-wizard-step]) { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; padding: 18px 22px; }
.workspace-dialog .wizard-progress { flex: 0 0 auto; margin: 0 0 16px; }
.workspace-dialog [data-wizard-step] { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.workspace-dialog [data-wizard-step][hidden] { display: none; }
.wizard-step-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 6px 16px; }
.wizard-step-content .scanner-shell { height: auto; grid-template-rows: auto auto; }
.workspace-dialog > .setup-link-box { margin: 0; border: 0; border-radius: 0; background: var(--surface); }
.workspace-dialog [data-wizard-step] > :is(.dialog-actions, .shop-order-footer) { flex: 0 0 auto; align-self: stretch; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.workspace-dialog .store-picker-list { max-height: none; overflow: visible; }
.workspace-dialog .form-grid { gap: 16px; }
.workspace-dialog .form-field { min-width: 0; }
.workspace-dialog input, .workspace-dialog select { max-width: 100%; }
.manager-order-list a { color: inherit; text-decoration: none; }
.order-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 18px 0 24px; border-bottom: 1px solid var(--line-strong); }
.order-hero h1 { margin: 4px 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.035em; }
.order-hero p:last-child { margin: 0; color: var(--muted); }
.handoff-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0; padding: 0; list-style: none; }
.handoff-rail li { position: relative; display: grid; gap: 3px; padding: 0 20px 0 24px; color: var(--muted); }
.handoff-rail li::before { position: absolute; top: 6px; left: 0; width: 10px; height: 10px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); content: ""; }
.handoff-rail li:not(:last-child)::after { position: absolute; top: 12px; right: 10px; left: 14px; z-index: -1; height: 1px; background: var(--line); content: ""; }
.handoff-rail li.is-complete::before { border-color: var(--brand); background: var(--brand); }
.handoff-rail strong { color: var(--ink); font-size: .85rem; }
.handoff-rail span { font-size: .74rem; }
.order-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 20px; align-items: start; }
.order-item-list { margin: 16px 0 0; padding: 0; list-style: none; }
.order-item-list li { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); }
.order-item-list li > div { min-width: 0; display: grid; gap: 2px; }
.order-item-list span { color: var(--muted); font-size: .74rem; }
.dispatch-panel { display: grid; gap: 14px; }
.dispatch-panel h2,
.handoff-card h2 { margin: 0; color: var(--ink); font-size: 1.35rem; }
.dispatch-panel > p:not(.eyebrow),
.handoff-card > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.dispatch-panel form { display: grid; gap: 14px; }
.handoff-card { display: grid; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.handoff-card .eyebrow { justify-self: start; }
.handoff-card img { width: min(240px, 100%); aspect-ratio: 1; }
.handoff-card img:not([src]) { display: none; }
.handoff-code { color: var(--ink); font-size: 2rem; letter-spacing: .24em; font-variant-numeric: tabular-nums; }
.handoff-card small { color: var(--muted); }

@media (max-width: 900px) {
  .store-row { grid-template-columns: minmax(180px, 1.2fr) 1fr 1fr; }
  .store-row > div:nth-of-type(3),
  .store-row .sync-status { display: none; }
  .item-row { grid-template-columns: minmax(180px, 1.5fr) 1fr 1fr; }
  .remove-row-button { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 700px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 276px; padding: 24px; }
  .brand-logo { width: 100px; height: 68px; }
  .brand-copy { padding: 32px 0; }
  .brand-title { max-width: 15ch; font-size: clamp(2.35rem, 10.5vw, 4rem); }
  .brand-copy > p:last-child,
  .brand-footer { display: none; }
  .login-panel { padding: 48px 24px; }

  .selector-shell { overflow: visible; }
  .selector-header { position: relative; min-height: 176px; padding: 24px; background: var(--solid); }
  .selector-header img { width: 88px; height: 56px; }
  .selector-header > div { max-width: 230px; text-align: right; }
  .selector-header h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .selector-header p:last-child { font-size: .82rem; }
  .role-selector { min-height: calc(100svh - 176px); grid-template-columns: 1fr; grid-template-rows: repeat(var(--role-count), minmax(230px, 1fr)); }
  .role-panel { min-height: 230px; padding: 24px; border-top: 1px solid rgb(255 255 255 / 18%); border-left: 0; }
  .role-panel-form:first-child .role-panel { border-top: 0; }
  .role-panel-copy { max-width: 290px; gap: 5px; }
  .role-panel-copy strong { font-size: clamp(2.2rem, 12vw, 3.4rem); }
  .role-panel-copy > span { min-height: 0; }

  .workspace-header { min-height: 64px; padding-inline: 14px; }
  .workspace-brand { top: 13px; left: 14px; }
  .workspace-header.is-logo-centred .workspace-brand { top: calc(8px + env(safe-area-inset-top)); }
  .workspace-brand img { width: 38px; height: 38px; }
  .workspace-context { max-width: min(42vw, 180px); margin-left: 48px; font-size: .76rem; }
  .quick-actions-panel { right: -52px; }
  .workspace-main { width: min(100% - 24px, 560px); padding-block: 20px 36px; }
  .message-stack { width: calc(100% - 24px); }
  .page-heading { min-height: 0; align-items: start; flex-direction: column; padding-bottom: 12px; }
  .team-heading { min-height: 52px; flex-flow: row wrap; align-items: center; }
  .team-heading > div:first-child { min-width: 0; flex: 1; }
  .reveal-search { margin-left: auto; }
  .reveal-search.is-open { width: 100%; flex: 0 0 100%; margin-left: 0; }
  .reveal-search.is-open .reveal-search-field { width: calc(100% - 52px); }
  .page-heading h1,
  .delivery-hero h1,
  .hq-heading h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
  .shop-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-metrics article { min-height: 82px; align-content: space-between; padding: 12px 10px; }
  .shop-metrics article + article { border-left: 1px solid var(--line); }
  .shop-metrics strong { font-size: 1.45rem; }
  .shop-metrics span { font-size: .75rem; line-height: 1.3; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .shop-index-row { grid-template-columns: 58px minmax(0, 1fr); gap: 6px 12px; }
  .shop-index-row > .status-badge { grid-column: 2; justify-self: start; }
  .compact-scanner .scanner-controls { grid-template-columns: 1fr; }
  .compact-scanner .scanner-controls button { width: 100%; }
  .compact-scanner .scanner-controls span { justify-self: start; }
  .shop-cart-row { grid-template-columns: minmax(0, 1fr) auto 45px; }
  .order-hero { align-items: start; flex-direction: column; }
  .handoff-rail { grid-template-columns: 1fr; gap: 14px; }
  .handoff-rail li:not(:last-child)::after { top: 14px; bottom: -14px; left: 6px; width: 1px; height: auto; }
  .page-heading .button-primary { width: 100%; }
  .manager-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 82px; }
  .day-metric { height: 82px; min-height: 82px; align-content: space-between; padding: 13px 10px; }
  .day-metric + .day-metric { border-left: 1px solid var(--line); }
  .day-metric strong { font-size: 1.5rem; }
  .day-metric span { font-size: .75rem; line-height: 1.3; }
  .content-section { margin-top: 20px; }
  .first-section { margin-top: 12px; }
  .field-overview-heading { align-items: end; padding-top: 4px; }
  .field-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-workspace .workspace-main { inset-block-start: 64px; width: 100%; padding: 0; }
  .map-locate { right: 10px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .map-feedback { right: 10px; bottom: 28px; }

  .scanner-shell { gap: 14px; }
  .scanner-viewfinder { height: auto; min-height: 0; aspect-ratio: 16 / 10; border-radius: 20px; }

  .manifest-row { min-height: 82px; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 7px 11px; padding: 12px; }
  .manifest-assignee { grid-column: 2; grid-row: 2; }
  .manifest-main strong { white-space: normal; }
  .manifest-row > .status-badge { grid-column: 3; grid-row: 1 / span 2; align-self: center; justify-self: end; }
  .store-row { grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
  .store-row > div:not(.store-identity) { grid-column: 1 / -1; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
  .store-row .store-identity { min-width: 0; }
  .store-row .sync-status { grid-column: 2; grid-row: 1; }
  .store-row .sync-status { display: inline-flex; }
  .section-heading { align-items: start; }

  .floating-nav { bottom: calc(26px + env(safe-area-inset-bottom)); width: auto; justify-content: center; padding: 5px; }
  .floating-nav a { width: 46px; min-width: 46px; min-height: 44px; flex: 0 0 46px; }
  .floating-nav svg { width: 20px; height: 20px; }

  .form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .form-field:first-of-type { grid-column: 1 / -1; }
  .remove-row-button { grid-column: 1 / -1; justify-self: stretch; }
  .setup-link-box > div,
  .member-link { grid-template-columns: 1fr; }
  .team-member { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .product-catalogue-head { display: none; }
  .product-catalogue-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 14px; }
  .product-catalogue-copy { grid-column: 1 / -1; }
  .product-catalogue-row code { grid-column: 1; }
  .product-catalogue-row > strong { grid-column: 2; justify-self: end; }
  .product-scanner-controls { grid-template-columns: 1fr 1fr; }
  .product-scanner-controls button { width: 100%; }
  .product-scanner-controls span { grid-column: 1 / -1; justify-self: start; }
  .product-create-dialog { max-height: calc(100svh - 16px); }
  .product-create-dialog .dialog-heading { padding: 14px 16px 10px; }
  .product-create-dialog .wizard-step-heading p { display: none; }
  .product-scanner-viewfinder { height: min(24svh, 180px); }
  .product-edit-grid { grid-template-columns: 1fr 1fr; }
  .product-edit-grid .wide { grid-column: 1 / -1; }
  .delivery-dialog-body { padding: 16px; }
  .delivery-dialog-facts { grid-template-columns: 1fr; gap: 12px; }
  .team-list { grid-template-columns: 1fr; }
  .store-picker-toolbar { grid-template-columns: 1fr; }
  .store-picker-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .store-picker-actions button { min-height: 44px; }
  .dialog-actions > * { flex: 1; width: auto; padding-inline: 10px; font-size: .8rem; }
  .workspace-dialog .dialog-heading { gap: 12px; padding: 16px; }
  .workspace-dialog .dialog-heading h2 { font-size: 1.25rem; }
  .workspace-dialog:has([data-wizard-step])[open] { height: min(660px, calc(100svh - 16px)); }
  .workspace-dialog > form:has([data-wizard-step]) { min-height: 0; padding: 12px 16px 16px; }
  .workspace-dialog .wizard-progress { margin-bottom: 12px; }
  .product-create-dialog .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-dialog-product { flex-wrap: wrap; gap: 8px; }
  .delivery-dialog-product-copy { flex: 1 1 100%; }
  .delivery-dialog-quantity { margin-left: auto; font-size: .78rem; }
  .shop-order-facts { grid-template-columns: 1fr; }
  .shop-delivery-facts dd { overflow-wrap: anywhere; }
  .workspace-dialog .shop-order-dialog-heading-actions { flex-shrink: 0; gap: 8px; }
  .delivery-create-dialog { width: calc(100% - 16px); max-height: calc(100svh - 16px); }
  .delivery-create-dialog .dialog-heading { padding: 14px 16px 10px; }
  .delivery-create-dialog .wizard-progress { margin-bottom: 12px; }
  .delivery-create-dialog .wizard-progress li { min-width: 0; display: grid; justify-items: center; gap: 4px; padding: 6px 2px; font-size: .67rem; }
  .delivery-create-dialog .wizard-step-heading p { display: none; }
  .shop-delivery-dialog { width: calc(100% - 16px); max-height: calc(100svh - 16px); }
  .shop-delivery-body { padding: 14px 16px 16px; }
  .shop-delivery-facts { grid-template-columns: 1fr 1fr; }
  .shop-order-dialog { width: calc(100% - 16px); height: calc(100svh - 16px); }
  .shop-order-dialog .dialog-heading { padding: 14px 16px 10px; }
  .shop-order-detail-dialog { width: calc(100% - 16px); max-height: calc(100svh - 16px); }
  .shop-order-detail-dialog .dialog-heading { align-items: center; padding: 14px 16px 10px; }
  .shop-order-dialog-heading-actions { gap: 10px; }
  .shop-order-detail-body { gap: 16px; padding: 14px 16px 16px; }
  .shop-order-metrics > div { padding: 11px 9px; }
  .shop-order-metrics dt { font-size: .62rem; }
  .shop-order-metrics dd { font-size: 1rem; }
  .shop-order-products li { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .shop-order-product-copy { grid-column: 1 / -1; }
  .shop-order-product-copy > strong { white-space: normal; }
  .shop-order-product-quantity { text-align: left; }
  .shop-order-delivery dl { grid-template-columns: 1fr; gap: 10px; }
  .shop-order-detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-order-detail-actions > button:last-child { grid-column: 2; }
  .shop-order-detail-actions form,
  .shop-order-detail-actions button { width: 100%; }
  .shop-order-wizard .wizard-step-heading p { display: none; }
  .shop-order-wizard .compact-scanner .scanner-viewfinder { height: auto; max-height: 31svh; aspect-ratio: 16 / 10; }
  .shop-order-wizard .dialog-actions { flex-direction: row; }
  .shop-order-wizard .dialog-actions > * { width: auto; flex: 1; }
  .shop-cart-row { grid-template-columns: minmax(0, 1fr) 45px; }
  .quantity-control { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 44px minmax(92px, 1fr) 44px; }
  .shop-cart-remove { grid-column: 2; grid-row: 1; }
  .shop-order-footer .dialog-actions { width: 100%; }
  .hq-heading { align-items: start; }
  .hq-heading time { max-width: 120px; text-align: right; }
  .hq-status-rail article { min-height: 82px; padding: 10px 8px; }
  .hq-status-rail strong { font-size: 1.4rem; }
  .hq-status-rail span { font-size: .75rem; line-height: 1.3; }
  .hq-work-grid { grid-template-columns: 1fr; gap: 12px; }
  .hq-network { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hq-network div { min-height: 62px; display: grid; align-content: center; gap: 3px; padding-inline: 10px; }
  .hq-network div + div { border-top: 0; border-left: 1px solid var(--line); }

  .delivery-hero { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; padding-block: 20px; }
  .delivery-hero-copy { min-width: 0; }
  .delivery-hero h1 { margin-top: 0; font-size: 1.75rem; overflow-wrap: anywhere; }
  .delivery-hero-meta { grid-row: 1; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 8px; }
  .delivery-hero time { justify-content: end; }
  .delivery-hero time strong { font-size: 1.45rem; }
  .delivery-hero time span { font-size: .68rem; line-height: 1.25; }
  .delivery-status-actions { align-items: stretch; flex-direction: column; }
  .delivery-status-actions .status-actions { grid-template-columns: 1fr; }
  .delivery-product-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .delivery-product-count { text-align: right; }
  .product-scan-button { width: 100%; grid-column: 1 / -1; }
  .delivery-scan-dialog { width: calc(100% - 20px); max-height: calc(100svh - 20px); }
  .delivery-scan-body { padding: 16px; }
  .delivery-scan-body .scanner-viewfinder { height: auto; aspect-ratio: 16 / 10; }
  .status-actions { flex-direction: column; }
  .status-actions button { width: 100%; }
  .delivery-state-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .delivery-state-tabs a:nth-child(3),
  .delivery-state-tabs a:nth-child(4) { border-top: 0; }
  .delivery-dialog-primary-actions,
  .delivery-recovery-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .delivery-recovery-actions form,
  .delivery-recovery-actions form:first-child { grid-column: 1 / -1; }
  .delivery-recovery-actions form:first-child button { width: 100%; }
  .delivery-recovery-actions form:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .delivery-recovery-actions form:last-child button { width: auto; }
  .field-manifest .manifest-row { grid-template-columns: 54px minmax(0, 1fr); align-items: start; }
  .field-manifest .manifest-main { min-width: 0; }
  .field-manifest .manifest-main strong,
  .field-manifest .manifest-main span { overflow-wrap: anywhere; }
  .field-manifest .status-badge { grid-column: 2; grid-row: auto; justify-self: start; }
  input,
  select,
  textarea { font-size: 16px; }
}

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