/* ── PASSWORD STRENGTH ──────────────────────────────────────── */
.pwd-strength{margin-top:6px;}
.pwd-bar{height:3px;border-radius:var(--r-full);background:var(--hairline);overflow:hidden;margin-bottom:4px;}
.pwd-bar-fill{height:100%;border-radius:var(--r-full);transition:width 0.3s ease,background 0.3s ease;width:0;}
.pwd-hint{font-size:11px;color:var(--stone);}

/* ============================================================
   AUTH SCREEN — изумрудный hero с янтарными декор-кругами
   ============================================================ */
#auth-screen {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  position: relative;
  overflow: hidden;
}
#auth-screen.visible { display: flex; }

/* Декоративные круги — янтарь, радиальные */
.auth-dots {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.auth-dots::before, .auth-dots::after {
  content: ''; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.15;
}
.auth-dots::before { width: 480px; height: 480px; top: -120px; left: -120px; }
.auth-dots::after  { width: 560px; height: 560px; bottom: -200px; right: -180px; }
.dot {
  /* Старые SVG-точки скрываем — заменили градиентными кругами выше */
  display: none;
}

.auth-card {
  background: var(--canvas);
  border-radius: var(--r-xxl);
  padding: 44px;
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--hairline);
  animation: slideUp 0.4s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand: монограмма «mf» в янтарном квадрате ──────────── */
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.auth-brand-icon {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Onest', sans-serif; font-weight: 800; font-size: 20px;
  color: var(--primary-deep);
  box-shadow: 0 4px 12px rgba(201,153,74,0.35);
  flex-shrink: 0;
}
/* Если внутри svg от старого монолита — скрываем его и показываем «mf» */
.auth-brand-icon svg { display: none; }
.auth-brand-icon::before {
  content: 'mf';
}
.auth-brand-name {
  font-family: 'Onest', sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--ink-deep);
}
.auth-brand-name span { color: var(--primary); }

/* ── Greeting (новый) ────────────────────────────────────── */
.auth-greet {
  font-family: 'Onest', sans-serif;
  font-size: 26px; font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px; color: var(--slate); margin-bottom: 28px;
}

/* ── Tabs (переключатель Войти / Регистрация) ────────────── */
.auth-tabs {
  display: flex; gap: 2px;
  background: var(--surface-soft);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1; text-align: center;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
  color: var(--steel);
  cursor: pointer;
  transition: all var(--ease);
}
.auth-tab.active {
  background: var(--canvas);
  color: var(--ink);
  box-shadow: var(--sh-sm);
  font-weight: 600;
}

/* ── Form fields ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--ink-light, var(--charcoal)); margin-bottom: 6px;
}
.form-input {
  width: 100%; height: 46px;
  padding: 0 var(--sp-md);
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--r-md);
  font-size: 14px; color: var(--ink);
  background: var(--canvas);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(27,104,80,0.1);
}
.form-input::placeholder { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11px; color: var(--stone); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--semantic-error); margin-top: 4px; }

.select-field {
  width: 100%; height: 46px;
  padding: 0 var(--sp-md);
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--r-md);
  font-size: 14px; color: var(--ink);
  background: var(--canvas);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6760' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select-field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(27,104,80,0.1); }

/* ── Primary CTA button (emerald) ────────────────────────── */
.btn-primary {
  width: 100%; height: 46px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  transition: all var(--ease);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px;
}
.btn-primary:hover {
  background: var(--primary-pressed);
  box-shadow: 0 4px 12px rgba(27,104,80,0.25);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--hairline-strong); color: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Flash messages ──────────────────────────────────────── */
.auth-flash {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.auth-flash.error   { background: #FCEFEC; color: var(--semantic-error); border: 1px solid #F5D5D0; display: block; }
.auth-flash.success { background: var(--primary-soft); color: var(--primary-deep); border: 1px solid #C9DCD2; display: block; }

/* ── Switch link ─────────────────────────────────────────── */
.auth-switch { text-align: center; font-size: 13px; color: var(--slate); margin-top: 18px; }
.auth-switch a { color: var(--primary); cursor: pointer; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

.auth-divider {
  text-align: center; font-size: 12px; color: var(--stone);
  margin: 16px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 42%; height: 1px;
  background: var(--hairline);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
