* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
}
body {
  margin: 0;
  background: #0b0f17;
  color: #e2e8f0;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}
a {
  color: #818cf8;
}
.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.card {
  background: #0f1521;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
h1 {
  font-size: 18px;
  margin: 0;
}
h2 {
  font-size: 15px;
  margin: 0 0 12px;
  color: #cbd5e1;
}
.muted {
  color: #94a3b8;
  font-size: 12px;
}
label {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin: 12px 0 5px;
}
input,
select {
  width: 100%;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  color: #f1f5f9;
  padding: 9px 11px;
  font-size: 14px;
  outline: none;
}
input:focus,
select:focus {
  border-color: rgba(129, 140, 248, 0.6);
}
button {
  cursor: pointer;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 14px;
  background: #4f46e5;
  color: #fff;
  transition: background 0.15s;
}
button:hover {
  background: #6366f1;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-weight: 500;
}
button.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}
button.danger {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  font-weight: 500;
}
button.danger:hover {
  background: rgba(244, 63, 94, 0.12);
}
button.sm {
  padding: 5px 9px;
  font-size: 12px;
}
.full {
  width: 100%;
  margin-top: 18px;
}
.err {
  color: #fb7185;
  font-size: 13px;
  margin-top: 12px;
  min-height: 16px;
}
.ok {
  color: #34d399;
}
.qr {
  display: block;
  margin: 14px auto;
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 8px;
  color: #cbd5e1;
}

/* Dashboard */
.shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.tab:hover {
  background: transparent;
  color: #e2e8f0;
}
.tab.active {
  color: #fff;
  border-bottom-color: #6366f1;
}
.panel {
  background: #0f1521;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
}
th {
  color: #94a3b8;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.green {
  background: #34d399;
}
.gray {
  background: #475569;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.spacer {
  flex: 1;
}
