/* Вход / регистрация на app: узкая gateway-карточка (как модалка на витрине). */
.auth-gateway {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  color: #e8eaed;
  background-color: #0c1220;
  background-image:
    radial-gradient(ellipse 90% 55% at 10% -10%, rgba(76, 127, 239, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 50% at 95% 15%, rgba(56, 189, 248, 0.10), transparent 52%),
    radial-gradient(ellipse 55% 45% at 45% 110%, rgba(99, 102, 241, 0.12), transparent 55%),
    linear-gradient(165deg, #080d18 0%, #0c1220 38%, #111827 100%);
  background-attachment: fixed;
}

/* Без клеточки — как на сайте */
.auth-gateway::before {
  display: none;
}

.auth-gateway__shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.auth-gateway__top {
  width: 100%;
  margin-bottom: 0.75rem;
}

.auth-gateway__top .btn-outline-secondary {
  color: #94a3b8;
  border-color: #334155;
  border-radius: 10px;
  background: #141820;
}

.auth-gateway__top .btn-outline-secondary:hover {
  color: #e8eaed;
  border-color: #4c7fef;
  background: rgba(76, 127, 239, 0.14);
}

.auth-gateway__panel {
  width: 100%;
}

.auth-gateway__card,
.auth-embed__card {
  border: 1px solid #334155;
  border-radius: var(--tu-radius-lg, 1rem);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  background: #141820;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #e8eaed;
}

.auth-gateway__card.tu-gateway-frame {
  overflow: hidden;
}

.auth-gateway .btn-primary {
  color: #fff;
  font-weight: 600;
  background: #4c7fef;
  border-color: #4c7fef;
  border-radius: 10px;
  box-shadow: none;
}

.auth-gateway .btn-primary:hover,
.auth-gateway .btn-primary:focus {
  color: #fff;
  background: #6b93f5;
  border-color: #6b93f5;
}

.auth-gateway .btn-outline-primary {
  color: #6b93f5;
  border-color: #334155;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
}

.auth-gateway .btn-outline-primary:hover,
.auth-gateway .btn-outline-primary:focus {
  color: #fff;
  border-color: #4c7fef;
  background: rgba(76, 127, 239, 0.14);
}

.auth-gateway .form-control {
  border-color: #334155;
  border-radius: 10px;
  background: #0c0e12;
  color: #e8eaed;
}

.auth-gateway .form-control::placeholder {
  color: #64748b;
}

.auth-gateway .form-control:focus {
  border-color: #4c7fef;
  background: #141820;
  color: #e8eaed;
  box-shadow: 0 0 0 0.2rem rgba(76, 127, 239, 0.2);
}

.auth-gateway a:not(.btn) {
  color: #6b93f5;
  text-decoration: none;
}

.auth-gateway a:not(.btn):hover {
  color: #93c5fd;
  text-decoration: underline;
}

.auth-gateway__meta dt {
  font-weight: 600;
}


.auth-embed {
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  background: transparent;
  overflow: hidden;
}

html:has(body.auth-embed),
html:has(body.auth-embed--hero) {
  background-color: transparent !important;
}

body.auth-embed,
body.auth-embed--hero {
  background: transparent !important;
}

.auth-embed__home-link {
  display: none;
}

.auth-embed__card {
  margin: 0 auto;
  max-width: 100%;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-embed__card .card-body {
  padding: 0.25rem 0.5rem 0.5rem !important;
}

.auth-embed__card--register .form-text {
  display: none;
}

.auth-embed__card .form-control {
  min-height: 2.75rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.auth-embed__card .mb-3 {
  margin-bottom: 0.85rem !important;
}

.auth-embed__card .btn-primary {
  min-height: 2.75rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.auth-embed__card .tu-callback-consent {
  margin-top: 0.75rem !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.5;
}

.auth-embed__card .tu-callback-submit {
  margin-top: 0.15rem;
}

.auth-embed--hero {
  padding: 0.15rem 0.35rem 0.35rem;
}

.auth-embed--hero .auth-embed__card .form-control {
  background: #f1f5f9;
  border-color: #e2e8f0;
  border-radius: 8px;
}

.auth-embed--hero .auth-embed__card .form-control::placeholder {
  color: #64748b;
}

.auth-embed--hero .auth-embed__card .form-control:focus {
  background: #ffffff;
  border-color: #155eef;
  box-shadow: 0 0 0 0.2rem rgba(21, 94, 239, 0.18);
}

.auth-embed--hero .tu-callback-consent {
  font-size: 0.72rem !important;
  margin-bottom: 0.85rem !important;
}

.auth-embed--hero .tu-callback-consent a {
  color: #155eef;
}

.auth-embed--hero .tu-callback-submit--hero {
  background: linear-gradient(135deg, #3b82f6 0%, #155eef 55%, #0f4fbf 100%);
  border-color: #0f4fbf;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(21, 94, 239, 0.32);
}

.auth-embed--hero .tu-callback-submit--hero:hover,
.auth-embed--hero .tu-callback-submit--hero:focus {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 55%, #155eef 100%);
  border-color: #155eef;
  color: #fff;
  filter: brightness(1.03);
}

html[data-tu-theme="dark"] .auth-embed {
  color-scheme: dark;
  color: #e8eaed;
}

/* Цельный тёмный фон iframe (не прозрачный поверх белой модалки) */
html[data-tu-theme="dark"]:has(body.auth-embed),
html[data-tu-theme="dark"]:has(body.auth-embed--hero) {
  background-color: #141820 !important;
}

html[data-tu-theme="dark"] body.auth-embed,
html[data-tu-theme="dark"] body.auth-embed--hero {
  background: #141820 !important;
  color: #e8eaed;
}

html[data-tu-theme="dark"] .auth-embed .auth-embed__card,
html[data-tu-theme="dark"] .auth-embed .card,
html[data-tu-theme="dark"] .auth-embed .card-body {
  background: #141820 !important;
  color: #e8eaed;
  border-color: transparent;
}

html[data-tu-theme="dark"] .auth-embed .text-secondary,
html[data-tu-theme="dark"] .auth-embed .form-text,
html[data-tu-theme="dark"] .auth-embed .text-muted,
html[data-tu-theme="dark"] .auth-embed .small {
  color: #94a3b8 !important;
}

html[data-tu-theme="dark"] .auth-embed a {
  color: #6b93f5;
}

html[data-tu-theme="dark"] .auth-embed a:hover {
  color: #93b4f8;
}

html[data-tu-theme="dark"] .auth-embed .form-check-label {
  color: #cbd5e1;
}

html[data-tu-theme="dark"] .auth-embed .form-check-input {
  background-color: #1e293b;
  border-color: #475569;
}

html[data-tu-theme="dark"] .auth-embed .form-check-input:checked {
  background-color: #155eef;
  border-color: #155eef;
}

html[data-tu-theme="dark"] .auth-embed .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #155eef 55%, #0f4fbf 100%);
  border-color: #0f4fbf;
  box-shadow: 0 6px 18px rgba(21, 94, 239, 0.28);
}

html[data-tu-theme="dark"] .auth-embed .btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 55%, #155eef 100%);
  border-color: #155eef;
}

html[data-tu-theme="dark"] .auth-embed .tu-callback-consent {
  color: #94a3b8 !important;
}

html[data-tu-theme="dark"] .auth-embed--hero .tu-callback-consent a {
  color: #6b93f5;
}

html[data-tu-theme="dark"] .auth-embed .form-label {
  color: #e2e8f0 !important;
}

html[data-tu-theme="dark"] .auth-embed .form-control,
html[data-tu-theme="dark"] .auth-embed--hero .auth-embed__card .form-control,
html[data-tu-theme="dark"] .auth-embed:not(.auth-embed--hero) .auth-embed__card .form-control {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e8eaed !important;
}

html[data-tu-theme="dark"] .auth-embed .form-control::placeholder,
html[data-tu-theme="dark"] .auth-embed--hero .auth-embed__card .form-control::placeholder,
html[data-tu-theme="dark"] .auth-embed:not(.auth-embed--hero) .auth-embed__card .form-control::placeholder {
  color: #94a3b8 !important;
}

html[data-tu-theme="dark"] .auth-embed .form-control:focus,
html[data-tu-theme="dark"] .auth-embed--hero .auth-embed__card .form-control:focus,
html[data-tu-theme="dark"] .auth-embed:not(.auth-embed--hero) .auth-embed__card .form-control:focus {
  background: #243447 !important;
  border-color: #4c7fef !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 127, 239, 0.25) !important;
  color: #e8eaed !important;
}

html[data-tu-theme="dark"] .auth-embed:not(.auth-embed--hero) .tu-callback-consent a {
  color: #6b93f5;
}

html[data-tu-theme="dark"] .auth-gateway {
  color-scheme: dark;
  background: linear-gradient(165deg, #080d18 0%, #0c1220 40%, #111827 100%);
  color: #e8eaed;
}

html[data-tu-theme="dark"] .auth-gateway__card {
  background: linear-gradient(155deg, rgba(36, 48, 68, 0.96) 0%, rgba(20, 24, 32, 0.98) 100%);
  border-color: #334155;
}
