/* Auth-sidor — matchar wiki.thern.io visuella stil */
:root {
  --w-bg: #f4ede0;
  --w-paper: #ffffff;
  --w-cream: #f4ede0;
  --w-body: #2b2b2b;
  --w-muted: #6b6357;
  --w-link: #0645ad;
  --w-danger: #b00020;
  --w-ok: #2e7d32;
  --w-rule: #d8cdb5;
  --w-serif: "Source Serif 4","Source Serif Pro",Georgia,serif;
  --w-display: "Cormorant Garamond","EB Garamond","Source Serif 4",serif;
  --w-mono: "JetBrains Mono","Fira Mono",ui-monospace,monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--w-bg);
  color: var(--w-body);
  font-family: var(--w-serif);
  font-size: 1.04rem;
  line-height: 1.6;
  min-height: 100vh;
}

.auth-shell {
  max-width: 460px;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
}

.auth-card {
  background: var(--w-paper);
  border: 1px solid var(--w-rule);
  border-radius: 6px;
  padding: 2rem 2rem 1.6rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.auth-logo {
  display: block;
  font-family: var(--w-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--w-body);
  text-decoration: none;
  text-align: center;
  margin-bottom: 0.4rem;
}
.auth-logo small {
  display: block;
  font-family: var(--w-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--w-muted);
  margin-top: 0.15rem;
}

.auth-card h1 {
  font-family: var(--w-display);
  font-weight: 600;
  font-size: 1.75rem;
  margin: 1.5rem 0 0.4rem;
  text-align: center;
}
.auth-card .lead {
  text-align: center;
  color: var(--w-muted);
  margin: 0 0 1.6rem;
  font-size: 0.96rem;
}

.field {
  display: block;
  margin: 0 0 1rem;
}
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--w-muted);
  font-family: var(--w-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--w-rule);
  border-radius: 4px;
  background: #fff;
  font-family: var(--w-serif);
  font-size: 1rem;
  color: var(--w-body);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.field input:focus {
  outline: none;
  border-color: var(--w-link);
  box-shadow: 0 0 0 2px rgba(6,69,173,0.15);
}
.field input[inputmode="numeric"] {
  font-family: var(--w-mono);
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.hint {
  font-size: 0.82rem;
  color: var(--w-muted);
  margin: -0.4rem 0 1rem;
}

.btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--w-link);
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-family: var(--w-serif);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
  margin-top: 0.4rem;
}
.btn:hover { background: #053a90; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--w-link);
  border: 1px solid var(--w-rule);
}
.btn-secondary:hover { background: var(--w-cream); }

.alt-links {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--w-rule);
  text-align: center;
  font-size: 0.92rem;
}
.alt-links a {
  color: var(--w-link);
  text-decoration: none;
}
.alt-links a:hover { text-decoration: underline; }

.msg {
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  margin: 0 0 1rem;
  font-size: 0.93rem;
  display: none;
}
.msg.err {
  background: #fdeaec;
  color: var(--w-danger);
  border: 1px solid #f3c2c8;
  display: block;
}
.msg.ok {
  background: #eaf6ec;
  color: var(--w-ok);
  border: 1px solid #c2e3c8;
  display: block;
}
.msg.info {
  background: #f0f5fc;
  color: #144a8e;
  border: 1px solid #cfdef7;
  display: block;
}

/* Turnstile-widget visas bara när vi behöver — start är hidden. */
.captcha {
  display: none;
  margin: 0 0 1rem;
}
.captcha.visible { display: block; }

.code-help {
  font-size: 0.86rem;
  color: var(--w-muted);
  text-align: center;
  margin: 0.6rem 0 0;
}
.code-help a {
  color: var(--w-link);
  text-decoration: none;
}
.code-help a:hover { text-decoration: underline; }

.account-card .row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--w-rule);
}
.account-card .row:last-child { border-bottom: 0; }
.account-card .row .k { color: var(--w-muted); font-family: var(--w-mono); font-size: 0.85rem; }

@media (max-width: 520px) {
  .auth-shell { margin: 1.5rem auto 3rem; }
  .auth-card { padding: 1.4rem 1.2rem 1.2rem; }
}
