/* login.html */

body.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.login-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--blue-500) 100%);
  z-index: 0;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(13,43,78,.25);
  padding: 48px 44px;
  width: 100%;
  max-width: 440px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}
.login-logo .logo-icon { font-size: 1.6rem; }
.login-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-900);
}

.login-card h1 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-align: center;
}
.login-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.forgot-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--blue-900);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.forgot-link:hover { color: var(--blue-700); }

.login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--blue-900);
  box-shadow: 0 0 0 3px rgba(45,107,201,.12);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
}
.toggle-pw:hover { color: var(--text); }

.login-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #b91c1c;
  font-weight: 500;
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--blue-900);
  color: var(--white);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.2s;
  margin-top: 4px;
}
.login-btn:hover { background: var(--blue-800); transform: translateY(-1px); }
.login-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

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

.login-help {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 24px;
}
.login-help a { color: var(--blue-900); text-decoration: underline; text-underline-offset: 2px; }

.back-to-forside { margin-top: 24px; text-align: center; }

.login-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px;
  font-size: 0.78rem;
  color: rgba(255,255,255,.45);
}

/* ---- Registrering ---- */
.reg-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.reg-step.active .step-circle   { background: var(--blue-900); color: var(--white); }
.reg-step.completed .step-circle { background: #16a34a; color: var(--white); }
.step-lbl { font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.reg-step.active .step-lbl { color: var(--blue-900); }
.reg-step-line { flex: 1; height: 2px; background: var(--border); width: 48px; margin: 0 4px; margin-bottom: 16px; }

.pw-hint { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.reg-nav { display: flex; gap: 10px; align-items: center; }
.back-step-btn {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s;
  white-space: nowrap;
}
.back-step-btn:hover { background: var(--border); color: var(--text); }

.reg-success { text-align: center; padding: 20px 0; }
.reg-success-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.reg-success h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.reg-success p  { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ---- Glemt passord modal ---- */
.glemt-overlay {
  position: fixed; inset: 0;
  background: rgba(13,43,78,.5);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: gfade 0.2s ease;
}
.glemt-overlay[hidden] { display: none; }
@keyframes gfade { from { opacity: 0; } to { opacity: 1; } }
.glemt-box {
  background: var(--white);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 380px; width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(13,43,78,.2);
  animation: slide-up 0.25s ease;
}
.glemt-box h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.glemt-box p  { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.glemt-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); color: var(--muted);
  font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
}
.glemt-close:hover { background: var(--border); }
.glemt-box .login-btn { margin-top: 0; }

@media (max-width: 480px) {
  .login-card { padding: 32px 24px; }
}
