*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #07111f;
  --bg-soft: #0d1728;
  --surface: rgba(14, 25, 44, 0.82);
  --surface-strong: rgba(16, 30, 52, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --stroke: rgba(148, 163, 184, 0.18);
  --stroke-strong: rgba(148, 163, 184, 0.28);
  --text: #edf2ff;
  --muted: #9fb2d8;
  --accent: #60a5fa;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --success: #34d399;
  --warning: #f59e0b;
  --danger: #f87171;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: min(1180px, calc(100vw - 32px));
}

body.light {
  --bg: #f4f7ff;
  --bg-soft: #e8eefc;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-soft: rgba(15, 23, 42, 0.05);
  --stroke: rgba(15, 23, 42, 0.09);
  --stroke-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --muted: #4f6184;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-3: #0891b2;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.18rem 0.42rem;
}

body.light code {
  background: rgba(15, 23, 42, 0.08);
}

.site-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.55;
}

.blob-1 {
  width: 420px;
  height: 420px;
  top: -80px;
  left: -80px;
  background: rgba(96, 165, 250, 0.32);
}

.blob-2 {
  width: 360px;
  height: 360px;
  right: -60px;
  top: 180px;
  background: rgba(139, 92, 246, 0.24);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.page-shell {
  padding-top: 102px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  transition: 0.25s ease;
}

.topbar.is-scrolled {
  backdrop-filter: blur(18px);
  background: rgba(8, 18, 34, 0.76);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.light .topbar.is-scrolled {
  background: rgba(244, 247, 255, 0.86);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 0 7px rgba(96, 165, 250, 0.12);
}

.brand-text {
  font-size: 1.08rem;
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--stroke);
}

.user-chip-role {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.18);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.theme-toggle,
.menu-btn {
  border: 1px solid var(--stroke);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1rem;
}

.menu-btn {
  width: 48px;
  height: 48px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 16px;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  padding: 36px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.timeline-item,
.cta-box,
.flash,
.auth-wrap,
.stat-card,
.message-card {
  backdrop-filter: blur(22px);
}

.hero-copy {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(17, 28, 47, 0.92), rgba(13, 22, 38, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

body.light .hero-copy {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.auth-copy h1,
.section-head h2,
.section-head h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.1rem, 5vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 12px;
  font-size: 1.7rem;
}

.hero-text,
.section-head p,
.auth-copy p,
.card p,
.timeline-item p,
.cta-box p,
.footer-text,
.form-note,
.info-row span,
.table-sub,
.message-text,
.contact-side p {
  color: var(--muted);
  line-height: 1.72;
}

.hero-actions,
.cta-actions,
.auth-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.mini-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.mini-card span {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-panel {
  display: flex;
}

.spotlight-card {
  width: 100%;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(11, 20, 35, 0.9), rgba(13, 24, 42, 0.82));
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: var(--shadow);
}

body.light .spotlight-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 255, 0.92));
}

.spotlight-badge {
  display: inline-flex;
  padding: 0.46rem 0.72rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  font-weight: 700;
  margin-bottom: 16px;
}

body.light .spotlight-badge {
  color: var(--accent-2);
}

.feature-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.feature-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 800;
}

.section {
  padding: 56px 0;
}

.section-head {
  margin-bottom: 24px;
  max-width: 760px;
}

.section-head-left {
  margin-bottom: 28px;
}

.cards-grid {
  display: grid;
  gap: 18px;
}

.cards-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 16px;
}

.card h3,
.card h2,
.timeline-item h3,
.auth-card h2,
.contact-side h2,
.cta-box h2,
.panel-head h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.card-highlight {
  background: linear-gradient(180deg, rgba(18, 32, 56, 0.86), rgba(12, 22, 37, 0.72));
}

body.light .card-highlight {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.86));
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.timeline-step {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(139, 92, 246, 0.18));
  color: var(--text);
  font-weight: 800;
}

.section-cta {
  padding-top: 18px;
}

.cta-box {
  padding: 30px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(11, 25, 46, 0.96), rgba(32, 18, 57, 0.82));
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

body.light .cta-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 255, 0.92));
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: start;
}

.contact-side,
.form-card {
  height: 100%;
}

.contact-side {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.contact-points {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.contact-point {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.contact-point strong,
.stat-value,
.info-row strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--stroke-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 0.96rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

body.light input,
body.light textarea {
  background: rgba(15, 23, 42, 0.035);
}

input:focus,
textarea:focus {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--stroke);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--stroke);
}

.btn-warning {
  color: #1f2937;
  background: rgba(245, 158, 11, 0.9);
}

.btn-danger {
  color: white;
  background: rgba(239, 68, 68, 0.88);
}

.btn-sm {
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
}

.btn-xs {
  padding: 0.5rem 0.74rem;
  font-size: 0.8rem;
  border-radius: 14px;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.flash-success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
}

.flash-error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.25);
}

.flash-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.flash-close {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.flash.hide {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.2s ease;
}

.error-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.auth-section {
  padding-top: 26px;
}

.auth-wrap {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: stretch;
}

.auth-copy {
  padding: 30px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 28px;
}

.stack-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.stack-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.form-note {
  margin: 0;
}

.form-note a {
  color: var(--accent);
  font-weight: 700;
}

.demo-credentials {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(96, 165, 250, 0.32);
  background: rgba(96, 165, 250, 0.08);
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.dashboard-section,
.admin-section {
  padding-top: 26px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  min-height: 170px;
}

.stat-label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.stat-value {
  font-size: 1.4rem;
}

.dashboard-panels,
.admin-panels {
  margin-top: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.info-list {
  display: grid;
  gap: 14px;
}

.info-row {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}

.table-card {
  padding: 22px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--stroke);
  vertical-align: top;
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-sub {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: lowercase;
}

.pill-admin {
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
}

.pill-user {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
}

.pill-success {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.pill-muted {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.pill-accent {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
}

.message-list {
  display: grid;
  gap: 14px;
}

.message-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.message-card-head,
.message-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-text {
  margin: 14px 0;
}

.empty-state,
.empty-cell {
  color: var(--muted);
  text-align: center;
  padding: 18px 0;
}

.footer {
  margin-top: 56px;
  border-top: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.02);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 20px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover,
.footer-bottom a:hover {
  color: var(--text);
}

.footer-bottom {
  padding: 0 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hero-grid,
  .auth-wrap,
  .contact-layout,
  .cards-grid-4,
  .cards-grid-3,
  .dashboard-grid,
  .cards-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel,
  .contact-side,
  .form-card {
    grid-column: auto;
  }

  .dashboard-grid.admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .page-shell {
    padding-top: 88px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav-shell {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    width: var(--container);
    margin-inline: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: var(--surface-strong);
    border: 1px solid var(--stroke);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .nav-shell.open {
    display: flex;
  }

  .nav-links,
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions .btn,
  .nav-actions .theme-toggle,
  .user-chip {
    width: 100%;
    justify-content: center;
  }

  .hero-grid,
  .auth-wrap,
  .contact-layout,
  .cards-grid-2,
  .cards-grid-3,
  .cards-grid-4,
  .dashboard-grid,
  .dashboard-grid.admin-stats {
    grid-template-columns: 1fr;
  }

  .hero-points,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .cta-box,
  .panel-head,
  .message-card-head,
  .message-card-foot,
  .footer-grid,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy,
  .spotlight-card,
  .auth-copy,
  .auth-card,
  .card,
  .contact-side,
  .cta-box {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100vw - 20px, 1180px);
  }

  .hero-copy h1,
  .auth-copy h1,
  .section-head h2,
  .section-head h1 {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .cta-actions,
  .auth-actions {
    flex-direction: column;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-step {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
