@font-face {
  font-family: "BwModelica HS";
  src: url("brand/fonts/BwModelica-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BwModelica HS";
  src: url("brand/fonts/BwModelica-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BwStretch HS";
  src: url("brand/fonts/BwStretch-Black.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #edf2f8;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --ink: #142338;
  --muted: #657487;
  --line: #dce5ef;
  --line-strong: #c7d5e4;
  --brand: #003f80;
  --brand-strong: #041c34;
  --accent: #bba757;
  --accent-soft: #fff8df;
  --ok: #16834a;
  --ok-soft: #e7f5ec;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --danger: #b42318;
  --danger-soft: #fdecec;
  --shadow: 0 16px 36px rgba(0, 63, 128, .09);
  --shadow-sm: 0 8px 20px rgba(0, 63, 128, .06);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "BwModelica HS", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    linear-gradient(180deg, rgba(0, 63, 128, .08), rgba(255,255,255,0) 280px),
    var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

a:hover { color: var(--accent); }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px 24px;
  color: #fff;
  background: linear-gradient(110deg, var(--brand-strong), var(--brand));
  border-bottom: 1px solid rgba(187,167,87,.26);
  box-shadow: 0 12px 28px rgba(4, 28, 52, .2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--accent);
  font-size: .82rem;
  font-weight: 900;
}

.brand-logo {
  width: 50px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.brand span {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,.72);
  font-size: .76rem;
  font-weight: 650;
}

.topbar nav,
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar nav a,
.nav-menu summary,
.logout-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255,255,255,.78);
  background: transparent;
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
  cursor: pointer;
}

.topbar nav a:hover,
.topbar nav a.on,
.nav-menu[open] summary,
.nav-menu summary:hover,
.logout-button:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(187,167,87,.36);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  color: rgba(255,255,255,.86);
  font-size: .9rem;
  line-height: 1;
}

.nav-menu {
  position: relative;
  margin: 0;
}

.nav-menu summary {
  list-style: none;
  user-select: none;
}

.nav-menu summary::-webkit-details-marker { display: none; }

.nav-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .8;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: var(--brand-strong);
  box-shadow: 0 18px 38px rgba(4, 28, 52, .34);
}

.nav-dropdown a {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
}

.nav-dropdown a.on {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.nav-menu:not([open]) .nav-dropdown { display: none; }

.logout-form { display: inline-flex; margin: 0 0 0 4px; }

main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
}

footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}

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

h1 {
  margin-bottom: 18px;
  color: var(--ink);
  font-family: "BwStretch HS", "BwModelica HS", "Segoe UI", sans-serif;
  font-size: 1.55rem;
  line-height: 1.12;
}

h2 {
  margin: 0 0 14px;
  color: var(--brand-strong);
  font-family: "BwStretch HS", "BwModelica HS", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.22;
}

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

.page-title h1 { margin-bottom: 6px; }

.page-title p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: .92rem;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
}

.kpi {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
}

.kpi .n {
  color: var(--brand-strong);
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1.05;
}

.kpi .l {
  margin-top: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.kpi.warn::before { background: var(--warn); }
.kpi.warn .n { color: var(--warn); }

.card {
  margin-bottom: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card.tight { padding: 14px; }

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

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.quick-card {
  display: block;
  min-height: 122px;
  padding: 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.quick-card:hover {
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.quick-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-strong);
  font-size: .98rem;
}

.quick-card span {
  display: block;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-card textarea {
  min-height: 118px;
}

.action-card .btn {
  align-self: flex-start;
  margin-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

tr:hover td { background: #fbfdff; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  font-size: .88rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { color: #fff; background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.sm { min-height: 30px; padding: 6px 10px; font-size: .78rem; }
.btn.gray { color: var(--ink); background: #eef2f7; border-color: var(--line); }
.btn.gray:hover { color: var(--ink); background: #e2e8f0; }
.btn.green { background: var(--ok); }
.btn.green:hover { background: #10652d; }
.btn.ghost { color: var(--brand); background: #fff; border-color: var(--line); }
.btn.ghost:hover { color: var(--brand-strong); background: var(--accent-soft); border-color: rgba(187,167,87,.52); }

input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: .92rem;
}

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

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(187, 167, 87, .22);
}

label {
  display: block;
  margin: 10px 0 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.flash {
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .9rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.flash.ok { color: var(--ok); background: var(--ok-soft); border-color: #bfe7cc; }
.flash.err { color: var(--danger); background: var(--danger-soft); border-color: #fac9c4; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--accent-soft);
  font-size: .74rem;
  font-weight: 850;
  white-space: nowrap;
}

.pill.deuda { color: var(--danger); background: var(--danger-soft); }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }

.muted { color: var(--muted); font-size: .85rem; }
.right { text-align: right; }

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.control-shell {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.control-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.control-main h2 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.25rem;
}

.control-main p { margin: 0; color: var(--muted); }

.control-actions,
.driver-command-actions,
.driver-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.control-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.metric-card span,
.driver-metrics span,
.driver-topline span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  color: var(--brand-strong);
  font-family: "BwStretch HS", "BwModelica HS", "Segoe UI", sans-serif;
  font-size: 1.32rem;
  line-height: 1.05;
}

.metric-card.strong {
  background: var(--brand);
  border-color: var(--brand);
}

.metric-card.strong span,
.metric-card.strong strong { color: #fff; }
.metric-card.warn strong { color: var(--warn); }
.metric-card.danger strong { color: var(--danger); }

.live-strip,
.live-board {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.live-strip {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.live-mini,
.driver-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.live-mini-head,
.driver-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.live-mini p,
.driver-card p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: .86rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f7;
  font-size: .72rem;
  font-weight: 900;
}

.status-chip.programada { color: var(--warn); background: var(--warn-soft); }
.status-chip.en_curso { color: var(--ok); background: var(--ok-soft); }
.status-chip.cerrada { color: var(--brand); background: var(--accent-soft); }
.status-chip.cancelada { color: var(--danger); background: var(--danger-soft); }

.mini-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mini-progress span {
  display: block;
  height: 100%;
  max-width: 100%;
  background: var(--accent);
}

.live-mini-grid,
.driver-metrics,
.driver-topline {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.live-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
}

.mini-alert,
.location-line.danger {
  margin-top: 10px;
  color: var(--danger);
  font-size: .82rem;
  font-weight: 850;
}

.driver-card header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.driver-card header h2 { margin-bottom: 4px; }

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

.driver-topline strong,
.driver-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.1;
}

.driver-topline small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
}

.driver-metrics {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.driver-metrics > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.driver-metrics .danger strong { color: var(--danger); }

.location-line {
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .84rem;
}

.driver-card footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.alert-list { display: grid; gap: 8px; }

.alert-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.alert-row.alta { border-left-color: var(--danger); }
.alert-row.media { border-left-color: var(--warn); }
.alert-row small { color: var(--muted); }

.driver-command {
  position: sticky;
  top: 84px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.driver-command h2 { margin-bottom: 4px; }
.driver-command p { margin: 0; color: var(--muted); }
.btn.xl { min-height: 48px; padding: 12px 16px; font-size: .96rem; }
.route-kpis .kpi { min-height: 96px; }

details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 850;
}

.login-shell {
  width: min(420px, 100%);
  margin: 7vh auto;
}

.login-brand {
  margin-bottom: 18px;
  text-align: center;
}

.login-mark {
  display: inline-block;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  object-fit: contain;
  border-radius: 12px;
  color: var(--brand-strong);
  background: #fff;
  border: 1px solid rgba(187,167,87,.38);
  padding: 6px;
  font-weight: 950;
}

.login-brand h1 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.stat-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 12px;
}

.section-heading h2 { margin-bottom: 4px; }

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.packaging-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.packaging-stock-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.packaging-stock-code {
  display: inline-flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid #b8e3dc;
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--accent-soft);
  font-size: .78rem;
  font-weight: 900;
}

.packaging-stock-item div { min-width: 0; }

.packaging-stock-item strong,
.packaging-stock-item span,
.packaging-stock-item small {
  display: block;
}

.packaging-stock-item strong {
  color: var(--brand-strong);
  font-size: 1.7rem;
  line-height: 1;
}

.packaging-stock-item div > span {
  margin-top: 5px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 800;
}

.packaging-stock-item small {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .7rem;
}

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

.packaging-reason { grid-column: span 2; }
.packaging-submit { min-height: 40px; }
.inventory-delta { font-weight: 900; }
.inventory-delta.positive { color: var(--ok); }
.inventory-delta.negative { color: var(--danger); }
.consumables-orders { margin-top: 30px; }
.form-actions { margin-top: 14px; }

@font-face {
  font-family: "HS Modelica";
  src: url("brand/bw-modelica-light.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "HS Modelica";
  src: url("brand/bw-modelica-bold.otf") format("opentype");
  font-weight: 800;
}

.commercial-page {
  --brand-blue: #003F80;
  --brand-blue-dark: #041C34;
  --brand-gold: #BBA757;
  --brand-silver: #A7A9AC;
  display: grid;
  gap: 26px;
  font-family: "HS Modelica", "Segoe UI", system-ui, sans-serif;
}

.commercial-floating-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  color: #fff;
  background: #0f7a3a;
  box-shadow: 0 14px 34px rgba(15, 122, 58, .28);
}

.commercial-floating-cta:hover {
  color: #fff;
  background: #0b6530;
}

.commercial-floating-cta svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.commercial-floating-cta span {
  font-size: .82rem;
  font-weight: 900;
}

.commercial-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  padding: 104px 44px 54px;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--brand-blue-dark);
  background-repeat: no-repeat;
  background-size: auto 106%;
  background-position: right top;
  box-shadow: var(--shadow);
  isolation: isolate;
  animation: commercial-pan 16s ease-in-out infinite alternate;
}

.commercial-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold), var(--brand-silver), var(--brand-blue));
  z-index: -1;
}

.commercial-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("brand/hs-avatar-pattern.png");
  background-repeat: no-repeat;
  background-size: 330px auto;
  background-position: calc(100% - 42px) calc(100% - 24px);
  opacity: .08;
  z-index: 0;
}

.commercial-watermark {
  position: absolute;
  right: 42px;
  bottom: 38px;
  width: 190px;
  max-width: 26vw;
  opacity: .11;
  z-index: 1;
  pointer-events: none;
}

.commercial-nav {
  position: absolute;
  top: 22px;
  right: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(3, 20, 31, .58);
  backdrop-filter: blur(14px);
  z-index: 3;
}

.commercial-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 900;
}

.commercial-logo img {
  display: block;
  width: 174px;
  height: auto;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}

.commercial-logo span {
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.commercial-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(3, 20, 31, .42);
  backdrop-filter: blur(12px);
}

.commercial-nav-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 7px;
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  font-weight: 850;
}

.commercial-nav-actions a:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.commercial-hero-copy {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  max-width: 100%;
  min-width: 0;
  color: #fff;
}

.commercial-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(187,167,87,.58);
  border-radius: 8px;
  color: #f3df8e;
  background: rgba(3, 20, 31, .46);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.commercial-hero h1 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: 3.25rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.commercial-lead {
  width: 100%;
  max-width: 610px;
  color: rgba(255,255,255,.9);
  font-size: 1.12rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.commercial-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.commercial-page .btn.green {
  background: var(--brand-blue);
  box-shadow: 0 10px 26px rgba(0, 63, 128, .16);
}

.commercial-page .btn.green:hover {
  background: #002f61;
}

.commercial-page .btn.ghost {
  color: var(--brand-blue);
  border-color: rgba(187,167,87,.5);
  box-shadow: 0 10px 26px rgba(0, 63, 128, .12);
}

.commercial-page .btn.ghost:hover {
  color: #002f61;
  background: #fffaf0;
  border-color: var(--brand-gold);
}

.commercial-page .btn.green::before,
.commercial-page .btn.ghost::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.commercial-page .btn.green::before { background: var(--brand-gold); }
.commercial-page .btn.ghost::before { background: var(--brand-silver); }

.commercial-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  max-width: 590px;
}

.commercial-trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.08);
  font-size: .78rem;
  font-weight: 800;
}

.commercial-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: -50px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.commercial-strip > div {
  min-height: 104px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.commercial-strip > div:hover {
  transform: translateY(-3px);
  border-color: rgba(187,167,87,.55);
  box-shadow: var(--shadow);
}

.commercial-strip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-blue);
  font-size: 1.25rem;
}

.commercial-strip span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
}

.commercial-marketplace {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(0,63,128,.18);
  border-radius: var(--radius);
  background: #eef4fb;
  box-shadow: var(--shadow-sm);
}

.market-topbar {
  display: grid;
  grid-template-columns: minmax(200px, .8fr) minmax(280px, 1.4fr) minmax(150px, .55fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--brand-blue);
  box-shadow: 0 14px 28px rgba(0, 63, 128, .18);
}

.market-brand,
.market-location {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
}

.market-brand {
  gap: 10px;
}

.market-brand:hover,
.market-location:hover {
  color: #fff;
}

.market-brand img {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.14);
}

.market-brand span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.market-brand strong {
  overflow: hidden;
  color: #fff;
  font-size: .96rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-brand small {
  overflow: hidden;
  color: rgba(255,255,255,.76);
  font-size: .72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 -1px 0 rgba(15,23,42,.06);
}

.market-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
}

.market-search input:focus {
  outline: 3px solid rgba(187,167,87,.26);
  outline-offset: -3px;
}

.market-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--brand-blue);
  background: #f8fbff;
  cursor: pointer;
}

.market-search button:hover {
  background: #fffaf0;
}

.market-search svg,
.market-location svg,
.market-benefits svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.market-location {
  justify-content: flex-end;
  gap: 8px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  font-size: .78rem;
  font-weight: 900;
}

.market-navline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 42px;
  padding: 0 4px;
}

.market-navline a,
.market-navline span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--brand-blue);
  background: rgba(255,255,255,.72);
  font-size: .78rem;
  font-weight: 850;
}

.market-navline span {
  margin-left: auto;
  color: var(--muted);
  background: transparent;
}

.market-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, .55fr);
  gap: 12px;
}

.market-promo {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  border: 1px solid rgba(0,63,128,.16);
  border-radius: var(--radius);
  background: #fff;
}

.market-promo-main {
  display: flex;
  align-items: stretch;
  min-height: 250px;
  grid-row: span 2;
}

.market-promo-main img {
  width: 44%;
  min-width: 250px;
  object-fit: cover;
}

.market-promo-main > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 22px;
}

.market-promo span {
  display: inline-flex;
  align-self: flex-start;
  min-height: 26px;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  color: #5b4a10;
  background: #fff4bf;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-promo h2 {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 1.72rem;
  line-height: 1.08;
}

.market-promo p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 650;
}

.market-promo .btn {
  align-self: flex-start;
  margin-top: 18px;
}

.market-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(135deg, #fff, #f8fbff);
}

.market-side.gold {
  background: linear-gradient(135deg, #fff, #fffaf0);
}

.market-side strong {
  display: block;
  color: var(--brand-blue);
  font-size: 1.05rem;
  line-height: 1.14;
}

.market-side small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

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

.market-departments a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 3px 10px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(0,63,128,.14);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.market-departments a:hover {
  color: var(--ink);
  border-color: rgba(187,167,87,.62);
  transform: translateY(-2px);
}

.market-departments span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-blue);
  font-size: .78rem;
  font-weight: 950;
}

.market-departments strong {
  min-width: 0;
  color: var(--brand-blue);
  line-height: 1.14;
}

.market-departments small {
  min-width: 0;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.22;
}

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

.market-benefits > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.market-benefits svg {
  grid-row: span 2;
  align-self: center;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 8px;
  color: var(--brand-blue);
  background: #eef6ff;
}

.market-benefits strong {
  min-width: 0;
  color: var(--brand-blue);
  font-size: .86rem;
  line-height: 1.16;
}

.market-benefits span {
  min-width: 0;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.22;
}

.market-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-top: 6px;
}

.market-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.market-filter button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(0,63,128,.14);
  border-radius: 8px;
  color: var(--brand-blue);
  background: #fff;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
}

.market-filter button:hover,
.market-filter button.active {
  color: #fff;
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

.market-shopping-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

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

.market-product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 384px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
}

.market-product-media {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: #e5eef8;
}

.market-product-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-product-media span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(4,28,52,.76);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.market-product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
}

.market-product-copy strong {
  min-height: 42px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.14;
}

.market-product-copy p {
  min-height: 42px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}

.market-price {
  margin-top: 12px;
  color: var(--brand-blue);
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1.04;
}

.market-price small {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

.market-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.market-product-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--accent-soft);
  font-size: .7rem;
  font-weight: 850;
}

.market-product-copy a,
.market-product-copy button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  margin-top: auto;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-blue);
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
}

.market-product-copy a:hover,
.market-product-copy button:hover {
  color: #fff;
  background: #002f61;
}

.market-cart {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  min-height: 320px;
  padding: 16px;
  border: 1px solid rgba(0,63,128,.18);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.market-cart-header {
  display: grid;
  gap: 4px;
}

.market-cart-header span {
  color: var(--brand-gold);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.market-cart-header strong {
  color: var(--brand-blue);
  font-size: 1.18rem;
}

.market-cart-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed rgba(0,63,128,.2);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbff;
  font-size: .82rem;
  font-weight: 750;
}

.market-cart-items {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.market-cart-items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.market-cart-items strong {
  overflow: hidden;
  color: var(--ink);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-cart-items span {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
}

.market-cart-items em {
  grid-row: span 2;
  align-self: center;
  color: var(--brand-blue);
  font-style: normal;
  font-weight: 950;
}

.market-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.market-cart-total span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

.market-cart-total strong {
  color: var(--brand-blue);
  font-size: 1.08rem;
}

.market-cart small {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.35;
}

.market-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(0,63,128,.28);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  font-weight: 800;
  text-align: center;
}

.commercial-photo-band {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 14px;
}

.photo-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-blue-dark);
  box-shadow: var(--shadow-sm);
}

.photo-card-main {
  min-height: 300px;
}

.photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,28,52,.12), rgba(4,28,52,.78));
}

.photo-card-copy {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  color: #fff;
}

.photo-card-copy span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin-bottom: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(187,167,87,.72);
  border-radius: 8px;
  color: #fff3bd;
  background: rgba(4,28,52,.48);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.photo-card-copy strong {
  display: block;
  max-width: 360px;
  font-size: 1.05rem;
  line-height: 1.18;
}

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

.sales-problem {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow-sm);
}

.sales-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(187,167,87,.45);
  border-radius: 8px;
  color: var(--brand-blue);
  background: #fffaf0;
}

.sales-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-problem strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-blue);
  font-size: .98rem;
}

.sales-problem p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
}

.commercial-section {
  padding: 12px 0;
}

.commercial-flow {
  margin-top: 4px;
}

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

.flow-step {
  position: relative;
  min-height: 170px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.flow-step::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--brand-blue);
}

.flow-step:nth-child(2)::before { background: var(--brand-gold); }
.flow-step:nth-child(3)::before { background: var(--brand-silver); }
.flow-step:nth-child(4)::before { background: var(--brand-blue); }

.flow-step-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.flow-index {
  display: block;
  color: #cbd5e1;
  font-size: 2.2rem;
  font-weight: 950;
  line-height: 1;
}

.flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0,63,128,.18);
  border-radius: 8px;
  color: var(--brand-blue);
  background: #f8fbff;
}

.flow-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-step strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-blue);
  font-size: .98rem;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.commercial-spotlight {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: 20px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #041C34 0%, #062B52 58%, #003F80 100%);
  box-shadow: var(--shadow);
}

.spotlight-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding: 12px;
  color: #fff;
}

.spotlight-brand {
  width: 210px;
  max-width: 78%;
  margin-bottom: 18px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
}

.spotlight-copy h2 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1.12;
}

.spotlight-copy p {
  color: rgba(255,255,255,.78);
  font-size: .98rem;
}

.spotlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.spotlight-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  color: #fff7d8;
  background: rgba(255,255,255,.08);
  font-size: .78rem;
  font-weight: 850;
}

.product-preview {
  overflow: hidden;
  min-height: 360px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  background: #082838;
  box-shadow: 0 18px 42px rgba(0,0,0,.28);
}

.product-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.commercial-calculator {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(0,63,128,.18);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f8fbff 0%, #fff 54%, #fffaf0 100%);
  box-shadow: var(--shadow-sm);
}

.calculator-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.calculator-copy h2 {
  margin: 14px 0 10px;
  color: var(--brand-blue);
  font-size: 1.65rem;
  line-height: 1.14;
}

.calculator-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.calculator-result {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(0,63,128,.18);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.calculator-result span,
.calculator-result small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.calculator-result strong {
  display: block;
  margin: 6px 0;
  color: var(--brand-blue);
  font-size: 2rem;
  line-height: 1.05;
}

.loss-calculator {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.loss-calculator label,
.lead-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--brand-blue);
  font-size: .78rem;
  font-weight: 900;
}

.loss-calculator input,
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: .9rem;
}

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

.loss-calculator input:focus,
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: 3px solid rgba(0,63,128,.12);
  border-color: var(--brand-blue);
}

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

.pricing-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pricing-featured {
  border-color: rgba(187,167,87,.74);
  background: linear-gradient(180deg, #fffaf0, #fff);
  box-shadow: var(--shadow);
}

.plan-tag {
  align-self: flex-start;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(0,63,128,.16);
  border-radius: 8px;
  color: var(--brand-blue);
  background: #f8fbff;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-card h3 {
  margin: 18px 0 8px;
  color: var(--brand-blue);
  font-size: 1.2rem;
}

.plan-price {
  display: block;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.12;
}

.pricing-card p {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 20px;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  position: relative;
  padding-left: 20px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 750;
}

.pricing-card li::before {
  content: "";
  position: absolute;
  top: .6em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-gold);
}

.pricing-card .btn {
  margin-top: auto;
  justify-content: center;
}

.commercial-contact {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(187,167,87,.4);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #041C34 0%, #083A69 68%, #003F80 100%);
  box-shadow: var(--shadow);
}

.contact-copy {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding: 8px;
  color: #fff;
}

.contact-copy h2 {
  margin: 14px 0 10px;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1.14;
}

.contact-copy p {
  color: rgba(255,255,255,.78);
  font-weight: 650;
}

.contact-copy img {
  width: 112px;
  margin-top: 18px;
  opacity: .82;
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
}

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

.lead-form .btn {
  justify-content: center;
  min-height: 46px;
}

.lead-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.commercial-close {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(187,167,87,.48);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fff 0%, #f8fbff 58%, #fffaf0 100%);
  box-shadow: var(--shadow-sm);
}

.commercial-close::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("brand/hs-avatar-pattern.png");
  background-size: 210px auto;
  background-repeat: no-repeat;
  background-position: right -22px bottom -36px;
  opacity: .12;
  pointer-events: none;
}

.commercial-close > * {
  position: relative;
  z-index: 1;
}

.commercial-close-mark {
  width: 96px;
  opacity: .72;
}

.commercial-close h2 {
  margin: 12px 0 8px;
}

.commercial-close p {
  margin: 0;
  color: var(--muted);
}

@keyframes commercial-pan {
  from { background-position: right top; }
  to { background-position: right 20%; }
}

@media (prefers-reduced-motion: reduce) {
  .commercial-hero { animation: none; }
  .commercial-strip > div { transition: none; }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .brand { width: 100%; }
  .topbar nav { justify-content: flex-start; width: 100%; }
  .topbar nav a, .nav-menu summary, .logout-button { font-size: .78rem; }
  .nav-menu { position: static; }
  .nav-dropdown {
    position: static;
    min-width: min(260px, calc(100vw - 32px));
    margin-top: 4px;
  }
  main, footer { width: min(100% - 24px, 1180px); }
  .page-head { flex-direction: column; }
  .packaging-stock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packaging-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packaging-reason { grid-column: 1 / -1; }
  .page-actions { justify-content: flex-start; width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-main,
  .driver-command {
    align-items: stretch;
    flex-direction: column;
  }
  .control-actions,
  .driver-command-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .control-actions .btn,
  .driver-command-actions .btn {
    flex: 1 1 180px;
  }
  .driver-command {
    position: static;
  }
  .driver-topline {
    grid-template-columns: 1fr;
  }
  .studio-dashboard { gap: 14px; }
  .ops-hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding: 18px;
  }
  .ops-hero h1 { font-size: 1.6rem; }
  .ops-actions {
    justify-content: flex-start;
    max-width: none;
  }
  .ops-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-board,
  .ops-panels { grid-template-columns: 1fr; }
  .department-card { min-height: auto; }
  .commercial-hero { min-height: 540px; padding: 94px 28px 34px; }
  .commercial-nav { top: 18px; right: 18px; left: 18px; }
  .commercial-nav-actions { display: none; }
  .commercial-logo img { width: 158px; }
  .commercial-logo span { font-size: .72rem; }
  .commercial-watermark { width: 150px; opacity: .08; }
  .commercial-hero h1 { font-size: 2.1rem; }
  .commercial-strip { grid-template-columns: 1fr; margin-top: -28px; padding: 0 12px; }
  .commercial-marketplace { padding: 14px; }
  .market-topbar { grid-template-columns: 1fr; }
  .market-location { justify-content: flex-start; }
  .market-navline span { margin-left: 0; width: 100%; }
  .market-hero-grid { grid-template-columns: 1fr; }
  .market-promo-main { flex-direction: column; }
  .market-promo-main img { width: 100%; min-width: 0; height: 210px; }
  .market-departments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-toolbar { align-items: flex-start; flex-direction: column; }
  .market-filter { justify-content: flex-start; }
  .market-shopping-layout { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-cart { position: static; }
  .commercial-photo-band { grid-template-columns: 1fr; }
  .photo-card,
  .photo-card-main { min-height: 230px; }
  .sales-problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commercial-calculator,
  .commercial-contact { grid-template-columns: 1fr; padding: 18px; }
  .calculator-copy h2,
  .contact-copy h2 { font-size: 1.35rem; }
  .contact-copy { min-height: auto; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { min-height: auto; }
  .commercial-spotlight { grid-template-columns: 1fr; padding: 18px; }
  .spotlight-copy { min-height: auto; }
  .product-preview { min-height: 300px; }
  .commercial-close { align-items: flex-start; flex-direction: column; }
  th, td { padding: 10px 8px; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .control-metrics,
  .live-strip,
  .driver-metrics,
  .live-mini-grid {
    grid-template-columns: 1fr;
  }
  .metric-card,
  .live-mini,
  .driver-card {
    min-height: auto;
  }
  .btn.xl {
    width: 100%;
  }
  .stop-form {
    grid-template-columns: 1fr !important;
  }
  .packaging-stock-grid,
  .packaging-form-grid { grid-template-columns: 1fr; }
  .packaging-reason { grid-column: auto; }
  .packaging-stock-item { min-height: 104px; }
  .quick-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .kpi { min-height: auto; }
  .ops-hero { padding: 16px; }
  .ops-hero h1 { font-size: 1.42rem; }
  .ops-kpi-grid { grid-template-columns: 1fr; }
  .studio-kpi { min-height: auto; padding: 16px; }
  .department-card { padding: 16px; }
  .dept-metrics { flex-wrap: wrap; }
  .dept-metrics strong { font-size: 1.15rem; }
  .priority-list a { min-height: auto; }
  .commercial-hero {
    min-height: 520px;
    padding: 22px;
    padding-top: 92px;
    background-size: cover;
    background-position: center top;
  }
  .commercial-hero h1 { font-size: 1.72rem; }
  .commercial-logo { gap: 8px; }
  .commercial-logo img { width: 138px; padding: 4px 7px; }
  .commercial-logo span { display: none; }
  .commercial-watermark { display: none; }
  .commercial-lead {
    max-width: 280px;
    font-size: .92rem;
    line-height: 1.42;
  }
  .commercial-actions .btn { width: 100%; }
  .commercial-trust-row span { width: 100%; }
  .commercial-marketplace { padding: 10px; }
  .market-topbar { padding: 10px; }
  .market-brand img { width: 36px; height: 36px; }
  .market-brand strong { font-size: .88rem; }
  .market-search { grid-template-columns: minmax(0, 1fr) 42px; }
  .market-search input { min-height: 42px; font-size: .84rem; }
  .market-search button { min-width: 42px; }
  .market-promo-main img { height: 180px; }
  .market-promo-main > div,
  .market-side { padding: 14px; }
  .market-promo h2 { font-size: 1.32rem; }
  .market-departments { grid-template-columns: 1fr; }
  .market-benefits { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
  .market-product { min-height: auto; }
  .market-product-copy strong,
  .market-product-copy p { min-height: 0; }
  .photo-card,
  .photo-card-main { min-height: 210px; }
  .photo-card-copy strong { font-size: .96rem; }
  .commercial-floating-cta {
    right: 12px;
    bottom: 12px;
    min-height: 42px;
    padding: 10px;
  }
  .commercial-floating-cta span { display: none; }
  .sales-problem-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-step { min-height: 138px; }
  .flow-step-top { margin-bottom: 18px; }
  .flow-index { font-size: 1.9rem; }
  .flow-icon { width: 38px; height: 38px; }
  .loss-calculator,
  .lead-form { grid-template-columns: 1fr; padding: 14px; }
  .calculator-result strong { font-size: 1.55rem; }
  .commercial-spotlight { padding: 14px; }
  .spotlight-brand { width: 170px; }
  .spotlight-copy h2 { font-size: 1.35rem; }
  .product-preview { min-height: 240px; }
  .commercial-close-mark { display: none; }
}
