:root {
  --ink: #142b45;
  --muted: #65778c;
  --subtle: #8796a7;
  --line: #dfe7f0;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --navy: #102f56;
  --navy-soft: #174b7e;
  --teal: #1f6fb2;
  --teal-dark: #174f83;
  --teal-pale: #eaf3fc;
  --brand: #1f6fb2;
  --sun: #f4c842;
  --sun-dark: #e1b52c;
  --amber: #b68412;
  --amber-pale: #fff6d8;
  --red: #d65454;
  --red-pale: #fff0f0;
  --green: #2e9660;
  --green-pale: #eaf8f0;
  --shadow: 0 14px 34px rgba(16, 47, 86, 0.065);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 91% 0%, rgba(244, 200, 66, 0.09), transparent 25rem),
    radial-gradient(circle at 0% 28%, rgba(31, 111, 178, 0.055), transparent 30rem),
    var(--canvas);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(31, 111, 178, 0.28);
  outline-offset: 2px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 1rem 1rem 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(223, 231, 240, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  box-shadow: 0 5px 18px rgba(16, 47, 86, 0.035);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-mark {
  position: relative;
  overflow: hidden;
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #fff;
  object-fit: cover;
  object-position: left center;
  box-shadow: 0 5px 14px rgba(16, 47, 86, 0.12);
}

.brand-mark::after {
  content: none;
}

.eyebrow,
.kicker,
.sidebar-label {
  display: block;
  margin: 0 0 0.24rem;
  color: var(--teal-dark);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 0.15rem;
  color: var(--teal);
  font-weight: 850;
}

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

h1 {
  margin-bottom: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 760;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.7rem, 6vw, 2.55rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

h3 {
  margin-bottom: 0;
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

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

.status-pill,
.panel-count,
.status-badge,
.alert-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 720;
  white-space: nowrap;
}

.status-pill {
  padding: 0.42rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

.online-dot,
.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--teal);
}

.app-layout {
  display: block;
}

.sidebar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(16, 47, 86, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 24px rgba(18, 43, 61, 0.1);
}

.sidebar-intro,
.sidebar-note {
  display: none;
}

.primary-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.3rem;
}

.is-master .primary-nav {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 3.35rem;
  padding: 0.4rem 0.25rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.62rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button:hover {
  color: #fff;
}

.nav-button.is-active {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-button.is-active::before {
  position: absolute;
  right: 34%;
  bottom: 0.15rem;
  left: 34%;
  height: 3px;
  border-radius: 999px;
  background: var(--sun);
  content: "";
}

.nav-button.is-active .nav-icon {
  color: var(--sun);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--sun);
  font-size: 1.08rem;
  line-height: 1;
}

.main-content {
  width: min(100%, 1420px);
  margin: 0 auto;
  padding: 1.55rem 1rem 7.1rem;
}

.view-panel {
  animation: panel-in 180ms ease-out;
}

.view-panel[hidden] {
  display: none;
}

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

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.25rem;
}

.page-heading p,
.panel-heading p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.dashboard-heading {
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 720;
}

.field input,
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 620;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(31, 111, 178, 0.7);
  box-shadow: 0 0 0 4px rgba(31, 111, 178, 0.1);
}

.field input::placeholder {
  color: #a8b2b9;
}

.field small {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
}

.compact-field {
  max-width: 100%;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.summary-card {
  position: relative;
  overflow: hidden;
  min-height: 7.4rem;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.summary-card:nth-child(even)::before {
  background: var(--sun-dark);
}

.summary-card-label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
}

.summary-card-value {
  display: block;
  color: var(--ink);
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 780;
  letter-spacing: -0.06em;
  line-height: 1;
}

.summary-card-meta {
  display: block;
  margin-top: 0.45rem;
  color: var(--subtle);
  font-size: 0.69rem;
  line-height: 1.35;
}

.summary-card.is-alert .summary-card-value {
  color: var(--red);
}

.summary-card.is-positive .summary-card-value {
  color: var(--teal-dark);
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.stock-overview-panel,
.sales-consolidated-panel {
  overflow: hidden;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.panel:hover {
  border-color: #d2deeb;
  box-shadow: 0 18px 38px rgba(16, 47, 86, 0.085);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.1rem 1rem 0.95rem;
}

.panel-count {
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.35rem 0.58rem;
  background: var(--teal-pale);
  color: var(--teal-dark);
}

.alert-panel .panel-count {
  background: var(--red-pale);
  color: var(--red);
}

.alerts-list {
  padding: 0 1rem 1rem;
}

.empty-state {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 13px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.empty-state strong {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--ink);
  font-size: 0.82rem;
}

.empty-state p {
  margin-bottom: 0;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-weight: 800;
}

.alert-item {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.alert-item:first-child {
  padding-top: 0;
}

.alert-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.alert-item-head,
.station-row,
.metric-line,
.form-actions,
.local-data-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.alert-item-title {
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 750;
}

.alert-item-product {
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.35;
}

.alert-item-meta,
.station-meta,
.metric-line,
.unit-hint {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.alert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.alert-tag {
  padding: 0.28rem 0.48rem;
  background: var(--red-pale);
  color: var(--red);
  font-size: 0.65rem;
}

.alert-tag.is-warning {
  background: var(--amber-pale);
  color: var(--amber);
}

.mini-action,
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 760;
}

.mini-action:hover,
.text-button:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.station-row {
  min-height: 3.15rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--line);
}

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

.station-row-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.station-index {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #f0f3f4;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.station-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-meta {
  margin-top: 0.18rem;
}

.status-badge {
  padding: 0.3rem 0.5rem;
  background: #f1f4f5;
  color: var(--muted);
  font-size: 0.65rem;
}

.status-badge.is-alert {
  background: var(--red-pale);
  color: var(--red);
}

.status-badge.is-data {
  background: var(--green-pale);
  color: var(--green);
}

.status-badge.is-warning {
  background: var(--amber-pale);
  color: var(--amber);
}

.status-badge.is-zero {
  background: var(--amber-pale);
  color: var(--amber);
}

.status-badge.is-inactive {
  background: #eef1f3;
  color: var(--muted);
}

.entry-toolbar {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.entry-context {
  align-self: end;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  background: var(--teal-pale);
}

.entry-context .kicker {
  margin-bottom: 0.28rem;
  font-size: 0.61rem;
}

.entry-context strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
}

.entry-context p {
  margin-bottom: 0;
  color: #3c7169;
  font-size: 0.7rem;
  line-height: 1.4;
}

.product-panel {
  overflow: hidden;
}

.product-panel-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.product-rows {
  padding: 0 1rem;
}

.product-row {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

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

.product-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.product-code {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.product-name {
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 750;
}

.product-subtitle {
  display: block;
  margin-top: 0.18rem;
  color: var(--subtle);
  font-size: 0.69rem;
  font-weight: 500;
}

.product-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.product-inputs .field {
  font-size: 0.67rem;
}

.product-inputs .field input {
  min-height: 2.55rem;
  padding: 0.58rem 0.65rem;
  font-size: 0.83rem;
}

.product-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.7rem;
  border-radius: 12px;
  background: #f8fafb;
}

.metric-line {
  display: block;
}

.metric-line span {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--subtle);
  font-size: 0.65rem;
}

.metric-line strong {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.metric-line strong.is-alert {
  color: var(--red);
}

.metric-line strong.is-warning {
  color: var(--amber);
}

.metric-status {
  grid-column: 1 / -1;
  min-height: 1.2rem;
  margin-top: 0.1rem;
}

.form-actions {
  align-items: flex-end;
  margin-top: 1rem;
}

.form-message {
  min-height: 1.25rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.form-message.is-success {
  color: var(--green);
}

.form-message.is-error {
  color: var(--red);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 11px;
  font-size: 0.79rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 7px 15px rgba(31, 111, 178, 0.18);
}

.primary-button:hover {
  background: var(--teal-dark);
  box-shadow: 0 9px 17px rgba(31, 111, 178, 0.23);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: #cad5da;
  background: #f9fbfb;
}

.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #caebe5;
  border-radius: 14px;
  background: var(--teal-pale);
}

.callout-icon {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 850;
}

.info-callout strong {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
}

.info-callout p {
  margin-bottom: 0;
  color: #3c7169;
  font-size: 0.73rem;
  line-height: 1.45;
}

.history-filters {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.sales-filters {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.sales-selection {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.sales-selection h3 {
  margin-bottom: 0.28rem;
}

.sales-selection p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.sales-summary {
  margin-bottom: 1rem;
}

.sales-chart-panel,
.sales-table-panel,
.sales-consolidated-panel {
  margin-bottom: 1rem;
  overflow: hidden;
}

.sales-chart {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  min-height: 12.8rem;
  padding: 0 1rem 0.9rem;
  overflow-x: auto;
}

.sales-chart .empty-state {
  width: 100%;
  align-self: center;
}

.sales-chart-day {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 0.28rem;
  min-width: 2.75rem;
  flex: 1 0 2.75rem;
  max-width: 4.6rem;
  text-align: center;
}

.sales-chart-track {
  display: flex;
  align-items: flex-end;
  height: 8.7rem;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(to top, #f8fafb 0, #f8fafb 1px, transparent 1px, transparent 25%);
}

.sales-chart-track span {
  display: block;
  width: 100%;
  min-height: 0;
  border-radius: 7px 7px 2px 2px;
  background: var(--teal);
}

.sales-chart-zero .sales-chart-track span {
  background: var(--amber);
}

.sales-chart-partial .sales-chart-track,
.sales-chart-partial-zero .sales-chart-track {
  border: 1px dashed #d08a16;
  border-bottom-color: #bc7910;
}

.sales-chart-partial .sales-chart-track span,
.sales-chart-partial-zero .sales-chart-track span {
  background: var(--amber);
}

.sales-chart-empty .sales-chart-track,
.sales-chart-missing .sales-chart-track {
  border: 1px dashed #d7e0e3;
  border-bottom-color: #c9d5d9;
  background: #fbfcfc;
}

.sales-chart-day strong {
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 760;
}

.sales-chart-day small {
  min-height: 1.8em;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.59rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.sales-period-note {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.sales-table {
  min-width: 520px;
}

.dashboard-stock-table {
  min-width: 620px;
}

.sales-consolidated-table {
  min-width: 560px;
}

.sales-launch-yes {
  color: var(--green);
  font-weight: 700;
}

.history-panel {
  overflow: hidden;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.76rem;
}

th,
td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: #fbfcfc;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-weight: 560;
}

td.muted-cell {
  color: var(--subtle);
}

.table-product {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 750;
}

.table-product-code {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 850;
}

.table-product-status {
  display: block;
  margin-top: 0.15rem;
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 600;
}

.table-cell-note {
  display: block;
  margin-top: 0.18rem;
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 550;
  line-height: 1.3;
}

.table-empty {
  padding: 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.settings-panel {
  margin-bottom: 1rem;
  overflow: hidden;
}

.settings-grid {
  display: grid;
  gap: 0.9rem;
  padding: 0 1rem 1.1rem;
}

.station-settings-list {
  display: grid;
  gap: 0.65rem;
  padding: 0 1rem 1.1rem;
}

.station-setting-card {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.station-setting-card[open] {
  border-color: rgba(31, 111, 178, 0.38);
  box-shadow: 0 8px 20px rgba(21, 45, 61, 0.05);
}

.station-setting-summary {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 0.7rem;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.7rem;
  padding: 0.62rem 0.75rem;
  list-style: none;
  cursor: pointer;
}

.station-setting-summary::-webkit-details-marker {
  display: none;
}

.station-setting-summary:focus-visible {
  outline: 3px solid rgba(31, 111, 178, 0.28);
  outline-offset: -3px;
}

.station-summary-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.station-summary-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-summary-copy small {
  color: var(--muted);
  font-size: 0.66rem;
}

.station-summary-chevron {
  width: 0.52rem;
  height: 0.52rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.station-setting-card[open] .station-setting-summary {
  background: #f5fbfa;
}

.station-setting-card[open] .station-summary-chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.station-setting-content {
  padding: 0.2rem 0.8rem 0.85rem;
  border-top: 1px solid var(--line);
}

.station-setting-header {
  display: block;
  margin-bottom: 0.8rem;
}

.station-setting-index {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: #eaf0f2;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.station-setting-name {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 700;
}

.station-setting-name input {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.52rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
}

.station-setting-name input:focus {
  border-color: rgba(31, 111, 178, 0.7);
  box-shadow: 0 0 0 4px rgba(31, 111, 178, 0.1);
}

.station-products-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 760;
}

.station-products-heading small {
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 550;
}

.station-product-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.product-toggle {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.42rem 0.38rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.15;
}

.product-toggle input {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  accent-color: var(--teal);
}

.product-toggle-code {
  color: var(--ink);
  font-size: 0.61rem;
  font-weight: 800;
}

.product-toggle-name {
  min-width: 0;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.station-setting-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}

.station-setting-row span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: #f0f3f4;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.station-setting-row input {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.58rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.station-setting-row input:focus {
  border-color: rgba(31, 111, 178, 0.7);
  box-shadow: 0 0 0 4px rgba(31, 111, 178, 0.1);
}

.settings-actions {
  margin-bottom: 1rem;
}

.local-data-panel {
  align-items: flex-end;
  padding: 1rem;
}

.local-data-panel h3 {
  margin-bottom: 0.35rem;
}

.local-data-panel p {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.danger-button {
  flex: 0 0 auto;
  color: var(--red);
}

@media (min-width: 600px) {
  .topbar {
    padding-right: 1.6rem;
    padding-left: 1.6rem;
  }

  .main-content {
    padding-right: 1.6rem;
    padding-left: 1.6rem;
  }

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

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

  .entry-context {
    grid-column: 1 / -1;
  }

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

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

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

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

@media (min-width: 900px) {
  .topbar {
    min-height: 82px;
    padding-left: 2.1rem;
  }

  .app-layout {
    display: grid;
    grid-template-columns: 226px minmax(0, 1fr);
    align-items: start;
  }

  .sidebar {
    position: sticky;
    top: 82px;
    height: calc(100vh - 82px);
    padding: 1.15rem 0.85rem;
    border-top: 0;
    box-shadow: none;
  }

  .sidebar-intro,
  .sidebar-note {
    display: block;
    padding: 0.7rem 0.65rem;
  }

  .sidebar-intro {
    margin-bottom: 1.4rem;
  }

  .sidebar-intro .sidebar-label,
  .sidebar-note .sidebar-label {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.6rem;
  }

  .sidebar-intro p,
  .sidebar-note p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.76rem;
    line-height: 1.55;
  }

  .sidebar-note {
    margin-top: auto;
    padding-top: 1.5rem;
  }

  .primary-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .nav-button {
    justify-content: flex-start;
    flex-direction: row;
    min-height: 2.85rem;
    padding: 0.55rem 0.7rem;
    gap: 0.65rem;
    font-size: 0.78rem;
  }

  .nav-button.is-active::before {
    top: 22%;
    right: auto;
    bottom: 22%;
    left: 0;
    width: 3px;
    height: auto;
  }

  .main-content {
    padding: 2rem 2.1rem 4rem;
  }

  .page-heading {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

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

  .compact-field {
    width: 190px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
  }

  .entry-toolbar {
    grid-template-columns: minmax(0, 1fr) 180px minmax(240px, 1fr);
    align-items: end;
  }

  .entry-context {
    grid-column: auto;
  }

  .product-row {
    grid-template-columns: minmax(150px, 1fr) minmax(280px, 1.15fr) minmax(220px, 0.95fr);
    align-items: center;
  }

  .product-metrics {
    min-height: 4.55rem;
  }

  .history-filters {
    grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) repeat(2, minmax(150px, 0.8fr));
    align-items: end;
  }

  .sales-filters {
    grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) repeat(2, minmax(150px, 0.8fr));
    align-items: end;
  }

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

@media (min-width: 1200px) {
  .app-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

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

  .station-product-toggles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-row {
    grid-template-columns: minmax(180px, 1fr) minmax(340px, 1.2fr) minmax(260px, 0.95fr);
  }
}

@media (max-width: 430px) {
  .local-pill {
    max-width: 42px;
    overflow: hidden;
    padding-right: 0.55rem;
    padding-left: 0.55rem;
    text-indent: -999px;
  }

  .local-pill .online-dot {
    display: block;
    text-indent: 0;
  }

  .form-actions,
  .local-data-panel,
  .sales-selection {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    radial-gradient(circle at 12% 8%, rgba(244, 200, 66, 0.2), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(31, 111, 178, 0.16), transparent 34%),
    linear-gradient(145deg, #f4f7fb 0%, #eaf1f8 100%);
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 480px);
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line, #dfe7f0);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16, 47, 86, 0.14);
}

.auth-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--navy), var(--brand) 72%, var(--sun) 72%);
  content: "";
}

.auth-brand { margin-bottom: 32px; }
.auth-brand h1 { margin: 0; font-size: 1.1rem; }
.auth-card .kicker { color: var(--brand); }
.auth-card > h2 { margin: 8px 0; font-size: 1.8rem; }
.auth-intro, .auth-footer, .bootstrap-details > p { color: var(--muted, #65778c); line-height: 1.55; }
.auth-form { display: grid; gap: 16px; margin-top: 20px; }
.auth-form .primary-button, .auth-form .secondary-button { width: 100%; min-height: 48px; }
.bootstrap-details { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line, #dfe7f0); }
.bootstrap-details summary { color: var(--brand, #1f6fb2); font-weight: 700; cursor: pointer; }
.auth-footer { margin: 18px 0 0; text-align: center; font-size: 0.88rem; }

.topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.signed-in-user { color: var(--muted, #66756d); font-size: 0.86rem; }
.logout-button { min-height: 36px; padding: 8px 12px; }
.password-menu { position: relative; }
.password-menu summary { padding: 9px 12px; border: 1px solid var(--line, #dfe7f0); border-radius: 10px; color: var(--brand, #1f6fb2); font-weight: 700; cursor: pointer; list-style: none; }
.password-menu summary::-webkit-details-marker { display: none; }
.password-form { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: grid; gap: 10px; width: min(340px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line, #dfe7f0); border-radius: 14px; background: #fff; box-shadow: 0 18px 50px rgba(16, 47, 86, 0.14); }
.password-form .field { margin: 0; }
.refresh-button { min-height: 36px; padding: 8px 12px; }

.station-create-form, .operator-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 18px 0;
}

.operator-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.station-create-form .field, .operator-create-form .field { margin: 0; }
.station-active-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: var(--muted, #66756d); font-size: 0.9rem; }

.station-access-fieldset {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0;
  padding: 14px;
  border: 1px solid var(--line, #dfe7e2);
  border-radius: 14px;
}

.station-access-fieldset legend { padding: 0 6px; font-weight: 700; }
.station-access-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; max-height: 230px; overflow: auto; }
.station-access-option { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f1f6fb; }
.station-access-option input { margin-top: 3px; }

.temporary-credential {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #c5d9ed;
  border-radius: 14px;
  background: #eff6fc;
}

.temporary-credential code { max-width: 100%; overflow-wrap: anywhere; padding: 10px 12px; border-radius: 8px; background: #fff; font-size: 1rem; user-select: all; }
.temporary-credential p { margin: 0; color: var(--muted, #66756d); font-size: 0.9rem; }
.operator-list { display: grid; gap: 14px; }

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

.operator-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(240px, 1.5fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line, #dfe7e2);
  border-radius: 16px;
  background: #fff;
}

.operator-card-heading strong, .operator-card-heading small { display: block; }
.operator-card-heading small { margin-top: 5px; color: var(--muted, #66756d); overflow-wrap: anywhere; }
.operator-card-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; }
.operator-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.dashboard-state-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}
.dashboard-state-filter-label { margin-right: 4px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.state-filter-button, .range-preset-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 750;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.state-filter-button:hover, .range-preset-button:hover { transform: translateY(-1px); border-color: #a8c9e8; }
.state-filter-button.is-selected, .range-preset-button.is-selected { border-color: var(--brand); background: var(--navy); color: #fff; }
.dashboard-state-areas { display: grid; gap: 18px; padding: 0 18px 18px; }
.dashboard-state-area { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #f8fbfe; }
.dashboard-state-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, #edf5fc, #fff); }
.dashboard-state-heading h4 { margin: 0; color: var(--navy); font-size: 1rem; }
.dashboard-state-heading .kicker { margin-bottom: 4px; }
.dashboard-station-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 12px; padding: 14px; }
.station-dashboard-card { min-width: 0; padding: 14px; border: 1px solid #e4ebf3; border-radius: 15px; background: #fff; box-shadow: 0 7px 20px rgba(16, 47, 86, 0.045); }
.station-dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #edf1f6; }
.station-dashboard-heading h4 { margin: 2px 0 0; color: var(--navy); font-size: 0.95rem; }
.station-dashboard-heading .kicker { margin: 0; font-size: 0.64rem; }
.dashboard-product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.dashboard-product-card { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 10px; border: 1px solid #e7edf4; border-radius: 12px; background: #fbfdff; }
.dashboard-product-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dashboard-product-heading > div { min-width: 0; }
.dashboard-product-heading strong, .dashboard-product-heading small { display: block; }
.dashboard-product-heading strong { overflow: hidden; color: var(--ink); font-size: 0.77rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-product-heading small { margin-top: 2px; color: var(--muted); font-size: 0.66rem; }
.dashboard-product-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dashboard-product-metrics > div { display: grid; gap: 3px; min-width: 0; }
.dashboard-product-metrics span { color: var(--muted); font-size: 0.65rem; }
.dashboard-product-metrics strong { overflow-wrap: anywhere; color: var(--navy); font-size: 0.78rem; }
.dashboard-product-card .status-badge { justify-self: start; max-width: 100%; white-space: normal; }

/* Imported measurement review, pending fuel purchases, and tank capacity. */
.import-upload-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 0.8fr) auto; align-items: end; gap: 0.8rem; padding: 0 1rem 0.8rem; }
.import-file-field input { min-width: 0; padding: 0.58rem; }
.import-privacy-note { margin: 0 1rem 0.7rem; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.import-preview { padding: 0 1rem 1rem; }
.import-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.import-preview-heading strong { color: var(--navy); font-size: 0.9rem; }
.import-preview-heading p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.import-warning { padding: 0.65rem 0.75rem; border-radius: 9px; background: #fff7e6; color: #74500c; font-size: 0.76rem; }
.import-table-wrap { max-height: 560px; border: 1px solid var(--line); border-radius: 12px; }
.import-preview-table { min-width: 1120px; }
.import-preview-table th, .import-preview-table td { padding: 0.5rem; vertical-align: middle; }
.import-preview-table input:not([type="checkbox"]), .import-preview-table select { min-width: 90px; padding: 0.48rem; font-size: 0.72rem; }
.import-preview-table td:first-child { min-width: 155px; }
.import-preview-table input[type="checkbox"] { width: 1rem; height: 1rem; }
.import-row-note { display: block; max-width: 155px; margin-top: 0.3rem; color: var(--muted); font-size: 0.63rem; white-space: normal; }
.purchase-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; padding: 0 1rem 1rem; }
.purchase-notes-field { grid-column: span 2; }
.purchase-capacity-preview { display: grid; gap: 0.38rem; margin: 0 1rem 0.75rem; padding: 0.8rem 0.9rem; border: 1px solid #d5e2ee; border-radius: 10px; background: #f5f9fc; color: var(--muted); font-size: 0.73rem; line-height: 1.45; }
.purchase-capacity-preview > strong { color: var(--navy); font-size: 0.78rem; }
.purchase-capacity-available strong { color: #15714f; font-size: 0.9rem; }
.purchase-capacity-available.is-over-capacity strong, .purchase-capacity-preview .is-over-capacity { color: #a64331; }
.purchase-form-note { margin: 0 1rem 0.6rem; padding: 0.75rem 0.85rem; border-left: 3px solid var(--yellow, #f2c23e); border-radius: 8px; background: #fff9e8; color: #5d4a16; font-size: 0.74rem; line-height: 1.5; }
.purchase-form-actions { display: flex; gap: 0.6rem; }
.purchase-list-panel { margin-top: 1rem; }
.entry-pending-purchases { margin-bottom: 1rem; overflow: hidden; border-color: #ecd487; }
.entry-pending-purchases .panel-heading { padding: 1rem 1rem 0.65rem; }
.entry-pending-purchases .panel-heading p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.45; }
.entry-pending-heading-actions { display: flex; align-items: center; gap: 0.55rem; flex: 0 0 auto; }
.entry-pending-list { display: grid; gap: 0.6rem; padding: 0 1rem 1rem; }
.entry-pending-empty { display: grid; gap: 0.25rem; padding: 0.8rem; border: 1px dashed #e7d9aa; border-radius: 10px; background: #fffdf6; }
.entry-pending-empty strong { color: var(--navy); font-size: 0.76rem; }
.entry-pending-empty span { color: var(--muted); font-size: 0.7rem; }
.entry-pending-purchase { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem; border: 1px solid #f0e3b8; border-radius: 12px; background: #fffdf6; }
.entry-pending-copy { display: grid; gap: 0.25rem; }
.entry-pending-copy strong { color: var(--navy); font-size: 0.78rem; }
.entry-pending-copy span { color: var(--muted); font-size: 0.68rem; }
.entry-pending-purchase button { flex: 0 0 auto; }
.station-product-config { display: grid; gap: 0.48rem; min-width: 0; padding: 0.5rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.station-product-toggles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.station-product-config .product-toggle { min-height: 1.8rem; padding: 0; border: 0; background: transparent; }
.tank-capacity-field { display: grid; grid-template-columns: auto minmax(62px, 1fr); align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.62rem; font-weight: 700; }
.tank-capacity-field input { min-width: 0; width: 100%; padding: 0.4rem; font-size: 0.7rem; }
.tank-level { display: grid; gap: 0.32rem; color: var(--muted); font-size: 0.64rem; }
.tank-level > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.tank-level strong { color: var(--navy); font-size: 0.68rem; text-align: right; }
.tank-level-track { height: 0.38rem; overflow: hidden; border-radius: 999px; background: #e9eef4; }
.tank-level-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1e70b7, #f0c23c); }
.tank-level.is-over-capacity strong, .tank-level.is-over-capacity small { color: #a64331; }
.tank-level.is-over-capacity .tank-level-track span { background: #c64f3d; }
.tank-level small { color: #a64331; font-size: 0.62rem; }
.tank-level .tank-free-space { color: var(--muted); }
.tank-level .tank-free-space strong { color: #15714f; }

@media (max-width: 920px) {
  .purchase-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-upload-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-upload-row > button { grid-column: span 2; justify-self: end; }
}

@media (max-width: 620px) {
  .purchase-form-grid, .import-upload-row { grid-template-columns: 1fr; }
  .purchase-notes-field, .import-upload-row > button { grid-column: auto; }
  .import-preview-heading { align-items: stretch; flex-direction: column; }
  .import-preview-heading .primary-button { width: 100%; }
  .purchase-form-actions { flex-wrap: wrap; }
  .entry-pending-purchase { align-items: stretch; flex-direction: column; }
  .entry-pending-purchase button { width: 100%; }
  .entry-pending-purchases .panel-heading { align-items: flex-start; }
  .entry-pending-heading-actions { flex-direction: column; align-items: flex-end; }
  .entry-pending-heading-actions button { padding-inline: 0.6rem; }
  .station-product-toggles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sales-range-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: -5px 0 16px; }
.sales-range-presets > span { margin-right: 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.sales-ranking-table { min-width: 1120px; }
.sales-ranking-table .is-over-capacity { color: #a64331; font-weight: 750; }
.table-link-button { padding: 0; border: 0; background: transparent; color: var(--brand); font-weight: 750; text-align: left; }
.table-link-button:hover { color: var(--navy); text-decoration: underline; }
.archived-stations-panel { margin-top: 16px; padding: 0; overflow: hidden; }
.archived-stations-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: var(--navy); font-weight: 750; cursor: pointer; list-style: none; }
.archived-stations-panel > summary::-webkit-details-marker { display: none; }
.archived-station-list { padding: 0 16px 16px; }
.archived-station-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafc; }
.archived-station-item + .archived-station-item { margin-top: 8px; }
.archived-station-item strong, .archived-station-item small { display: block; }
.archived-station-item small { margin-top: 4px; color: var(--muted); font-size: 0.73rem; }
.station-setting-state { display: grid; gap: 7px; min-width: 140px; color: var(--muted); font-size: 0.73rem; font-weight: 700; }
.station-setting-state select { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 0.82rem; }
.station-setting-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f6; }
.station-setting-footer > span { color: var(--muted); font-size: 0.74rem; }
.archive-station-button { color: #9b3f3f; border-color: #edcaca; background: #fff9f9; }
.archive-station-button:hover { border-color: #dca4a4; background: #fff0f0; }

@media (max-width: 620px) {
  .dashboard-state-areas { padding: 0 10px 10px; }
  .dashboard-station-grid { grid-template-columns: 1fr; padding: 9px; }
  .dashboard-product-grid { grid-template-columns: 1fr; }
  .dashboard-state-filter { gap: 6px; padding: 10px; }
  .state-filter-button { padding-inline: 10px; }
  .archived-station-item { align-items: flex-start; flex-direction: column; }
}
.operator-card-actions button { min-height: 36px; }

@media (max-width: 820px) {
  .operator-card { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .station-create-form, .operator-create-form { grid-template-columns: 1fr; }
  .operator-create-form .station-access-fieldset { grid-column: 1; }
}
