/* ============================================================
   Kundenkonto WOSA Transkription
   Baut auf /apps/transcription/assets/css/app.css auf (Tokens, Header,
   Footer, Buttons, Punktraster). Hier nur, was das Konto zusätzlich braucht.
   Dunkler Kopfbereich wie der Hero der Transkription, weisse Karten
   darüber, kein Bootstrap.
   ============================================================ */

body.konto { display: flex; flex-direction: column; min-height: 100vh; }
.k-main { flex: 1 0 auto; display: flex; flex-direction: column; }
/* Login/Registrierung: der dunkle Bereich füllt die Höhe, damit unten keine leere Fläche bleibt */
.konto--auth { background: var(--dark); }
.konto--auth .k-hero--auth { flex: 1 0 auto; display: flex; align-items: center; }
.konto--auth .k-hero--auth > .container { flex: 1; }
.konto--auth .site-footer { border-top: 1px solid rgba(255, 255, 255, .08); }
.k-nav-back { margin-right: 8px; font-size: .8em; }
.site-header__link { white-space: nowrap; }
.k-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Dunkler Kopf ---------- */
.k-hero {
  position: relative;
  overflow: hidden;
  color: var(--paper);
  background: var(--dark);
}
.k-hero > .container { position: relative; z-index: 1; }

/* Login/Registrierung: die Karte ragt unten in den hellen Grund */
.k-hero--auth { padding: 64px 0 80px; }
.k-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: 72px;
  align-items: start;
}
.k-auth__info { padding-top: 28px; max-width: 520px; }
.k-auth__title {
  margin: 0;
  font-size: clamp(2.25rem, 1.3rem + 3vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--paper);
}
.k-auth__lead {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
}
.k-auth__below { display: none; }

/* Preisliste */
.k-prices { margin-top: 36px; max-width: 400px; }
.k-prices__head { margin: 0 0 6px; font-size: .9375rem; font-weight: 600; color: rgba(255, 255, 255, .6); }
.k-prices__list { margin: 0; padding: 0; list-style: none; }
.k-prices__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.k-prices__min { font-size: 1.0625rem; color: rgba(255, 255, 255, .86); }
.k-prices__chf { font-size: 1.1875rem; font-weight: 600; color: var(--paper); font-variant-numeric: tabular-nums; }

.k-checks { display: flex; flex-direction: column; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .9375rem; color: rgba(255, 255, 255, .78); }
.k-checks li { position: relative; padding-left: 26px; }
.k-checks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .42em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

.k-prices--light { margin: 0 0 56px; max-width: none; padding: 24px 20px; background: var(--paper); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.k-prices--light .k-prices__head { color: var(--ink-mid); }
.k-prices--light .k-prices__row { border-bottom-color: var(--line-soft); }
.k-prices--light .k-prices__min { color: var(--ink); }
.k-prices--light .k-prices__chf { color: var(--ink-strong); }
.k-prices--light .k-checks { color: var(--ink); }

/* ---------- Karte ---------- */
.k-card {
  position: relative;
  padding: 36px;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
}
.k-card__title { margin: 0; font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--ink-strong); }
.k-card__sub { margin: 8px 0 0; font-size: 1rem; color: var(--ink-mid); }

/* Umschalter Anmelden / Konto erstellen */
.k-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  background: var(--ground);
  border-radius: var(--radius-lg);
}
.k-tabs__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-mid);
  transition: background-color .18s var(--ease-soft), color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.k-tabs__tab:hover { color: var(--ink-strong); }
.k-tabs__tab.is-active { color: var(--ink-strong); background: var(--paper); box-shadow: 0 1px 2px rgba(22, 24, 28, .08), 0 2px 8px rgba(22, 24, 28, .06); }

/* Google, Passkey */
.k-social { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.k-social:empty { display: none; }
.k-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #D5D8DE;
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-strong);
  transition: border-color .18s var(--ease-soft), background-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.k-social__btn:hover { color: var(--ink-strong); border-color: var(--ink-dim); background: var(--ground-soft); box-shadow: 0 4px 14px rgba(22, 24, 28, .08); }
.k-social__btn img { width: 20px; height: 20px; }
.k-social__btn i { font-size: 1.125rem; color: var(--ink-strong); }
.k-social__btn[hidden] { display: none; }

.k-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-size: .875rem;
  color: var(--ink-dim);
}
.k-divider::before,
.k-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.k-social:empty + .k-divider { display: none; }

/* Felder */
.k-form { margin-top: 0; }
.k-card__sub + .k-form,
.k-card__title + .k-form { margin-top: 24px; }
.k-field { margin-bottom: 18px; }
.k-label { display: block; margin-bottom: 6px; font-size: .9375rem; font-weight: 600; color: var(--ink-strong); }
.k-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.k-label-link { font-size: .875rem; font-weight: 500; }
.k-input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid #D5D8DE;
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 1.0625rem;
  color: var(--ink-strong);
  transition: border-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.k-input:hover { border-color: var(--ink-dim); }
.k-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(211, 38, 35, .16); }
.k-input.is-valid { border-color: var(--ok); }
.k-input--code { font-size: 1.25rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; }

/* Passwort mit Auge im Feld */
.k-pw { position: relative; }
.k-pw .k-input { padding-right: 56px; }
.k-pw__toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 1.0625rem;
  color: var(--ink-mid);
  transition: color .18s var(--ease-soft), background-color .18s var(--ease-soft);
}
.k-pw__toggle:hover { color: var(--ink-strong); background: var(--ground); }

/* Passwort-Regeln */
.k-rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.k-rules li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--ground);
  font-size: .8125rem;
  color: var(--ink-mid);
  transition: background-color .2s var(--ease-soft), color .2s var(--ease-soft);
}
.k-rules li::before { content: ""; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--ink-dim); }
.k-rules li.is-ok { background: #E7F6E5; color: #146E0E; }
.k-rules li.is-ok::before { width: 8px; height: 4px; margin: -2px 1px 0; border-radius: 0; background: none; border-left: 2px solid #146E0E; border-bottom: 2px solid #146E0E; transform: rotate(-45deg); }
.k-match { margin: 8px 0 0; font-size: .875rem; color: var(--red); }
.k-match.is-ok { color: #146E0E; }

.k-check { display: flex; align-items: center; gap: 10px; margin: 2px 0 20px; font-size: .9375rem; color: var(--ink); cursor: pointer; }
.k-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--red); cursor: pointer; }
.k-check--top { align-items: flex-start; margin: 0; }
.k-check--top input { margin-top: 3px; }
.k-check--consent { margin: 4px 0 20px; line-height: 1.5; }
.k-check--consent a { font-weight: 600; }
.k-field-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 16px;
  padding: 10px 12px;
  border: 1px solid #F4C3C1;
  border-radius: var(--radius);
  background: var(--red-tint);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--red-deep);
}
.k-field-error[hidden] { display: none; }
.k-field-error i { margin-top: 3px; color: var(--red); }
.k-check.is-invalid input { outline: 2px solid var(--red); outline-offset: 2px; }
.k-buy__consent { flex: 1 1 360px; max-width: 64ch; }
.k-buy__consent .k-check { max-width: none; }
.k-buy__consent .k-field-error { margin-bottom: 0; }
.k-buy__pay.is-busy { opacity: .8; pointer-events: none; transform: none; box-shadow: none; }

/* Turnstile: unsichtbar, ausser Cloudflare verlangt eine Bestätigung */
.cf-turnstile { height: 0; overflow: hidden; }
.cf-turnstile.is-visible { height: auto; overflow: visible; margin: 0 0 18px; }

.k-submit { width: 100%; min-height: 54px; font-size: 1.0625rem; }
.k-submit.is-busy { opacity: .75; pointer-events: none; transform: none; box-shadow: none; }

.k-switch { margin: 22px 0 0; text-align: center; font-size: .9375rem; color: var(--ink-mid); }
.k-switch a { font-weight: 600; }
.k-fine { margin: 14px 0 0; font-size: .8125rem; line-height: 1.55; color: var(--ink-mid); }
.k-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: .9375rem; font-weight: 500; color: var(--ink-mid); }
.k-back:hover { color: var(--red); }

.k-details { margin: -4px 0 20px; font-size: .9375rem; }
.k-details summary { cursor: pointer; color: var(--red); font-weight: 500; }
.k-details p { margin: 8px 0 0; color: var(--ink-mid); }

/* Bestätigung nach Registrierung */
.k-done { text-align: center; }
.k-done__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--red-tint);
  font-size: 1.625rem;
  color: var(--red);
}
.k-done .k-card__sub { margin-bottom: 4px; }
.k-done .k-submit { margin-top: 24px; }

/* Meldungen */
.k-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px 14px 14px 16px;
  border: 1px solid #F4C3C1;
  border-radius: var(--radius-lg);
  background: var(--red-tint);
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink);
}
.k-alert--success { border-color: #BFE5BA; background: #EEF8EC; }
.k-alert--warning { border-color: #F1DB9E; background: #FFF7E1; }
.k-alert--info { border-color: #C6D9F3; background: #EEF4FC; }
.k-alert__body { flex: 1; min-width: 0; }
.k-alert__body p { margin: 0; }
.k-alert__body ul { margin: 0; padding-left: 18px; }
.k-alert__body li + li { margin-top: 4px; }
.k-alert__title { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink-strong); }
.k-alert .btn,
.k-alert .btn-secondary { margin: 8px 6px 0 0; padding: 6px 12px; min-height: 0; min-width: 0; font-size: .875rem; }
.k-alert .button-wrapper { margin-top: 4px; }
.k-alert__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -4px -4px 0 0;
  border-radius: var(--radius);
  color: var(--ink-mid);
}
.k-alert__close:hover { color: var(--ink-strong); background: rgba(22, 24, 28, .06); }
.k-live .k-alert { margin: 10px 0 0; }

/* ============================================================
   Kontoübersicht
   ============================================================ */
.k-hero--account { padding: 48px 0 128px; }
.k-hero--account .hero__grid { position: absolute; inset: 0; }
.k-account__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.k-account__title { margin: 0; font-size: 2rem; font-weight: 600; color: var(--paper); }
.k-balance { margin: 0; }
.k-balance__num {
  display: block;
  font-size: clamp(3.25rem, 2.2rem + 4vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.k-balance__unit { display: block; margin-top: 8px; font-size: 1.1875rem; color: rgba(255, 255, 255, .72); }
.k-account__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .9375rem; color: rgba(255, 255, 255, .78); }
.k-account__facts i { margin-right: 8px; color: var(--red); }
.k-account__go { flex: 0 0 auto; }

.k-account { position: relative; z-index: 2; margin-top: -88px; padding-bottom: 72px; }
.k-account > .k-alert { box-shadow: var(--shadow-card); }

.k-section-title { margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink-strong); }
.k-sub-title { margin: 22px 0 4px; font-size: .9375rem; font-weight: 600; color: var(--ink-mid); }

/* Minuten kaufen */
.k-buy__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.k-buy__promise { margin: 0; font-size: 1rem; font-weight: 500; color: var(--ink-strong); }
.k-buy__promise i { margin-right: 6px; color: var(--ok); }
.k-packs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}
.k-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  border: 1px solid #D5D8DE;
  border-radius: var(--radius-lg);
  background: var(--paper);
  cursor: pointer;
  transition: border-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft), background-color .18s var(--ease-soft);
}
.k-pack:hover { border-color: var(--ink-dim); }
.k-pack input { position: absolute; opacity: 0; pointer-events: none; }
.k-pack::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  border: 2px solid #C6CAD1;
  border-radius: 50%;
  background: var(--paper);
  transition: border-color .18s var(--ease-soft), background-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.k-pack:has(input:checked) { border-color: var(--red); background: #FFFAFA; box-shadow: 0 0 0 1px var(--red), 0 10px 26px rgba(211, 38, 35, .12); }
.k-pack:has(input:checked)::after { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 4px var(--paper); }
.k-pack:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.k-pack__min { font-size: 1.875rem; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.k-pack__min small { font-size: .55em; font-weight: 600; letter-spacing: 0; color: var(--ink-mid); }
.k-pack__hours { margin-top: 4px; font-size: .875rem; color: var(--ink-mid); }
.k-pack__chf { margin-top: 16px; font-size: 1.375rem; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.k-pack__rp { font-size: .8125rem; color: var(--ink-dim); }

.k-buy__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 24px; }
.k-buy__foot .k-check { flex: 1 1 360px; max-width: 64ch; }
.k-buy__pay { flex: 0 0 auto; }
.k-buy .k-fine { max-width: 90ch; }

/* Verlauf und Sicherheit */
.k-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.k-grid .k-card { box-shadow: var(--shadow-card); }
.k-empty { margin: 12px 0 0; color: var(--ink-mid); }
.k-list { margin: 0; padding: 0; list-style: none; }
.k-list__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.k-list__row:last-child { border-bottom: 0; }
.k-list__row > div:first-child { min-width: 0; }
.k-list__row strong { font-weight: 600; color: var(--ink-strong); }
.k-list__row strong i { margin-right: 6px; color: var(--ink-mid); }
.k-list__meta { display: block; font-size: .8125rem; color: var(--ink-mid); }
.k-list__end { text-align: right; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.k-list__file { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-list__row.is-muted { opacity: .55; }

/* Meine Texte */
.k-texte { box-shadow: var(--shadow-lift); }
.k-account > .k-alert + .k-texte { margin-top: 20px; }

/* Minuten kaufen: aufklappbar */
.k-card.k-fold { margin-top: 20px; padding: 0; box-shadow: var(--shadow-card); }
.k-fold__sum { display: flex; align-items: center; gap: 16px; padding: 24px 36px; cursor: pointer; list-style: none; }
.k-fold__sum::-webkit-details-marker { display: none; }
.k-fold__sum:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: var(--radius-xl); }
.k-fold__titles { flex: 1 1 auto; min-width: 0; }
.k-fold__titles .k-section-title { display: block; }
.k-fold__sub { display: block; margin-top: 4px; font-size: .9375rem; color: var(--ink-mid); }
.k-fold__chev { flex: 0 0 auto; color: var(--ink-mid); transition: transform .18s ease; }
.k-fold[open] .k-fold__chev { transform: rotate(180deg); }
.k-fold:hover .k-fold__chev { color: var(--red); }
.k-fold > .k-buy__form { padding: 0 36px 36px; }
@media (max-width: 767px) {
  .k-fold__sum { padding: 20px; }
  .k-fold > .k-buy__form { padding: 0 20px 26px; }
}
@media (prefers-reduced-motion: reduce) { .k-fold__chev { transition: none; } }

/* Kaufverlauf als kleine Tabelle im Bereich «Minuten kaufen» */
.k-buys { margin: 0 36px; padding: 8px 0 32px; }
.k-modal__panel:focus { outline: none; }
.k-buys .k-sub-title { margin-top: 0; }
.k-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.k-table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.k-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--ink-mid); background: var(--line-soft); white-space: nowrap; }
.k-table td { padding: 10px 14px; color: var(--ink-strong); white-space: nowrap; }
.k-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.k-table tr.is-muted td { color: var(--ink-dim); }
@media (max-width: 767px) { .k-buys { margin: 0 20px; padding-bottom: 24px; } }

/* Kopfzeile: Menüpunkt Sicherheit */
.k-nav-sec { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font-family: inherit; cursor: pointer; }
.k-nav-sec i { color: var(--red); }

/* Sicherheit: Modal */
.k-modal {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.k-modal::backdrop { background: rgba(18, 20, 24, .58); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.k-modal__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
}
.k-modal__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 28px;
  color: var(--paper);
  background-color: var(--dark);
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px;
}
.k-modal__badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
  color: var(--paper);
  background: var(--red);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(211, 38, 35, .45);
}
.k-modal__titles { flex: 1 1 auto; min-width: 0; }
.k-modal__title { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; color: var(--paper); }
.k-modal__sub { margin: 2px 0 0; font-size: .875rem; color: rgba(255, 255, 255, .7); overflow-wrap: anywhere; }
.k-modal__sub i { margin-right: 6px; }
.k-modal__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .08);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.k-modal__close:hover { color: var(--paper); background: rgba(255, 255, 255, .18); }
.k-modal__close:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.k-modal__body { padding: 6px 28px 8px; overflow-y: auto; }
.k-modal__body .k-sec__item:last-child { border-bottom: 0; }
.k-modal__foot { display: flex; justify-content: flex-end; padding: 16px 28px 22px; background: var(--line-soft); }
.k-modal__foot .k-logout { margin: 0; }

.k-modal[open] .k-modal__panel { animation: k-modal-in .26s cubic-bezier(.2, .8, .2, 1); }
.k-modal[open]::backdrop { animation: k-fade-in .26s ease; }
.k-modal.is-closing .k-modal__panel { animation: k-modal-out .16s ease forwards; }
.k-modal.is-closing::backdrop { animation: k-fade-out .16s ease forwards; }
@keyframes k-modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes k-modal-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes k-fade-in { from { opacity: 0; } }
@keyframes k-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .k-modal[open] .k-modal__panel, .k-modal[open]::backdrop,
  .k-modal.is-closing .k-modal__panel, .k-modal.is-closing::backdrop { animation: none; }
}
@media (max-width: 600px) {
  .k-modal__head { padding: 20px; gap: 12px; }
  .k-modal__badge { width: 42px; height: 42px; font-size: 1.0625rem; border-radius: 12px; }
  .k-modal__title { font-size: 1.25rem; }
  .k-modal__body { padding: 4px 20px 8px; }
  .k-modal__foot { padding: 14px 20px 18px; }
}
.k-texte__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.k-texte__count { font-size: .875rem; color: var(--ink-mid); }
.k-texte__intro { margin: 6px 0 16px; }
.k-texte__list { display: grid; gap: 10px; }
.k-text { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.k-text[open] { border-color: var(--ink-mid); }
.k-text__sum { display: flex; align-items: center; gap: 16px; padding: 14px 16px; cursor: pointer; list-style: none; }
.k-text__sum::-webkit-details-marker { display: none; }
.k-text__sum:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: var(--radius); }
.k-text__main { flex: 1 1 auto; min-width: 0; }
.k-text__main strong { font-weight: 600; color: var(--ink-strong); }
.k-text__preview { display: block; margin-top: 4px; font-size: .875rem; color: var(--ink-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-text[open] .k-text__preview { display: none; }
.k-text__chev { flex: 0 0 auto; color: var(--ink-mid); transition: transform .18s ease; }
.k-text[open] .k-text__chev { transform: rotate(180deg); }
.k-text__body { padding: 0 16px 16px; }
.k-text__pre { margin: 0; max-height: 420px; overflow: auto; padding: 16px; font-family: inherit; font-size: .9375rem; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-wrap: break-word; background: var(--bg, #f6f7f9); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.k-text__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.k-text__actions form { margin: 0; }
.k-text__actions .btn-secondary { padding: 8px 14px; min-height: 0; font-size: .875rem; }
.k-texte__all { margin: 16px 0 0; text-align: right; }
.k-texte__all .btn-ghost { padding: 8px 12px; min-height: 0; font-size: .875rem; }
@media (prefers-reduced-motion: reduce) { .k-text__chev { transition: none; } }

.k-account__mail { margin: 6px 0 4px; font-size: .9375rem; color: var(--ink-mid); overflow-wrap: anywhere; }
.k-account__mail i { margin-right: 6px; }
.k-sec__item { padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.k-sec__head { display: flex; gap: 14px; }
.k-sec__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--ground);
  color: var(--red);
}
.k-sec__title { margin: 0; font-size: 1.0625rem; font-weight: 600; color: var(--ink-strong); }
.k-sec__text { margin: 2px 0 14px; font-size: .9375rem; color: var(--ink-mid); }
.k-sec__item > form,
.k-sec__item > .k-list,
.k-sec__item > .k-alert,
.k-sec__item > .k-setup,
.k-sec__item > #btnAddPasskey,
.k-sec__item > #passkeyResponse { margin-left: 54px; }
.k-sec__item > .k-list { margin-bottom: 10px; }
.k-badge { display: inline-block; margin-right: 6px; padding: 1px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.k-badge--ok { background: #E7F6E5; color: #146E0E; }
.btn-secondary.k-btn-danger,
.btn-ghost.k-btn-danger { color: var(--red); }
.btn-secondary i,
.btn-ghost i { margin-right: 8px; }
#passkeyResponse .k-alert { margin: 12px 0 0; }

.k-setup { display: flex; flex-wrap: wrap; gap: 20px; }
.k-setup__qr { flex: 0 0 auto; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.k-setup__steps { flex: 1 1 220px; font-size: .9375rem; }
.k-setup__steps p { margin: 0 0 10px; }
.k-code { font-size: .875rem; overflow-wrap: anywhere; }
.k-codes { margin: 8px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--paper); font-size: .9375rem; line-height: 1.7; }
.k-inline-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.k-inline-form .k-input { width: 170px; }
.k-logout { margin-top: 20px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
  .k-hero--auth { padding: 32px 0 24px; }
  .k-auth { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .k-auth__info { padding-top: 0; }
  .k-auth__info .k-prices { display: none; }
  .k-auth__title { font-size: 2.25rem; }
  .k-auth__lead { margin-top: 12px; font-size: 1rem; }
  .k-auth__card { width: 100%; max-width: 520px; }
  .k-auth__below { display: block; max-width: 560px; padding-bottom: 56px; }
  .k-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .k-card { padding: 26px 20px; }
  .k-card__title { font-size: 1.4375rem; }
  .k-hero--account { padding: 32px 0 112px; }
  .k-account__go { width: 100%; }
  .k-buy__pay { width: 100%; }
  .k-pack { padding: 16px 16px 14px; }
  .k-pack::after { top: 14px; right: 14px; }
  .k-pack__min { font-size: 1.375rem; }
  .k-pack__chf { margin-top: 10px; font-size: 1.25rem; }
  .k-pack__hours { font-size: .8125rem; }
  .k-packs { gap: 10px; }
  .k-pack::after { width: 18px; height: 18px; }
  .k-sec__item > form,
  .k-sec__item > .k-list,
  .k-sec__item > .k-alert,
  .k-sec__item > .k-setup,
  .k-sec__item > #btnAddPasskey,
  .k-sec__item > #passkeyResponse { margin-left: 0; }
}
@media (max-width: 600px) {
  .k-hide-xs { display: none; }
  .k-auth__title { font-size: 1.875rem; }
  .k-auth__title br { display: none; }
  .k-auth__lead { display: none; }
  .k-auth { gap: 22px; }
}
@media (max-width: 330px) {
  .k-packs { grid-template-columns: minmax(0, 1fr); }
}
