:root {
  --ink: #07070b;
  --ink-2: #0c0c12;
  --panel: rgba(18, 18, 26, 0.82);
  --panel-solid: #12121a;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: #9a9aa8;
  --faint: #6b6b78;
  --signal: #8b7cff;
  --signal-2: #6d5ce7;
  --pulse: #3ee0c5;
  --warm: #f0c27b;
  --danger: #f87171;
  --ok: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.font-display { font-family: "Syne", sans-serif; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-hover {
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(139,124,255,0.08), rgba(255,255,255,0.02));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, #9b8cff, #7a6af0);
  color: white;
  box-shadow: 0 10px 30px rgba(139, 124, 255, 0.28);
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(139, 124, 255, 0.4); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); }

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.input, select.input, textarea.input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  border-color: rgba(139,124,255,.7);
  box-shadow: 0 0 0 4px rgba(139,124,255,.15);
}
.input-error { border-color: rgba(248,113,113,.7) !important; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .15rem .6rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-success { background: rgba(52,211,153,.12); color: #6ee7b7; }
.badge-info { background: rgba(139,124,255,.14); color: #c4b5fd; }
.badge-warn { background: rgba(240,194,123,.12); color: #f0c27b; }
.badge-danger { background: rgba(248,113,113,.12); color: #fca5a5; }
.badge-muted { background: rgba(255,255,255,.06); color: #a1a1aa; }

.score-ring {
  --p: 70;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: conic-gradient(var(--signal) calc(var(--p) * 1%), rgba(255,255,255,.08) 0);
  display: grid;
  place-items: center;
}
.score-ring span {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: #12121a;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(139,124,255,.1);
  color: white;
}

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
table.data th {
  text-align: left;
  color: var(--faint);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
}
table.data td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tr:hover td { background: rgba(255,255,255,.02); }

.flash {
  border-radius: 16px;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}
.flash-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.2); }
.flash-error { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.25); }
.flash-info { background: rgba(139,124,255,.1); border-color: rgba(139,124,255,.22); }

.choice {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.choice:hover { border-color: rgba(139,124,255,.5); }
.choice:has(input:checked) {
  border-color: var(--signal);
  background: rgba(139,124,255,.1);
}

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 42px;
}
.waveform i {
  display: block;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--pulse), var(--signal));
  animation: eq 1.4s ease-in-out infinite;
}
@keyframes eq {
  0%, 100% { transform: scaleY(.35); }
  50% { transform: scaleY(1); }
}

.progress {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--signal), var(--pulse));
  border-radius: 99px;
}

.nav-blur {
  background: rgba(7,7,11,.7);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--muted);
}

.cover {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2158, #12343a);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1024px) {
  .desktop-only { display: none !important; }
}
