:root {
  --bg: #030712;
  --bg-2: #07111f;
  --glass: rgba(9, 18, 36, 0.72);
  --line: rgba(56, 189, 248, 0.18);
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #f472b6;
  --text: #e2e8f0;
  --muted: #8ba0b8;
  --danger: #fb7185;
  --ok: #34d399;
  --side: 268px;
  --radius: 18px;
  --font: "Outfit", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 8% -10%, rgba(34, 211, 238, .16), transparent 55%),
    radial-gradient(900px 600px at 110% 10%, rgba(167, 139, 250, .18), transparent 50%),
    radial-gradient(700px 500px at 70% 110%, rgba(244, 114, 182, .12), transparent 45%),
    linear-gradient(180deg, #020617, #030712 40%, #07111f);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34,211,238,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
h1,h2,h3 { font-weight: 700; letter-spacing: -.02em; }
h1 { margin: 0; font-size: 1.55rem; }
h2 { margin: 0 0 10px; font-size: 1.15rem; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: stretch;
}

.hero, .card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}

.hero { padding: 36px; position: relative; overflow: hidden; }
.hero h1 { font-size: 2.4rem; line-height: 1.1; }
.hero p { color: var(--muted); max-width: 42ch; }
.pulse {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from 90deg, var(--cyan), var(--violet), var(--pink), var(--cyan));
  filter: blur(18px);
  opacity: .45;
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.logo {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #0ea5e9, #7c3aed);
  font-weight: 800; letter-spacing: .08em;
  box-shadow: 0 0 24px rgba(34,211,238,.4);
  margin-bottom: 16px;
}

.card { padding: 24px; }
.login .card { width: 100%; }

.muted { color: var(--muted); }
.field { margin: 13px 0; }
.field label, label.field { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9fb4cc; margin-bottom: 7px; }
.field input, .field select, .field textarea,
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 8, 20, .7);
  color: var(--text);
  font: inherit;
  outline: none;
}
textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,.15);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, .8);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  transition: .18s ease;
}
.btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
.primary {
  background: linear-gradient(135deg, #0891b2, #7c3aed);
  border-color: transparent;
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(8,145,178,.28);
}
.danger { color: var(--danger); border-color: rgba(251,113,133,.3); }
.small { padding: 6px 9px; font-size: 12px; }

.msg { padding: 11px 12px; border-radius: 12px; margin: 12px 0; font-size: 13px; }
.err { background: rgba(251,113,133,.12); color: #fecdd3; border: 1px solid rgba(251,113,133,.25); }
.ok { background: rgba(52,211,153,.12); color: #bbf7d0; border: 1px solid rgba(52,211,153,.25); }

.app { position: relative; z-index: 1; min-height: 100vh; }
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side);
  padding: 18px 14px;
  background: rgba(3, 8, 20, .82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
  overflow: auto;
  z-index: 6;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; padding: 8px 10px 18px;
}
.brand span { font-family: var(--mono); color: var(--cyan); font-size: 12px; }
.nav-title {
  font-size: 10px; color: #6b829c; font-weight: 800; letter-spacing: .14em;
  padding: 16px 12px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 8px;
  color: #b7c7d9; padding: 9px 12px; border-radius: 11px; margin: 2px 0;
}
.nav a.active, .nav a:hover {
  background: linear-gradient(90deg, rgba(34,211,238,.16), rgba(167,139,250,.08));
  color: white;
  box-shadow: inset 0 0 0 1px rgba(34,211,238,.22);
}

.main { margin-left: var(--side); padding: 24px 28px 48px; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px; gap: 16px;
}
.hud {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.chip {
  font-family: var(--mono); font-size: 12px;
  padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(2,8,20,.55);
  color: #9fdff0;
}
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); display: inline-block; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { font-size: 30px; font-weight: 700; margin-top: 8px; background: linear-gradient(90deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section { margin-top: 15px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .field { margin: 0; }
.full, .field.full { grid-column: 1 / -1; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tablewrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 10px; border-bottom: 1px solid rgba(148,163,184,.12);
  text-align: left; white-space: nowrap; font-size: 13px;
}
.table th { color: #93c5fd; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.empty {
  padding: 30px; text-align: center;
  border: 1px dashed rgba(56,189,248,.28);
  border-radius: 14px; color: var(--muted);
}
.badge {
  font-size: 11px; font-family: var(--mono);
  padding: 4px 8px; border-radius: 999px;
  color: var(--cyan); border: 1px solid rgba(34,211,238,.3);
}
.mobile { display: none; }
.search {
  min-width: 220px;
  padding: 9px 12px;
  border-radius: 999px;
}

.timeline {
  display: grid; gap: 10px;
}
.timeline .row {
  display: grid; grid-template-columns: 92px 1fr;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(148,163,184,.1);
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 850px) {
  .side { transform: translateX(-110%); transition: .2s; }
  .side.open { transform: none; }
  .main { margin-left: 0; padding: 16px; }
  .mobile { display: inline-flex; }
}
@media (max-width: 550px) {
  .grid, .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
}
