/* ============================================================
   AUTH.CSS — Вход и Регистрация
   ============================================================ */

/* LAYOUT */
.auth-layout {
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 32px;
  align-items: start;
  padding: 32px 0 60px;
}

/* CARD */
.auth-card {
  background: var(--surface);
  border: 1.5px solid var(--ink-10);
  border-radius: var(--radius-l);
  padding: 36px 40px 32px;
}

/* PAGE-LEVEL TABS (Войти / Регистрация) */
.auth-page-tabs {
  display: flex;
  background: var(--ink-10);
  border-radius: var(--radius-m);
  padding: 3px;
  margin-bottom: 28px;
}
.auth-ptab {
  flex: 1;
  padding: 10px 14px;
  border: none; background: none; cursor: pointer;
  border-radius: calc(var(--radius-m) - 2px);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  color: var(--ink-60); transition: all .2s;
  text-align: center; text-decoration: none; display: block;
  white-space: nowrap;
}
.auth-ptab--active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.auth-ptab:hover:not(.auth-ptab--active) { color: var(--ink); }

/* PANELS */
.auth-panel--hidden { display: none; }

/* CARD HEAD */
.auth-card-head {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo-mark {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.auth-logo-mark svg { width: 44px; height: 44px; }
.auth-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--ink); margin: 0 0 6px;
}
.auth-sub {
  font-size: 13px; color: var(--ink-60);
  margin: 0; line-height: 1.5;
}

/* FIELDS */
.auth-field {
  margin-bottom: 16px;
  position: relative;
}
.auth-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--ink-80); margin-bottom: 6px;
  font-family: var(--font-display);
}
.auth-label-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.auth-label-row .auth-label { margin-bottom: 0; }
.auth-input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--ink-30);
  border-radius: var(--radius-m);
  padding: 0 14px;
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  background: var(--surface);
  outline: none; transition: border-color .2s;
  box-sizing: border-box;
}
.auth-input:focus { border-color: var(--primary); }
.auth-input.is-err { border-color: var(--accent); }

/* INPUT WITH EYE */
.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 42px; }
.auth-eye {
  position: absolute; right: 0; top: 0;
  width: 42px; height: 42px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-40); transition: color .2s;
}
.auth-eye:hover { color: var(--ink); }
.auth-eye svg { width: 16px; height: 16px; }

/* FIELD ERROR */
.auth-field-err {
  display: block;
  font-size: 11px; color: var(--accent);
  margin-top: 4px; min-height: 14px;
}

/* FORM-LEVEL ERROR */
.auth-form-err {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent-light);
  border: 1px solid rgba(212,98,26,.25);
  border-radius: var(--radius-m);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px; color: var(--accent-dark);
}
.auth-form-err svg { width: 16px; height: 16px; flex-shrink: 0; }

/* SUCCESS MESSAGE */
.auth-success {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary-light);
  border: 1px solid rgba(45,122,79,.25);
  border-radius: var(--radius-m);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px; color: var(--primary);
}

/* CHECKBOX */
.auth-checkbox-row {
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer; margin-bottom: 12px;
  font-size: 12px; color: var(--ink-80); line-height: 1.4;
}
.auth-checkbox-input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.auth-checkbox-box {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 1.5px solid var(--ink-30);
  border-radius: 4px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; margin-top: 1px;
}
.auth-checkbox-input:checked + .auth-checkbox-box {
  background: var(--primary); border-color: var(--primary);
}
.auth-checkbox-input:checked + .auth-checkbox-box::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}
.auth-checkbox-lbl { user-select: none; }

/* SUBMIT */
.auth-submit {
  width: 100%; height: 46px;
  font-size: 13px; font-weight: 700;
  margin-bottom: 20px;
}

/* LINK */
.auth-link { color: var(--primary); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* CARD FOOT */
.auth-card-foot {
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--ink-10);
  font-size: 12px; color: var(--ink-60);
  margin-top: 4px;
}

/* ============================================================
   REGISTER SPECIFIC
   ============================================================ */

/* SECTIONS */
.reg-section {
  border: none; padding: 0; margin: 0 0 22px;
}
.reg-section-title {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700; color: var(--ink);
  padding: 0; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.reg-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--ink-10);
}

/* GRID */
.reg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 14px;
}
.reg-grid .auth-field { margin-bottom: 0; }
.reg-grid-full { grid-column: 1 / -1; }

/* AGREE */
.reg-agree { margin-bottom: 20px; }
.req { color: var(--accent); }

/* ACTIONS */
.reg-actions {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.reg-actions .auth-submit { margin-bottom: 0; }
.reg-login-hint { font-size: 12px; color: var(--ink-60); margin: 0; }

/* PASSWORD STRENGTH */
.pwd-strength {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
.pwd-strength-bar {
  flex: 1; height: 4px;
  background: var(--ink-10); border-radius: 2px; overflow: hidden;
}
.pwd-strength-fill {
  height: 100%; border-radius: 2px;
  transition: width .3s, background .3s;
  width: 0;
}
.pwd-strength-fill.weak   { background: var(--accent); width: 33%; }
.pwd-strength-fill.medium { background: #E8873A;        width: 66%; }
.pwd-strength-fill.strong { background: var(--primary); width: 100%; }
.pwd-strength-label {
  font-size: 10px; font-weight: 600; font-family: var(--font-display);
  white-space: nowrap; color: var(--ink-60);
}

/* ============================================================
   ASIDE
   ============================================================ */
.auth-aside {
  padding: 32px 28px;
  background: var(--primary-light);
  border-radius: var(--radius-l);
  border: 1.5px solid rgba(45,122,79,.15);
  position: sticky; top: 80px;
}
.auth-aside-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px;
}
.auth-aside-desc {
  font-size: 13px; color: var(--ink-60); line-height: 1.5;
  margin: 0 0 22px;
}
.auth-benefits {
  list-style: none; padding: 0; margin: 0 0 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-benefit {
  display: flex; align-items: flex-start; gap: 12px;
}
.auth-benefit-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--primary); border-radius: var(--radius-m);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.auth-benefit-icon svg { width: 16px; height: 16px; }
.auth-benefit strong {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink); margin-bottom: 2px;
  font-family: var(--font-display);
}
.auth-benefit span {
  font-size: 12px; color: var(--ink-60); line-height: 1.4;
}
.auth-aside-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--ink-60);
  padding-top: 18px;
  border-top: 1px solid rgba(45,122,79,.15);
}

/* ============================================================
   FORGOT — SUCCESS STATE
   ============================================================ */
.forgot-sent-info {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
  background: var(--primary-light);
  border-radius: var(--radius-m);
  padding: 18px 20px;
}
.forgot-sent-step {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: var(--ink-80); line-height: 1.45;
}
.forgot-sent-num {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  margin-top: 1px;
}
.forgot-resend-hint {
  font-size: 12px; color: var(--ink-60); text-align: center;
  margin-bottom: 20px; line-height: 1.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 40px;
  }
  .auth-aside { position: static; }
}
@media (max-width: 560px) {
  .auth-card { padding: 24px 20px 20px; }
  .auth-aside { padding: 24px 20px; }
  .reg-grid { grid-template-columns: 1fr; }
  .reg-grid-full { grid-column: auto; }
}
