/* =====================================================================
   Study Sphere AI  -  auth.css  (login / signup / forgot)
   ===================================================================== */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: min(440px, 100%);
  padding: 2.4rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.auth-card .brand {
  justify-content: center;
  margin-bottom: 1.4rem;
}

.auth-card h1 {
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}

.auth-card .sub {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 1.8rem;
  font-size: 0.95rem;
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-dim);
}
.input-wrap { position: relative; }
.input-wrap i.lead-icon {
  position: absolute;
  left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.field input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(109, 123, 255, 0.25);
}
.toggle-pw {
  position: absolute;
  right: 1rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 0.95rem;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.3rem;
  font-size: 0.88rem;
}
.auth-row a { color: var(--accent); }
.auth-row label { color: var(--text-dim); display: flex; align-items: center; gap: 0.45rem; cursor: pointer; }

.auth-foot {
  text-align: center;
  margin-top: 1.4rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auth-foot a { color: var(--accent); font-weight: 600; }

.form-msg {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.form-msg.show { display: block; }
.form-msg.error { background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251, 113, 133, 0.4); color: #fecdd3; }
.form-msg.success { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4); color: #bbf7d0; }

.pw-strength { height: 5px; border-radius: 4px; background: rgba(255,255,255,0.08); margin-top: 0.5rem; overflow: hidden; }
.pw-strength span { display: block; height: 100%; width: 0; transition: width 0.3s, background 0.3s; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.back-home {
  position: fixed; top: 1.2rem; left: 1.2rem; z-index: 10;
  color: var(--text-dim); display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(10px);
  transition: color 0.2s, transform 0.2s;
}
.back-home:hover { color: var(--text); transform: translateX(-3px); }

/* ---------- divider ("or") ---------- */
.auth-or {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 1.2rem 0; color: var(--text-dim); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* Guest button accent */
.btn.ghost.block i { color: var(--accent); }
