/*
 * Dooer - login look for login.dooer.com (Kerros custom mode, contract 06).
 *
 * The page around the box: frame.sv.html / frame.en.html. The box itself is drawn by Kerros
 * inside {{form}} and restyled here only through its stable .k-* classes.
 * Look: the bookkeeping app (Inter, zinc neutrals, slate rail, 8-14px radii, quiet cards)
 * with the Dooer yellow (#FFF000) as the one loud colour: the sun, the dot, the main button.
 *
 * Rules kept: no @import, nothing from other sites, none only to files uploaded with this look.
 * Inter is already served by the login page itself, so no font files are needed.
 * Uploaded files used: dooer-logo.svg, dooer-logo-white.svg (in the HTML).
 */

:root {
  --d-yellow: #FFF000;
  --d-yellow-hover: #F7E800;
  --d-yellow-press: #EBDC00;
  --d-yellow-line: #D6C900;
  --d-yellow-halo: rgba(255, 240, 0, 0.6);
  --d-ink: #18181B;
  --d-ink-2: #52525B;
  --d-ink-3: #71717A;
  --d-ink-4: #A1A1AA;
  --d-line: #E4E4E7;
  --d-line-2: #D4D4D8;
  --d-bg: #FAFAFA;
  --d-surface: #FFFFFF;
  --d-surface-2: #F4F4F5;
  --d-slate: #1E293B;
  --d-slate-2: #273449;
  --d-slate-deep: #111A2B;
  --d-rail-ink: #E2E8F0;
  --d-rail-mute: #94A3B8;
  --d-bad: #DC2626;
  --d-bad-t: #B91C1C;
  --d-bad-bg: #FEF2F2;
  --d-bad-b: #FECACA;
  --d-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* The app colours of the bookkeeping rail (tokens.css --c-*). */
  --d-c-books: #F59E0B;
  --d-c-bank: #14B8A6;
  --d-c-tax: #6366F1;
  --d-c-portal: #0EA5E9;

  /* Kerros' own theme ramp: whatever in the box has no .k-* class follows it (ink, not blue). */
  --k-primary-50: 255 253 230;
  --k-primary-100: 255 250 194;
  --k-primary-200: 255 245 128;
  --k-primary-500: 24 24 27;
  --k-primary-600: 24 24 27;
  --k-primary-700: 9 9 11;

  /* The BankID button is drawn with these. */
  --kerros-color-primary: #1E293B;
  --kerros-color-on-primary: #FFFFFF;
  --kerros-radius: 10px;
  --kerros-font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── The page ─────────────────────────────────────────────────────────────── */

html.k-custom body {
  margin: 0;
  background: var(--d-bg);
  color: var(--d-ink);
  font-family: var(--d-font);
  -webkit-font-smoothing: antialiased;
}

.dr-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(400px, 42%) minmax(0, 1fr);
}

/* Left: the slate panel, the bookkeeping app's rail colour, with the Dooer sun. */
.dr-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 48px 36px;
  color: var(--d-rail-ink);
  background-color: var(--d-slate);
  background-image:
    radial-gradient(90% 70% at 0% 100%, var(--d-slate-2) 0%, rgba(39, 52, 73, 0) 70%),
    linear-gradient(180deg, var(--d-slate) 0%, var(--d-slate-deep) 100%);
}

.dr-sun {
  position: absolute;
  width: 460px;
  height: 460px;
  top: -190px;
  right: -170px;
  border-radius: 50%;
  background: var(--d-yellow);
  pointer-events: none;
}

.dr-sun::after {
  content: "";
  position: absolute;
  inset: -44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 0, 0.22);
}

.dr-panel-top {
  position: relative;
  z-index: 1;
}

.dr-panel-top img {
  display: block;
  height: 30px;
  width: auto;
}

.dr-pitch {
  position: relative;
  z-index: 1;
  margin-top: auto;
  max-width: 440px;
}

.dr-eyebrow {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--d-rail-mute);
}

.dr-headline {
  margin: 0 0 16px;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.dr-headline mark {
  background: none;
  color: var(--d-yellow);
}

.dr-lede {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.55;
  color: #CBD5E1;
}

/* A quiet copy of the app's own left rail: the apps behind this sign-in. */
.dr-rail {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  gap: 2px;
  max-width: 320px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dr-rail li {
  --c: var(--d-rail-mute);
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
  color: var(--d-rail-ink);
}

.dr-rail li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}

.dr-rail .dr-books { --c: var(--d-c-books); }
.dr-rail .dr-bank { --c: var(--d-c-bank); }
.dr-rail .dr-tax { --c: var(--d-c-tax); }
.dr-rail .dr-portal { --c: var(--d-c-portal); }

.dr-rail .dr-on {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.dr-rail .dr-ai {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--d-yellow);
  color: var(--d-ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dr-panel-foot {
  position: relative;
  z-index: 1;
  margin: 36px 0 0;
  font-size: 12.5px;
  color: var(--d-rail-mute);
}

/* Right: the canvas the box sits on. */
.dr-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 32px 28px;
  box-sizing: border-box;
}

.dr-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 40px;
}

/* A column, so the box Kerros puts here always gets the full width (and stays 420 px wide). */
.dr-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

.dr-form .k-page {
  max-width: 420px;
}

.dr-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 0;
  font-size: 12.5px;
  color: var(--d-ink-3);
}

.dr-foot p {
  margin: 0;
}

.dr-foot a {
  color: var(--d-ink-2);
  font-weight: 550;
  text-decoration: none;
}

.dr-foot a:hover {
  color: var(--d-ink);
  text-decoration: underline;
  text-decoration-color: var(--d-yellow-line);
  text-underline-offset: 3px;
}

/* {{language}}: the app's segmented control. */
html.k-custom .dr-top .k-language {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--d-surface-2);
  border: 1px solid var(--d-line);
  font-size: 12.5px;
  line-height: 1;
}

html.k-custom .dr-top .k-language-option {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--d-ink-3);
  opacity: 1;
  font-weight: 500;
}

html.k-custom .dr-top .k-language-option:hover {
  color: var(--d-ink);
}

html.k-custom .dr-top .k-language-option[aria-current="true"] {
  background: var(--d-surface);
  color: var(--d-ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.1);
}

/* ── The box (drawn by Kerros) ────────────────────────────────────────────── */

html.k-custom .k-box {
  padding: 36px 36px 32px;
  border: 1px solid var(--d-line);
  border-radius: 16px;
  background: var(--d-surface);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04), 0 16px 40px -12px rgba(15, 23, 42, 0.12);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Heading block: left aligned like the app's page headers, with the Dooer dot above it. */
html.k-custom .k-box > div:first-child {
  margin-bottom: 28px;
  text-align: left;
}

html.k-custom .k-title {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--d-ink);
}

html.k-custom .k-title::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--d-yellow);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 27, 0.08);
}

html.k-custom .k-text {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--d-ink-3);
}

html.k-custom .k-label {
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--d-ink-3);
}

html.k-custom .k-input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--d-line-2);
  border-radius: 10px;
  background: var(--d-surface);
  font-size: 15px;
  color: var(--d-ink);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.k-custom .k-input.pr-10 {
  padding-right: 44px;
}

html.k-custom .k-input::placeholder {
  color: var(--d-ink-4);
}

html.k-custom .k-input:hover {
  border-color: var(--d-ink-4);
}

html.k-custom .k-input:focus {
  outline: none;
  border-color: var(--d-ink);
  box-shadow: 0 0 0 4px var(--d-yellow-halo);
}

html.k-custom .k-input.input-error {
  border-color: var(--d-bad);
}

html.k-custom .k-input.input-error:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16);
}

html.k-custom .k-box input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--d-ink);
  border-radius: 5px;
}

html.k-custom .k-box label > span {
  color: var(--d-ink-2);
}

/* Buttons: Dooer yellow for the one main action, white for the rest. */
html.k-custom .k-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transform: none;
}

html.k-custom .k-button-primary {
  border: 1px solid var(--d-yellow-line);
  background: var(--d-yellow);
  background-image: none;
  color: var(--d-ink);
  box-shadow: inset 0 -2px 0 rgba(24, 24, 27, 0.07), 0 1px 2px rgba(24, 24, 27, 0.06);
}

html.k-custom .k-button-primary:hover {
  background: var(--d-yellow-hover);
  background-image: none;
  box-shadow: inset 0 -2px 0 rgba(24, 24, 27, 0.09), 0 8px 20px -8px rgba(160, 150, 0, 0.55);
}

html.k-custom .k-button-primary:active {
  background: var(--d-yellow-press);
  transform: translateY(1px);
}

html.k-custom .k-button:not(.k-button-primary) {
  border: 1px solid var(--d-line-2);
  background: var(--d-surface);
  color: var(--d-ink);
  font-weight: 550;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
}

html.k-custom .k-button:not(.k-button-primary):hover {
  border-color: var(--d-ink-4);
  background: var(--d-surface-2);
}

html.k-custom .k-button:focus-visible,
html.k-custom .k-bankid button:focus-visible {
  outline: 2px solid var(--d-ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--d-yellow-halo);
}

html.k-custom .k-button:disabled {
  opacity: 0.5;
}

html.k-custom .k-bankid:hover {
  --kerros-color-primary: #273449;
}

html.k-custom .k-bankid button {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

/* "or" between the ways in. */
html.k-custom .k-divider {
  margin: 22px 0;
}

html.k-custom .k-divider .border-t {
  border-color: var(--d-line);
}

html.k-custom .k-divider span {
  padding: 0 12px;
  background: var(--d-surface);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--d-ink-4);
}

/* Links: ink with a yellow marker stroke that fills on hover. */
html.k-custom .k-link {
  padding: 0 1px;
  color: var(--d-ink);
  font-weight: 600;
  text-decoration: none;
  background-image: linear-gradient(var(--d-yellow), var(--d-yellow));
  background-repeat: no-repeat;
  background-position: 0 94%;
  background-size: 100% 0.3em;
  transition: background-size 0.15s ease;
}

html.k-custom .k-link:hover {
  color: var(--d-ink);
  text-decoration: none;
  background-size: 100% 100%;
}

html.k-custom .k-link:focus-visible {
  outline: 2px solid var(--d-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Two-step code: six cells. */
html.k-custom .k-code {
  gap: 10px;
}

html.k-custom .k-code input {
  width: 48px;
  height: 58px;
  border: 1px solid var(--d-line-2);
  border-radius: 10px;
  background: var(--d-surface);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--d-ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.k-custom .k-code input:focus {
  outline: none;
  border-color: var(--d-ink);
  box-shadow: 0 0 0 4px var(--d-yellow-halo);
}

/* Choose company: rows like the app's cards, a yellow band on the one you point at. */
html.k-custom .k-list-item > button,
html.k-custom .k-list-item > div {
  position: relative;
  padding: 13px 40px 13px 16px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: var(--d-surface);
  box-shadow: none;
}

html.k-custom .k-list-item > button::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-top: 2px solid var(--d-ink-4);
  border-right: 2px solid var(--d-ink-4);
  transform: rotate(45deg);
}

html.k-custom .k-list-item > button:hover {
  border-color: var(--d-ink-4);
  background: #FFFEF2;
  box-shadow: inset 4px 0 0 var(--d-yellow);
}

html.k-custom .k-list-item > button:hover::after {
  border-color: var(--d-ink);
}

html.k-custom .k-list-item span:first-child {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--d-ink);
}

html.k-custom .k-list-item span + span {
  margin-top: 2px;
  font-size: 12px;
  color: var(--d-ink-3);
}

/* Errors. */
html.k-custom div.k-error {
  border: 1px solid var(--d-bad-b);
  border-radius: 10px;
  background: var(--d-bad-bg);
  color: var(--d-bad-t);
}

html.k-custom p.k-error {
  color: var(--d-bad-t);
  font-size: 13px;
}

html.k-custom .k-footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--d-ink-4);
}

html.k-custom .k-support {
  color: var(--d-ink-2);
}

/* ── Phone and narrow windows ─────────────────────────────────────────────── */

@media (max-width: 959px) {
  .dr-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .dr-panel {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    padding: 18px 20px;
  }

  .dr-panel-top img {
    height: 24px;
  }

  .dr-pitch,
  .dr-panel-foot {
    display: none;
  }

  .dr-sun {
    width: 150px;
    height: 150px;
    top: -64px;
    right: -38px;
  }

  .dr-sun::after {
    inset: -18px;
  }

  .dr-main {
    min-height: 0;
    padding: 14px 16px 28px;
  }

  .dr-form {
    justify-content: flex-start;
    padding: 14px 0 28px;
  }

  html.k-custom .k-box {
    padding: 26px 20px 24px;
    border-radius: 14px;
  }

  html.k-custom .k-title {
    font-size: 23px;
  }
}

@media (max-width: 420px) {
  html.k-custom .k-code {
    gap: 6px;
  }

  html.k-custom .k-code input {
    width: 40px;
    height: 52px;
    font-size: 20px;
  }
}

@media (max-width: 350px) {
  html.k-custom .k-code input {
    width: 34px;
  }
}

/* The brand colour is set on <html> as an inline style, which beats :root.
   Set Kerros' variables again on body so the box and BankID keep the Dooer look. */
html.k-custom body {
  --k-primary-50: 255 253 230;
  --k-primary-100: 255 250 194;
  --k-primary-200: 255 245 128;
  --k-primary-500: 24 24 27;
  --k-primary-600: 24 24 27;
  --k-primary-700: 9 9 11;

  /* The BankID button is drawn with these. */
  --kerros-color-primary: #1E293B;
  --kerros-color-on-primary: #FFFFFF;
  --kerros-radius: 10px;
  --kerros-font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}