.station-data-page,
.station-dashboard-page {
  display: grid;
  gap: 18px;
  width: 100%;
  color: #243b45;
  font-size: 15px;
}

.station-data-page { padding: 22px 24px 40px; }

.station-data-control-card,
.station-data-card,
.station-dashboard-heading,
.station-dashboard-card,
.station-kpi-grid article {
  border: 1px solid #dfe7e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 55, 65, 0.07);
}

.station-data-control-card { padding: 22px; }

.station-data-heading,
.station-dashboard-heading,
.station-card-head,
.station-table-toolbar,
.station-summary-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.station-data-heading h3,
.station-dashboard-heading h2,
.station-card-head h3,
.station-summary-intro strong { margin: 0; color: #18333f; }
.station-data-heading h3 { font-size: 25px; }
.station-data-heading p,
.station-dashboard-heading p,
.station-card-head p { margin: 6px 0 0; color: #73858d; line-height: 1.5; }

.station-save-area { display: flex; align-items: center; gap: 14px; }
.station-save-area span { color: #71838b; font-size: 14px; }
.station-save-area span.dirty { color: #d92d20; font-weight: 700; }
.station-save-area button,
.station-table-toolbar button,
.station-card-head > button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #ef4766;
  border-radius: 9px;
  color: #fff;
  background: #ef4766;
  font-weight: 700;
}
.station-save-area button:disabled { cursor: not-allowed; border-color: #dfe6e8; color: #a9b5ba; background: #eef2f3; }

.station-data-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px minmax(300px, 1.2fr);
  gap: 12px;
  margin-top: 20px;
}
.station-data-filters > label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dce5e8;
  border-radius: 9px;
  background: #fafcfc;
}
.station-data-filters label > span { color: #788990; font-size: 13px; }
.station-data-filters select,
.station-data-filters input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  color: #203943;
  background: transparent;
  font: inherit;
  font-weight: 700;
}
.station-data-period-rule { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 0 14px; border-radius: 9px; background: #f1f8f6; }
.station-data-period-rule strong { color: #16705a; }
.station-data-period-rule span { color: #647a73; }

.station-data-card { overflow: hidden; }
.station-subtabs { display: flex; align-items: stretch; min-height: 54px; padding: 0 18px; border-bottom: 1px solid #e4eaec; }
.station-subtabs button,
.station-mini-tabs button,
.station-card-switch button {
  border: 0;
  border-radius: 0;
  color: #6f8189;
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}
.station-subtabs button { min-width: 180px; padding: 0 22px; font-size: 16px; }
.station-subtabs button.active { color: #e93859; background: #fff0f3; box-shadow: inset 0 -3px #ef4766; }

.station-monthly-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  min-height: 56px;
  padding: 0 18px;
  overflow-x: auto;
  border-bottom: 1px solid #e4eaec;
}
.station-monthly-tabs button {
  min-width: 130px;
  padding: 0 18px;
  border: 0;
  color: #687c85;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-weight: 700;
}
.station-monthly-tabs button:hover { color: #d72e4d; background: #fff7f8; }
.station-monthly-tabs button.active { color: #e62f51; background: #fff0f3; box-shadow: inset 0 -3px #ef4766; }

.station-monthly-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 4px;
}
.station-monthly-intro strong { color: #18333f; font-size: 18px; }
.station-monthly-intro span { color: #7c8d94; }
.station-monthly-products { display: grid; gap: 14px; padding: 14px 18px 20px; }
.station-monthly-product { overflow: hidden; border: 1px solid #dfe7e9; border-radius: 11px; background: #fff; }
.station-monthly-product > summary {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  min-height: 54px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
  background: #fbfcfc;
}
.station-monthly-product > summary::-webkit-details-marker { display: none; }
.station-monthly-product > summary strong { color: #18333f; font-size: 16px; }
.station-monthly-product > summary span { color: #778991; }
.station-monthly-product > summary b { color: #415963; font-size: 14px; }
.station-monthly-product[open] > summary { border-bottom: 1px solid #e4eaec; }
.station-monthly-product .station-table-scroll { border-top: 0; }

.station-monthly-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.station-monthly-table th,
.station-monthly-table td {
  box-sizing: border-box;
  height: 43px;
  padding: 0 12px;
  border-right: 1px solid #e4eaec;
  border-bottom: 1px solid #e4eaec;
  white-space: nowrap;
  text-align: right;
}
.station-monthly-table th { color: #506670; background: #eff6f8; font-size: 14px; text-align: center; }
.station-monthly-table td.station-input-cell { padding: 0 !important; background: #fff0f1 !important; }
.station-monthly-table input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #203a45;
  background: transparent;
  font: inherit;
  text-align: right;
  outline: 0;
}
.station-monthly-table input::placeholder { color: #c38e96; }
.station-monthly-table input:focus { border-color: #ef4766; box-shadow: inset 0 0 0 1px #ef4766, 0 0 0 2px rgba(239, 71, 102, 0.12); }
.station-monthly-table input.invalid { border-color: #d92d20; background: #ffe1e5; }

.station-validation { display: flex; align-items: center; gap: 12px; margin: 16px 18px 0; padding: 12px 14px; border: 1px solid #f3b6bf; border-radius: 9px; color: #9f2437; background: #fff5f6; }
.station-validation span { color: #b24a59; }
.station-validation.hidden { display: none; }

.station-table-toolbar,
.station-summary-intro { padding: 18px; }
.station-table-toolbar > div { display: flex; align-items: baseline; gap: 12px; }
.station-table-toolbar strong { font-size: 18px; }
.station-table-toolbar span,
.station-summary-intro span { color: #7c8d94; }
.station-table-scroll { width: 100%; overflow: auto; border-top: 1px solid #e5ebed; }
.station-entry-table,
.station-summary-table { width: 100%; min-width: 1500px; border-collapse: separate; border-spacing: 0; }
.station-entry-table.inside { min-width: 2860px; }
.station-summary-table.inside-summary { min-width: 1860px; }
.station-entry-table th,
.station-summary-table th,
.station-entry-table td,
.station-summary-table td { height: 43px; padding: 0 12px; border-right: 1px solid #e4eaec; border-bottom: 1px solid #e4eaec; white-space: nowrap; text-align: right; }
.station-entry-table thead th,
.station-summary-table thead th { position: sticky; top: 0; z-index: 3; color: #4f646d; background: #eff6f8; font-size: 14px; text-align: center; }
.station-entry-table thead th:nth-child(-n+3),
.station-entry-table tbody td:nth-child(-n+3) { position: sticky; z-index: 2; background: #f8fbfc; }
.station-entry-table thead th:nth-child(1), .station-entry-table tbody td:nth-child(1) { left: 0; width: 150px; min-width: 150px; }
.station-entry-table thead th:nth-child(2), .station-entry-table tbody td:nth-child(2) { left: 150px; width: 150px; min-width: 150px; }
.station-entry-table thead th:nth-child(3), .station-entry-table tbody td:nth-child(3) { left: 300px; width: 180px; min-width: 180px; box-shadow: 8px 0 14px rgba(45, 66, 75, 0.06); }
.station-entry-table td { background: #fff; }
.station-entry-table tbody tr:hover td { background: #fff8f9; }
.station-entry-table tbody tr:hover td:nth-child(-n+3) { background: #fff3f5; }
.station-entry-table td.station-input-cell,
.station-entry-table td.station-date-cell,
.station-entry-table td.station-product-cell {
  padding: 0 !important;
  background: #fff0f1 !important;
}
.station-entry-table input,
.station-entry-table select {
  width: 100%;
  min-width: 112px;
  height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #203a45;
  background: transparent;
  font: inherit;
  text-align: right;
  outline: 0;
}
.station-entry-table select { min-width: 150px; text-align: left; }
.station-entry-table input[type="date"] { min-width: 126px; text-align: left; }
.station-entry-table input:focus,
.station-entry-table select:focus {
  border-color: #ef4766;
  box-shadow: inset 0 0 0 1px #ef4766, 0 0 0 2px rgba(239, 71, 102, 0.12);
}
.station-entry-table input.invalid { border-color: #d92d20; background: #ffe1e5; }
.station-computed,
.station-linked {
  color: #1b2d37;
  background: #fff !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.station-delete { border: 0; color: #d92d20; background: transparent; box-shadow: none; font-weight: 700; }
.station-empty,
.station-chart-empty { padding: 34px !important; color: #89989e; text-align: center !important; }
.station-summary-table th:first-child,
.station-summary-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 180px; text-align: left; background: #f8fbfc; }
.station-summary-table tbody td { color: #3b535d; }
.station-summary-table tbody td:last-child { color: #173f4f; background: #f5faf8; }

.station-unsaved-dialog { width: min(520px, calc(100vw - 48px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 70px rgba(20, 39, 47, 0.24); }
.station-unsaved-dialog::backdrop { background: rgba(26, 42, 49, 0.46); }
.station-unsaved-dialog > div { padding: 28px; }
.station-unsaved-dialog h3 { margin: 0; font-size: 22px; }
.station-unsaved-dialog p { margin: 10px 0 24px; color: #71838b; }
.station-unsaved-dialog footer { display: flex; justify-content: flex-end; gap: 10px; }
.station-unsaved-dialog button { min-height: 40px; padding: 0 15px; border: 1px solid #ef4766; border-radius: 8px; color: #fff; background: #ef4766; font-weight: 700; }
.station-unsaved-dialog button.secondary { border-color: #dce5e8; color: #425962; background: #f5f8f9; }
.station-unsaved-dialog button.ghost { border-color: transparent; color: #6d8088; background: transparent; }

.station-dashboard-page { background: #f3f6f8; }
.station-dashboard-heading { padding: 22px 24px; }
.station-dashboard-heading h2 { font-size: 27px; }
.station-dashboard-heading > span { padding: 7px 12px; border-radius: 999px; color: #16705a; background: #eaf7f2; font-weight: 700; }
.station-card-head > button { min-height: 34px; border-color: #dce5e8; color: #586d76; background: #fff; }

.station-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.station-kpi-grid article { display: grid; gap: 8px; min-height: 108px; padding: 17px; }
.station-kpi-grid span { color: #71838b; }
.station-kpi-grid strong { color: #173b49; font-size: 23px; }

.station-dashboard-card { min-width: 0; padding: 18px; }
.station-card-head { align-items: flex-start; margin-bottom: 12px; }
.station-card-head h3 { font-size: 19px; }
.station-card-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.station-card-total { display: flex; align-items: baseline; gap: 7px; min-height: 40px; padding: 7px 11px; border: 1px solid #e1e8eb; border-radius: 8px; background: #f8fafb; }
.station-card-total span { color: #71838b; font-size: 12px; }
.station-card-total strong { color: #173b49; font-size: 16px; font-variant-numeric: tabular-nums; }
.station-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; min-height: 30px; margin-bottom: 5px; color: #536a73; font-size: 13px; }
.station-chart-legend-item { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0; border: 0; border-radius: 5px; color: #536a73; background: transparent; box-shadow: none; font-size: 13px; font-weight: 500; }
.station-chart-legend-item:hover { border: 0; color: #173c4a; background: transparent; box-shadow: none; }
.station-chart-legend-item:focus-visible { outline: 2px solid #ef4766; outline-offset: 2px; }
.station-chart-legend-item i { flex: 0 0 auto; width: 18px; height: 4px; border-radius: 999px; background: var(--legend); }
.station-chart-legend-item[data-series-type="bar"] i,
.station-chart-legend-item[data-series-type="stack"] i { width: 12px; height: 12px; border-radius: 3px; }
.station-chart-legend-item.muted { color: #9aa6ac; text-decoration: line-through; opacity: 0.65; }
.station-chart-stage { width: 100%; min-height: 300px; overflow: hidden; }
.station-stack-scroll { max-width: 100%; overflow-x: auto; }
.station-chart-svg { display: block; width: 100%; height: 100%; min-height: 300px; overflow: visible; }
.station-chart-grid line { stroke: #e5ebed; stroke-width: 1; }
.station-chart-grid text,
.station-chart-labels text { fill: #74868d; font-size: 12px; }
.station-chart-bar,
.station-chart-line,
.station-chart-point,
.station-chart-stack { pointer-events: none; }
.station-chart-hit { cursor: crosshair; outline: none; }
.station-chart-hit:focus { stroke: #ef4766; stroke-width: 2; stroke-dasharray: 4 4; }
.station-chart-all-hidden { display: grid; min-height: 300px; place-items: center; }
.station-dashboard-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 18px; }
.station-card-switch { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 8px; background: #f2f5f6; }
.station-card-switch button { min-height: 34px; padding: 0 14px; border-radius: 6px; }
.station-card-switch button.active { color: #e62f51; background: #fff; box-shadow: 0 2px 8px rgba(44, 62, 70, 0.09); }
.station-product-trend-switch { flex-wrap: wrap; justify-content: flex-end; }

.station-chart-tooltip[hidden] { display: none; }
