/* ============================================================
   TRUDLAB auth pages theme — scoped to body.auth-page only.
   Подключается дополнительно к app.css на index.html и register.html.
   Остальные страницы (dashboard и т.д.) остаются на светлой теме.
   ============================================================ */

body.auth-page {
  background: #03060c;
  color: #e9eefc;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
body.auth-page a { color: #c9d6ff; }
body.auth-page a:hover { color: #fff; }

/* WebGL подложка — на самый низ z-стека */
#shader-bg {
  position: fixed; inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 30% 30%, #0c1838 0%, #060b1c 60%, #03060c 100%);
}
#shader-bg canvas { width: 100%; height: 100%; display: block; }

body.auth-page .container { position: relative; z-index: 1; }

/* Шапка с логотипом */
.auth-header {
  position: relative; z-index: 2;
  max-width: 900px; margin: 0 auto;
  padding: 22px 16px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.auth-header .brand { display: flex; align-items: center; gap: 12px; }
.auth-header .brand img {
  width: 40px; height: 40px; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(214,18,30,.45));
}
.auth-header .brand .b-name {
  font-weight: 700; letter-spacing: .16em; font-size: 13px; color: #e9eefc;
  display: block; line-height: 1;
}
.auth-header .brand .b-sub {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(233,238,252,.62); margin-top: 4px; display: block; line-height: 1;
}
.auth-header .top-meta {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(233,238,252,.55);
}

/* Заголовки и текст поверх фона */
body.auth-page h1 {
  color: #f3f6ff;
  font-weight: 600;
  letter-spacing: -.01em;
}
body.auth-page h2 {
  color: #f3f6ff;
  font-weight: 600;
}
body.auth-page .text-muted { color: rgba(233,238,252,.68); }

/* «Стеклянная» карточка */
body.auth-page .card {
  background: rgba(8, 12, 26, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
  color: #e9eefc;
  position: relative;
}
body.auth-page .card::before {
  content: "";
  position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(214,18,30,.18), transparent 60%);
}

/* Поля формы — тёмный вариант */
body.auth-page .form-group label { color: rgba(233,238,252,.78); }
body.auth-page .form-group input {
  background: rgba(255,255,255,0.06);
  color: #e9eefc;
  border: 1px solid rgba(255,255,255,0.14);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
body.auth-page .form-group input::placeholder { color: rgba(233,238,252,.32); }
body.auth-page .form-group input:focus {
  outline: none;
  border-color: rgba(214,18,30,.55);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(214,18,30,.18);
}

/* Кнопка — в брендовом красном TRUDLAB */
body.auth-page .btn-primary {
  background: linear-gradient(180deg, #e6202c 0%, #b80f1a 100%);
  border: 1px solid #ec1a26;
  box-shadow: 0 12px 28px rgba(214,18,30,.35), inset 0 1px 0 rgba(255,255,255,.18);
  font-weight: 600; letter-spacing: .02em;
}
body.auth-page .btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ef2a36 0%, #c81522 100%);
  filter: brightness(1.05);
}

/* Ошибки и инфо-алерты — на тёмном фоне */
body.auth-page .alert-error {
  background: rgba(214,18,30,.12);
  border: 1px solid rgba(214,18,30,.45);
  color: #ffd2d6;
}

body.auth-page .text-center a {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.25);
  padding-bottom: 1px;
}
body.auth-page .text-center a:hover {
  border-bottom-color: #ec1a26;
  text-decoration: none;
}

/* Низкий футер */
.auth-foot {
  position: relative; z-index: 1;
  max-width: 900px; margin: 24px auto 16px;
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(233,238,252,.55);
}

@media (max-width: 520px) {
  .auth-header { padding: 16px 12px 0; }
  .auth-header .top-meta { display: none; }
  .auth-foot { flex-direction: column; gap: 6px; text-align: center; }
}

/* ============================================================
   Бейдж «ТРЕНАЖЁР · ЭКСПЕРТИЗА СОУТ» (над заголовком)
   ============================================================ */
.auth-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.auth-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(214, 18, 30, 0.14);
  border: 1px solid rgba(214, 18, 30, 0.42);
  color: #ffd2d6;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.auth-badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ec1a26;
  box-shadow: 0 0 0 0 rgba(236, 26, 38, 0.6);
  animation: auth-pulse 1.8s ease-out infinite;
  flex: 0 0 7px;
}
@keyframes auth-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(236, 26, 38, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(236, 26, 38, 0); }
  100% { box-shadow: 0 0 0 0   rgba(236, 26, 38, 0); }
}

/* ============================================================
   Список преимуществ (под формой)
   ============================================================ */
.auth-features {
  list-style: none;
  padding: 0;
  margin: 22px auto 0;
  max-width: 420px;
  display: grid;
  gap: 10px;
}
.auth-features li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(233, 238, 252, 0.78);
  text-align: left;
}
.auth-features li::before {
  content: "";
  margin-top: 7px;
  width: 8px; height: 8px;
  background: #ec1a26;
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(236, 26, 38, 0.55);
}
