:root {
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe4ee;
  --paper: #eef5f9;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-2: #e0523f;
  --danger: #b42318;
  --shadow: 0 14px 36px rgba(31, 41, 51, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Urbanist, Avenir Next, Helvetica Neue, Arial, sans-serif;
}
a { color: var(--brand); font-weight: 700; text-decoration: none; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 18px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 18px;
  background: #102a43;
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--brand-2);
  color: #fff;
  font-weight: 800;
}
.brand small { display: block; color: rgba(255,255,255,.7); font-size: 12px; margin-top: 3px; }
.sidebar nav { display: grid; gap: 8px; margin-top: 34px; }
.sidebar nav a {
  color: rgba(255,255,255,.86);
  padding: 11px 12px;
  border-radius: 8px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.09); color: #fff; }

.shell { margin-left: 260px; padding: 30px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.eyebrow { color: var(--brand-2); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
.ghost, .small-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--brand);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stats-grid article, .panel {
  background: var(--panel);
  border: 1px solid rgba(15, 118, 110, .14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.stats-grid article { padding: 18px; }
.stats-grid span, .muted { color: var(--muted); }
.stats-grid strong { display: block; font-size: 32px; margin-top: 8px; }
.panel { padding: 18px; overflow-x: auto; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th, td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6f1;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
}
.status-failed, .status-cancelled { background: #fef3f2; color: var(--danger); }
.status-processing { background: #fff7e6; color: #946200; }
.status-complete { background: #eef6f1; color: var(--brand); }
.form-grid { display: grid; gap: 14px; margin-top: 16px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #344054; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.check-row input { width: auto; }
.primary {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.messages { margin-bottom: 16px; }
.notice {
  padding: 11px 13px;
  border-radius: 8px;
  background: #eef6f1;
  color: var(--brand);
  font-weight: 700;
}
.detail-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}
.detail-list dt { color: var(--muted); font-weight: 800; }
.detail-list dd { margin: 0; }
.inline-filter select { min-width: 170px; }
.order-panel { margin-top: 18px; }
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.small-button.success {
  background: #eef6f1;
  color: var(--brand);
  border-color: #c8e3d2;
}
.small-button.danger {
  background: #fef3f2;
  color: var(--danger);
  border-color: #fecdca;
}
.copy-source {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}
.table-wrap { overflow-x: auto; }
.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #102a43, #eef5f9 58%);
}
.login-panel {
  width: min(460px, 100%);
  background: var(--panel);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(16, 42, 67, .26);
}
.login-brand { color: var(--ink); margin-bottom: 24px; }
.login-brand small { color: var(--muted); }
.login-panel h1 { margin-bottom: 8px; }
.admin-link { display: inline-block; margin-top: 18px; }

@media (max-width: 860px) {
  .sidebar { position: static; width: auto; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { margin-left: 0; padding: 20px; }
  .stats-grid, .two-col { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; gap: 16px; }
}
