/* auth.css — login/register pages + the header auth chip shown across the
   app. Reuses base.css tokens so it themes (light/dark) automatically. */

/* ---------------- Header auth slot (avatar + dropdown, in .app-nav) ---------------- */
.auth-controls { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--unio-yellow);
  color: var(--unio-dark);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

/* ---------------- Login / register page ---------------- */
.auth-main {
  max-width: 460px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}
.auth-card {
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-radius: 14px;
  padding: 32px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head-mascot { margin: 0 auto 14px; }
.auth-head h1 { font-size: 23px; margin: 0 0 8px; }
.auth-head p { color: var(--ielts-text-muted); font-size: 14px; margin: 0; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; font-weight: 600; color: var(--ielts-text); }
.auth-field input {
  padding: 10px 12px;
  border: 1px solid var(--ielts-border);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--ielts-white);
  color: var(--ielts-text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.auth-field input::placeholder { color: var(--ielts-text-muted); }
.auth-field input:focus {
  outline: none;
  border-color: var(--unio-blue);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.18);
}
.auth-field input:disabled { opacity: 0.6; cursor: not-allowed; }

/* Password field with a show/hide toggle */
.auth-password { position: relative; display: flex; }
.auth-password input { flex: 1; padding-right: 44px; }
.auth-password-toggle {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--ielts-text-muted);
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
}
.auth-password-toggle:hover { color: var(--ielts-text); }

.auth-field-hint { font-size: 12px; color: var(--ielts-text-muted); }

.auth-submit { width: 100%; justify-content: center; padding: 11px 16px; font-size: 15px; margin-top: 4px; }

/* Inline error/status banner */
.auth-message {
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}
.auth-message.visible { display: block; }
.auth-message.error { background: var(--unio-pink); color: var(--ielts-incorrect); border: 1px solid #f3c9c9; }
.auth-message.success { background: #e6f4ea; color: var(--ielts-correct); border: 1px solid #bfe3cd; }
body.dark-theme .auth-message.error { background: #3a2326; border-color: #5a3236; }
body.dark-theme .auth-message.success { background: #1e3327; border-color: #2f5540; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--ielts-text-muted); }
.auth-switch a { color: var(--unio-blue); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* One-time-token password reset page. */
.auth-reset-card { position:relative; overflow:hidden; }
.auth-reset-card::before { content:""; position:absolute; width:120px; height:120px; right:-62px; top:-58px; border:17px solid rgba(91,141,239,.07); border-radius:50%; pointer-events:none; }
.auth-reset-icon { display:grid; width:54px; height:54px; margin:0 auto 13px; place-items:center; border-radius:17px; color:var(--unio-blue); background:linear-gradient(145deg,var(--ielts-blue-light),#fff9e2); box-shadow:0 8px 20px rgba(50,77,105,.09); }
.auth-reset-icon .icon { width:23px; height:23px; }
.auth-reset-login-btn { width:100%; justify-content:center; text-decoration:none !important; }

@media (max-width: 460px) {
  .auth-main { padding: 28px 16px 48px; }
  .auth-card { padding: 26px 20px; }
}
