@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #0a0c10;
  --bg-card:     #111318;
  --bg-elevated: #181b22;
  --border:      #1e222c;
  --border-hover:#2a3040;
  --accent:      #00e5a0;
  --accent-dim:  rgba(0,229,160,0.12);
  --accent-glow: rgba(0,229,160,0.25);
  --danger:      #ff4d6d;
  --danger-dim:  rgba(255,77,109,0.12);
  --warning:     #ffb547;
  --warning-dim: rgba(255,181,71,0.12);
  --text-1:      #f0f2f7;
  --text-2:      #8b92a5;
  --text-3:      #4a5168;
  --font-display:'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(0,229,160,0.08);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ── Grid noise texture ─────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,160,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Auth Layout ────────────────────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}

.auth-brand {
  background: linear-gradient(135deg, #0d1117 0%, #0a1628 50%, #0d1a0f 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,229,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,100,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #000;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.brand-name span { color: var(--accent); }

.brand-content { position: relative; z-index: 1; }

.brand-headline {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 20px;
}

.brand-headline em {
  color: var(--accent);
  font-style: normal;
}

.brand-desc {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 360px;
}

.brand-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}

.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-2);
  margin-top: 4px;
}

.brand-footer {
  font-size: 0.8125rem;
  color: var(--text-3);
  position: relative; z-index: 1;
}

/* Auth Form Panel */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  z-index: 1;
}

.auth-box {
  width: 100%;
  max-width: 420px;
}

.auth-box h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 8px;
}

.auth-box p.subtitle {
  color: var(--text-2);
  font-size: 0.9375rem;
  margin-bottom: 32px;
}

/* ── Form Elements ──────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  padding: 12px 16px;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control::placeholder { color: var(--text-3); }

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-dim);
}

.invalid-feedback {
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

.form-control.is-invalid + .invalid-feedback { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  width: 100%;
  font-weight: 600;
}

.btn-primary:hover {
  background: #00ffb3;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  background: var(--bg-elevated);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(255,77,109,0.2);
}

.btn-danger:hover {
  background: rgba(255,77,109,0.2);
}

.btn-sm { padding: 8px 14px; font-size: 0.8125rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ── Dashboard Layout ───────────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-logo .brand-mark { width: 32px; height: 32px; font-size: 0.9rem; }

.sidebar-logo .brand-name { font-size: 1.1rem; }

.nav-section {
  padding: 0 12px;
  margin-bottom: 24px;
}

.nav-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 0 12px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-1);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item .nav-icon {
  width: 18px; height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px 0;
  border-top: 1px solid var(--border);
}

.merchant-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.merchant-avatar {
  width: 34px; height: 34px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
  flex-shrink: 0;
}

.merchant-info { flex: 1; overflow: hidden; }

.merchant-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merchant-status {
  font-size: 0.6875rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.merchant-status::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* Main content */
.main-content { overflow-y: auto; }

.topbar {
  position: sticky;
  top: 0;
  background: rgba(10,12,16,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content-area { padding: 32px; }

/* ── Stats Grid ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-tile::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tile-accent, var(--accent)), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.stat-tile:hover { border-color: var(--border-hover); }
.stat-tile:hover::after { opacity: 1; }

.stat-tile.accent   { --tile-accent: var(--accent); }
.stat-tile.warning  { --tile-accent: var(--warning); }
.stat-tile.danger   { --tile-accent: var(--danger); }
.stat-tile.blue     { --tile-accent: #4d90fe; }

.tile-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.tile-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.tile-change {
  font-size: 0.8125rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.tile-change.up   { color: var(--accent); }
.tile-change.down { color: var(--danger); }

/* ── Card ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-2);
  margin-top: 2px;
}

.card-body { padding: 24px; }

/* ── Table ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-elevated); }

td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--text-1);
  vertical-align: middle;
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-2);
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-success  { background: rgba(0,229,160,0.12); color: var(--accent); }
.badge-pending  { background: var(--warning-dim);   color: var(--warning); }
.badge-failed   { background: var(--danger-dim);    color: var(--danger); }
.badge-active   { background: rgba(0,229,160,0.12); color: var(--accent); }
.badge-inactive { background: rgba(255,255,255,0.06); color: var(--text-3); }

/* ── API Key Box ────────────────────────────────────────────────────────── */
.api-key-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-key-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-1);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-value.masked { color: var(--text-3); letter-spacing: 0.1em; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.alert-success { background: rgba(0,229,160,0.08); border: 1px solid rgba(0,229,160,0.2); color: var(--accent); }
.alert-error   { background: var(--danger-dim); border: 1px solid rgba(255,77,109,0.2); color: var(--danger); }
.alert-warning { background: var(--warning-dim); border: 1px solid rgba(255,181,71,0.2); color: var(--warning); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-1);
}

.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 12px; justify-content: flex-end; }

.modal-close {
  background: none; border: none;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover { background: var(--bg-elevated); color: var(--text-1); }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.pagination-info { font-size: 0.8125rem; color: var(--text-2); }
.pagination-controls { display: flex; gap: 6px; }

.page-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-2);
  font-size: 0.8125rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}

.page-btn:hover { border-color: var(--border-hover); color: var(--text-1); }
.page-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.page-btn:disabled { opacity: 0.3; pointer-events: none; }

/* ── Profile Section ────────────────────────────────────────────────────── */
.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px; height: 72px;
  background: var(--accent-dim);
  border: 2px solid rgba(0,229,160,0.2);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 4px;
}

.profile-email { font-size: 0.875rem; color: var(--text-2); }

.profile-meta {
  display: flex; gap: 20px;
  margin-top: 12px;
}

.meta-item { font-size: 0.8125rem; color: var(--text-2); }
.meta-item strong { color: var(--text-1); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ── Divider ────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-3);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

/* ── Loading spinner ────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-primary .spinner { border-color: rgba(0,0,0,0.2); border-top-color: #000; }

@keyframes spin { to { transform: rotate(360deg); } }

.btn.loading .spinner { display: block; }
.btn.loading .btn-text { opacity: 0.7; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-3);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}

.empty-desc { font-size: 0.875rem; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  min-width: 280px;
  max-width: 380px;
}

.toast.success { border-color: rgba(0,229,160,0.3); }
.toast.error   { border-color: rgba(255,77,109,0.3); }

.toast-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast.success .toast-dot { background: var(--accent); }
.toast.error   .toast-dot { background: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col    { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand  { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Additional dashboard styles ─────────────────────────────────────────── */

/* Stat tile colour variants */
.stat-tile.blue { --tile-accent: #4d90fe; }
.stat-tile.blue .tile-value { color: #4d90fe; }

/* Balance breakdown (multi-currency) */
.balance-breakdown { display: none; margin-top: 12px; }
.balance-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}
.currency-code  { color: var(--text-2); font-family: var(--font-mono); }
.currency-amount{ color: var(--text-1); font-weight: 500; }

/* Code block copy animation */
.code-block { position: relative; }

/* Responsive sidebar toggle (mobile) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  padding: 8px;
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

/* CREATED → neutral onboarding state */
.badge-created {
  background: rgba(148, 163, 184, 0.12);   /* slate-400 soft */
  color: #475569;                         /* slate-600 */
  border-color: rgba(148, 163, 184, 0.25);
}

/* INITIATED → info / processing start */
.badge-initiated {
  background: rgba(59, 130, 246, 0.10);   /* blue-500 soft */
  color: #2563eb;                         /* blue-600 */
  border-color: rgba(59, 130, 246, 0.25);
}

/* PENDING → warning but not failure */
.badge-pending {
  background: rgba(245, 158, 11, 0.12);  /* amber-500 soft */
  color: #d97706;                         /* amber-600 */
  border-color: rgba(245, 158, 11, 0.25);
}

/* SUCCESS → positive outcome */
.badge-success {
  background: rgba(34, 197, 94, 0.12);    /* green-500 soft */
  color: #16a34a;                         /* green-600 */
  border-color: rgba(34, 197, 94, 0.25);
}

/* FAILED → error state */
.badge-failed {
  background: rgba(239, 68, 68, 0.12);    /* red-500 soft */
  color: #dc2626;                         /* red-600 */
  border-color: rgba(239, 68, 68, 0.25);
}

@media (max-width: 768px) {
  .sidebar-toggle { display: flex; align-items: center; }
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0; bottom: 0;
    z-index: 50;
    transition: left 0.25s ease;
    width: 240px;
  }
  .sidebar.open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content-area { padding: 20px 16px; }
}

/* Topbar mobile hamburger */
.topbar { gap: 12px; }

/* Profile section responsive */
@media (max-width: 640px) {
  .profile-header { flex-direction: column; text-align: center; }
  .profile-header > div:last-child { margin-left: 0; }
  .profile-meta { justify-content: center; flex-wrap: wrap; }
}