.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 6, 42, 0.55);
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  padding: 32px;
  position: relative;
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(18, 6, 42, 0.05);
  color: #12062a;
  font-size: 20px;
  line-height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.auth-modal-close:hover {
  background: rgba(18, 6, 42, 0.1);
}

.auth-modal-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-modal-title {
  text-align: center;
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2f2e41;
}

.auth-modal-form-container {
  display: none;
}

.auth-modal-form-container.active {
  display: block;
}

.auth-modal .label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #6b7094;
}

.auth-modal .field-form {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(107, 112, 148, 0.2);
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.auth-modal .field-form:focus {
  outline: none;
  border-color: #5d6eff;
}

.auth-modal .button-form {
  width: 100%;
  padding: 14px;
  background: #5d6eff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.3s;
  margin-top: 8px;
}

.auth-modal .button-form:hover {
  opacity: 0.9;
}

.auth-modal-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7094;
}

.auth-modal-footer a {
  color: #5d6eff;
  text-decoration: none;
  font-weight: 600;
}

.auth-modal-footer a:hover {
  text-decoration: underline;
}

.auth-modal-error {
  background: rgba(255, 82, 82, 0.1);
  color: #ff5252;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  display: none;
}

.auth-modal-success {
  background: rgba(88, 207, 155, 0.1);
  color: #2a9d8f;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  display: none;
}

/* Галочка согласия на рассылку */
.consent-check { display:flex; align-items:flex-start; gap:10px; margin:14px 0; cursor:pointer; user-select:none; }
.consent-check input { position:absolute; opacity:0; width:0; height:0; }
.consent-box { flex:0 0 auto; width:24px; height:24px; border:2px solid #c5c8d6; border-radius:8px; background:#fff; transition:all .2s ease; position:relative; margin-top:1px; }
.consent-box { animation: consentPulse 2.2s ease-in-out infinite; }
@keyframes consentPulse { 0%,100% { box-shadow:0 0 0 0 rgba(93,110,255,.5); } 50% { box-shadow:0 0 0 9px rgba(93,110,255,0); } }
.consent-check:hover .consent-box { border-color:#5d6eff; box-shadow:0 0 0 6px rgba(93,110,255,.25); animation:none; }
.consent-check input:checked + .consent-box { animation:none; }
.consent-check input:checked + .consent-box { background:linear-gradient(135deg,#5d6eff,#8b60ff); border-color:#5d6eff; }
.consent-check input:checked + .consent-box::after { content:"★"; position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); text-align:center; color:#fff; font-size:14px; line-height:1; }
.consent-text { font-size:13px; line-height:1.4; color:#5d6c7b; }
.consent-check:hover .consent-text { color:#2a2438; }
