:root {
  --ink: #13292c;
  --muted: #5e7478;
  --line: #d8e4e2;
  --canvas: #f3f7f6;
  --surface: #ffffff;
  --primary: #1f7a80;
  --primary-deep: #0f4a50;
  --accent: #e0664a;
  --accent-wash: #fff3ef;
  --danger: #c93b37;
  --danger-wash: #fdf0ef;
  --warning: #e57c3a;
  --warning-wash: #fff5ec;
  --calm: #1f7a80;
  --calm-wash: #eaf5f4;
  --gradeb: #6a5aa8;
  --damage: #b0456e;
  --header-bg: #0c3439;
  --header-line: #1a4d53;
  --header-edge: #e0664a;
  --control: #eef5f4;
  --control-line: #c8dcd9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
tr[role="button"]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.dashboard-content {
  display: none;
}

.dashboard-content.is-unlocked {
  display: block;
}

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 28px;
  color: #eaf4f3;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  box-shadow: inset 0 -3px 0 -1px rgba(224, 102, 74, 0.6);
}

.hdr-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 2px 7px;
  color: #d3ece3;
  background: rgba(20, 80, 70, 0.34);
  border: 1px solid #4f8f7a;
  border-radius: 10px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-status span {
  width: 6px;
  height: 6px;
  background: #5fd3a6;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(95, 211, 166, 0.16);
}

.hdr-mark {
  width: auto;
  height: 26px;
}

.hdr h1 {
  margin: 0;
  color: #fff;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hdr-badge,
.release-version {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  border: 1px solid #3f7f84;
  border-radius: 3px;
  color: #c4e0dd;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.hdr-badge {
  color: #f3f6f8;
  background: #17565c;
}

.tnav {
  position: fixed;
  inset: 52px 0 auto;
  z-index: 19;
  display: flex;
  gap: 4px;
  min-height: 42px;
  padding: 0 24px;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tn {
  min-height: 42px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tn:hover {
  color: var(--primary-deep);
  background: #eff6f5;
}

.tn.on {
  color: var(--primary-deep);
  border-bottom-color: var(--primary);
}

.content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 122px 30px 34px;
}

.pg {
  display: none;
}

.pg.on {
  display: block;
}

.page-lead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 12px;
}

.page-lead-compact {
  align-items: center;
}

.eyebrow,
.section-marker {
  display: block;
  margin: 0 0 5px;
  color: var(--primary);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-lead h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: clamp(23px, 1.8vw, 28px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.freshness-line,
.page-caption {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.freshness-line {
  max-width: 500px;
  padding-left: 14px;
  border-left: 2px solid #a9c4c0;
}

.filter-bar {
  position: sticky;
  top: 96px;
  z-index: 18;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 12px;
  margin: 0 0 17px;
  padding: 9px 13px;
  background: var(--control);
  border: 1px solid var(--control-line);
  border-radius: 7px;
  box-shadow: 0 5px 13px rgba(12, 52, 57, 0.07);
}

.filter-label {
  color: var(--primary-deep);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-bar label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.filter-bar select {
  min-width: 148px;
  padding: 6px 28px 6px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c3d6d3;
  border-radius: 4px;
  font-size: 11px;
}

.filter-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.filter-search {
  width: 190px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
}

.filter-search::placeholder {
  color: #8fa5a3;
}

.ms-host {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ms {
  position: relative;
}

.ms-btn {
  display: flex;
  align-items: baseline;
  gap: 7px;
  max-width: 230px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.3;
}

.ms-btn:hover {
  border-color: var(--primary);
}

.ms-btn .ms-lab {
  color: var(--muted);
  font-weight: 600;
}

.ms-btn .ms-val {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ms-btn .ms-caret {
  width: 0;
  height: 0;
  margin-left: auto;
  border-top: 4px solid currentColor;
  border-right: 3.5px solid transparent;
  border-left: 3.5px solid transparent;
  opacity: 0.5;
}

/* Coral (accent) is reserved for "this is narrowing what you see". */
.ms-btn.is-active {
  color: #a63d25;
  background: var(--accent-wash);
  border-color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
}

.ms-pop {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 30;
  width: 232px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(12, 52, 57, 0.18);
}

.ms-find {
  width: 100%;
  margin-bottom: 7px;
  padding: 5px 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--control-line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
}

.ms-list {
  max-height: 232px;
  overflow-y: auto;
}

.ms-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px;
  border-radius: 3px;
  font-size: 11.5px;
  cursor: pointer;
}

.ms-opt:hover {
  background: var(--control);
}

.ms-opt input {
  flex: none;
  accent-color: var(--primary);
}

.ms-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.ms-clear {
  padding: 0;
  color: var(--primary);
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 600;
}

.ms-count {
  color: var(--muted);
  font-size: 10px;
}

/* Phone: the controls stack and the panel takes the bar's full width, so a
   right-hand filter cannot open off-screen. */
@media (max-width: 620px) {
  .filter-search,
  .ms-host,
  .ms,
  .ms-btn,
  .ms-pop {
    width: 100%;
    max-width: none;
  }

  .filter-status {
    margin-left: 0;
  }
}

.ticker-row {
  display: flex;
  align-items: stretch;
  margin: 0 0 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 5px 13px rgba(12, 52, 57, 0.06);
}

.ticker-row .kpi-row {
  display: contents;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.kpi-card {
  min-height: 112px;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.ticker-row .kpi-card {
  display: flex;
  flex: 1 1 148px;
  flex-direction: column;
  justify-content: center;
  min-width: 142px;
  min-height: 86px;
  padding: 12px 15px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.ticker-row .kpi-card.is-emphasis {
  flex: 1.9 1 250px;
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

.kpi-card.kind-risk strong {
  color: var(--warning);
}

.kpi-card.kind-expired strong {
  color: var(--danger);
}

.kpi-card.kind-slow strong {
  color: var(--calm);
}

.kpi-card.kind-gradeb strong {
  color: var(--gradeb);
}

.kpi-card.kind-damage strong {
  color: var(--damage);
}

.kpi-card.is-emphasis {
  color: #fff;
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

.kpi-card p,
.kpi-card span {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.kpi-card p {
  color: var(--muted);
  text-transform: uppercase;
}

.kpi-card.is-emphasis p,
.kpi-card.is-emphasis span {
  color: #b9dcd9;
}

.kpi-card strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.kpi-card.is-emphasis strong {
  color: #fff;
}

.card {
  padding: 17px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.risk-card {
  display: flex;
  flex-direction: column;
}

.risk-card .chart-title {
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.risk-card .chart-title p {
  max-width: none;
  text-align: left;
}

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

.chart-grid-3 {
  grid-template-columns: 1.7fr 1fr;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-chart .chart-wrap {
  height: 320px;
}

.side-col > .card:not(.risk-card) .chart-wrap {
  height: 190px;
}

.chart-title,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 13px;
}

.chart-title h3,
.section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chart-title p,
.section-head p {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.chart-wrap {
  position: relative;
  height: 250px;
}

.chart-risk {
  height: 22px;
  overflow: hidden;
  border-radius: 3px;
}

.risk-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.risk-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.risk-legend-item b {
  margin-left: auto;
}

.risk-legend-item b {
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 600;
}

.risk-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.risk-swatch.risk-0 { background: #2e9e6b; }
.risk-swatch.risk-1 { background: #8cc084; }
.risk-swatch.risk-2 { background: #e6b23a; }
.risk-swatch.risk-3 { background: #e57c3a; }
.risk-swatch.risk-4 { background: #c93b37; }

.trend-grid {
  margin-top: 16px;
}

.chart-trend {
  height: 300px;
}

.table-section {
  margin-top: 25px;
}

.table-card {
  padding: 0;
}

.tbl-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Keep the long drill-down in its own working area: columns, header and total
   remain visible while the reader compares brands and SKU lines. */
.brand-table-wrap {
  position: relative;
  max-height: min(64vh, 650px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.brand-table-wrap table.biz thead th {
  top: 0;
  z-index: 5;
}

.brand-table-wrap table.biz tfoot th,
.brand-table-wrap table.biz tfoot td {
  bottom: 0;
  z-index: 4;
}

.action-table-wrap {
  max-height: min(68vh, 760px);
}

table.biz {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

table.biz th,
table.biz td {
  padding: 9px 11px;
  border-bottom: 1px solid #e6eeec;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

table.biz th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #e3f2f1;
  background: var(--primary-deep);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

table.biz th.tleft,
table.biz td.tleft {
  text-align: left;
}

table.biz th[data-sort-key] {
  cursor: pointer;
  user-select: none;
}

table.biz th[data-sort-key]:hover {
  background: #17606a;
}

table.biz th[data-sort-dir="asc"]::after {
  content: " ↑";
}

table.biz th[data-sort-dir="desc"]::after {
  content: " ↓";
}

table.biz tbody tr:hover td {
  background: #f0f7f6;
}

table.biz tfoot th,
table.biz tfoot td,
.sv-total-row th,
.sv-total-row td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  color: #a63d25;
  background: var(--accent-wash);
  border-top: 1px solid var(--accent);
  border-bottom: 0;
  font-weight: 700;
}

.sv-brand-summary-row {
  cursor: pointer;
}

.sv-brand-summary-row.is-expanded td {
  background: #e6f2f0;
}

.sv-expand-icon {
  display: inline-block;
  width: 18px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.sv-brand-summary-row.is-expanded .sv-expand-icon {
  color: var(--primary-deep);
  transform: rotate(90deg);
}

.sv-sku-row td {
  color: #4d6568;
  background: #f8fbfb;
  font-size: 11px;
}

.sv-sku-row td:nth-child(2) {
  border-left: 2px solid #cfe1de;
  padding-left: 28px; /* indent SKU name under the brand */
}

.company-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid;
  border-radius: 3px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.company-pill.vcan {
  color: #0f5a60;
  background: #e6f4f3;
  border-color: #b4dbd8;
}

.company-pill.moola {
  color: #8a6212;
  background: #fdf4e1;
  border-color: #ecd29a;
}

.company-pill + .company-pill {
  margin-left: 4px;
}

.sku-count {
  display: inline-flex;
  margin-left: 9px;
  padding: 2px 6px;
  color: var(--muted);
  background: #eef4f3;
  border-radius: 10px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  vertical-align: middle;
}

.aging-hold {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 5px;
  color: #607875;
  background: #eef4f3;
  border: 1px solid #d3e2e0;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  vertical-align: middle;
}

table.biz td.aging-good {
  color: #23865a;
  font-weight: 600;
}

table.biz td.aging-clearance {
  color: #b7791f;
  font-weight: 600;
}

table.biz td.aging-expired {
  color: var(--danger);
  font-weight: 700;
}

table.biz td.grade-b-value {
  color: var(--gradeb);
  font-weight: 700;
}

table.biz td.damage-value {
  color: var(--damage);
  font-weight: 700;
}

table.biz td.no-aging {
  color: #90a4a2;
  background: #f8fbfa;
  font-style: italic;
}

.sv-sku-name,
.sku-cell {
  display: block;
  max-width: 420px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
}

.sv-sku-row small,
.sku-cell + small {
  display: block;
  margin-top: 2px;
  color: #809694;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 400;
}

.sv-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.sv-brand b {
  overflow: hidden;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.sv-brand-logo {
  position: relative;
  display: inline-grid;
  width: 27px;
  height: 20px;
  flex: 0 0 27px;
  place-items: center;
  overflow: hidden;
  color: var(--primary);
  background: #fff;
  border: 1px solid #d0e0de;
  border-radius: 3px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 8px;
  font-weight: 600;
}

.sv-brand-logo img {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  background: #fff;
}

.tier-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.tier-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  min-height: 76px;
  padding: 12px 13px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 6px;
}

.tier-summary:hover,
.tier-summary.is-selected {
  background: #f1f8f7;
  border-color: #8fbab5;
}

.tier-summary span {
  align-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tier-summary strong {
  grid-row: span 2;
  align-self: center;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.tier-summary small {
  align-self: start;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 10px;
}

.tier-summary.clear,
.tier-pill.clear {
  border-left-color: var(--danger);
}

.tier-summary.discount,
.tier-pill.discount {
  border-left-color: var(--warning);
}

.tier-summary.watch,
.tier-pill.watch {
  border-left-color: var(--calm);
}

.tier-summary.overstock,
.tier-pill.overstock {
  border-left-color: #6a5aa8;
}

.action-card {
  margin-bottom: 14px;
}

.tier-pill {
  display: inline-flex;
  min-width: 74px;
  justify-content: center;
  padding: 3px 7px;
  color: var(--ink);
  background: #f3f8f7;
  border: 1px solid #d3e2e0;
  border-left-width: 3px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.days-urgent {
  color: var(--danger);
  font-weight: 700;
}

.data-flag {
  display: inline-flex;
  margin-top: 4px;
  padding: 1px 4px;
  color: #9a5316;
  background: var(--warning-wash);
  border: 1px solid #f0c9a6;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.empty-cell {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.coverage-panel {
  padding: 12px 15px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}

.coverage-panel summary {
  color: var(--primary-deep);
  cursor: pointer;
  font-weight: 700;
}

.coverage-panel p {
  margin: 9px 0 0;
  line-height: 1.6;
}

.biz-foot {
  margin-top: 28px;
  padding-top: 16px;
  color: #7f9593;
  border-top: 1px solid var(--line);
  font-size: 10px;
  text-align: center;
}

dialog.pw-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(90vw, 380px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

dialog.pw-modal::backdrop {
  background: rgba(8, 34, 38, 0.91);
  backdrop-filter: blur(5px);
}

.pw-box {
  padding: 34px;
  background: #ebf4f3;
  border: 1px solid #bfd6d3;
  border-radius: 8px;
}

.pw-brand {
  margin-bottom: 4px;
  color: var(--primary-deep);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.pw-sub {
  margin-bottom: 21px;
  color: var(--primary);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pw-box input,
.pw-box button {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border-radius: 4px;
}

.pw-box input {
  margin-bottom: 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b5ceca;
  outline: 0;
}

.pw-box input:focus {
  border-color: var(--primary);
}

.pw-box button {
  color: #fff;
  background: var(--primary-deep);
  border: 1px solid var(--primary-deep);
  font-weight: 700;
}

.pw-box button:hover:not(:disabled) {
  background: #17606a;
}

.pw-box button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pw-err {
  min-height: 17px;
  margin-bottom: 7px;
  color: var(--danger);
  font-size: 10px;
}

@media (max-width: 1100px) {
  .page-lead {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .freshness-line {
    max-width: 720px;
  }
}

@media (max-width: 900px) {
  .content {
    padding-right: 18px;
    padding-left: 18px;
  }

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

  .hero-chart .chart-wrap {
    height: 250px;
  }

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

  .tbl-wrap {
    overflow-x: auto;
  }

  .brand-table-wrap {
    max-height: min(70vh, 600px);
  }

  table.biz {
    min-width: 1040px;
  }
}

@media (max-width: 680px) {
  .hdr {
    position: static;
    min-height: 50px;
    padding: 10px 14px;
  }

  .hdr-mark,
  .hdr-badge {
    display: none;
  }

  .hdr h1 {
    font-size: 16px;
  }

  .tnav {
    position: static;
    min-height: 39px;
    padding: 0 10px;
  }

  .tn {
    min-height: 39px;
    padding: 0 10px;
  }

  .content {
    padding: 22px 13px 28px;
  }

  .ticker-row {
    position: static;
    flex-direction: column;
    overflow: visible;
  }

  .ticker-row .kpi-card,
  .ticker-row .kpi-card.is-emphasis {
    flex: none;
    width: 100%;
    min-height: 76px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ticker-row .filter-bar {
    flex: none;
    width: 100%;
    flex-wrap: nowrap;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
    top: 8px;
  }

  .filter-bar label {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .filter-bar select {
    width: 100%;
  }

  .filter-status {
    margin-left: 0;
  }

  .chart-title,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .chart-title p,
  .section-head p {
    max-width: none;
    text-align: left;
  }

  .chart-wrap,
  .hero-chart .chart-wrap,
  .chart-trend {
    height: 225px;
  }

  .chart-risk {
    height: 22px;
  }
}

@media (max-width: 440px) {
  .kpi-row,
  .tier-strip {
    grid-template-columns: 1fr;
  }

  .page-lead h2 {
    font-size: 24px;
  }

  .card {
    padding: 14px;
  }

  .table-card {
    padding: 0;
  }

  .pw-box {
    padding: 25px;
  }
}

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