:root {
  --navy: #082f50;
  --blue: #0077bd;
  --ink: #172c43;
  --muted: #718397;
  --line: #e2e9f0;
  --bg: #f4f7fa;
  --red: #ce5267;
  --amber: #ad761c;
  --green: #2e8a72;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 "Segoe UI",
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #edf6fc;
  border-color: #a7cce3;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--ink);
  min-width: 0;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #74beed;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 4px 12px #0077bd18;
}
.primary:hover {
  background: #00649e;
  color: white;
  border-color: #00649e;
}
.brand {
  font-size: 39px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -2px;
  color: white;
  display: block;
}
.brand:hover {
  text-decoration: none;
}
.brand span {
  color: #79c4ef;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 2.1px;
  color: #a5bbce;
  margin-top: 13px;
}
.app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--navy);
  padding: 34px 22px 24px;
  color: #a5bed2;
  display: flex;
  flex-direction: column;
}
.nav-label {
  margin: 45px 12px 14px;
  color: #7e9bb2;
  font-size: 10px;
  letter-spacing: 1.6px;
}
.nav-link {
  display: block;
  color: #a9c2d4;
  margin: 5px -5px;
  padding: 13px 15px;
  border-radius: 8px;
}
.nav-link:hover {
  text-decoration: none;
  background: #104263;
}
.nav-link.active {
  background: #104e77;
  color: #e7f4fc;
}
.nav-link span {
  display: inline-block;
  width: 24px;
}
.side-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.side-note {
  font-size: 11px;
  line-height: 1.8;
  color: #85a5bc;
  border-bottom: 1px solid #28516c;
  padding-bottom: 22px;
  margin-bottom: 22px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.profile b {
  display: block;
  color: #d9e7f1;
  font-size: 12px;
}
.profile #signed-in-email {
  display: block;
  font-size: 10px;
  word-break: break-all;
  margin-top: 3px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  background: #e7f4fc;
  color: #1677a9;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.logout {
  padding: 8px 0;
  background: none;
  border: 0;
  color: #a5bed2;
  font-size: 11px;
  margin-top: 13px;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 0 34px;
  gap: 16px;
}
.crumb {
  font-size: 12px;
  color: #8996a6;
}
.crumb span {
  margin: 0 12px;
}
.crumb strong {
  font-weight: 600;
  color: #586a7d;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mode-badge {
  background: #e8f4fb;
  color: #187cae;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.mode-badge.fixture {
  background: #fff0d5;
  color: #966112;
}
main {
  padding: 32px 34px;
  max-width: 1600px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.9px;
  color: #4d89a8;
  font-weight: 700;
}
h1 {
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.9px;
  margin: 9px 0 11px;
}
h2 {
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
p {
  color: var(--muted);
  margin: 0 0 12px;
}
.heading p {
  margin: 0;
}
.button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  border: 1px solid var(--line);
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 3px 8px #172c4303;
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.stat-dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}
.metric {
  font-size: 33px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 12px 0;
}
.metric small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 400;
}
.small {
  font-size: 11px;
  color: var(--muted);
}
.red {
  color: var(--red);
}
.amber {
  color: var(--amber);
}
.green {
  color: var(--green);
}
.grey {
  color: #77879b;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.section-heading p {
  font-size: 12px;
  margin-bottom: 0;
}
.small-button {
  font-size: 11px;
  padding: 8px 11px;
  white-space: nowrap;
}
.filterbar {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 10px;
}
.filterbar > * {
  min-width: 0;
}
.subfilter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 17px 0 20px;
  color: var(--muted);
  font-size: 11px;
}
.subfilter label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.subfilter input {
  width: auto;
  accent-color: var(--blue);
}
.export {
  padding: 5px;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #7f8fa1;
  background: #f8fafc;
  border-top: 1px solid #edf1f5;
  text-transform: uppercase;
  white-space: nowrap;
}
td,
th {
  padding: 16px 12px;
  border-bottom: 1px solid #edf1f5;
}
td {
  font-size: 12px;
  vertical-align: middle;
}
td b {
  font-weight: 600;
}
.product-name {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 190px;
}
.product-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #edf6fc;
  color: #55a4d0;
  border-radius: 9px;
  flex-shrink: 0;
}
.product-name b {
  display: block;
}
.sku {
  font-size: 10px;
  color: #6d8298;
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.money {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 5px;
  background: #eff3f7;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.pill.red {
  background: #fff0f2;
}
.pill.amber {
  background: #fff5e3;
}
.pill.green {
  background: #e9f6ef;
}
.detail-button {
  font-size: 11px;
  white-space: nowrap;
  padding: 8px 10px;
}
.table-note {
  font-size: 10px;
  line-height: 1.8;
  color: #8292a4;
  margin-top: 16px;
}
.empty {
  padding: 38px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty b {
  display: block;
  margin-bottom: 7px;
  color: #435c74;
}
.notice {
  background: #fff8e8;
  border: 1px solid #f1dfb2;
  border-radius: 8px;
  padding: 13px 17px;
  font-size: 12px;
  color: #896122;
  margin-bottom: 24px;
}
.limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 23px;
}
.limits > div {
  background: #eaf3f9;
  border: 1px solid #d4e5f1;
  padding: 19px 22px;
  border-radius: 10px;
}
.limits span {
  display: block;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #68879d;
  margin-bottom: 7px;
}
.limits b {
  font-size: 21px;
  letter-spacing: -0.5px;
}
.run-card {
  margin-bottom: 15px;
}
.run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.run-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}
.progress {
  height: 7px;
  border-radius: 8px;
  background: #edf2f7;
  overflow: hidden;
  margin: 17px 0;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 0.3s;
}
.run-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  gap: 12px;
}
.run-checks {
  margin-top: 20px;
}
.run-check {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.back-button {
  margin-bottom: 22px;
}
.detail-hero {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 23px;
}
.detail-hero .product-icon {
  width: 54px;
  height: 54px;
  font-size: 25px;
}
.detail-hero h1 {
  font-size: 25px;
  margin: 6px 0 8px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.detail-price {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
}
.detail-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 19px;
}
.detail-data span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.history {
  margin-top: 20px;
}
.history-row {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}
.history-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.safe-link {
  font-size: 11px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 9px;
  letter-spacing: 0.4px;
  color: #899aac;
  margin: 25px 0 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 520px;
  width: calc(100% - 32px);
  padding: 30px;
  color: var(--ink);
  box-shadow: 0 25px 80px #082f5033;
}
dialog::backdrop {
  background: #102d4877;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 23px;
  margin: 9px 0 20px;
}
.dialog-close {
  float: right;
  padding: 2px 9px;
  font-size: 23px;
  border: 0;
  margin: -15px -15px 0 0;
}
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 20px;
  background: var(--bg);
  border-radius: 10px;
  margin: 20px 0;
}
.preview-grid span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.preview-grid b {
  font-size: 24px;
  display: block;
  margin: 4px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 25px;
}
.dialog-note {
  font-size: 12px;
  line-height: 1.8;
}
.form-message {
  font-size: 12px;
  color: #236a91;
  margin: 15px 0 0;
  min-height: 0;
}
.error {
  color: #b43b50 !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  max-width: 440px;
  background: var(--navy);
  color: white;
  border-radius: 10px;
  box-shadow: 0 12px 35px #092b5033;
  padding: 16px 22px;
  font-size: 13px;
  z-index: 30;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 44% 56%;
  background: white;
}
.login-brand {
  position: relative;
  background: var(--navy);
  color: white;
  padding: 55px 12%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.login-brand h1 {
  font-size: clamp(32px, 3.2vw, 53px);
  line-height: 1.15;
  letter-spacing: -2px;
  margin: 90px 0 20px;
}
.login-brand p {
  color: #a8c4d8;
  font-size: 15px;
  line-height: 1.9;
}
.login-visual {
  display: flex;
  align-items: flex-end;
  gap: 15px;
  margin-top: 70px;
  height: 150px;
  width: 100%;
  opacity: 0.8;
}
.login-visual i {
  flex: 1;
  background: linear-gradient(#37a7e8, #104a71);
  height: 35%;
  border-radius: 7px 7px 0 0;
}
.login-visual i:nth-child(2) {
  height: 62%;
}
.login-visual i:nth-child(3) {
  height: 48%;
}
.login-visual i:nth-child(4) {
  height: 80%;
}
.login-visual i:nth-child(5) {
  height: 100%;
}
.private-label {
  margin-top: auto;
  padding-top: 55px;
  font-size: 9px;
  letter-spacing: 2px;
  color: #7da1bb;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 45px 10%;
  width: 100%;
  max-width: none;
}
.login-card {
  width: 100%;
  max-width: 390px;
}
.login-card h2 {
  font-size: 27px;
  line-height: 1.25;
  margin: 12px 0;
}
.login-card p {
  font-size: 13px;
  line-height: 1.8;
}
.login-card form {
  margin-top: 32px;
}
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.login-card input {
  padding: 14px;
  margin-bottom: 14px;
}
.login-card .primary {
  width: 100%;
  padding: 14px;
  display: flex;
  justify-content: space-between;
}
.login-card .text-button {
  padding-left: 0;
  border: 0;
  color: var(--blue);
  font-size: 12px;
  margin-top: 8px;
}
.login-note {
  font-size: 11px;
  color: #8a98a7;
  line-height: 1.8;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
#code {
  letter-spacing: 9px;
  font-size: 23px;
  text-align: center;
}
.spinner {
  height: 24px;
  width: 24px;
  border: 3px solid #dceaf4;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 10px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  main {
    padding: 40px 45px;
  }
  .heading {
    margin-bottom: 32px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 29px 18px;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 25px 24px;
  }
  .heading {
    align-items: flex-start;
  }
  .filterbar {
    grid-template-columns: 1.5fr 1fr;
  }
  .stats {
    gap: 11px;
  }
  .stats .card {
    padding: 19px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .button-row {
    justify-content: flex-end;
  }
  .heading .button-row {
    max-width: 180px;
  }
  .login-brand {
    padding: 40px 10%;
  }
}
@media (max-width: 720px) {
  .app {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 19px 18px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  .brand {
    font-size: 30px;
  }
  .brand-sub {
    font-size: 8px;
    margin-top: 7px;
    letter-spacing: 1.5px;
  }
  .nav-label,
  .side-note,
  .profile {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
  }
  .nav-link {
    font-size: 12px;
    padding: 10px;
    margin: 0;
  }
  .nav-link span {
    width: 17px;
  }
  .side-bottom {
    padding: 0;
    margin: 0;
  }
  .logout {
    margin: 0;
    padding: 5px;
    font-size: 11px;
  }
  .topbar {
    height: 56px;
    padding: 0 17px;
  }
  .topbar .avatar {
    display: none;
  }
  .crumb {
    font-size: 11px;
  }
  .mode-badge {
    font-size: 8px;
    padding: 5px 7px;
  }
  main {
    padding: 23px 16px;
  }
  .heading {
    display: block;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 26px;
  }
  .heading p {
    font-size: 12px;
  }
  .heading .button-row {
    max-width: none;
    justify-content: flex-start;
    margin-top: 18px;
  }
  .button-row button {
    flex: 1;
    font-size: 12px;
    padding: 11px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }
  .stats .card {
    padding: 17px 15px;
  }
  .metric {
    font-size: 28px;
    margin: 8px 0;
  }
  .stat-label {
    font-size: 11px;
  }
  .stats .small {
    font-size: 10px;
  }
  .card {
    padding: 20px 16px;
  }
  .section-heading {
    gap: 8px;
  }
  h2 {
    font-size: 17px;
  }
  .section-heading p {
    font-size: 11px;
  }
  .filterbar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .search-label {
    grid-column: 1/-1;
  }
  .filterbar input,
  .filterbar select {
    font-size: 16px;
    padding: 11px 8px;
  }
  .subfilter {
    font-size: 10px;
    flex-wrap: wrap;
  }
  .table-wrap {
    overflow: visible;
  }
  .product-table,
  .product-table tbody,
  .product-table tr,
  .product-table td {
    display: block;
    width: 100%;
  }
  .product-table thead {
    display: none;
  }
  .product-table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px 14px;
    margin-bottom: 13px;
  }
  .product-table td {
    border: 0;
    padding: 7px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
    font-size: 12px;
  }
  .product-table td::before {
    content: attr(data-label);
    text-align: left;
    color: var(--muted);
    font-size: 10px;
    flex-shrink: 0;
    max-width: 45%;
  }
  .product-table td:first-child {
    display: block;
    text-align: left;
    padding-bottom: 13px;
  }
  .product-table td:first-child::before,
  .product-table td:last-child::before {
    display: none;
  }
  .product-table td:last-child button {
    width: 100%;
    margin-top: 6px;
    min-height: 40px;
  }
  .product-name {
    min-width: 0;
    align-items: flex-start;
  }
  .limits {
    gap: 8px;
  }
  .limits > div {
    padding: 13px 10px;
  }
  .limits span {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .limits b {
    font-size: 16px;
  }
  .run-meta {
    gap: 14px;
    font-size: 11px;
  }
  .run-footer {
    flex-wrap: wrap;
  }
  .detail-hero h1 {
    font-size: 21px;
  }
  .detail-hero .product-icon {
    width: 43px;
    height: 43px;
  }
  .detail-data {
    font-size: 12px;
  }
  .rank-table td,
  .rank-table th {
    padding: 12px 8px;
  }
  .rank-table {
    min-width: 550px;
  }
  .rank-table-wrap {
    overflow-x: auto;
  }
  .detail-grid .card {
    min-width: 0;
  }
  .notice {
    padding: 12px;
    font-size: 11px;
  }
  footer {
    flex-wrap: wrap;
    font-size: 8px;
  }
  .login-page {
    display: block;
  }
  .login-brand {
    padding: 29px 25px;
    min-height: auto;
  }
  .login-brand h1 {
    font-size: 30px;
    letter-spacing: -1px;
    margin: 35px 0 12px;
  }
  .login-brand p {
    font-size: 12px;
  }
  .login-visual,
  .private-label {
    display: none;
  }
  .login-panel {
    padding: 38px 25px 50px;
  }
  .login-card h2 {
    font-size: 24px;
  }
  .login-card input {
    font-size: 16px;
  }
  .login-card form {
    margin-top: 24px;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
  dialog {
    padding: 25px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.top-gap {
  margin-top: 16px;
}
[data-spacing="top"] {
  margin-top: 24px;
}
