/* ============================================================
   Design tokens
   Background: deep navy (#0A0F1C) — not pure black, has depth
   Panels: #111826, raised: #182236
   Accent: #4F6EF7 (indigo, used sparingly) + #22D3EE (cyan, status only)
   Type: Sora (display, headings) + Inter (body/UI) + JetBrains Mono (data/codes)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0A0F1C;
  --bg-raised: #111826;
  --panel: #131B2C;
  --panel-hover: #182236;
  --border: #212B40;
  --border-light: #2A3550;

  --text: #E7ECF5;
  --text-muted: #8A96AD;
  --text-dim: #5B667D;

  --accent: #4F6EF7;
  --accent-dim: #3A52C4;
  --accent-glow: rgba(79, 110, 247, 0.18);

  --cyan: #22D3EE;
  --green: #34D399;
  --amber: #FBBF24;
  --red: #F87171;

  --radius: 10px;
  --radius-sm: 6px;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(79, 110, 247, 0.10), transparent),
    radial-gradient(ellipse 700px 400px at 100% 0%, rgba(34, 211, 238, 0.06), transparent);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
  color: var(--text);
}

h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

p { color: var(--text-muted); margin: 0 0 12px 0; }

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

code, .mono { font-family: var(--font-mono); }

/* ---------- Layout shells ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

.auth-side {
  background: linear-gradient(160deg, #0D1526 0%, #0A0F1C 60%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
}

.auth-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

.sidebar {
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main {
  padding: 32px 40px;
  max-width: 1200px;
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  flex-shrink: 0;
}

.sidebar .brand { padding: 8px 12px 24px 12px; }

/* ---------- Nav ---------- */

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.nav-link:hover { background: var(--panel-hover); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-glow); color: var(--accent); }

.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 16px 12px 6px 12px;
  font-weight: 600;
}

/* ---------- Cards & panels ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card + .card { margin-top: 16px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.stat-value.accent { color: var(--accent); }

/* ---------- Signature: platform status strip ---------- */

.platform-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.dot.up { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); position: relative; }
.dot.down { background: var(--red); box-shadow: 0 0 8px rgba(248, 113, 113, 0.6); }
.dot.pending { background: var(--amber); }

.dot.up::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dot.up::after { animation: none; display: none; }
}

/* ---------- Feature section (landing page) ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 980px;
  margin: 56px auto 0 auto;
}

.feature-cell {
  background: var(--bg-raised);
  padding: 26px 24px;
  text-align: left;
}

.feature-icon {
  width: 34px; height: 34px;
  color: var(--accent);
  margin-bottom: 14px;
}

.feature-cell h3 { font-size: 15px; margin-bottom: 6px; }
.feature-cell p { font-size: 13px; margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* ---------- Forms ---------- */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=url],
.field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.15s;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-hint { font-size: 12px; color: var(--text-dim); margin-top: 5px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.checkbox-row input { margin-top: 3px; accent-color: var(--accent); }
.checkbox-row label { font-size: 13px; color: var(--text); line-height: 1.45; }
.checkbox-row .label-strong { font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: white; width: 100%; }
.btn-primary:hover { background: var(--accent-dim); }

.btn-secondary { background: var(--panel-hover); color: var(--text); border: 1px solid var(--border-light); }
.btn-secondary:hover { border-color: var(--accent); }

.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(248,113,113,0.35); }
.btn-danger:hover { background: rgba(248,113,113,0.08); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Table ---------- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-success { background: rgba(52,211,153,0.12); color: var(--green); }
.badge-failed { background: rgba(248,113,113,0.12); color: var(--red); }
.badge-pending { background: rgba(251,191,36,0.12); color: var(--amber); }
.badge-suspended { background: rgba(248,113,113,0.12); color: var(--red); }

/* ---------- Misc ---------- */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.error-banner {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
}

.divider { height: 1px; background: var(--border); margin: 20px 0; }
