:root {
  --bg: #0f172a;
  --card: #ffffff;
  --muted: #64748b;
  --border: #e2e8f0;
  --text: #0f172a;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #ffedd5;
  --gray-soft: #f8fafc;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  color: var(--text);
}
.container {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 40px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.topbar, .toolbar, .tabbar, .actions, .metric-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.toolbar { justify-content: flex-start; }
h1, h2, h3 { margin: 0 0 10px; }
p { margin: 0; }
.small { color: var(--muted); font-size: 0.92rem; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
label {
  display: block;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 6px;
}
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
textarea { min-height: 100px; resize: vertical; }
button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  color: white;
  background: var(--primary);
  font-weight: 600;
}
button.secondary { background: #475569; }
button.success { background: var(--success); }
button.warning { background: var(--warning); }
button.danger { background: var(--danger); }
button.ghost {
  color: var(--text);
  background: #e2e8f0;
}
button.inline {
  padding: 8px 10px;
  font-size: 0.88rem;
}
button.tab {
  color: var(--text);
  background: #e2e8f0;
}
button.tab.active {
  background: var(--primary);
  color: white;
}
.metric {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.metric .label { color: var(--muted); font-size: 0.9rem; }
.metric .value { font-size: 1.5rem; font-weight: 700; margin-top: 8px; }
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  background: var(--gray-soft);
  color: #334155;
  font-size: 0.9rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge.unverified { background: var(--warning-soft); color: #9a3412; }
.badge.verified { background: var(--success-soft); color: #065f46; }
.badge.rejected { background: var(--danger-soft); color: #991b1b; }
.badge.active { background: var(--success-soft); color: #065f46; }
.badge.inactive { background: #e2e8f0; color: #475569; }
.notice, .error, .success-text {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
}
.notice { background: var(--primary-soft); color: #1d4ed8; }
.error { background: var(--danger-soft); color: #991b1b; }
.success-text { background: var(--success-soft); color: #065f46; }
.actions {
  justify-content: flex-start;
  align-items: stretch;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  width: min(920px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.login-wrap {
  width: min(520px, calc(100% - 24px));
  margin: 60px auto;
}
.section-gap { margin-top: 16px; }
.inline-group { display:flex; gap:10px; flex-wrap:wrap; }
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100%, calc(100% - 16px)); }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 14px; border-radius: 16px; }
  .metric .value { font-size: 1.25rem; }
  button, input, select, textarea { font-size: 16px; }
}
