:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --color-bg: #0a0a0a;
  --color-surface: #131b2e;
  --color-surface-high: #1a2340;
  --color-surface-card: #141414;
  --color-border: #222;
  --color-border-muted: rgba(255, 255, 255, 0.08);

  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
}

* { box-sizing: border-box; }

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

.page-title { font-size: 28px; font-weight: 700; color: #fff; line-height: 1.2; }
.section-title { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 0.75rem; }
.text-muted { color: var(--color-text-muted); }
.text-dim { color: var(--color-text-dim); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: 8px;
  padding: 1.5rem;
}
.card-danger { border-color: rgba(239, 68, 68, 0.3); }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 12px; font-weight: 500; }
.badge-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger  { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-muted   { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.badge-primary { background: rgba(37, 99, 235, 0.15); color: #60a5fa; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.625rem 1.25rem; border-radius: 8px; font-weight: 500;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-size: 14px; transition: all 0.15s ease-out;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); }
.btn-danger { background: transparent; border-color: rgba(239, 68, 68, 0.4); color: #f87171; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--color-text); margin-bottom: 0.5rem; }
.form-input, .form-select, .form-textarea {
  display: block; width: 100%; padding: 0.625rem 0.875rem;
  background: #0a0f1f; color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.form-helper { font-size: 12px; color: var(--color-text-muted); margin-top: 0.375rem; }

.flash-container { position: fixed; top: 1rem; right: 1rem; z-index: 1000; }
.flash { padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-radius: 8px; max-width: 400px; font-size: 14px; }
.flash-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.flash-error { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 0.75rem 1rem; font-size: 11px;
  font-weight: 500; color: var(--color-text-dim); text-transform: uppercase;
  letter-spacing: 0.05em; border-bottom: 1px solid var(--color-border-muted);
}
.data-table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--color-border-muted); }
.data-table tr:hover { background: rgba(255, 255, 255, 0.02); }

code {
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  background: rgba(37, 99, 235, 0.1); color: #60a5fa;
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
}

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

.divider {
  margin: 1.5rem 0;
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  text-align: center;
  position: relative;
}
.divider::before, .divider::after {
  content: "";
  display: inline-block;
  width: 35%;
  height: 1px;
  background: #333;
  vertical-align: middle;
  margin: 0 0.5rem;
}
.login-links { margin-top: 1.5rem; font-size: 13px; text-align: center; }

.warning {
  background: #4d3a1a;
  color: #f0c060;
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  margin: 0.5rem 0;
  font-size: 13px;
}
