:root {
  --bg: #07060d;
  --panel: #100e18;
  --card: #161322;
  --line: #2a2438;
  --text: #f6f1ff;
  --muted: #9b93b0;
  --accent: #c84bff;
  --accent-2: #5b6cff;
  --gold: #efc56a;
  --green: #3ddc97;
  --red: #ff5d73;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Outfit, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2, .logo {
  font-family: Syne, Outfit, sans-serif;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.logo span { color: var(--gold); }

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 15% -10%, #c84bff33, transparent 60%),
    radial-gradient(700px 380px at 90% 10%, #5b6cff28, transparent 55%),
    radial-gradient(600px 300px at 50% 100%, #efc56a18, transparent 50%);
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 8vw;
}
.top-links { display: flex; gap: 22px; }
.top-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top-links a:hover { color: var(--text); }

.landing main { position: relative; z-index: 1; }
.hero-full {
  padding: 48px 8vw 24px;
  max-width: 1100px;
}
.eyebrow {
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.hero-full h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 800;
}
.lead { color: var(--muted); font-size: 1.15rem; max-width: 520px; }

.hero-card {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #1c1730, #14101f);
  border: 1px solid #3a3154;
  border-radius: 24px;
  padding: 18px 20px;
  width: min(720px, 100%);
  box-shadow: 0 30px 80px #0006;
}
.hero-card strong { display: block; font-size: 1.1rem; }
.hero-card .btn { margin-left: auto; }

.avatar-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.avatar-wrap img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.dot {
  position: absolute; right: 0; bottom: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #6b6578; border: 3px solid #1c1730;
}
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 28px 8vw 64px;
  max-width: 1100px;
}
.features article {
  background: #14101f;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.features h3 { margin: 0 0 8px; color: var(--gold); }
.features p { margin: 0; color: var(--muted); }

footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 20px 8vw 32px;
  color: var(--muted);
  font-size: 0.85rem;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
button.ghost, .ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
button:hover, .btn:hover { filter: brightness(1.08); }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 400px at 50% -10%, #c84bff2e, transparent),
    var(--bg);
}
.login-card { width: min(400px, 100%); }
.login-card .logo { margin: 0 0 8px; display: block; font-size: 1.2rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 0.85rem; }
input, select, textarea {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #c84bff66;
  border-color: var(--accent);
}
.ok { color: var(--green); font-size: 0.9rem; }
.muted { color: var(--muted); }

#login-view[hidden],
#app[hidden] {
  display: none !important;
}
#app:not([hidden]) {
  display: grid;
}
aside {
  background: linear-gradient(180deg, #14101f, #0d0b14);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: #222; }
.brand strong { display: block; font-size: 0.92rem; }
nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
nav button {
  justify-content: flex-start;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
nav button.active {
  background: linear-gradient(90deg, #c84bff33, #5b6cff22);
  color: #fff;
  border: 1px solid #c84bff44;
}
main { padding: 32px 36px; overflow: auto; }
h2 { margin: 0 0 18px; font-size: 2rem; }
h3 { margin: 0 0 12px; }
.row-head, .row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat {
  background: linear-gradient(180deg, #1b1628, #14101f);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat b { display: block; font-size: 1.45rem; margin-top: 6px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.pill {
  display: inline-block;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: #2a2438;
  color: var(--muted);
}
.pill.on { background: #3ddc9722; color: var(--green); }
.pill.gold { background: #efc56a22; color: var(--gold); }
.pill.red { background: #ff5d7322; color: var(--red); }
.form-grid { max-width: 560px; }
.form-wide { max-width: 720px; }
.form-grid label input[type="checkbox"] { width: auto; margin-right: 8px; }
.person { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.person img { width: 24px; height: 24px; border-radius: 50%; }
.secret-box {
  border: 1px dashed #efc56a55;
  background: #efc56a0f;
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
dialog { border: 0; padding: 0; background: transparent; }
dialog::backdrop { background: #07060dcc; }

@media (max-width: 800px) {
  #app { grid-template-columns: 1fr; }
  aside { flex-direction: row; flex-wrap: wrap; }
  nav { flex-direction: row; overflow: auto; }
  main { padding: 20px; }
  .hero-card .btn { margin-left: 0; width: 100%; }
}
