/* auth.css */
#auth-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(16,24,40,.7);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
#auth-overlay.open { display: flex; }

#auth-modal {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: min(420px, 92vw);
  box-shadow: 0 24px 70px rgba(16,24,40,.18);
  direction: rtl;
  text-align: right;
}

#auth-modal h2 {
  font-size: 1.5rem; font-weight: 700;
  margin: 0 0 .4rem;
  background: linear-gradient(92deg,#7C3AED,#FF2EA6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
#auth-modal p.sub { color: #667085; margin: 0 0 1.5rem; font-size: .95rem; }

#auth-modal input {
  width: 100%; padding: .85rem 1rem;
  border: 1.5px solid #EAECF0; border-radius: 12px;
  font-size: 1.1rem; margin-bottom: 1rem;
  outline: none; transition: border .2s;
  direction: ltr; text-align: center;
  box-sizing: border-box;
}
#auth-modal input:focus { border-color: #7C3AED; }

#auth-modal button.primary {
  width: 100%; padding: .9rem;
  background: linear-gradient(92deg,#7C3AED 0%,#FF2EA6 48%,#FF8A3D 100%);
  color: #fff; border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: opacity .2s;
}
#auth-modal button.primary:hover { opacity: .88; }
#auth-modal button.primary:disabled { opacity: .5; cursor: not-allowed; }

#auth-modal .back-link {
  display: block; text-align: center; margin-top: .75rem;
  color: #667085; font-size: .85rem; cursor: pointer;
}
#auth-modal .back-link:hover { color: #7C3AED; }
#auth-modal .error-msg {
  color: #e53e3e; font-size: .85rem; margin-bottom: .75rem; display: none;
}
#auth-modal .error-msg.show { display: block; }

#auth-modal button.primary {
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
#auth-modal button.secondary {
  width: 100%; padding: .9rem;
  background: #F5F3FF; color: #7C3AED;
  border: 1.5px solid #DDD6FE; border-radius: 12px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  margin-top: .6rem; transition: background .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
#auth-modal button.secondary:hover { background: #EDE9FE; border-color: #7C3AED; }
#auth-modal button.secondary:disabled { opacity: .5; cursor: not-allowed; }

#auth-modal .divider {
  text-align: center; color: #aaa; font-size: .8rem;
  margin: .75rem 0; position: relative;
}
#auth-modal .divider::before, #auth-modal .divider::after {
  content: ''; position: absolute; top: 50%; width: 42%; height: 1px;
  background: #EAECF0;
}
#auth-modal .divider::before { right: 0; }
#auth-modal .divider::after  { left: 0; }

#auth-modal input[dir="rtl"] { text-align: right; }

#auth-modal .pass-wrap {
  position: relative;
  margin-bottom: 1rem;
}
#auth-modal .pass-wrap input {
  margin-bottom: 0;
  padding-left: 2.8rem;
}
#auth-modal .eye-btn {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #667085;
  display: flex;
  align-items: center;
  width: auto;
  transition: color .2s;
}
#auth-modal .eye-btn:hover { color: #7C3AED; }
