/* auth.css — login / register / forgot / reset. Matches Pelgo's landing aesthetic. */
:root {
  --natt: #1B3A4B;
  --fjord: #2D5F7A;
  --accent: #60A5FA;
  --bg: #FAFAF7;
  --text: #1C1917;
  --text-muted: #8C8780;
  --border: #E5E2DB;
  --danger: #B91C1C;
  --ok: #16A34A;
  --font: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

/* Honour [hidden] even on elements that set display (.btn, .auth-divider) —
   used to gate the Google button + divider behind the feature flag. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(40px + env(safe-area-inset-bottom, 0px));
}

.auth-brand {
  font-family: var(--display);
  font-size: 28px;
  color: var(--natt);
  text-decoration: none;
  letter-spacing: 0.3px;
  margin-bottom: 22px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 8px 30px rgba(27, 58, 75, 0.06);
}

.auth-card h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 23px;
  margin: 0 0 6px;
  color: var(--natt);
}

.auth-sub {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--natt);
}
.auth-field input {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--fjord);
  box-shadow: 0 0 0 3px rgba(45, 95, 122, 0.12);
}

.btn {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--natt); color: #fff; }
.btn-primary:hover { background: #16313f; }
.btn-primary:disabled { opacity: .55; cursor: default; }

.btn-google {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google:hover { background: #fafafa; border-color: #d8d4cb; }
.btn-google svg { width: 18px; height: 18px; flex: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: lowercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-foot {
  margin-top: 20px;
  font-size: 13px;
  text-align: center;
  color: var(--text-muted);
}
.auth-foot a { color: var(--fjord); text-decoration: none; font-weight: 500; }
.auth-foot a:hover { text-decoration: underline; }
.auth-foot .dot { margin: 0 8px; opacity: .5; }

/* Site-wide legal line (foretaksnavn + org.nr) under the auth card. */
.auth-legal { margin-top: 22px; font-size: 12px; line-height: 1.6; color: var(--text-muted); text-align: center; }
.auth-legal a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* status / error banners */
.auth-msg {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: none;
}
.auth-msg.show { display: block; }
.auth-msg.error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.auth-msg.ok    { background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.auth-msg.info  { background: #F0F6FB; color: var(--natt); border: 1px solid #D6E6F2; }
.auth-msg a { color: inherit; font-weight: 600; }

.auth-success-panel { display: none; text-align: center; }
.auth-success-panel.show { display: block; }
.auth-success-panel .ico { font-size: 34px; margin-bottom: 10px; }
.auth-resend-q { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* Prominent "check your spam folder" reminder — emails to new domains
   (esp. Outlook/Hotmail) often land in junk until reputation builds. */
.auth-spam-note {
  display: flex; align-items: flex-start; gap: 9px; text-align: left;
  background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 10px;
  padding: 11px 13px; margin: 0 0 16px;
  font-size: 13px; line-height: 1.5; color: #9A3412;
}
.auth-spam-note .spam-ico { flex: none; font-size: 16px; line-height: 1.3; }
.auth-spam-note[hidden] { display: none; }
