@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0d0d12;
  --surface: #14141b;
  --surface-hover: #1c1c24;
  --ink: #ffffff;
  --muted: #8b8b9e;
  --line: #262631;
  --accent: #a4a9f4; /* Лавандовый цвет как на скринах */
  --accent-hover: #8f94df;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

body.light-theme {
  color-scheme: light;
  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-hover: #ebebef;
  --ink: #0d0d12;
  --muted: #646473;
  --line: #d2d2db;
  --accent: #5c62d6;
  --accent-hover: #4a4fb0;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

body.light-theme .site-header {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Фоновая сетка с затуханием */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 100vh;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 60%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, black, transparent 60%);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 24px 6vw;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Header & Nav --- */
.site-header {
  display: flex;
  align-items: center;
  padding: 8px 24px;
  background: rgba(20, 20, 27, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 20px;
  z-index: 1000;
  width: max-content;
  max-width: calc(100% - 48px);
  margin: 0 auto;
  gap: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  align-items: center;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  color: var(--ink);
  opacity: 1;
  transform: translateY(-0.5px);
}

.nav-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  fill: none;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #101014;
}

.btn.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  background: var(--surface);
  border-color: #383846;
}

.btn.active-tab {
  background: var(--accent);
  color: #101014;
  border: none;
}

/* --- Hero Section --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 0;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(164, 169, 244, 0.1);
  border: 1px solid rgba(164, 169, 244, 0.2);
  color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  max-width: 800px;
}

.hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

/* --- Auth Form --- */
.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.auth-panel {
  text-align: center;
  margin-bottom: 24px;
}

.auth-panel h1 {
  font-size: 28px;
  font-weight: 600;
}

.auth-form {
  background: var(--surface);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--line);
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 20px;
}

.input-group {
  display: grid;
  gap: 8px;
}

.input-group label {
  font-size: 13px;
  color: var(--muted);
}

.input-group input {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}

.input-group input:focus {
  border-color: var(--accent);
}

.auth-form .btn.primary {
  padding: 14px;
  font-size: 15px;
}

/* --- Bento Grid (LK Layout) --- */
.dashboard {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
  align-items: start;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 24px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  background: var(--line);
  border-radius: 50%;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h3 {
  font-size: 16px;
  font-weight: 600;
}

.profile-info h3 span {
  color: var(--accent);
}

.profile-info p {
  font-size: 13px;
  color: var(--muted);
}

.bento-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.bento-nav .btn {
  flex: 1;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.bento-item {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-item .label {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bento-item .value {
  font-size: 15px;
  font-weight: 500;
}

.bento-item.full-width {
  grid-column: 1 / -1;
}

/* --- Toasts --- */
.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  z-index: 999;
}

.toast {
  min-width: 260px;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid #ef4444; }

@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .site-header {
    flex-direction: column;
    gap: 16px;
  }
}
/* --- Анимации --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0; /* Скрыто по умолчанию до срабатывания скрипта */
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Задержки для красивого появления по очереди */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* --- Секция Статистики --- */
.statistics {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 0;
  margin-top: 40px;
}

.stats-bg-number {
  position: absolute;
  left: -4%;
  top: 10%;
  font-size: 380px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.02);
  line-height: 0.8;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

.stats-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 12px;
}

.stats-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.stats-header p {
  color: var(--muted);
  font-size: 15px;
  max-width: 400px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

.stats-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-4px);
  border-color: rgba(164, 169, 244, 0.3);
  background: rgba(20, 20, 27, 0.5); /* Легкая подсветка фона при наведении */
}

.stats-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.stats-card-title svg {
  color: var(--ink);
  width: 18px;
  height: 18px;
}

.stats-card-desc {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
  line-height: 1.5;
  flex-grow: 1; /* Чтобы карточки были одной высоты, если текст разный */
}

.stats-card-value {
  width: 100%;
  font-size: 32px;
  font-weight: 600;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-bottom: 12px;
  color: var(--ink);
}

.stats-card-value span {
  color: var(--accent); /* Плюсик фиолетового цвета */
}

.stats-card-footer {
  font-size: 12px;
  color: #4a4a5e; /* Еще более приглушенный цвет как на скрине */
}
/* Добавь это в styles.css */

/* Глобальная анимация входа для всей страницы */
.page {
  animation: pageFadeIn 0.5s ease-out forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

/* Эффект наведения на кнопки на главной (гладкое свечение) */
.btn.primary {
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn.primary:hover::after {
  left: 100%;
}

/* Кастомизация скроллбара в стиле Dark Mode */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
/* --- Dashboard Redesign --- */
.dashboard-page {
  gap: 28px;
  min-height: 100vh;
  padding-top: 18px;
  padding-bottom: 48px;
}

.dashboard-page::after {
  content: '';
  position: fixed;
  inset: auto 8% 18% auto;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(164, 169, 244, 0.14), rgba(164, 169, 244, 0));
  pointer-events: none;
  z-index: -1;
  filter: blur(10px);
}

.dashboard-header {
  /* Inherits max-content width and centralized layout from .site-header */
}

.dashboard-brand {
  gap: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.dashboard-nav {
  justify-content: center;
  flex: 1;
  gap: 28px;
  font-size: 13px;
}

.dashboard-nav a {
  opacity: 0.8;
}

.dashboard-actions {
  gap: 14px;
}

.dashboard-moon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dashboard-moon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dashboard-profile-chip {
  min-width: 110px;
  min-height: 40px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.chip-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.dashboard-hero {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 20px 0 8px;
}

.dashboard-kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 10px;
}

.dashboard-hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 30px rgba(164, 169, 244, 0.06);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.15fr);
  gap: 34px;
  align-items: start;
}

.dashboard-sidebar-column,
.dashboard-main-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-card {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 24, 31, 0.96), rgba(20, 20, 27, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
}

.user-card-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.user-avatar {
  width: 68px;
  height: 68px;
  padding: 3px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(240, 236, 255, 0.98), rgba(201, 200, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(164, 169, 244, 0.24);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 21px;
  object-fit: cover;
  object-position: center 24%;
  display: block;
  transform: scale(1.04);
}

.user-copy {
  min-width: 0;
}

.user-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
}

.user-id {
  color: var(--accent);
}

.user-copy p {
  margin-top: 4px;
  color: #bebed3;
  font-size: 14px;
}

.user-exit {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 14px;
  padding: 8px 0;
}

.activation-card {
  padding: 24px 26px;
}

.section-heading {
  color: rgba(255, 255, 255, 0.42);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.activation-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 204px;
  gap: 12px;
}

.activation-input {
  width: 100%;
  min-height: 58px;
  background: rgba(16, 16, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-radius: 16px;
  padding: 0 18px;
  font-size: 15px;
  outline: none;
}

.activation-input:focus {
  border-color: rgba(164, 169, 244, 0.7);
  box-shadow: 0 0 0 4px rgba(164, 169, 244, 0.12);
}

.activation-button {
  min-height: 58px;
  border-radius: 16px;
  font-size: 16px;
}

.inline-message {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.inline-message[data-state='success'] {
  color: #8ff0b8;
}

.inline-message[data-state='error'] {
  color: #ff8f98;
}

.dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-tabs .btn {
  min-height: 58px;
  border-radius: 16px;
  font-size: 15px;
}

.info-panel {
  padding: 26px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-tile {
  min-height: 118px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(18, 18, 24, 0.72);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.tile-label {
  color: rgba(255, 255, 255, 0.46);
  font-size: 13px;
  font-weight: 600;
}

.tile-value {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.metric-card {
  padding: 24px 26px;
  min-height: 146px;
}

.metric-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 600;
}

.metric-value {
  margin-top: 8px;
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
}

.metric-foot {
  margin-top: 12px;
  color: #9f9fb7;
  font-size: 14px;
}

.clickable-card {
  overflow: hidden;
}

.card-arrow {
  position: absolute;
  right: 24px;
  bottom: 22px;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

@media (max-width: 1100px) {
  .dashboard-header {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .dashboard-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page.dashboard-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dashboard-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dashboard-tabs,
  .info-grid,
  .metrics-grid,
  .activation-form {
    grid-template-columns: 1fr;
  }

  .user-card {
    flex-direction: column;
    align-items: stretch;
  }

  .user-exit {
    align-self: flex-end;
  }

  .dashboard-hero {
    min-height: 90px;
  }

  .metric-value {
    font-size: 38px;
  }
}

/* --- Auth Redesign --- */
.auth-page-shell {
  min-height: 100vh;
  gap: 26px;
}

.auth-header {
  width: 100%;
}

.auth-nav {
  justify-content: center;
}

.auth-actions {
  gap: 14px;
}

.auth-screen {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 36px;
}

.auth-stage {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.auth-copy {
  text-align: center;
}

.auth-copy h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
  margin-bottom: 8px;
}

.auth-copy p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 16px;
}

.auth-switch-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.auth-form-card {
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field-group label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.38);
  padding-left: 12px;
}

.auth-input-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 14px;
  border-radius: 16px;
  background: #dfe9f6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.auth-input-icon,
.auth-input-clear {
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
  font-size: 18px;
}

.auth-input-icon {
  width: 18px;
  height: 18px;
  justify-self: center;
  pointer-events: none;
}

.auth-input-clear {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.auth-input-shell input {
  border: 0;
  outline: none;
  background: transparent;
  color: #14141b;
  font-size: 16px;
  font-weight: 500;
}

.auth-input-shell input::placeholder {
  color: rgba(20, 20, 27, 0.46);
}

.auth-submit {
  width: 100%;
  min-height: 58px;
  border-radius: 16px;
  font-size: 18px;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: rgba(255, 255, 255, 0.34);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 26px);
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.auth-divider span {
  display: inline-block;
  padding: 0 12px;
}

.auth-secondary {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  background: rgba(24, 24, 31, 0.82);
  font-size: 15px;
}

@media (max-width: 760px) {
  .auth-screen {
    padding-top: 18px;
  }

  .auth-stage {
    max-width: 100%;
  }

  .auth-nav {
    justify-content: flex-start;
  }

  .auth-copy h1 {
    font-size: 30px;
  }
}

/* --- Launcher Settings --- */
.launcher-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.setting-desc {
  font-size: 12px;
  color: var(--muted);
}

.setting-control {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ram-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ram-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}

.ram-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(164,169,244,0.2);
  transition: box-shadow 0.2s;
}

.ram-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(164,169,244,0.25);
}

.ram-value-badge {
  min-width: 52px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(164,169,244,0.1);
  border: 1px solid rgba(164,169,244,0.2);
  border-radius: 8px;
  padding: 4px 8px;
}

.ram-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding: 0 2px;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 48px;
  height: 26px;
  background: var(--line);
  border-radius: 999px;
  transition: background 0.25s;
  display: flex;
  align-items: center;
  padding: 3px;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-thumb {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(22px);
}

@media (max-width: 760px) {
  .setting-row {
    flex-direction: column;
    align-items: stretch;
  }
  .setting-control {
    flex: none;
    width: 100%;
  }
}

/* --- Products Section --- */
.products-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.products-grid--compact {
  gap: 18px;
}

.product-card {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 24, 31, 0.96), rgba(20, 20, 27, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(164, 169, 244, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.36);
}

.product-card--featured {
  border-color: rgba(164, 169, 244, 0.3);
  background: linear-gradient(180deg, rgba(164, 169, 244, 0.08), rgba(20, 20, 27, 0.98));
  box-shadow: 0 16px 40px rgba(164, 169, 244, 0.1);
}

.product-card--featured:hover {
  border-color: rgba(164, 169, 244, 0.5);
  box-shadow: 0 24px 56px rgba(164, 169, 244, 0.18);
}

.product-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-badge--accent {
  background: rgba(164, 169, 244, 0.12);
  color: var(--accent);
  border-color: rgba(164, 169, 244, 0.25);
}

.product-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.product-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  flex-grow: 1;
}

.product-price {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.product-currency {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.product-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.product-features li svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--accent);
}

.product-btn {
  margin-top: 4px;
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Admin Panel Custom Styles --- */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(20, 20, 27, 0.4);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-table th, 
.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow);
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Form controls */
select.activation-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b8b9e' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px !important;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}


/* Admin release uploader */
.release-layout { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(520px, 1.28fr); gap: 24px; align-items: start; }
.release-upload-card { position: sticky; top: 112px; }
.release-form { display: grid; gap: 16px; }
.release-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.release-fields .activation-input { min-height: 48px; }
.release-dropzone { min-height: 180px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; border: 1px dashed rgba(164,169,244,.35); border-radius: 18px; color: var(--muted); background: rgba(164,169,244,.035); cursor: pointer; transition: .2s ease; }
.release-dropzone:hover, .release-dropzone.dragging { color: var(--ink); border-color: var(--accent); background: rgba(164,169,244,.09); transform: translateY(-1px); }
.release-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.release-dropzone svg { width: 34px; height: 34px; color: var(--accent); }
.release-dropzone strong { color: var(--ink); font-size: 15px; }
.release-dropzone span { font-size: 12px; }
.release-selected-files { max-height: 148px; overflow: auto; display: grid; gap: 7px; padding: 12px; border-radius: 12px; color: var(--muted); background: rgba(0,0,0,.13); font-size: 12px; }
.release-selected-files span { display: flex; justify-content: space-between; gap: 12px; }
.release-selected-files b { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.release-selected-files small { flex: 0 0 auto; color: var(--muted); }
.release-progress { height: 6px; overflow: hidden; border-radius: 99px; background: var(--line); }
.release-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.release-publish-button { min-height: 50px; }
.release-publish-button:disabled { opacity: .5; cursor: wait; }
.release-current-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.release-current-head .section-heading { margin: 0 0 4px; }
.release-current-head > div { display: flex; flex-direction: column; }
.release-current-head strong { font-size: 21px; }
.release-current-head small { color: var(--muted); font-size: 12px; }
.release-status { display: inline-flex; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.release-status.ok { color: #8ff0b8; background: rgba(74,222,128,.1); }
.release-status.missing { color: #ff8f98; background: rgba(239,68,68,.1); }
#releaseFilesBody code { color: var(--muted); font-size: 11px; }
@media (max-width: 1050px) { .release-layout { grid-template-columns: 1fr; } .release-upload-card { position: static; } }
@media (max-width: 640px) { .release-fields { grid-template-columns: 1fr; } }
