:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #617078;
  --line: #d7dfe2;
  --soft-line: #e9edef;
  --surface: #ffffff;
  --canvas: #f3f6f6;
  --nav: #18262b;
  --nav-hover: #26383e;
  --accent: #087f73;
  --accent-dark: #075f57;
  --accent-soft: #e2f3f0;
  --blue: #1d5f91;
  --blue-soft: #e7f0f7;
  --amber: #a45b00;
  --amber-soft: #fff0d9;
  --red: #b33131;
  --red-soft: #fde9e9;
  --green: #197045;
  --green-soft: #e5f3eb;
  --shadow: 0 12px 34px rgba(23, 33, 38, 0.12);
  --topbar-height: 92px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(8, 127, 115, 0.22);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

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

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.auth-gate {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(24px, 4vw, 56px);
  color: #ffffff;
  background-color: #101b1f;
}

.auth-gate[data-mode] {
  background-image: url("/synovaq-operations-login.png");
  background-position: center;
  background-size: cover;
}

.auth-gate[data-mode]::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(7, 15, 18, 0.58);
}

.auth-gate[data-mode="setup"] {
  place-items: start center;
}

.auth-frame {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100dvh - clamp(48px, 8vw, 112px)));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 450px);
  grid-template-rows: auto 1fr;
  gap: 36px clamp(36px, 8vw, 112px);
  align-items: start;
}

.auth-gate[data-mode="setup"] .auth-frame {
  grid-template-columns: minmax(220px, 340px) minmax(520px, 760px);
}

.auth-brand-main {
  align-self: start;
  color: #ffffff;
}

.auth-brand-main .brand-mark {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border-color: rgba(255, 255, 255, 0.35);
  background: #07877a;
  box-shadow: 0 0 0 6px rgba(7, 135, 122, 0.16);
  font-size: 13px;
}

.auth-product,
.tracking-product {
  display: block;
  color: #81d8c9;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-brand-main h1 {
  margin-top: 3px;
  font-size: clamp(22px, 2.3vw, 32px);
}

.auth-brand-main p {
  color: #c6d0d3;
  font-size: 13px;
}

.auth-context {
  align-self: end;
  max-width: 520px;
  padding: 26px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.auth-context .eyebrow {
  color: #9eafb4;
}

.auth-context h2 {
  margin: 7px 0 20px;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.05;
}

.auth-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-signals > div {
  min-width: 0;
  padding: 14px 14px 14px 0;
}

.auth-signals > div + div {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-signals dt,
.auth-signals dd {
  margin: 0;
}

.auth-signals dt {
  color: #9eafb4;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-signals dd {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.auth-signal-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: #55d8a1;
  box-shadow: 0 0 0 3px rgba(85, 216, 161, 0.13);
}

.tracking-view {
  min-height: 100vh;
  background: #eef2f3;
}

.tracking-header {
  padding: 20px max(20px, calc((100vw - 760px) / 2));
  border-bottom: 1px solid #2d4148;
  color: #ffffff;
  background: var(--nav);
}

.tracking-header-inner {
  width: min(760px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
}

.tracking-header .auth-brand p {
  color: #aebcc1;
}

.tracking-product {
  margin-bottom: 2px;
}

.tracking-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c4d0d4;
  font-size: 10px;
  font-weight: 750;
}

.tracking-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #55d8a1;
  box-shadow: 0 0 0 3px rgba(85, 216, 161, 0.13);
}

.tracking-sync.is-error .tracking-live-dot {
  background: #ff8585;
  box-shadow: 0 0 0 3px rgba(255, 133, 133, 0.13);
}

.tracking-refresh {
  min-height: 32px;
  padding: 5px 9px;
  border-color: #40555d;
  color: #ffffff;
  background: #24363c;
  font-size: 10px;
}

.tracking-refresh:hover {
  border-color: #6a858f;
  background: #30464e;
}

.tracking-content {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.tracking-status {
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 7px;
  background: #ffffff;
}

.tracking-status h2 {
  margin: 7px 0;
  font-size: 24px;
}

.tracking-status > p {
  margin: 0;
  color: var(--muted);
}

.tracking-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--line);
}

.tracking-meta > div {
  min-width: 0;
  padding: 12px;
  background: #ffffff;
}

.tracking-meta span,
.tracking-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.tracking-meta span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.tracking-meta strong {
  margin-top: 4px;
  font-size: 12px;
}

.tracking-timeline {
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.delivery-tools {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tracking-link-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.tracking-link-result {
  min-width: 0;
  display: flex;
  gap: 7px;
}

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

.delivery-location-form .span-2 {
  grid-column: span 2;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand h1,
.auth-brand p {
  margin: 0;
}

.auth-brand h1 {
  font-size: 22px;
  line-height: 1.2;
}

.auth-brand p {
  margin-top: 4px;
  color: var(--muted);
}

.auth-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 100%;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(159, 190, 199, 0.42);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(11, 25, 30, 0.95);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.auth-panel-setup {
  align-self: start;
}

.auth-panel .eyebrow {
  color: #81d8c9;
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h2 {
  margin: 5px 0 0;
  font-size: 24px;
}

.auth-heading p {
  margin: 7px 0 0;
  color: #9eafb4;
  font-size: 12px;
}

.auth-panel > label,
.password-form > label,
.pos-cart > label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #334248;
  font-size: 12px;
  font-weight: 750;
}

.auth-panel > label,
.auth-panel .form-grid label,
.auth-panel .form-grid .form-field,
.auth-panel .setup-code-instructions {
  color: #dce5e7;
}

.auth-panel input,
.auth-panel select,
.auth-panel textarea {
  border-color: #52676e;
  color: #ffffff;
  background: #17292f;
}

.auth-panel input::placeholder {
  color: #829399;
}

.auth-panel .field-button {
  border-color: #52676e;
  color: #dce5e7;
  background: #24383e;
}

.auth-panel .field-button:hover {
  border-color: #81d8c9;
  background: #2e484f;
}

.auth-password-field {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.auth-session-note {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #9eafb4;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.auth-session-note > span {
  min-width: 0;
}

.auth-loading {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #dce5e7;
  font-weight: 700;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 22px;
  border-bottom: 1px solid #2d4148;
  color: #ffffff;
  background: var(--nav);
}

.brand {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 17px;
  line-height: 1.25;
}

.brand p {
  max-width: 350px;
  margin-top: 3px;
  overflow: hidden;
  color: #aebcc1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.system-status {
  min-width: 112px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #e8a23c;
  box-shadow: 0 0 0 3px rgba(232, 162, 60, 0.18);
}

.system-status.is-healthy .status-dot {
  background: #4fd09a;
  box-shadow: 0 0 0 3px rgba(79, 208, 154, 0.16);
}

.system-status.is-error .status-dot {
  background: #ff7878;
  box-shadow: 0 0 0 3px rgba(255, 120, 120, 0.16);
}

.system-status-copy {
  display: grid;
}

.system-status-copy strong {
  font-size: 11px;
}

.system-status-copy small {
  color: #aebcc1;
  font-size: 10px;
}

.search {
  width: min(300px, 24vw);
}

.search input {
  width: 100%;
  min-height: 38px;
  border-color: #40555d;
  color: #ffffff;
  background: #24363c;
}

.search input::placeholder {
  color: #aebcc1;
}

.mode-switch {
  height: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  padding: 3px;
  border: 1px solid #40555d;
  border-radius: 6px;
  background: #24363c;
}

.mode-button {
  border: 0;
  border-radius: 4px;
  color: #b8c4c8;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.mode-button.is-active {
  color: var(--ink);
  background: #ffffff;
}

.account-button {
  height: 44px;
  max-width: 190px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  background: transparent;
  text-align: left;
}

.account-button:hover {
  border-color: #40555d;
  background: #24363c;
}

#userInitials {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--nav);
  background: #b6e1d8;
  font-size: 11px;
  font-weight: 900;
}

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

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

.account-copy strong {
  font-size: 11px;
}

.account-copy small {
  color: #aebcc1;
  font-size: 10px;
}

.workspace {
  min-height: calc(100vh - var(--topbar-height));
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
}

.module-rail {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.rail-title {
  margin: 0 10px 12px;
  color: #7a888e;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-list {
  display: grid;
  gap: 3px;
}

.module-button {
  min-width: 0;
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #45545a;
  background: transparent;
  text-align: left;
}

.module-button:hover {
  background: #f2f6f6;
}

.module-button.is-active {
  border-color: #badbd5;
  color: #075f57;
  background: var(--accent-soft);
}

.module-short {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #ffffff;
  background: #53666d;
  font-size: 9px;
  font-weight: 900;
}

.module-button.is-active .module-short {
  background: var(--accent);
}

.module-copy {
  min-width: 0;
  display: grid;
}

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

.module-copy strong {
  font-size: 12px;
}

.module-copy small {
  margin-top: 2px;
  color: #7a888e;
  font-size: 10px;
}

.main-pane {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 16px;
  padding: 20px;
}

.context-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.context-bar h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.context-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 800;
}

.button {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 12px;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-block {
  width: 100%;
  margin-top: 20px;
}

.button-primary {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button-secondary {
  border-color: #bdc9cd;
  color: #35464c;
  background: #ffffff;
}

.button-secondary:hover {
  border-color: #87979d;
  background: #f5f7f7;
}

.button-danger {
  border-color: #e2b3b3;
  color: var(--red);
  background: #ffffff;
}

.button-danger:hover {
  background: var(--red-soft);
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: var(--line);
  color: #55676e;
  background: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.flow-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.section-heading {
  display: grid;
  gap: 3px;
}

.section-heading span {
  color: #7a888e;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-heading strong {
  font-size: 12px;
}

.workflow-steps {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(58px, 1fr));
  gap: 4px;
}

.flow-step {
  position: relative;
  min-width: 0;
  padding: 7px 4px;
  border: 1px solid var(--soft-line);
  border-radius: 4px;
  color: #718087;
  background: #f7f9f9;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.flow-step.is-complete {
  border-color: #c7e1d5;
  color: var(--green);
  background: var(--green-soft);
}

.flow-step.is-current {
  border-color: #90c9c0;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.summary-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid #6f858d;
  border-radius: 6px;
  background: #ffffff;
}

.summary-card.tone-green {
  border-top-color: var(--green);
}

.summary-card.tone-amber {
  border-top-color: var(--amber);
}

.summary-card.tone-red {
  border-top-color: var(--red);
}

.summary-card.tone-blue {
  border-top-color: var(--blue);
}

.summary-card span,
.summary-card small {
  display: block;
  color: var(--muted);
}

.summary-card span {
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 23px;
  line-height: 1.1;
}

.summary-card small {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.dashboard-grid[data-columns="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-kpis {
  min-width: 0;
  grid-column: 1 / -1;
}

.dashboard-widget {
  min-width: 0;
  min-height: 290px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.dashboard-widget-header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-widget-header h2 {
  margin: 4px 0 0;
  font-size: 16px;
}

.chart-type-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.dashboard-grid[data-density="compact"] {
  gap: 10px;
}

.dashboard-grid[data-density="compact"] .dashboard-widget {
  min-height: 240px;
  padding: 14px;
}

.dashboard-grid[data-density="compact"] .dashboard-widget-header {
  margin-bottom: 12px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-chart-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(86px, 0.85fr) minmax(90px, 1.35fr) auto;
  align-items: center;
  gap: 9px;
  font-size: 10px;
}

.bar-chart-row > span {
  overflow: hidden;
  color: #405057;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-chart-track {
  height: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: #e8edef;
}

.bar-chart-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.bar-chart-row strong {
  min-width: 24px;
  color: #304148;
  font-size: 10px;
  text-align: right;
}

.donut-chart {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(118px, 0.7fr) minmax(130px, 1.3fr);
  align-items: center;
  gap: 16px;
}

.donut-chart svg {
  width: 100%;
  max-width: 170px;
  justify-self: center;
}

.donut-chart text:first-of-type {
  fill: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.donut-chart text:last-of-type {
  fill: var(--muted);
  font-size: 8px;
}

.chart-legend {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.chart-legend > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.chart-legend span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.line-chart svg {
  display: block;
  width: 100%;
  min-width: 360px;
}

.chart-grid-line {
  stroke: #dce4e6;
  stroke-width: 1;
}

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

.line-chart text {
  fill: var(--muted);
  font-size: 10px;
}

.chart-area {
  fill: var(--accent);
  opacity: 0.13;
}

.chart-point {
  fill: var(--accent);
}

.column-chart {
  height: 220px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding-top: 8px;
}

.column-chart-item {
  min-width: 0;
  flex: 1 1 0;
  display: grid;
  grid-template-rows: 20px minmax(100px, 1fr) 32px;
  align-items: end;
  gap: 5px;
  text-align: center;
}

.column-chart-item > strong {
  overflow: hidden;
  color: #33484f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-chart-item > span {
  align-self: start;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.column-chart-track {
  width: min(36px, 82%);
  height: 100%;
  justify-self: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
  background: #eef2f3;
}

.column-chart-track i {
  width: 100%;
  display: block;
  border-radius: 3px 3px 0 0;
}

.grouped-column-chart,
.multi-series-chart {
  min-width: 0;
}

.grouped-column-plots {
  height: 190px;
  display: flex;
  gap: 7px;
}

.grouped-column-group {
  min-width: 0;
  flex: 1 1 0;
  display: grid;
  grid-template-rows: minmax(120px, 1fr) 24px;
  gap: 5px;
}

.grouped-column-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  border-bottom: 1px solid #dce4e6;
}

.grouped-column-bars i {
  width: min(12px, 30%);
  min-height: 0;
  border-radius: 2px 2px 0 0;
}

.grouped-column-group > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
}

.multi-series-chart {
  overflow-x: auto;
}

.multi-series-chart svg {
  display: block;
  width: 100%;
  min-width: 400px;
}

.multi-series-chart text {
  fill: var(--muted);
  font-size: 9px;
}

.series-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

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

.series-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

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

.gauge-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

.gauge-item svg {
  width: min(112px, 100%);
}

.gauge-track,
.gauge-value {
  fill: none;
  stroke-width: 10;
}

.gauge-track {
  stroke: #e4eaec;
}

.gauge-value {
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 55px 55px;
}

.gauge-item svg text:first-of-type {
  fill: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.gauge-item svg text:last-of-type {
  fill: var(--muted);
  font-size: 8px;
}

.gauge-item > strong {
  color: #34464d;
  font-size: 10px;
}

.gauge-item > span {
  max-width: 150px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.stacked-chart {
  display: grid;
  gap: 14px;
}

.stacked-chart-track {
  height: 30px;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  background: #e7ecee;
}

.stacked-chart-track i {
  min-width: 2px;
}

.stacked-total {
  color: #35484f;
  font-size: 11px;
}

.stacked-legend {
  display: grid;
}

.stacked-legend > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 9px;
}

.stacked-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.stacked-legend strong {
  color: var(--ink);
}

.stacked-legend small {
  text-align: right;
}

.funnel-chart {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.funnel-chart > div {
  min-width: 34%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 3px;
  color: #ffffff;
  font-size: 9px;
}

.funnel-chart span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treemap-chart {
  min-height: 205px;
  display: flex;
  flex-wrap: wrap;
  align-content: stretch;
  gap: 3px;
}

.treemap-chart > div {
  min-width: 92px;
  min-height: 70px;
  flex-basis: 30%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  border-radius: 3px;
  color: #ffffff;
}

.treemap-chart span {
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treemap-chart strong {
  margin-top: 3px;
  font-size: 13px;
}

.heatmap-chart {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.heatmap-head,
.heatmap-row {
  display: grid;
  grid-template-columns: 28px repeat(6, minmax(26px, 1fr));
  gap: 4px;
  align-items: center;
}

.heatmap-head b,
.heatmap-row > b {
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.heatmap-row i {
  aspect-ratio: 1.45;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 122, 114, 0.08);
  border-radius: 2px;
  background: rgba(17, 122, 114, calc(0.08 + var(--heat) * 0.84));
  color: #ffffff;
  font-style: normal;
  font-size: 8px;
  text-shadow: 0 1px 2px rgba(24, 43, 49, 0.65);
}

.heatmap-scale {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.heatmap-scale i {
  width: 12px;
  height: 8px;
  background: #dfeceb;
}

.heatmap-scale i:nth-of-type(2) {
  background: #a8d0cc;
}

.heatmap-scale i:nth-of-type(3) {
  background: #5ba59e;
}

.heatmap-scale i:nth-of-type(4) {
  background: var(--accent);
}

.dashboard-map-widget {
  min-height: 500px;
  grid-column: 1 / -1;
}

.delivery-map-shell {
  min-width: 0;
  position: relative;
}

.delivery-map-canvas {
  width: 100%;
  height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #e9eff0;
}

.delivery-map-notice,
.delivery-map-legend {
  position: absolute;
  z-index: 500;
  border: 1px solid rgba(67, 87, 94, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(24, 43, 49, 0.12);
}

.delivery-map-notice {
  top: 10px;
  left: 50px;
  max-width: min(360px, calc(100% - 62px));
  padding: 8px 10px;
  color: #3d5057;
  font-size: 9px;
}

.delivery-map-legend {
  right: 10px;
  bottom: 22px;
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  color: #41535a;
  font-size: 8px;
}

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

.delivery-map-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(41, 59, 65, 0.25);
}

.map-key-base {
  background: #17363e;
}

.map-key-active {
  background: #117a72;
}

.map-key-destination {
  background: #c48a18;
}

.dashboard-map-marker-wrap {
  border: 0;
  background: transparent;
}

.dashboard-map-marker {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #117a72;
  box-shadow: 0 2px 8px rgba(21, 46, 53, 0.36);
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
}

.map-marker-base {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: #17363e;
}

.map-marker-destination {
  width: 21px;
  height: 21px;
  border-radius: 3px 50% 50% 50%;
  background: #c48a18;
  transform: rotate(45deg);
}

.map-marker-complete {
  background: #6f858d;
}

.map-marker-active::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.map-popup {
  min-width: 180px;
  display: grid;
  gap: 5px;
  font-family: inherit;
}

.map-popup > strong {
  color: #17262c;
  font-size: 11px;
}

.map-popup > span {
  color: #596c73;
  font-size: 9px;
}

.map-popup dl {
  display: grid;
  gap: 3px;
  margin: 4px 0 0;
}

.map-popup dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 8px;
}

.map-popup dt {
  color: #6c7b80;
}

.map-popup dd {
  margin: 0;
  color: #2f4249;
  font-weight: 700;
  text-align: right;
}

.chart-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.content-grid,
.lower-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 16px;
}

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

.panel-primary {
  min-height: 220px;
}

.panel h2,
.panel h3,
.panel p {
  margin-top: 0;
}

.panel h2 {
  margin-bottom: 7px;
  font-size: 17px;
}

.panel h3 {
  margin-bottom: 5px;
  font-size: 13px;
}

.panel p {
  color: var(--muted);
}

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

.panel-header {
  margin-bottom: 14px;
}

.panel-header h2,
.section-title h3 {
  margin: 3px 0 0;
}

.metric-list,
.status-list,
.action-list,
.audit-timeline,
.pos-inventory,
.cart-lines {
  display: grid;
  gap: 8px;
}

.metric-line,
.status-line,
.action-button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--soft-line);
}

.metric-line:last-child,
.status-line:last-child {
  border-bottom: 0;
}

.metric-line span,
.status-line span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.metric-line strong,
.status-line strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.action-button {
  width: 100%;
  border: 0;
  color: #294047;
  background: transparent;
  text-align: left;
}

.action-button:hover {
  color: var(--accent-dark);
}

.action-button span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.action-button span:last-child {
  color: var(--accent);
  font-weight: 900;
}

.table-panel {
  overflow: hidden;
}

.risk-filter,
.check-field {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  color: #46575d;
  font-size: 11px;
  font-weight: 750;
}

.risk-filter input,
.check-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.records-table {
  min-width: 0;
  overflow-x: auto;
}

.data-table-shell {
  min-width: 0;
}

.data-table-scroll {
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid var(--soft-line);
}

.data-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 10px;
}

.users-table .data-table {
  min-width: 900px;
}

.import-preview-table .data-table {
  min-width: 680px;
}

.data-table th,
.data-table td {
  min-width: 112px;
  padding: 10px 9px;
  border-bottom: 1px solid var(--soft-line);
  vertical-align: middle;
  text-align: left;
}

.data-table th {
  color: #42535a;
  background: #f7f9f9;
  font-weight: 800;
}

.data-table tbody tr:hover {
  background: #f7fbfa;
}

.data-table td {
  color: #425159;
}

.data-title-column {
  min-width: 190px !important;
}

.data-number-column {
  text-align: right !important;
  white-space: nowrap;
}

.data-action-column {
  min-width: 100px !important;
  text-align: right !important;
}

.data-primary,
.data-secondary {
  display: block;
}

.data-primary {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.data-secondary {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.data-sort-button {
  width: 100%;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 10px;
  font-weight: 850;
  text-align: left;
}

.data-sort-button span:last-child {
  color: var(--accent);
  font-size: 12px;
}

.data-filter-row th {
  padding-top: 7px;
  padding-bottom: 8px;
  background: #ffffff;
}

.data-filter {
  min-width: 82px;
  min-height: 31px;
  padding: 5px 7px;
  border-color: #c8d2d5;
  font-size: 9px;
}

.data-filter-empty {
  background: #ffffff !important;
}

.data-table-empty {
  height: 120px;
  color: var(--muted) !important;
  text-align: center !important;
}

.data-pagination {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 2px 2px;
  color: var(--muted);
  font-size: 10px;
}

.data-pagination > span {
  margin-right: auto;
}

.data-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.data-pagination select {
  width: 62px;
  min-height: 32px;
  padding: 4px 7px;
  font-size: 10px;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-buttons button {
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid #bcc8cc;
  border-radius: 4px;
  color: #314249;
  background: #ffffff;
  font-size: 16px;
}

.pagination-buttons button:disabled {
  cursor: default;
  opacity: 0.4;
}

.pagination-buttons strong {
  min-width: 86px;
  color: #46575e;
  font-size: 10px;
  text-align: center;
}

.record-row {
  min-width: 670px;
  display: grid;
  grid-template-columns: minmax(200px, 1.55fr) minmax(120px, 0.8fr) 105px 105px 70px;
  align-items: center;
  gap: 10px;
  padding: 12px 3px;
  border-top: 1px solid var(--soft-line);
}

.record-row:first-child {
  border-top: 0;
}

.record-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

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

.record-main strong {
  font-size: 12px;
}

.record-main small,
.record-cell small {
  color: var(--muted);
  font-size: 10px;
}

.record-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: 11px;
}

.status-pill,
.risk-pill {
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  color: #44555b;
  background: #edf1f2;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.tone-green {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.tone-amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill.tone-red,
.risk-pill {
  color: var(--red);
  background: var(--red-soft);
}

.open-record {
  min-height: 32px;
  padding: 5px 9px;
}

.empty-state,
.loading-state {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.quick-panel h2 {
  font-size: 15px;
}

.dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(16, 28, 33, 0.62);
}

.dialog-wide {
  width: min(960px, calc(100vw - 32px));
}

.dialog-confirm {
  width: min(480px, calc(100vw - 32px));
}

.dialog > form,
.dialog > div,
.dialog > section,
.dialog > dl,
.dialog > .dialog-actions {
  margin-left: 24px;
  margin-right: 24px;
}

.dialog > form {
  margin-top: 0;
}

.dialog form > .dialog-header {
  margin-left: 0;
  margin-right: 0;
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 15px;
  border-bottom: 1px solid var(--soft-line);
  background: #ffffff;
}

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

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

.auth-panel .form-grid {
  margin-top: 0;
}

.form-grid label,
.form-grid .form-field,
.user-form label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  color: #334248;
  font-size: 11px;
  font-weight: 750;
}

.lookup-control {
  display: grid;
  gap: 8px;
}

.form-field > label {
  display: block;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 7px;
}

.field-button {
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid #9cabb1;
  border-radius: 5px;
  color: var(--ink);
  background: #eef2f3;
  font-size: 11px;
  font-weight: 800;
}

.field-button:hover {
  border-color: var(--teal);
  background: #e2eeee;
}

#setupAccessCode {
  font-family: Consolas, "Courier New", monospace;
}

#setupCodeCount.is-invalid {
  color: var(--red);
  font-weight: 800;
}

.setup-code-instructions {
  padding: 11px 0;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  color: #334248;
}

.setup-code-instructions summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.setup-code-instructions h3 {
  margin: 12px 0 6px;
  font-size: 10px;
}

.setup-code-instructions p {
  margin: 9px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
}

.setup-code-instructions pre {
  max-width: 100%;
  margin: 9px 0;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid #c8d2d5;
  border-radius: 5px;
  background: #f4f6f7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.setup-code-instructions code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.instruction-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.instruction-actions .button {
  min-height: 34px;
}

#setupCommandStatus {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.import-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.import-control {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.import-control + .import-control {
  padding-left: 24px;
  border-left: 1px solid var(--soft-line);
}

.import-control > label {
  display: grid;
  gap: 7px;
  color: #334248;
  font-size: 11px;
  font-weight: 750;
}

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

.file-picker input {
  padding: 7px;
  border-style: dashed;
  background: #f7f9f9;
}

.file-picker input::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  padding: 6px 10px;
  border: 1px solid #9cabb1;
  border-radius: 4px;
  color: #26383e;
  background: #ffffff;
  font-weight: 800;
}

.import-preview {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.import-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  background: #edf7f3;
}

.import-preview-heading.is-invalid {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.import-preview-heading h3 {
  margin: 3px 0 0;
  font-size: 15px;
}

.import-preview-heading > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.import-preview-table {
  max-height: 280px;
  overflow: auto;
}

.import-preview-row {
  min-width: 560px;
  display: grid;
  grid-template-columns: 56px minmax(180px, 1fr) minmax(130px, 0.7fr) 100px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--soft-line);
  font-size: 11px;
}

.import-preview-row > span,
.import-preview-row > small {
  color: var(--muted);
}

.import-preview-row > b {
  text-align: right;
}

.import-error-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--soft-line);
  color: #6f2424;
  font-size: 11px;
}

.import-preview > .field-help {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--soft-line);
}

.dialog .form-grid {
  margin-top: 20px;
}

.span-2 {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bfcacf;
  border-radius: 5px;
  background: #ffffff;
}

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

.detail-fields {
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.record-builder {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--soft-line);
}

.record-builder + .record-builder {
  padding-top: 18px;
}

.builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-heading h3 {
  margin: 3px 0 0;
  font-size: 15px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  padding: 3px;
  border: 1px solid #aebdc1;
  border-radius: 6px;
  background: #eef2f3;
}

.form-grid .segmented-control label {
  position: relative;
  display: block;
  color: #46565c;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}

.segmented-control span {
  display: block;
  padding: 6px 9px;
  border-radius: 4px;
}

.segmented-control input:checked + span {
  color: #ffffff;
  background: #126f68;
}

.segmented-control input:focus-visible + span {
  outline: 2px solid #1d8279;
  outline-offset: 1px;
}

.sku-output {
  max-width: 100%;
}

.sku-output input {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
  letter-spacing: 0;
}

.sku-output input.is-generated {
  border-color: #7ba9a4;
  color: #0d5d57;
  background: #eef8f6;
}

.sku-output small,
.builder-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

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

.placement-rows {
  display: grid;
  gap: 8px;
}

.placement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 36px;
  align-items: end;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

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

.placement-remove {
  width: 36px;
  height: 40px;
}

.record-subsection {
  padding: 16px 0 2px;
  border-top: 1px solid var(--soft-line);
}

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

.stock-location-list {
  display: grid;
  margin: 12px 0 18px;
  border-top: 1px solid var(--line);
}

.stock-location-list > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.stock-location-list strong {
  font-family: Consolas, "Courier New", monospace;
  color: #0d5d57;
}

.stock-location-list span {
  color: var(--muted);
}

.stock-location-list b {
  white-space: nowrap;
}

.relationship-list {
  display: grid;
  margin: 12px 0 18px;
  border-top: 1px solid var(--line);
}

.relationship-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 9px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.relationship-row:hover,
.relationship-row:focus-visible {
  background: #f2f8f7;
  outline: none;
}

.relationship-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.relationship-row small,
.relationship-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.relationship-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relationship-direction {
  color: #087c72;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.relationship-empty p {
  margin: 8px 0 18px;
  color: var(--muted);
}

.form-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--red) !important;
  font-size: 11px;
  font-weight: 700;
}

.auth-panel .form-error:not(:empty) {
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  border-radius: 4px;
  background: #fff1ef;
  font-size: 12px;
}

.auth-panel .field-help,
.auth-panel .setup-code-instructions p {
  color: #9eafb4;
}

.auth-panel .setup-code-instructions {
  border-color: rgba(255, 255, 255, 0.14);
}

.auth-panel .setup-code-instructions pre {
  border-color: #40565d;
  color: #dce5e7;
  background: #102127;
}

.auth-panel .setup-code-instructions summary {
  color: #ffffff;
}

.auth-panel #setupCommandStatus,
.auth-panel #setupCommandStatusWindows {
  color: #81d8c9;
}

.auth-panel .form-error:not(:empty) {
  border-left-color: #ff8585;
  color: #ffd8d8 !important;
  background: rgba(124, 39, 39, 0.32);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 0 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.detail-grid > div {
  min-width: 0;
  padding: 11px;
  background: #ffffff;
}

.detail-grid dt,
.account-summary dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-grid dd,
.account-summary dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.record-notes {
  padding: 14px;
  border-left: 3px solid #96aaa8;
  color: #3f5056;
  background: #f4f7f7;
  white-space: pre-wrap;
}

.transition-section,
.audit-section {
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.transition-form {
  display: grid;
  grid-template-columns: 180px minmax(180px, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.audit-entry {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--soft-line);
}

.audit-entry:first-child {
  border-top: 0;
}

.audit-entry time {
  color: var(--muted);
  font-size: 10px;
}

.audit-entry strong,
.audit-entry p {
  margin: 0;
  font-size: 11px;
}

.audit-entry p {
  margin-top: 3px;
  color: var(--muted);
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 22px;
  margin-top: 20px;
}

.inventory-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--soft-line);
  border-radius: 5px;
}

.inventory-product strong,
.inventory-product small {
  display: block;
}

.inventory-product small {
  margin-top: 2px;
  color: var(--muted);
}

.inventory-product input {
  min-height: 34px;
}

.pos-cart {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid var(--soft-line);
  font-size: 11px;
}

.shipping-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.shipping-fields label {
  display: grid;
  gap: 6px;
  color: #334248;
  font-size: 11px;
  font-weight: 750;
}

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

.cart-total {
  display: flex;
  justify-content: space-between;
  margin: 15px 0 0;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.cart-total dd {
  margin: 0;
}

.user-form {
  margin-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.inline-end {
  display: flex;
  justify-content: flex-end;
}

.users-table {
  margin: 10px 0 22px !important;
}

.user-row {
  min-width: 930px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(180px, 1fr) 180px 80px 176px;
  gap: 12px;
  padding: 12px 3px;
  border-top: 1px solid var(--soft-line);
  align-items: center;
}

.user-row select,
.user-row .button {
  min-height: 34px;
}

.user-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 6px;
}

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

.organization-location-settings {
  margin-top: 22px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.organization-location-settings .section-title {
  margin-bottom: 13px;
}

.organization-location-settings .section-title h3 {
  margin: 3px 0 0;
}

.organization-location-settings > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
}

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

.organization-location-grid label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #334248;
  font-size: 11px;
  font-weight: 750;
}

.dashboard-display-settings label,
.dashboard-setting-row > label:not(.dashboard-widget-toggle) {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #334248;
  font-size: 11px;
  font-weight: 750;
}

.dashboard-settings-title {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dashboard-widget-settings {
  display: grid;
  margin-top: 4px;
  border-top: 1px solid var(--soft-line);
}

.dashboard-setting-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.55fr) 78px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--soft-line);
}

.dashboard-widget-toggle {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.dashboard-widget-toggle input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}

.dashboard-widget-toggle span {
  min-width: 0;
  display: grid;
}

.dashboard-widget-toggle strong,
.dashboard-widget-toggle small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-widget-toggle strong {
  font-size: 11px;
}

.dashboard-widget-toggle small {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-order-buttons {
  display: grid;
  grid-template-columns: repeat(2, 36px);
  gap: 6px;
}

.dashboard-order-buttons .icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

.import-validation-message {
  color: #8c2e2e;
  font-weight: 700;
}

.confirm-message {
  padding: 20px 0 4px;
}

.confirm-message strong {
  display: block;
  font-size: 16px;
}

.confirm-message p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.account-summary {
  display: grid;
  gap: 0;
  padding: 8px 0;
}

.account-summary > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  padding: 11px 0;
  border-bottom: 1px solid var(--soft-line);
}

.password-form {
  margin-top: 8px !important;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100vw - 40px));
  padding: 12px 15px;
  border: 1px solid #21484a;
  border-radius: 6px;
  color: #ffffff;
  background: #17383a;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-color: #843434;
  background: #742b2b;
}

@media (max-width: 1180px) {
  .auth-frame {
    gap: 32px;
  }

  .brand p,
  .system-status-copy strong {
    display: none;
  }

  .system-status {
    min-width: 18px;
  }

  .search {
    width: min(250px, 23vw);
  }

  .workflow-steps {
    overflow-x: auto;
    grid-template-columns: repeat(10, 72px);
    padding-bottom: 3px;
  }

  .content-grid,
  .lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-grid,
  .dashboard-grid[data-columns="2"],
  .dashboard-grid[data-columns="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-panel {
    order: -1;
  }

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

  .action-button {
    border: 1px solid var(--soft-line);
    border-radius: 5px;
    padding: 10px;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 142px;
  }

  .auth-gate {
    place-items: start center;
    padding: 28px 20px;
  }

  .auth-frame,
  .auth-gate[data-mode="setup"] .auth-frame {
    width: min(560px, 100%);
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 24px;
  }

  .auth-brand-main {
    grid-column: 1;
    grid-row: 1;
  }

  .auth-context {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
  }

  .auth-context h2 {
    font-size: 30px;
  }

  .auth-panel,
  .auth-loading {
    grid-column: 1;
    grid-row: 3;
  }

  .auth-gate[data-mode="setup"] .auth-context {
    display: none;
  }

  .auth-gate[data-mode="setup"] .auth-panel {
    grid-row: 2;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 168px 44px;
  }

  .search {
    width: auto;
  }

  .system-status,
  .account-copy {
    display: none;
  }

  .account-button {
    width: 44px;
    padding: 5px;
  }

  .workspace {
    display: block;
  }

  .module-rail {
    position: sticky;
    z-index: 15;
    top: var(--topbar-height);
    width: 100%;
    height: 66px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-title {
    display: none;
  }

  .module-list {
    width: max-content;
    display: flex;
    gap: 5px;
  }

  .module-button {
    width: 156px;
    height: 50px;
  }

  .main-pane {
    padding: 16px;
  }

  .flow-strip {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 680px) {
  :root {
    --topbar-height: 142px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .auth-gate {
    padding: 20px 14px 28px;
    background-position: 38% center;
  }

  .auth-frame,
  .auth-gate[data-mode="setup"] .auth-frame {
    gap: 18px;
  }

  .auth-brand-main .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    box-shadow: 0 0 0 4px rgba(7, 135, 122, 0.16);
  }

  .auth-brand-main h1 {
    font-size: 21px;
  }

  .auth-context {
    padding-top: 16px;
  }

  .auth-context h2 {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .auth-signals > div {
    padding: 10px 8px 10px 0;
  }

  .auth-signals > div + div {
    padding-left: 8px;
  }

  .auth-signals dd {
    font-size: 10px;
  }

  .auth-panel {
    padding: 24px 18px;
  }

  .auth-session-note {
    flex-wrap: wrap;
  }

  .tracking-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .tracking-sync {
    width: 100%;
  }

  .tracking-refresh {
    margin-left: auto;
  }

  .brand h1 {
    font-size: 15px;
  }

  .topbar-actions {
    grid-template-columns: minmax(120px, 1fr) 150px 40px;
  }

  .mode-switch {
    grid-template-columns: repeat(2, minmax(66px, 1fr));
  }

  .account-button {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }

  #userInitials {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .main-pane {
    padding: 13px 10px 24px;
  }

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

  .context-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .context-actions .button {
    padding: 7px 6px;
  }

  .flow-strip,
  .panel {
    padding: 14px;
  }

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

  .dashboard-grid,
  .dashboard-grid[data-columns="2"],
  .dashboard-grid[data-columns="3"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-widget {
    min-height: 250px;
    padding: 14px;
  }

  .donut-chart {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
  }

  .dashboard-display-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .organization-location-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .coordinate-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .gauge-grid {
    gap: 8px;
  }

  .delivery-map-canvas {
    height: 300px;
  }

  .delivery-map-legend {
    right: 6px;
    bottom: 20px;
  }

  .dashboard-setting-row {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 9px;
  }

  .dashboard-setting-row > label:not(.dashboard-widget-toggle) {
    grid-column: 1;
    grid-row: 2;
  }

  .dashboard-order-buttons {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .data-pagination {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 9px 12px;
  }

  .data-pagination > span {
    width: 100%;
    margin-right: 0;
  }

  .pagination-buttons {
    margin-left: auto;
  }

  .summary-card small {
    white-space: normal;
  }

  .action-list {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .builder-heading {
    align-items: flex-start;
  }

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

  .placement-row {
    grid-template-columns: minmax(0, 1fr) 92px 36px;
  }

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

  .stock-location-list > div {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stock-location-list span {
    grid-column: span 2;
  }

  .relationship-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .relationship-row > .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .relationship-row strong {
    white-space: normal;
  }

  .span-2 {
    grid-column: span 1;
  }

  .dialog {
    width: 100vw;
    max-width: none;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .dialog > form,
  .dialog > div,
  .dialog > section,
  .dialog > dl,
  .dialog > .dialog-actions {
    margin-left: 16px;
    margin-right: 16px;
  }

  .user-row {
    min-width: 0;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 0;
  }

  .user-row > .record-main,
  .user-row > span:not(.status-pill),
  .user-row > select {
    grid-column: 1 / -1;
  }

  .user-row > span:not(.status-pill) {
    overflow-wrap: anywhere;
  }

  .user-actions {
    grid-column: 2;
  }

  .transition-form,
  .pos-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .import-control + .import-control {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--soft-line);
    border-left: 0;
  }

  .pos-cart {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

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

  .tracking-meta,
  .delivery-location-form,
  .tracking-link-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .delivery-location-form .span-2 {
    grid-column: span 1;
  }
}

@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;
  }
}
