/* css/pages/auth.css
   Används av både login.js och signup.js. */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
}

.auth-page__logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-8);
  cursor: pointer;
}

.auth-page__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page__logo-icon svg { width: 18px; height: 18px; }

.auth-page__logo-text {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-1);
}

/* ─── Kort ────────────────────────────────────────────────────────── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.auth-card__icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--accent-subtle);
  border-radius: var(--r-lg);
  margin: 0 auto var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 24px;
}

.auth-card__title {
  font-family: var(--font-ui);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-1);
  text-align: center;
  margin-bottom: var(--s-2);
}

.auth-card__sub {
  font-size: var(--text-sm);
  color: var(--text-2);
  text-align: center;
  margin-bottom: var(--s-6);
  line-height: 1.55;
}

/* ─── Formulärfält ────────────────────────────────────────────────── */
.auth-field { margin-bottom: var(--s-4); }

.auth-field__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-2);
  margin-bottom: var(--s-2);
}

.auth-field__input {
  width: 100%;
  padding: 11px var(--s-4);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.auth-field__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 94, 102, 0.08);
}

.auth-field__hint {
  font-size: var(--text-xs);
  color: var(--text-2);
  margin-top: var(--s-1);
}

/* ─── Felmeddelande ───────────────────────────────────────────────── */
.auth-error {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  color: var(--loss);
  font-size: var(--text-sm);
  line-height: 1.4;
  margin-bottom: var(--s-4);
  display: none;
}

.auth-error.visible { display: block; }

/* ─── Villkorstext ────────────────────────────────────────────────── */
.auth-terms {
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: var(--s-4);
}

.auth-terms a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ─── Submit-knapp + footer ───────────────────────────────────────── */
.auth-card__submit {
  width: 100%;
  margin-top: var(--s-2);
  margin-bottom: var(--s-5);
}

.auth-card__footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-2);
}

.auth-card__footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
