/* Нейтральная авторизация: светлая тема, без привязки к чужим брендам */
:root {
  --auth-bg: #ffffff;
  --auth-text: #222222;
  --auth-muted: #707579;
  --auth-border: #d9dce0;
  --auth-accent: #2b7fd4;
  --auth-accent-hover: #2568b8;
  --auth-focus: #2b7fd4;
  --auth-error: #c62828;
  --auth-radius: 10px;
  --auth-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--auth-font);
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
  box-sizing: border-box;
}

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

.auth-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-mark {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d9ae8 0%, var(--auth-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 28px rgba(43, 127, 212, 0.25);
}

.auth-mark svg {
  width: 54px;
  height: 54px;
  fill: #fff;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.auth-mark--image {
  padding: 0;
  overflow: hidden;
  background: #f0f4f8;
}

.auth-mark--image img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  display: block;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.auth-lead {
  margin: 0 0 28px;
  font-size: 0.95rem;
  color: var(--auth-muted);
  text-align: center;
  max-width: 340px;
}

.auth-form-block {
  width: 100%;
}

.auth-field {
  position: relative;
  margin-bottom: 18px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 16px 14px 12px;
  font-size: 1rem;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.auth-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23707579' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 1px var(--auth-focus);
}

.auth-field label {
  position: absolute;
  left: 12px;
  top: -8px;
  padding: 0 4px;
  font-size: 0.75rem;
  color: var(--auth-muted);
  background: var(--auth-bg);
  pointer-events: none;
  line-height: 1;
}

.auth-field--active label {
  color: var(--auth-accent);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 20px;
  font-size: 0.9rem;
}

.auth-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--auth-accent);
  cursor: pointer;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.auth-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--auth-radius);
  background: var(--auth-accent);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}

.auth-btn:hover:not(:disabled) {
  background: var(--auth-accent-hover);
}

.auth-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-btn--hidden {
  display: none;
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--auth-accent);
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-step {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
}

.auth-step--visible {
  display: flex;
}

.auth-phone-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.auth-phone-display {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-step2-phone-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  width: 100%;
}

.auth-phone-display--large {
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-align: center;
}

.auth-icon-btn--hero {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.auth-lead--step2 {
  margin-top: 0;
}

.auth-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f0f2f5;
  color: var(--auth-muted);
  cursor: pointer;
  transition: background 0.15s;
}

.auth-icon-btn:hover {
  background: #e4e7eb;
}

.auth-icon-btn svg {
  width: 18px;
  height: 18px;
}

.auth-error {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--auth-error);
  background: #ffebee;
  border-radius: 8px;
  display: none;
}

.auth-error--show {
  display: block;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-overlay--show {
  display: flex;
}

.auth-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 320px;
  padding: 1.5rem;
  text-align: center;
}

.auth-loading-message {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--auth-text);
}

.auth-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #e0e4e8;
  border-top-color: var(--auth-accent);
  border-radius: 50%;
  animation: auth-spin 0.75s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-footnote {
  margin-top: 32px;
  font-size: 0.8rem;
  color: var(--auth-muted);
  text-align: center;
  max-width: 320px;
}
