/* TestSwap console · app style: Framed sheet (seed 1062998292), light.
   Blue-grey frame, white sheet inset 8px from the right and bottom, no shadows. */

@import url("https://api.fontshare.com/v2/css?f[]=switzer@400,500,600&display=swap");

:root {
  --chrome: #e9edf3;
  --sheet: #ffffff;
  --edge: #e4e8ee;
  --ink: #0b0c0e;
  --muted: #5d6470;
  --rule: #eef1f5;
  --accent: #1f2de6;
  --accent-soft: #edeeff;
  --positive: #1e6a52;
  --negative: #a02b2b;
  --step-small: 0.8125rem;
  --step-body: 0.875rem;
  --radius: 16px;
}

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

/* The console shell is a grid; without this the hidden attribute loses to it. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Switzer", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-body);
  color: var(--ink);
  background: var(--chrome);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Login ---------- */

.login {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login__card {
  width: min(420px, 100%);
  background: var(--sheet);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 20px;
}

.login__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.login p {
  margin: 0;
  color: var(--muted);
  font-size: var(--step-small);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: var(--step-small);
  color: var(--muted);
}

.field input {
  padding: 10px 12px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  background: #fff;
  font-size: var(--step-body);
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: var(--step-small);
  font-weight: 500;
  transition: background-color 140ms ease, transform 120ms ease;
}

.btn:hover {
  background: #26282c;
}

.btn:active {
  transform: translateY(1px);
}

.btn--quiet {
  background: #f1f3f7;
  color: var(--ink);
  font-weight: 400;
}

.btn--quiet:hover {
  background: #e6e9f0;
}

.btn--danger {
  background: #fbecec;
  color: var(--negative);
  font-weight: 400;
}

.btn--danger:hover {
  background: #f7dede;
}

.error {
  color: var(--negative);
  font-size: var(--step-small);
  min-height: 1.25rem;
}

/* ---------- Shell ---------- */

.frame {
  height: 100svh;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  grid-template-rows: 48px minmax(0, 1fr);
}

.side {
  grid-row: 1 / span 2;
  padding: 18px 12px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 22px;
  min-height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-inline: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 15px;
}

.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 2px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: var(--step-body);
  color: #3d434d;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav__item:hover {
  background: #dfe4ec;
}

.nav__item[aria-current="page"] {
  background: #dfe4ec;
  color: var(--ink);
  font-weight: 500;
}

.nav__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav__count[data-empty="true"] {
  color: #a2a8b3;
}

.side__foot {
  display: grid;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding-inline: 10px;
}

.side__foot a:hover {
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline: 24px 16px;
  font-size: var(--step-small);
  color: var(--muted);
}

.topbar strong {
  color: var(--ink);
  font-weight: 500;
}

.topbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet {
  background: var(--sheet);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  margin: 0 8px 8px 0;
  overflow: auto;
  min-height: 0;
}

.sheet__inner {
  padding: 24px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.pagetitle {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.pagetitle h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.pagetitle p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--step-small);
  max-width: 68ch;
}

.pagetitle__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---------- Figures ---------- */

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

.figure {
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  background: var(--sheet);
  border-radius: 10px;
}

.figure + .figure {
  padding-top: 14px;
}

.figure span {
  font-size: 13px;
  color: var(--muted);
}

.figure strong {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.figure strong[data-alert="true"] {
  color: var(--negative);
}

/* ---------- Panels ---------- */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px 6px;
}

.panel__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel__head span {
  color: var(--muted);
  font-size: 12px;
}

.panel__head a {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
}

.panel__body {
  padding: 6px 16px 16px;
}

/* ---------- Tables ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-body);
}

.table th {
  text-align: left;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 18px 8px 0;
  white-space: nowrap;
}

.table th.num,
.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table td {
  padding: 11px 18px 11px 0;
  border-top: 1px solid var(--rule);
  vertical-align: middle;
}

.table th:last-child,
.table td:last-child {
  padding-right: 0;
}

.table tr:hover td {
  background: #fbfcfd;
}

.table .name {
  font-weight: 500;
}

.table .sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
}

.table .actions button + button {
  margin-left: 6px;
}

.empty-row td {
  color: var(--muted);
  padding: 22px 0;
  font-size: var(--step-small);
}

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #f1f3f7;
  color: #3d434d;
  white-space: nowrap;
}

.status--good {
  background: #e7f2ec;
  color: var(--positive);
}

.status--warn {
  background: #fdf1e6;
  color: #8a4b16;
}

.status--bad {
  background: #fbecec;
  color: var(--negative);
}

/* ---------- Queue cards ---------- */

.queue {
  display: grid;
  gap: 10px;
}

.queue__item {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.queue__item header {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.queue__item h3 {
  margin: 0;
  font-size: var(--step-body);
  font-weight: 500;
}

.queue__item time {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.queue__item p {
  margin: 0;
  color: #3d434d;
  font-size: 13px;
}

.queue__item footer {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.queue__item footer .actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  padding: 8px 10px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  background: #fff;
  font-size: var(--step-small);
  min-width: 220px;
}

.toolbar span {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Phone ---------- */

@media (max-width: 900px) {
  .frame {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 48px minmax(0, 1fr);
    height: auto;
    min-height: 100svh;
  }

  .side {
    display: none;
  }

  .side.is-open {
    display: grid;
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    background: var(--chrome);
    z-index: 20;
  }

  .topbar {
    padding-inline: 12px;
    background: var(--chrome);
  }

  .sheet {
    margin: 0;
    border-radius: 12px 12px 0 0;
  }

  .sheet__inner {
    padding: 16px;
  }

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

  .figure:nth-child(3) {
    padding-top: 14px;
  }

  .figure:nth-child(n + 3) {
    padding-top: 14px;
  }

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

  .table {
    display: block;
    overflow-x: auto;
  }
}

.menu-button {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--edge);
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .menu-button {
    display: inline-flex;
  }
}
