:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #17202a;
  --muted: #64748b;
  --line: #dbe3ed;
  --accent: #f59e0b;
  --accent-dark: #9a5b00;
  --good: #14854f;
  --bad: #b42318;
  --warn: #b7791f;
  --info: #1b6ca8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: #15181d;
  color: #ffffff;
  padding: 22px 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 22px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent);
  color: #15181d;
  font-weight: 900;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 19px;
}

.brand p {
  color: #aeb7c2;
  font-size: 12px;
}

nav {
  display: grid;
  gap: 6px;
}

.nav {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d8dee6;
  padding: 12px;
  text-align: left;
}

.nav:hover,
.nav.active {
  background: #232932;
  color: #ffffff;
}

.shell {
  margin-left: 260px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  position: sticky;
  top: 0;
  z-index: 2;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0;
}

.top-actions,
.row-actions,
.checkout-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary,
.secondary,
.danger {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 700;
}

.primary {
  background: var(--accent);
  color: #1c1300;
}

.secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}

.danger {
  background: #fff1f0;
  border-color: #f4b8b2;
  color: var(--bad);
}

.content {
  padding: 24px 28px 44px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.two {
  grid-template-columns: 1.2fr 0.8fr;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 850;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  background: var(--panel-soft);
}

.paid,
.ok,
.delivered {
  background: #e8f7ef;
  color: var(--good);
}

.failed,
.cancelled {
  background: #fff1f0;
  color: var(--bad);
}

.pending,
.requires_action,
.refund_pending {
  background: #fff8e6;
  color: var(--warn);
}

.provider-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.muted {
  color: var(--muted);
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar input,
.toolbar select,
label input,
label select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(520px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.54);
}

.dialog-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.dialog-card header,
.dialog-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 20px;
}

.link-button {
  text-decoration: none;
}

.checkout-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.checkout-card {
  width: min(460px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}

.checkout-card .mark {
  margin: 0 auto 16px;
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .shell {
    margin-left: 0;
  }

  .stats,
  .two {
    grid-template-columns: 1fr;
  }

  .topbar,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
