@font-face {
  font-family: Inter;
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #172033;
  --muted: #607087;
  --line: #e1e7ef;
  --surface: #f5f7fa;
  --primary: #245be0;
  --radius: 12px;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7199fa;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 26px;
  font-weight: 750;
  padding: 0 12px 30px;
}
.logo > span {
  font-size: 17px;
}
.logo small {
  display: block;
  font-weight: 450;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav {
  border: 0;
  background: none;
  text-align: left;
  padding: 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 560;
  min-height: 44px;
}
.nav:hover {
  background: var(--surface);
}
.nav.active {
  background: #eaf0ff;
  color: #234caa;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 17px;
  padding: 24px 12px 0;
}
.sidebar-bottom a {
  font-size: 12px;
  text-decoration: none;
}
.sidebar-bottom small {
  font-size: 10px;
  color: var(--muted);
}
main {
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  background: #fff;
  color: var(--muted);
}
#application {
  max-width: 1440px;
  padding: 30px 32px 60px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}
h1 {
  font-size: 28px;
  letter-spacing: -0.04em;
  margin: 8px 0 0;
  font-weight: 680;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  gap: 8px;
}
.button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.button.danger {
  color: #a62a44;
  border-color: #ecc3cc;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
  background: #fff;
  text-align: left;
  min-width: 0;
}
.metric strong {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.04em;
  display: block;
  margin: 12px 0 8px;
  font-variant-numeric: tabular-nums;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric.alert strong {
  color: #a54116;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
  margin-bottom: 20px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-heading h2 {
  margin: 0;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  min-height: 64px;
}
.row:first-child {
  border-top: 0;
}
.row p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.row-link {
  width: 100%;
  text-align: left;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  color: var(--ink);
  font-size: 14px;
}
.row-link:hover {
  background: var(--surface);
}
.badge {
  font-size: 10px;
  font-weight: 650;
  border-radius: 5px;
  padding: 5px 7px;
  background: #eef2f8;
  color: #45576e;
  white-space: nowrap;
  display: inline-block;
}
.badge.warn {
  background: #fff1df;
  color: #88470c;
}
.badge.good {
  background: #e9f5ef;
  color: #236442;
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar select {
  min-width: 150px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--muted);
  background: #f9fafc;
}
th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.text-link {
  padding: 6px 0;
  border: 0;
  background: none;
  color: #244daf;
  font-weight: 600;
  text-align: left;
  min-height: 44px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.cards > .panel {
  margin: 0;
}
.product {
  border-left: 4px solid var(--brand);
  padding-left: 17px;
}
.swatch {
  height: 6px;
  border-radius: 4px;
  background: var(--brand);
  margin-top: 24px;
  width: 55px;
}
.empty {
  text-align: center;
  padding: 42px 22px;
  color: var(--muted);
}
.gate {
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 80px auto;
  padding: 38px;
}
.gate h1 {
  color: var(--ink);
}
.notice {
  background: #eef3ff;
  border-radius: 8px;
  padding: 12px 16px;
}
.error {
  color: #a62a44;
  line-height: 1.5;
}
.empty p {
  margin: 8px 0;
}
.icon-button {
  font-size: 25px;
  border: 0;
  background: var(--surface);
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  max-width: 780px;
  width: calc(100% - 28px);
  max-height: 90vh;
  box-shadow: 0 24px 90px #17203333;
}
dialog::backdrop {
  background: #17203366;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.dialog-header h2 {
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #bfcbdc;
  border-radius: 8px;
  background: #fff;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 84px;
}
.choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.choices label {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border-radius: 7px;
  padding: 9px;
}
.choices input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 18px;
}
.history {
  border-left: 2px solid var(--line);
  padding-left: 18px;
  margin: 18px 0;
}
.history p {
  margin: 5px 0 18px;
}
.history small {
  font-size: 10px;
}
.proposal-item {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}
.proposal-item label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.proposal-item input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 32px;
}
.status-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.amount {
  font-variant-numeric: tabular-nums;
}
.capture-page {
  max-width: 850px;
  margin: 40px auto;
  padding: 0 20px;
}
.capture-page .logo {
  padding-left: 0;
}
.capture-page h1 {
  font-size: 36px;
  max-width: 650px;
}
.capture-page > p {
  max-width: 650px;
  font-size: 16px;
}
.capture-page .panel {
  margin-top: 28px;
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.6;
  font-weight: 400;
}
.check-row input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
}
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .workspace {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  #application {
    padding: 24px;
  }
  .topbar {
    padding: 18px 24px;
  }
}
@media (max-width: 720px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px 16px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .logo {
    padding: 0 0 16px;
    font-size: 23px;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
  }
  .nav {
    white-space: nowrap;
    padding: 12px;
  }
  .sidebar-bottom {
    display: none;
  }
  .topbar {
    padding: 14px 18px;
    font-size: 10px;
  }
  #application {
    padding: 24px 16px 40px;
  }
  .page-heading {
    margin-bottom: 20px;
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 27px;
  }
  .metric span {
    font-size: 11px;
  }
  .cards,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .panel {
    padding: 18px;
  }
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 10px 16px;
  }
  td {
    border: 0;
    padding: 6px 0;
  }
  td[data-label]:before {
    content: attr(data-label) ": ";
    font-size: 11px;
    color: var(--muted);
  }
  .gate {
    margin: 35px 16px;
  }
  .toolbar input {
    min-width: 100%;
    margin-top: 0;
  }
  .toolbar select {
    flex: 1;
    min-width: 130px;
  }
  .toolbar .button {
    flex: 1;
  }
  dialog {
    padding: 20px;
  }
  .capture-page {
    margin-top: 24px;
  }
  .capture-page h1 {
    font-size: 29px;
  }
}
