:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --text: #e8edf4;
  --muted: #8b9bb4;
  --ok: #22c55e;
  --warn: #eab308;
  --danger: #ef4444;
  --border: #2d3a4f;
  --accent: #2563eb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 20% 0%, #1e3a5f 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, #1a2f1a 0%, transparent 45%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.auth-card .sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.4; }
.auth-card label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0.35rem; }
.auth-card input, .auth-card textarea, .auth-card select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.auth-card button, button.primary {
  width: 100%;
  margin-top: 1.25rem;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}
.auth-card .foot { margin-top: 1.25rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.auth-card .note { margin-top: 1rem; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.error { color: #fca5a5; font-size: 0.9rem; margin-top: 0.75rem; min-height: 1.2em; }

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.topnav .brand { font-weight: 600; font-size: 1.1rem; }
.topnav nav { display: flex; gap: 0.85rem; flex-wrap: wrap; align-items: center; }
.topnav nav a, .topnav button.linkish {
  color: var(--muted);
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.topnav nav a.active { color: var(--text); font-weight: 600; }
.topnav .who { color: var(--muted); font-size: 0.85rem; }

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.5rem;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}
.panel h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ok { background: rgba(34,197,94,0.2); color: var(--ok); }
.badge.warn { background: rgba(234,179,8,0.2); color: var(--warn); }
.badge.muted { background: rgba(139,155,180,0.2); color: var(--muted); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.stat .n { font-size: 1.6rem; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary { background: var(--border); }
.bar-wrap {
  height: 8px;
  background: #0b1016;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.bar-wrap .bar {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #2563eb);
  width: 0%;
}
.muted { color: var(--muted); }
.success { color: var(--ok); }
