:root {
  --ink: #0b1f2a;
  --ink-2: #123040;
  --foam: #e8f2ef;
  --mist: #c5d9d2;
  --accent: #c8f542;
  --accent-2: #7dd3c0;
  --warn: #f0a06a;
  --danger: #e25c5c;
  --line: rgba(232, 242, 239, 0.12);
  --card: rgba(18, 48, 64, 0.72);
  --glow: rgba(200, 245, 66, 0.18);
  --font-brand: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--foam);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(125, 211, 192, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(200, 245, 66, 0.12), transparent 50%),
    linear-gradient(160deg, #07151d 0%, var(--ink) 45%, #0e2a36 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  z-index: 0;
}

#app { position: relative; z-index: 1; min-height: 100vh; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(7, 21, 29, 0.55);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.brand span { color: var(--accent); }

.nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nav a, .btn, button.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foam);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.nav a:hover, .btn:hover { border-color: var(--accent-2); background: rgba(125, 211, 192, 0.08); }
.nav a.active { background: var(--accent); color: var(--ink); border-color: var(--accent); font-weight: 600; }
.btn-primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  font-weight: 700;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--glow); }

.shell { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 3rem; }

.hero-login {
  min-height: calc(100vh - 4rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1rem;
}
.hero-login .brand-hero {
  font-family: var(--font-brand);
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 0.75rem;
  animation: rise 0.7s ease both;
}
.hero-login .brand-hero em {
  font-style: normal;
  color: var(--accent);
}
.hero-login p {
  max-width: 28rem;
  margin: 0 auto 1.75rem;
  color: var(--mist);
  animation: rise 0.7s ease 0.1s both;
}
.login-box {
  width: min(360px, 100%);
  text-align: left;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card);
  backdrop-filter: blur(12px);
  animation: rise 0.7s ease 0.18s both;
}
label { display: block; font-size: 0.8rem; color: var(--mist); margin: 0.65rem 0 0.25rem; }
input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: rgba(7, 21, 29, 0.65);
  color: var(--foam);
  font: inherit;
}
.login-box .btn-primary { width: 100%; margin-top: 1rem; }
.hint { font-size: 0.75rem; color: var(--mist); margin-top: 0.75rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-head h1 {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
  letter-spacing: -0.03em;
}
.section-head p { margin: 0.35rem 0 0; color: var(--mist); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--card);
}
.stat strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}
.stat span { color: var(--mist); font-size: 0.8rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.tile {
  display: block;
  padding: 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.tile h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-brand);
  font-size: 1.15rem;
}
.tile p { margin: 0; color: var(--mist); font-size: 0.85rem; }
.badge {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(200, 245, 66, 0.15);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card);
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-brand);
  font-size: 1.2rem;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th, .table td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--line);
}
.table th { color: var(--mist); font-weight: 500; }

.voice-widget {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(200, 245, 66, 0.35);
  background: rgba(200, 245, 66, 0.05);
}
.voice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.voice-status { font-size: 0.85rem; color: var(--mist); margin-top: 0.65rem; min-height: 1.2em; }
.pulse { animation: pulse 1.2s ease infinite; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(200, 245, 66, 0); }
}

.err { color: var(--danger); font-size: 0.85rem; margin-top: 0.5rem; }
.ok { color: var(--accent-2); }

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .section-head { flex-direction: column; align-items: start; }
}
