/*
 * K1 — app2-login (D-K1.1). Mobil-først, 380px (D-APP-12).
 *
 * Eget lag: deler KUN tokens.css med resten. app2-shell.css lastes ikke her —
 * loginsiden er et eget dokument uten skall.
 *
 * ── FARGEREGELEN ───────────────────────────────────────────────────────────
 * `--acc*` KUN på identitet (header) og handling (primærknapp, tekstknapper).
 * Feilmeldingen bruker statustokens, aldri aksent — bytter tenanten
 * aksentfarge, står feilfargen stille. Ingen hex her.
 *
 * ── TRYKKFLATER (fasiten) ──────────────────────────────────────────────────
 * Felt 56px, primærknapp 56px, «Bytt bruker» 48px. Alle over 44px-kravet.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--card);
  color: var(--ink-1);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%;
}

.k1-rot {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── kundens merkevare øverst (D-LG, design/innlogging-tekniker.html) ──
   [SUPERSERT 2026-10-05] Var en AKSENTFLATE (--acc) med initialer og «ServFix». Nå: kundens
   logo + navn + «Tekniker» på lys flate. Aksenten brukes bare på handling (knapp, fokus).
   ServFix står nederst som «Levert av», alltid på lys flate (.k1-levert), aldri på aksent. */

.k1-topp {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 56px 28px 0;
  padding-top: max(56px, env(safe-area-inset-top));
}

.k1-kunde-merke {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}

.k1-kunde-merke img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.k1-kunde-tekst {
  min-width: 0;
}

.k1-kunde-navn {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.k1-topp--uten .k1-kunde-navn {
  font-size: 22px;
  font-weight: 650;
}

/* D-LG.4: ServFix-logoen i kundens plass. */
.k1-hovedlogo {
  height: 28px;
  width: auto;
  display: block;
}

.k1-levert {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  font-size: 11px;
  color: var(--ink-4);
}

.k1-levert-logo {
  height: 16px;
  width: auto;
  display: block;
}

/* ── skjemaflaten ── */

.k1-kropp {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.k1-tittel {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.22;
}

/* Kjent bruker: identiteten leses FØRST — «dette er meg». */
.k1-identitet {
  display: flex;
  align-items: center;
  gap: 12px;
}

.k1-identitet-merke {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--ink-2);
  font-size: 18px;
  font-weight: 700;
}

.k1-identitet-navn {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k1-felt {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.k1-etikett {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.k1-input {
  height: 56px;
  padding: 0 14px;
  border: 1.5px solid var(--line-input);
  border-radius: var(--r-card);
  background: var(--card);
  color: var(--ink-1);
  font-size: var(--fs-felt);   /* D-ZOOM.1 — tokenet baerer naa begrunnelsen */
  font-family: inherit;
}

.k1-input:focus {
  outline: none;
  border-color: var(--acc-strong);
}

/* Feil er STATUS, aldri aksent. */
.k1-feil {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--status-danger-bg);
  color: var(--status-danger-fg);
  font-size: 13.5px;
  line-height: 1.45;
}

.k1-primar {
  min-height: 56px;
  border: none;
  border-radius: var(--r-card);
  background: var(--acc);
  color: var(--acc-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.k1-primar:disabled { opacity: 0.6; cursor: default; }

.k1-tekstknapp {
  min-height: 48px;
  border: none;
  background: none;
  color: var(--acc-strong);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.k1-hint {
  font-size: 13.5px;
  color: var(--ink-5);
  line-height: 1.5;
}

/* Desktop er forstørret variant (D-APP-12) — mobilformen beholdes. */
@media (min-width: 720px) {
  .k1-rot {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px var(--line);
  }
}

/* ── [hidden] (R-A4 / D-R4.3, 2026-09-16) ────────────────────────────────────
   .k1-feil { display: flex } slo nettleserens [hidden] { display: none }, saa
   lenkesidens tomme feilboks sto rosa foer noe var skrevet (A16-65). */
[hidden] {
  display: none !important;
}

/* ── bredere skjerm: papirbakgrunn, kunden og kortet midtstilt (design: desktop 360 px kort) ── */
@media (min-width: 481px) {
  html, body { background: var(--paper); }

  .k1-topp {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    margin-top: auto;
    padding: 32px 28px 0;
  }

  .k1-kunde-merke { width: 52px; height: 52px; }

  .k1-kropp {
    flex: 0 0 auto;
    overflow: visible;
    width: 360px;
    max-width: 100%;
    margin: 20px auto auto;
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 1px 2px rgba(16, 20, 26, 0.05);
  }
}
