:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --surface: #1a1d24;
  --surface-2: #242830;
  --text: #e8e9ec;
  --muted: #9aa0ab;
  --accent: #32cd8a;
  --accent-dark: #279f6c;
  --danger: #e5484d;
  --border: #2d313a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.topbar h1 { font-size: 18px; margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

h1, h2, h3 { font-weight: 600; }

label { display: block; margin: 16px 0 6px; font-size: 14px; color: var(--muted); }

input, textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

textarea { font-family: monospace; min-height: 70px; }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #06120b;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

button:hover, .btn:hover { background: var(--accent-dark); text-decoration: none; }

.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-approved { background: rgba(50,205,138,0.15); color: var(--accent); }
.badge-pending { background: rgba(250,204,21,0.15); color: #facc15; }
.badge-other { background: rgba(229,72,77,0.15); color: var(--danger); }

.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qr-box { text-align: center; }
.qr-box img { width: 260px; height: 260px; border-radius: 12px; background: white; padding: 10px; }
.copy-code {
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  font-size: 12px;
  margin-top: 10px;
}
.status-line { text-align: center; font-size: 16px; margin-top: 16px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
