/* Station Admin dashboard only. All selectors remain scoped to .admin-dashboard. */
.admin-dashboard {
  --admin-green-950: #073f35;
  --admin-green-900: #075142;
  --admin-green-800: #08644f;
  --admin-green-700: #087b5d;
  --admin-green-600: #159069;
  --admin-green-100: #dff3e8;
  --admin-green-50: #f1faf5;
  --admin-blue: #2878c8;
  --admin-blue-soft: #eaf3fc;
  --admin-yellow: #bd7a08;
  --admin-yellow-soft: #fff4d8;
  --admin-purple: #7350ad;
  --admin-purple-soft: #f1ebfb;
  --admin-red: #c14942;
  --admin-red-soft: #fff0ee;
  --admin-ink: #19362f;
  --admin-muted: #687d75;
  --admin-line: #dfe9e3;
  --admin-panel: #ffffff;
  --admin-surface: #f5f8f6;
  --admin-shadow: 0 10px 30px rgba(11, 74, 57, 0.07);
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  color: var(--admin-ink);
  display: grid;
  gap: 14px;
  min-width: 0;
}

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

.admin-dash-head {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 17px 19px;
  overflow: hidden;
  border: 1px solid #0c7058;
  border-radius: 15px;
  background:
    radial-gradient(circle at 94% 10%, rgba(216, 241, 150, 0.2), transparent 28%),
    linear-gradient(118deg, var(--admin-green-950), var(--admin-green-700));
  color: #fff;
  box-shadow: var(--admin-shadow);
}

.admin-dash-head::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -42px -72px auto;
  width: 170px;
  height: 170px;
  border: 28px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
}

.admin-dash-head h1,
.admin-dash-head h2,
.admin-dash-head p {
  margin: 0;
}

.admin-dash-head h1,
.admin-dash-head h2 {
  color: #fff;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.admin-dash-head p {
  margin-top: 5px;
  color: #d5eee4;
  font-size: 11px;
  line-height: 1.45;
}

.admin-dash-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-dash-controls label {
  display: grid;
  gap: 4px;
  color: #d7eee6;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.admin-dash-controls input,
.admin-dash-controls select,
.admin-dash-controls button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
}

.admin-dash-controls input,
.admin-dash-controls select {
  min-width: 136px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--admin-ink);
  outline: 0;
}

.admin-dash-controls input:focus,
.admin-dash-controls select:focus {
  border-color: #bfe78b;
  box-shadow: 0 0 0 3px rgba(215, 239, 153, 0.2);
}

.admin-dash-controls button {
  padding: 0 12px;
  background: #d7ef99;
  border-color: #d7ef99;
  color: var(--admin-green-950);
  font-weight: 800;
  cursor: pointer;
}

.admin-dash-controls button:hover {
  background: #e2f5b2;
}

.admin-dash-controls .btn.primary {
  border-color: #d7ef99;
  background: #d7ef99;
  color: var(--admin-green-950);
}

.admin-dash-controls .btn.primary:hover {
  border-color: #e2f5b2;
  background: #e2f5b2;
}

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

.admin-kpi {
  --tone: var(--admin-green-700);
  --tone-soft: var(--admin-green-50);
  position: relative;
  display: block;
  min-width: 0;
  min-height: 105px;
  padding: 13px;
  border: 1px solid var(--admin-line);
  border-top: 3px solid var(--tone);
  border-radius: 12px;
  background: var(--admin-panel);
  box-shadow: var(--admin-shadow);
}

.admin-kpi[data-tone="blue"] {
  --tone: var(--admin-blue);
  --tone-soft: var(--admin-blue-soft);
}

.admin-kpi[data-tone="yellow"] {
  --tone: var(--admin-yellow);
  --tone-soft: var(--admin-yellow-soft);
}

.admin-kpi[data-tone="purple"] {
  --tone: var(--admin-purple);
  --tone-soft: var(--admin-purple-soft);
}

.admin-kpi[data-tone="green"] {
  --tone: var(--admin-green-700);
  --tone-soft: var(--admin-green-50);
}

.admin-kpi-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 9px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 15px;
  font-weight: 850;
}

.admin-kpi-main {
  display: block;
  min-width: 0;
  margin-top: 5px;
  color: var(--admin-ink);
  font-size: clamp(18px, 1.65vw, 26px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1.16;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.admin-kpi-main.is-quantity {
  color: var(--tone);
  font-size: clamp(14px, 1.25vw, 18px);
  letter-spacing: -0.02em;
}

.admin-kpi > div:last-child {
  min-width: 0;
}

.admin-kpi > div:last-child > h2 {
  margin: 0;
  padding-right: 40px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.admin-kpi > div:last-child > p {
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 8px;
  line-height: 1.35;
}

.admin-kpi-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  margin-top: 8px;
}

.admin-kpi-breakdown > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 6px;
  background: var(--tone-soft);
}

.admin-kpi-breakdown b,
.admin-kpi-breakdown em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-kpi-breakdown b {
  color: var(--admin-ink);
  font-size: 8px;
  font-weight: 800;
}

.admin-kpi-breakdown em {
  color: var(--tone);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.admin-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 0.95fr);
  gap: 11px;
  min-width: 0;
}

.admin-dash-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 13px;
  background: var(--admin-panel);
  box-shadow: var(--admin-shadow);
}

.admin-dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 47px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--admin-line);
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.admin-dash-panel-head > div {
  min-width: 0;
}

.admin-dash-panel-head strong,
.admin-dash-panel-head h2 {
  display: block;
  margin: 0;
  color: var(--admin-ink);
  font-size: 12px;
  line-height: 1.25;
}

.admin-dash-panel-head small,
.admin-dash-panel-head span,
.admin-dash-panel-head p {
  display: block;
  margin-top: 2px;
  margin-bottom: 0;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-dash-panel-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px 13px;
}

.admin-product-row {
  --product-color: var(--admin-green-700);
  --product-soft: var(--admin-green-50);
  display: grid;
  grid-template-columns: minmax(68px, 0.55fr) auto minmax(90px, 1.45fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 0;
}

.admin-product-row[data-product="MS"],
.admin-tank[data-product="MS"],
.admin-receipt[data-product="MS"] {
  --product-color: #16803d;
  --product-soft: #eaf7ee;
}

.admin-product-row[data-product="HSD"],
.admin-tank[data-product="HSD"],
.admin-receipt[data-product="HSD"] {
  --product-color: #276fbe;
  --product-soft: #eaf3fc;
}

.admin-product-row[data-product="CBG"],
.admin-tank[data-product="CBG"],
.admin-receipt[data-product="CBG"] {
  --product-color: #064e3b;
  --product-soft: #e5f1eb;
}

.admin-product-row + .admin-product-row {
  border-top: 1px solid #edf2ef;
}

.admin-product-row > strong,
.admin-product-row > span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-row > div:first-child {
  min-width: 0;
}

.admin-product-row > div:first-child b,
.admin-product-row > div:first-child small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-row > div:first-child b {
  color: var(--product-color);
  font-size: 10px;
}

.admin-product-row > div:first-child small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 8px;
}

.admin-product-quantity {
  display: grid;
  justify-items: end;
  min-width: 64px;
  color: var(--product-color);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-product-quantity small {
  color: var(--admin-muted);
  font-size: 8px;
  font-weight: 650;
}

.admin-product-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0ec;
}

.admin-product-bar > span,
.admin-product-bar > i {
  display: block;
  width: var(--fill, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--product-color);
}

.admin-tank {
  --product-color: var(--admin-green-700);
  --product-soft: var(--admin-green-50);
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e3ece7;
  border-radius: 10px;
  background: var(--product-soft);
}

.admin-tank-label,
.admin-tank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.admin-tank-label strong,
.admin-tank-label b,
.admin-tank-label span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tank-label strong {
  color: var(--product-color);
  font-weight: 850;
  text-align: right;
}

.admin-tank-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e1;
  box-shadow: inset 0 1px 2px rgba(10, 61, 47, 0.08);
}

.admin-tank-track > span,
.admin-tank-track > i {
  display: block;
  width: var(--fill, 0%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--product-color);
}

.admin-tank-meta {
  color: var(--admin-muted);
  font-size: 8px;
}

.admin-receipt {
  --product-color: var(--admin-green-700);
  --product-soft: var(--admin-green-50);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 3px 9px;
  align-items: center;
  min-width: 0;
  padding: 8px 0;
}

.admin-receipt + .admin-receipt {
  border-top: 1px solid #edf2ef;
}

.admin-receipt > .admin-kpi-icon {
  grid-row: 1;
  width: 29px;
  height: 29px;
  background: var(--product-soft);
  color: var(--product-color);
}

.admin-receipt > div {
  min-width: 0;
}

.admin-receipt > div strong,
.admin-receipt > div span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-receipt > div span {
  color: var(--admin-muted);
  font-size: 8px;
}

.admin-receipt > div strong {
  margin-top: 2px;
  color: var(--product-color);
  font-size: 11px;
}

.admin-receipt > small {
  grid-column: 3;
  align-self: center;
  color: var(--admin-muted);
  font-size: 8px;
  text-align: right;
  white-space: nowrap;
}

.admin-operations {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.admin-operation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  color: var(--admin-ink);
}

button.admin-operation,
a.admin-operation {
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

button.admin-operation:hover,
a.admin-operation:hover {
  border-color: #add2be;
  background: var(--admin-green-50);
  transform: translateY(-1px);
}

.admin-operation > :first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--admin-green-100);
  color: var(--admin-green-800);
  font-size: 13px;
}

.admin-operation strong,
.admin-operation span,
.admin-operation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-operation > span:nth-child(2) b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--admin-ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-operation > i:last-child {
  color: #91a59c;
  font-size: 17px;
  font-style: normal;
}

.admin-operation strong {
  font-size: 10px;
}

.admin-operation small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 8px;
}

section.admin-reconciliation {
  display: block;
}

.admin-reconciliation .admin-dash-panel-body {
  gap: 11px;
}

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

.admin-recon-totals > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  background: var(--admin-surface);
}

.admin-recon-totals span,
.admin-recon-totals small,
.admin-recon-totals strong {
  display: block;
}

.admin-recon-totals span,
.admin-recon-totals small {
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-recon-totals strong {
  margin-top: 4px;
  color: var(--admin-ink);
  font-size: 14px;
  line-height: 1.1;
}

.admin-dash-table {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.admin-dash-table table,
table.admin-dash-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.admin-dash-table th,
.admin-dash-table td,
table.admin-dash-table th,
table.admin-dash-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #e9efeb;
  text-align: left;
  vertical-align: middle;
}

.admin-dash-table th,
table.admin-dash-table th {
  background: #f4f8f5;
  color: var(--admin-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-dash-table td,
table.admin-dash-table td {
  color: #3e554c;
  font-size: 9px;
}

.admin-dash-table tbody tr:hover td,
table.admin-dash-table tbody tr:hover td {
  background: #fbfdfc;
}

.admin-total-row td,
tr.admin-total-row td {
  border-top: 2px solid #bdd5c8;
  border-bottom: 0;
  background: var(--admin-green-50);
  color: var(--admin-green-950);
  font-weight: 850;
}

.admin-dash-warning,
.admin-dash-note {
  display: block;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.45;
}

.admin-dash-warning strong {
  display: block;
  margin-bottom: 3px;
  color: #704b0a;
}

.admin-dash-warning ul {
  margin: 0;
  padding-left: 17px;
}

.admin-dash-warning li + li {
  margin-top: 2px;
}

.admin-dash-warning {
  border: 1px solid #efd39e;
  background: #fff8e7;
  color: #7d560f;
}

.admin-dash-note {
  border: 1px solid #cfe3d7;
  background: var(--admin-green-50);
  color: #42685a;
}

section.admin-recent {
  display: block;
}

.admin-recent .admin-dash-panel-body {
  gap: 9px;
}

.admin-recent-tabs {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.admin-recent-tabs button,
.admin-recent-tabs a {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  background: #fff;
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 27px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-recent-tabs button.active,
.admin-recent-tabs a.active,
.admin-recent-tabs [aria-selected="true"],
.admin-recent-tabs [aria-pressed="true"] {
  border-color: var(--admin-green-700);
  background: var(--admin-green-700);
  color: #fff;
}

.admin-dashboard .amount-short,
.admin-dashboard .amount-gain {
  font-weight: 850;
}

.admin-dashboard .amount-short {
  background: var(--admin-red-soft);
  color: var(--admin-red);
}

.admin-dashboard .amount-gain {
  background: var(--admin-green-100);
  color: var(--admin-green-800);
}

.admin-recon-totals > .amount-short,
.admin-recon-totals > .amount-gain {
  border-width: 1px;
  border-style: solid;
}

.admin-recon-totals > .amount-short {
  border-color: #efcbc7;
}

.admin-recon-totals > .amount-gain {
  border-color: #c8e5d3;
}

.admin-dash-table td.amount-short,
table.admin-dash-table td.amount-short {
  display: table-cell;
  background: var(--admin-red-soft);
}

.admin-dash-table td.amount-gain,
table.admin-dash-table td.amount-gain {
  display: table-cell;
  background: var(--admin-green-50);
}

.admin-dashboard .admin-empty,
.admin-dashboard .admin-no-data,
.admin-dashboard [data-empty="true"] .admin-dash-panel-body {
  min-height: 94px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed #cddbd3;
  border-radius: 9px;
  background: #fafcfb;
  color: var(--admin-muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.admin-dashboard .admin-empty strong,
.admin-dashboard .admin-no-data strong {
  display: block;
  margin-bottom: 3px;
  color: #40594f;
  font-size: 10px;
}

.admin-dashboard [hidden] {
  display: none !important;
}

@media (max-width: 1280px) {
  .admin-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .admin-dash-grid > .admin-dash-panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .admin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dash-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-dash-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-dash-grid {
    grid-template-columns: 1fr;
  }

  .admin-dash-grid > .admin-dash-panel:first-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .admin-dashboard {
    gap: 10px;
  }

  .admin-dash-head {
    padding: 14px;
    border-radius: 12px;
  }

  .admin-dash-controls > *,
  .admin-dash-controls label {
    flex: 1 1 128px;
  }

  .admin-dash-controls input,
  .admin-dash-controls select,
  .admin-dash-controls button {
    width: 100%;
    min-width: 0;
  }

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

  .admin-kpi {
    min-height: 98px;
    padding: 11px;
  }

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

  .admin-product-row {
    grid-template-columns: minmax(62px, 0.55fr) auto minmax(78px, 1.45fr);
  }
}

@media (max-width: 420px) {
  .admin-kpis,
  .admin-operations,
  .admin-recon-totals {
    grid-template-columns: 1fr;
  }

  .admin-kpi {
    min-height: 0;
  }

  .admin-product-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-product-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
