:root {
  --bg-0: #040405;
  --bg-1: #0b0c10;
  --bg-2: #11131a;
  --fg: #f4f6fb;
  --muted: #a8b0bf;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --accent: #6aa3ff;
  --accent-soft: #7ce6d3;
  --danger: #ff5f7d;
  --warn: #ffca67;
  --ok: #41d38f;
  --radius: 18px;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--fg);
  font-family: "Space Grotesk", "Manrope", "Avenir Next", sans-serif;
  background-color: #05070b;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(1400px 900px at 5% 0%, rgba(88, 137, 255, 0.34), transparent 58%),
    radial-gradient(1200px 700px at 105% 100%, rgba(124, 230, 211, 0.26), transparent 62%),
    linear-gradient(170deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 3px 3px;
}

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

.container {
  width: min(1160px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(6, 7, 10, 0.9), rgba(6, 7, 10, 0.62));
  backdrop-filter: blur(14px);
}

.topbar .inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 22px rgba(106, 163, 255, 0.75);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.topbar-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.lang-picker {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.44rem;
  background: rgba(255, 255, 255, 0.03);
}

.lang-picker select {
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-links a {
  padding: 0.44rem 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: 999px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-links a:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.subline {
  color: var(--muted);
  line-height: 1.62;
  margin-top: 0.8rem;
  max-width: 67ch;
}

.hero {
  padding: 6.2rem 0 3.8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.2rem;
}

.glass {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(8, 9, 12, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  padding: 1.45rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.68rem;
  margin-top: 1rem;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.stat .label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.28rem;
}

.stat .value {
  font-size: 1.02rem;
  font-weight: 650;
}

.section {
  padding: 3.1rem 0;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}

.card p,
.small {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.58;
}

.btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  padding: 0.72rem 1.18rem;
  background: linear-gradient(132deg, #4b81ff 2%, #3db6ff 45%, #42d6a3 112%);
  box-shadow: 0 14px 36px rgba(63, 126, 255, 0.36);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(116deg, transparent 28%, rgba(255, 255, 255, 0.36) 50%, transparent 72%);
  transform: translateX(-125%);
  transition: transform 0.42s ease;
}

.btn:hover::after {
  transform: translateX(125%);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(63, 126, 255, 0.44);
}

.btn.ghost {
  color: var(--fg);
  border: 1px solid var(--line-strong);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.02);
}

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

.price-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  padding: 1.3rem;
}

.price-card.featured {
  border-color: rgba(122, 232, 205, 0.45);
  box-shadow: 0 20px 42px rgba(96, 162, 255, 0.19);
}

.price {
  margin: 0.65rem 0;
  font-size: 2rem;
  font-weight: 650;
}

.price small {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.list {
  margin: 0.82rem 0 1.18rem;
  padding-left: 1.1rem;
}

.list li {
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.row > * {
  flex: 1;
}

.auth-wrap,
.dashboard-wrap {
  padding: 2.2rem 0 3.2rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
  align-items: start;
}

.auth-intro {
  padding: 1.2rem 0.4rem;
}

.eyebrow {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
}

.auth-intro h1 {
  margin-top: 0.7rem;
  font-size: clamp(1.45rem, 2.8vw, 2.18rem);
}

.card-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.62rem;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.82rem;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 0.25rem;
}

.mini-card strong {
  font-size: 0.9rem;
}

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

.auth-card {
  padding: 1.2rem;
}

.tab-row {
  margin-bottom: 0.8rem;
}

.form {
  display: grid;
  gap: 0.72rem;
}

label {
  color: var(--muted);
  font-size: 0.84rem;
}

.input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.74rem 0.88rem;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.03);
  font: inherit;
}

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(106, 163, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(106, 163, 255, 0.2);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.kpi .k {
  font-size: 0.74rem;
  color: var(--muted);
}

.kpi .v {
  margin-top: 0.2rem;
  font-size: 1.04rem;
  font-weight: 650;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0.9rem;
}

.auth-gate {
  padding: 1.25rem;
  margin-top: 0.8rem;
}

.tabs {
  align-self: start;
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem;
}

.tab-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0.62rem 0.72rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.tab-btn:hover {
  color: var(--fg);
}

.tab-btn.active {
  color: var(--fg);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.panel {
  display: none;
  padding: 1rem;
}

.panel.active {
  display: block;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.018);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.66rem;
  text-align: left;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.16rem 0.55rem;
  font-size: 0.75rem;
}

.badge.ok {
  color: var(--ok);
}

.badge.warn {
  color: var(--warn);
}

.badge.danger {
  color: var(--danger);
}

.notice {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.68rem 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.86rem;
}

.notice.error {
  border-color: rgba(255, 95, 125, 0.5);
  color: #ffc5d1;
}

.notice.success {
  border-color: rgba(65, 211, 143, 0.48);
  color: #b9ffd8;
}

.chart {
  width: 100%;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.footer {
  color: var(--muted);
  font-size: 0.81rem;
  padding: 2.4rem 0;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (max-width: 1024px) {
  .hero-grid,
  .grid-3,
  .pricing-grid,
  .auth-shell,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

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

  .nav-links {
    display: none;
  }

  .topbar-controls {
    gap: 0;
  }
}
