:root {
  --bg: #08111f;
  --bg-soft: #0e1a2d;
  --panel: rgba(8, 17, 31, 0.72);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #ecf4ff;
  --muted: #a5b4c7;
  --accent: #67e8f9;
  --accent-strong: #14b8a6;
  --accent-warm: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.24), transparent 30%),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.18), transparent 28%),
    linear-gradient(160deg, #050b15 0%, #091423 45%, #10253b 100%);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #bff7ff; }

.page-shell { position: relative; min-height: 100vh; overflow: hidden; }
.ambient {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.3;
  pointer-events: none;
}
.ambient-left { left: -8rem; top: 6rem; background: rgba(20, 184, 166, 0.35); }
.ambient-right { right: -10rem; top: 10rem; background: rgba(103, 232, 249, 0.28); }

.glass-nav,
.glass-panel,
.stat-card,
.history-item,
.empty-state {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.glass-nav { margin: 1rem auto 0; border-radius: 1.5rem; }
.glass-panel { border-radius: 1.5rem; }
.panel-pad { padding: 1.5rem; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #03111a;
}
.nav-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}
.auth-copy,
.auth-card {
  padding: 2rem;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.auth-copy h1,
.dashboard-hero h1 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.auth-copy h1 { font-size: clamp(2.25rem, 4vw, 4.25rem); }
.dashboard-hero h1 { font-size: clamp(2rem, 3vw, 3.35rem); max-width: 20ch; }
.lead-copy { color: var(--muted); font-size: 1.08rem; max-width: 56ch; }
.feature-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.feature-list div,
.history-main span,
.history-main small,
.history-meta span,
.muted-copy { color: var(--muted); }
.feature-list i { color: var(--accent); margin-right: 0.55rem; }
.auth-card h2,
.section-title { font-weight: 700; letter-spacing: -0.03em; }
.auth-switch { color: var(--muted); }
.form-label { color: var(--text); font-weight: 600; }
.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(103, 232, 249, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(103, 232, 249, 0.12);
  color: var(--text);
}
.form-error { color: #fca5a5; font-size: 0.875rem; margin-top: 0.35rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border: none;
  color: #03111a;
  font-weight: 700;
}
.btn-primary:hover { background: linear-gradient(135deg, #10a49a, #8df0fd); color: #03111a; }
.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.18);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  padding: 2rem;
  align-items: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.stat-card {
  padding: 1rem;
  border-radius: 1rem;
}
.stat-card span,
.history-count { color: var(--muted); font-size: 0.88rem; }
.stat-card strong { display: block; font-size: 1.5rem; margin-top: 0.4rem; }
.grid-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
}
.history-panel { min-height: 100%; }
.history-list { display: grid; gap: 0.9rem; }
.history-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
}
.history-main { display: grid; gap: 0.2rem; }
.history-meta { display: grid; justify-items: end; gap: 0.45rem; min-width: 8rem; }
.empty-state { padding: 1.5rem; text-align: center; border-radius: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.alert { border-radius: 1rem; }
.flash-stack { position: relative; z-index: 2; }

@media (max-width: 991px) {
  .auth-layout,
  .dashboard-hero,
  .grid-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .auth-copy,
  .auth-card,
  .dashboard-hero,
  .panel-pad { padding: 1.15rem; }
  .history-item { flex-direction: column; }
  .history-meta { justify-items: start; }
}
