/* ==========================================================================
   AUTH PAGES — Shared styles for login, register, confirmation pages
   Clean, modern design with dark/light theme support
   ========================================================================== */

/* ---------- Page layout ---------- */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
html[data-theme="dark"] .auth-page {
  background: linear-gradient(160deg, #09090b 0%, #0c1222 50%, #09090b 100%);
}
html[data-theme="light"] .auth-page {
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 50%, #f8fafc 100%);
}

/* ---------- Card container ---------- */
.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  padding: 2.5rem 2.25rem;
}
html[data-theme="dark"] .auth-card {
  background: #111113;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
html[data-theme="light"] .auth-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 20px 60px rgba(0,0,0,.07);
}

/* ---------- Logo / brand header ---------- */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
}
.auth-brand-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .auth-brand-icon {
  background: linear-gradient(135deg,#6366f1,#818cf8);
  color: #fff;
}
html[data-theme="light"] .auth-brand-icon {
  background: linear-gradient(135deg,#4f46e5,#6366f1);
  color: #fff;
}
.auth-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
html[data-theme="dark"] .auth-brand-name { color: #e4e4e7; }
html[data-theme="light"] .auth-brand-name { color: #1e293b; }

/* ---------- Headings ---------- */
.auth-heading {
  font-size: 1.55rem;
  font-weight: 750;
  text-align: center;
  margin: 0 0 .35rem;
  letter-spacing: -.025em;
}
html[data-theme="dark"] .auth-heading { color: #fafafa; }
html[data-theme="light"] .auth-heading { color: #0f172a; }

.auth-subheading {
  text-align: center;
  font-size: .9rem;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}
html[data-theme="dark"] .auth-subheading { color: #a1a1aa; }
html[data-theme="light"] .auth-subheading { color: #64748b; }

/* ---------- Social / OAuth buttons ---------- */
.auth-social-group {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .78rem 1rem;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
/* Google */
.auth-social-btn.google {
  border-color: rgba(128,128,128,.25);
}
html[data-theme="dark"] .auth-social-btn.google {
  background: #1a1a1c;
  color: #e4e4e7;
}
html[data-theme="light"] .auth-social-btn.google {
  background: #fff;
  color: #374151;
}
.auth-social-btn.google:hover {
  border-color: #4285F4;
  box-shadow: 0 4px 16px rgba(66,133,244,.18);
  transform: translateY(-1px);
}
/* LinkedIn */
.auth-social-btn.linkedin {
  background: #0077b5;
  color: #fff;
}
html[data-theme="dark"] .auth-social-btn.linkedin {
  background: #005885;
  color: #fff !important;
}
.auth-social-btn.linkedin:hover {
  background: #006399;
  box-shadow: 0 4px 16px rgba(0,119,181,.25);
  transform: translateY(-1px);
}
html[data-theme="dark"] .auth-social-btn.linkedin:hover {
  background: #00486f;
}
/* Facebook */
.auth-social-btn.facebook {
  background: #1877f2;
  color: #fff;
}
html[data-theme="dark"] .auth-social-btn.facebook {
  background: #1456b8;
  color: #fff !important;
}
.auth-social-btn.facebook:hover {
  background: #166fe5;
  box-shadow: 0 4px 16px rgba(24,119,242,.25);
  transform: translateY(-1px);
}
html[data-theme="dark"] .auth-social-btn.facebook:hover {
  background: #114aa0;
}

/* ---------- Divider ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
}
html[data-theme="dark"] .auth-divider::before,
html[data-theme="dark"] .auth-divider::after { background: rgba(255,255,255,.08); }
html[data-theme="light"] .auth-divider::before,
html[data-theme="light"] .auth-divider::after { background: #e5e7eb; }
.auth-divider span {
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
html[data-theme="dark"] .auth-divider span { color: #a1a1aa; }
html[data-theme="light"] .auth-divider span { color: #9ca3af; }

/* ---------- Form ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.auth-field label {
  font-size: .82rem;
  font-weight: 600;
}
html[data-theme="dark"] .auth-field label { color: #a1a1aa; }
html[data-theme="light"] .auth-field label { color: #374151; }

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-forgot-link {
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
}
html[data-theme="dark"] .auth-forgot-link { color: #818cf8; }
html[data-theme="light"] .auth-forgot-link { color: #4f46e5; }
.auth-forgot-link:hover { text-decoration: underline; }

/* Input wrapper with icon */
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
html[data-theme="dark"] .auth-input-icon { color: #3f3f46; }
html[data-theme="light"] .auth-input-icon { color: #9ca3af; }

.auth-input {
  width: 100%;
  padding: .78rem .85rem .78rem 2.6rem;
  border-radius: 10px;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
  border: 1.5px solid transparent;
  outline: none;
  font-family: inherit;
}
html[data-theme="dark"] .auth-input {
  background: #18181b;
  color: #fafafa;
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .auth-input::placeholder { color: #3f3f46; }
html[data-theme="dark"] .auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
html[data-theme="light"] .auth-input {
  background: #f9fafb;
  color: #1e293b;
  border-color: #e5e7eb;
}
html[data-theme="light"] .auth-input::placeholder { color: #9ca3af; }
html[data-theme="light"] .auth-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.08);
  background: #fff;
}

.auth-input-hint {
  font-size: .75rem;
  margin-top: .1rem;
}
html[data-theme="dark"] .auth-input-hint { color: #3f3f46; }
html[data-theme="light"] .auth-input-hint { color: #9ca3af; }

.auth-input-error {
  font-size: .78rem;
  color: #ef4444;
  margin-top: .1rem;
}

/* ---------- Submit button ---------- */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 650;
  cursor: pointer;
  transition: all .2s ease;
  margin-top: .35rem;
  font-family: inherit;
  color: #fff;
}
.auth-submit.primary {
  background: linear-gradient(135deg,#6366f1 0%,#4f46e5 100%);
  box-shadow: 0 3px 12px rgba(99,102,241,.28);
}
html[data-theme="dark"] .auth-submit.primary {
  background: linear-gradient(135deg,#4338ca 0%,#3730a3 100%);
  box-shadow: 0 3px 12px rgba(67,56,202,.3);
}
.auth-submit.primary:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,.38);
  transform: translateY(-1px);
}
html[data-theme="dark"] .auth-submit.primary:hover {
  box-shadow: 0 6px 20px rgba(67,56,202,.38);
}
.auth-submit.green {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%);
  box-shadow: 0 3px 12px rgba(16,185,129,.28);
}
html[data-theme="dark"] .auth-submit.green {
  background: linear-gradient(135deg,#065f46 0%,#064e3b 100%);
  box-shadow: 0 3px 12px rgba(4,120,87,.3);
}
.auth-submit.green:hover {
  box-shadow: 0 6px 20px rgba(16,185,129,.38);
  transform: translateY(-1px);
}
html[data-theme="dark"] .auth-submit.green:hover {
  box-shadow: 0 6px 20px rgba(4,120,87,.38);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit svg { transition: transform .2s; }
.auth-submit:hover svg { transform: translateX(3px); }

/* ---------- Footer links ---------- */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .88rem;
}
html[data-theme="dark"] .auth-footer { color: #a1a1aa; }
html[data-theme="light"] .auth-footer { color: #64748b; }
.auth-footer a {
  font-weight: 600;
  text-decoration: none;
}
html[data-theme="dark"] .auth-footer a { color: #818cf8; }
html[data-theme="light"] .auth-footer a { color: #4f46e5; }
.auth-footer a:hover { text-decoration: underline; }

.auth-terms {
  text-align: center;
  margin-top: .85rem;
  font-size: .72rem;
  line-height: 1.6;
}
html[data-theme="dark"] .auth-terms { color: #a1a1aa; }
html[data-theme="light"] .auth-terms { color: #9ca3af; }
.auth-terms a { text-decoration: none; }
html[data-theme="dark"] .auth-terms a { color: #cbd5e1; }
html[data-theme="light"] .auth-terms a { color: #6b7280; }
.auth-terms a:hover { text-decoration: underline; }

/* ---------- Flash / alert messages ---------- */
.auth-flash {
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.auth-flash.info {
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.2);
  color: #818cf8;
}
.auth-flash.success {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2);
  color: #34d399;
}
.auth-flash.error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  color: #f87171;
}
html[data-theme="light"] .auth-flash.info {
  background: rgba(79,70,229,.06);
  border-color: rgba(79,70,229,.15);
  color: #4f46e5;
}
html[data-theme="light"] .auth-flash.success {
  background: rgba(5,150,105,.06);
  border-color: rgba(5,150,105,.15);
  color: #059669;
}
html[data-theme="light"] .auth-flash.error {
  background: rgba(239,68,68,.06);
  border-color: rgba(239,68,68,.15);
  color: #dc2626;
}

/* ---------- Confirmation page specifics ---------- */
.auth-confirm-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .auth-confirm-icon {
  background: rgba(99,102,241,.12);
  color: #818cf8;
}
html[data-theme="light"] .auth-confirm-icon {
  background: rgba(79,70,229,.08);
  color: #4f46e5;
}
.auth-confirm-email {
  display: inline-block;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 6px;
  font-size: .88rem;
  word-break: break-all;
}
html[data-theme="dark"] .auth-confirm-email {
  background: rgba(255,255,255,.06);
  color: #d4d4d8;
}
html[data-theme="light"] .auth-confirm-email {
  background: rgba(0,0,0,.04);
  color: #374151;
}
.auth-confirm-steps {
  text-align: left;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.auth-confirm-steps li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
  line-height: 1.5;
}
html[data-theme="dark"] .auth-confirm-steps li { color: #a1a1aa; }
html[data-theme="light"] .auth-confirm-steps li { color: #4b5563; }
.auth-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
html[data-theme="dark"] .auth-step-num {
  background: rgba(99,102,241,.15);
  color: #818cf8;
}
html[data-theme="light"] .auth-step-num {
  background: rgba(79,70,229,.1);
  color: #4f46e5;
}
.auth-confirm-help {
  text-align: center;
  font-size: .8rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  line-height: 1.6;
}
html[data-theme="dark"] .auth-confirm-help {
  color: #52525b;
  border-top: 1px solid rgba(255,255,255,.06);
}
html[data-theme="light"] .auth-confirm-help {
  color: #9ca3af;
  border-top: 1px solid rgba(0,0,0,.06);
}
.auth-confirm-help a {
  font-weight: 600;
  text-decoration: none;
}
html[data-theme="dark"] .auth-confirm-help a { color: #818cf8; }
html[data-theme="light"] .auth-confirm-help a { color: #4f46e5; }
.auth-confirm-help a:hover { text-decoration: underline; }

/* Password strength indicator */
.auth-pw-strength {
  display: flex;
  gap: 4px;
  margin-top: .35rem;
}
.auth-pw-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  transition: background .3s;
}
html[data-theme="dark"] .auth-pw-bar { background: rgba(255,255,255,.06); }
html[data-theme="light"] .auth-pw-bar { background: #e5e7eb; }
.auth-pw-bar.weak { background: #ef4444; }
.auth-pw-bar.fair { background: #f59e0b; }
.auth-pw-bar.good { background: #10b981; }
.auth-pw-bar.strong { background: #6366f1; }

.auth-pw-label {
  font-size: .72rem;
  font-weight: 500;
  margin-top: .15rem;
  min-height: 1rem;
}

/* ---------- Password toggle ---------- */
.auth-pw-toggle {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .auth-pw-toggle { color: #3f3f46; }
html[data-theme="light"] .auth-pw-toggle { color: #9ca3af; }
.auth-pw-toggle:hover {
  color: #6366f1;
}

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
  .auth-page { padding: 1rem; }
  .auth-card { padding: 2rem 1.5rem; border-radius: 16px; }
  .auth-heading { font-size: 1.35rem; }
  .auth-social-btn { padding: .7rem .85rem; font-size: .88rem; }
}
