/* ===========================================================
   Булка — авторизация
   =========================================================== */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(ellipse at top, #ffeadf 0%, transparent 50%),
    radial-gradient(ellipse at bottom, #dbe9ff 0%, transparent 50%),
    var(--bg);
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.7s var(--ease-bounce);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card {
  padding: 44px 40px 32px;
  border-radius: var(--radius-xl);
}

/* ---------- Шапка ---------- */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.logo__mark {
  font-size: 38px;
  filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.35));
  animation: wobble 4s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

.logo__text {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Переключатель вкладок ---------- */
.auth-switch {
  position: relative;
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 26px;
}

.auth-switch__btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--t-med) var(--ease);
  position: relative;
  z-index: 2;
}

.auth-switch__btn.is-active {
  color: var(--text);
}

.auth-switch__pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease);
  z-index: 1;
}

.auth-switch[data-active="register"] .auth-switch__pill {
  transform: translateX(100%);
}

/* ---------- Формы ---------- */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: fadeIn 0.35s var(--ease);
}

.auth-form.is-active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-left: 4px;
}

.field input {
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15), var(--shadow-sm);
}

.field__hint {
  font-size: 12px;
  color: var(--text-tertiary);
  padding-left: 4px;
  margin-top: 2px;
}

/* ---------- Ошибки ---------- */
.auth-error {
  min-height: 18px;
  font-size: 13px;
  color: var(--error);
  text-align: center;
  font-weight: 500;
}

/* ---------- Футер ---------- */
.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- Адаптив ---------- */
@media (max-width: 480px) {
  .auth-card { padding: 32px 24px 24px; }
  .logo__text { font-size: 28px; }
  .logo__mark { font-size: 32px; }
}
