/* Raszter központi belépés: elrendezés, betűk és a közös alapelemek.
   A színek, térközök és méretek a tokens.css tokenjeiből jönnek (docs/DESIGN_SYSTEM.md 3-5.).
   A CSP miatt minden stílus fájlból jön: nincs inline <style> és style="" attribútum. */

/* Inter (OFL, fonts/OFL.txt): helyi WOFF2, latin + latin-ext, nincs külső betűszolgáltatás. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/inter-latin-ext-400-normal.0a6ff1a7c1e4.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/inter-latin-400-normal.da03732a27e1.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("fonts/inter-latin-ext-500-normal.90ff4f7e8bcb.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("fonts/inter-latin-500-normal.51205681a1ba.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("fonts/inter-latin-ext-600-normal.65aed4e1ef63.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("fonts/inter-latin-600-normal.2ede57db1a3a.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/inter-latin-ext-700-normal.aa4c26661f64.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/inter-latin-700-normal.8ca0a5155296.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ds-canvas);
  color: var(--ds-ink);
  font-family: var(--ds-font);
  font-size: var(--ds-text-body);
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 2rem;
}

h2 {
  font-size: var(--ds-text-section);
  font-weight: 600;
  line-height: 1.625rem;
}

a {
  color: var(--ds-action);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--ds-brand-hover);
}

:focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
}

.rr-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Középre igazított kártya: legfeljebb 420 px, mobilon a teljes szélesség 16 px oldalsó térközzel. */
.rr-auth {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: var(--ds-space-8) var(--ds-space-4);
}

.rr-card {
  width: 100%;
  max-width: 26.25rem;
  padding: var(--ds-space-6);
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
}

.rr-brand {
  display: flex;
  justify-content: center;
  margin-bottom: var(--ds-space-6);
}

/* Logó: a márka saját színei (nem témaszerep); a rajz magasságát a befogadó adja. */
.rl-logo {
  --rl-mark: #4845e4;
  --rl-word: #141b2e;
  --rl-erp: #5b667c;
  display: block;
  width: auto;
  height: 2rem;
  overflow: visible;
}

.rl-logo--mark {
  height: 2.5rem;
}

.rl-mark {
  fill: var(--rl-mark);
}

.rl-word {
  fill: var(--rl-word);
}

.rl-erp {
  fill: var(--rl-erp);
}

/* Kényszerített színeknél (Windows nagy kontraszt) a rendszer szövegszínével rajzol. */
@media (forced-colors: active) {
  .rl-mark,
  .rl-word,
  .rl-erp {
    fill: CanvasText;
  }
}

@media (min-width: 40rem) {
  .rr-auth {
    align-items: center;
    padding-block: var(--ds-space-12);
  }

  .rr-card {
    padding: var(--ds-space-8);
  }

  h1 {
    font-size: var(--ds-text-title);
    line-height: 2.25rem;
  }
}

/* ---------------------------------------------------------------------------------------------
   Űrlapelemek, gombok, sávok és listák a belépő- és fiókoldalakhoz
   (docs/DESIGN_SYSTEM.md, „Belépés, fiók és identitás-kezelés”). Az elemek osztály nélkül, a
   típusuk alapján kapnak stílust: az allauth és a Django saját mezőrajzolása változatlan marad.
   --------------------------------------------------------------------------------------------- */

/* A `hidden` attribútum erősebb, mint a komponensek display-szabálya (pl. a szkripttel kapcsolt gomb). */
[hidden] {
  display: none !important;
}

/* A kártya közvetlen gyermekei között egységes függőleges ritmus. */
.rr-card > * + * {
  margin-top: var(--ds-space-4);
}

.rr-brand + * {
  margin-top: 0;
}

.rr-lead {
  margin-top: var(--ds-space-2);
  color: var(--ds-muted);
}

.rr-text {
  color: var(--ds-ink);
}

.rr-aside {
  margin-top: var(--ds-space-5);
  text-align: center;
  font-size: var(--ds-text-md);
}

.rr-form {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

/* Mezők */
.rr-label {
  display: block;
  margin-bottom: var(--ds-space-1);
  font-size: var(--ds-text-md);
  font-weight: 600;
}

.rr-field input:not([type="checkbox"]):not([type="radio"]),
.rr-field textarea {
  width: 100%;
  min-height: var(--ds-control-height);
  padding: 0 var(--ds-space-3);
  color: var(--ds-ink);
  background: var(--ds-surface);
  border: 1px solid var(--ds-control-border);
  border-radius: var(--ds-radius-control);
  font: inherit;
  font-size: var(--ds-text-input); /* 16 px: az iOS nem nagyít rá fókuszkor */
}

.rr-field textarea {
  padding: var(--ds-space-2) var(--ds-space-3);
}

.rr-field--invalid input:not([type="checkbox"]):not([type="radio"]),
.rr-field--invalid textarea {
  border-color: var(--ds-danger);
}

.rr-field input:disabled,
.rr-field textarea:disabled {
  color: var(--ds-muted);
  background: var(--ds-subtle);
}

.rr-input-group {
  display: flex;
  align-items: stretch;
}

.rr-input-group input {
  flex: 1 1 auto;
  min-width: 0;
}

.rr-input-group:has(> .rr-btn--toggle:not([hidden])) input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.rr-btn--toggle {
  flex: none;
  margin-left: -1px;
  padding: 0 var(--ds-space-3);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  font-size: var(--ds-text-md);
}

.rr-check {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-height: var(--ds-control-height);
}

.rr-check input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--ds-action);
}

.rr-check label {
  flex: 1;
}

.rr-help {
  margin-top: var(--ds-space-1);
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
}

.rr-error-list {
  margin: var(--ds-space-1) 0 0;
  padding: 0;
  color: var(--ds-danger);
  font-size: var(--ds-text-md);
  list-style: none;
}

.rr-error-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-2);
}

.rr-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Gombok: oldalanként egy elsődleges (indigó), a többi körvonalas vagy szövegkapcsolat. */
.rr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: var(--ds-control-height);
  padding: 0 var(--ds-space-5);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-control);
  font: inherit;
  font-size: var(--ds-text-input);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--ds-duration-fast),
    border-color var(--ds-duration-fast);
}

.rr-btn--block {
  display: flex;
  width: 100%;
}

.rr-btn--primary {
  color: var(--ds-on-action);
  background: var(--ds-action);
}

.rr-btn--primary:hover {
  color: var(--ds-on-action);
  background: var(--ds-brand-hover);
}

.rr-btn--outline {
  color: var(--ds-ink);
  background: var(--ds-surface);
  border-color: var(--ds-control-border);
}

.rr-btn--outline:hover {
  color: var(--ds-ink);
  background: var(--ds-subtle);
}

.rr-btn--danger {
  color: var(--ds-surface);
  background: var(--ds-danger);
}

.rr-btn--danger:hover {
  color: var(--ds-surface);
  background: var(--ds-danger);
  filter: brightness(0.9);
}

.rr-btn--link {
  min-height: auto;
  padding: var(--ds-space-1) var(--ds-space-2);
  color: var(--ds-action);
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.rr-btn--small {
  min-height: 2.25rem;
  padding: 0 var(--ds-space-3);
  font-size: var(--ds-text-md);
}

/* Letiltott gomb (pl. a még nem élesített belépési módok, az érvénytelen jelszó): jól olvasható, de láthatóan nem használható. */
.rr-btn:disabled,
.rr-btn[aria-disabled="true"] {
  color: var(--ds-muted);
  background: var(--ds-subtle);
  border-color: var(--ds-border);
  cursor: not-allowed;
  filter: none;
}

/* Figyelmeztető sávok és üzenetek: ikon + szöveg, nem csak szín. */
.rr-messages {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}

.rr-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid;
  border-radius: var(--ds-radius-control);
  font-size: var(--ds-text-md);
}

.rr-alert__text {
  flex: 1;
  min-width: 0;
}

.rr-alert--error {
  color: var(--ds-danger);
  background: var(--ds-danger-soft);
  border-color: var(--ds-danger);
}

.rr-alert--warning {
  color: var(--ds-warning);
  background: var(--ds-warning-soft);
  border-color: var(--ds-warning);
}

.rr-alert--success {
  color: var(--ds-success);
  background: var(--ds-success-soft);
  border-color: var(--ds-success);
}

.rr-alert--info,
.rr-alert--debug {
  color: var(--ds-info);
  background: var(--ds-info-soft);
  border-color: var(--ds-info);
}

/* Elválasztó („vagy”) és a további belépési módok. */
.rr-divider {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  color: var(--ds-muted);
  font-size: var(--ds-text-md);
}

.rr-divider::before,
.rr-divider::after {
  flex: 1;
  border-top: 1px solid var(--ds-border);
  content: "";
}

.rr-methods {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.rr-actions {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
}

/* Az új jelszó élő szabálylistája. */
.rr-rules {
  margin-bottom: 0;
  padding: 0;
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
  list-style: none;
}

.rr-rules li {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.rr-rules__pending,
.rr-rules__done {
  display: inline-flex;
}

.rr-rules__done {
  display: none;
}

.rr-rules li[data-ok="true"] {
  color: var(--ds-ink);
}

.rr-rules li[data-ok="true"] .rr-rules__done {
  display: inline-flex;
  color: var(--ds-success);
}

.rr-rules li[data-ok="true"] .rr-rules__pending {
  display: none;
}

/* Az allauth további elemei (fiókoldalak): panel, tábla, jelvény, részletek. */
.rr-panel > h2 {
  margin-bottom: var(--ds-space-3);
}

.rr-rule {
  margin: var(--ds-space-5) 0;
  border: 0;
  border-top: 1px solid var(--ds-border);
}

.rr-img {
  max-width: 100%;
  height: auto;
}

.rr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ds-text-md);
}

.rr-table th,
.rr-table td {
  padding: var(--ds-space-2);
  border-bottom: 1px solid var(--ds-border);
  text-align: left;
}

.rr-badge {
  display: inline-block;
  padding: 0 var(--ds-space-2);
  color: var(--ds-ink);
  background: var(--ds-subtle);
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-text-xs);
  font-weight: 600;
}

.rr-badge--primary {
  color: var(--ds-action);
  background: var(--ds-brand-soft);
}

.rr-badge--success {
  color: var(--ds-success);
  background: var(--ds-success-soft);
}

.rr-badge--warning {
  color: var(--ds-warning);
  background: var(--ds-warning-soft);
}

.rr-details summary {
  cursor: pointer;
  font-weight: 600;
}

/* Kétlépcsős hitelesítés: QR-kód, kézi kulcs, helyreállító kódok és a kulcsok listája. */
.rr-qr {
  display: block;
  width: 12.5rem;
  height: 12.5rem;
  margin-inline: auto;
  padding: var(--ds-space-2);
  background: #ffffff; /* a QR-kódnak világos háttér kell a sötét témában is */
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
}

.rr-secret {
  display: inline-block;
  max-width: 100%;
  color: var(--ds-ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--ds-text-md);
  overflow-wrap: anywhere;
}

.rr-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-2);
  margin-bottom: 0;
  padding: var(--ds-space-3);
  background: var(--ds-subtle);
  border-radius: var(--ds-radius-control);
  list-style: none;
}

.rr-codes code {
  color: var(--ds-ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--ds-text-body);
  letter-spacing: 0.04em;
}

.rr-key-list {
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.rr-key-list > li {
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-border);
}

.rr-key-list__head,
.rr-key-list__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
}

.rr-key-list__actions {
  margin-top: var(--ds-space-2);
}

/* Fiókoldal: szélesebb kártya, szakaszok, adatsorok és a munkamenetek listája. */
.rr-card--wide {
  max-width: 40rem;
}

.rr-section {
  padding-top: var(--ds-space-5);
  border-top: 1px solid var(--ds-border);
}

.rr-section > * + * {
  margin-top: var(--ds-space-3);
}

.rr-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.rr-kv {
  display: grid;
  gap: var(--ds-space-2);
  margin: 0;
}

.rr-kv > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-1) var(--ds-space-3);
}

.rr-kv dt {
  min-width: 9rem;
  color: var(--ds-muted);
  font-size: var(--ds-text-md);
}

.rr-kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.rr-sessions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rr-session {
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--ds-border);
}

.rr-session__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
}

.rr-session__actions {
  margin-top: var(--ds-space-2);
}

/* Munkaterületek (kezdőlap, fiókoldal): egyenrangú hivatkozások, a név alatt a slug. */
.rr-workspaces {
  display: grid;
  gap: var(--ds-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rr-workspace {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1);
  padding: var(--ds-space-3) var(--ds-space-4);
  color: var(--ds-ink);
  text-decoration: none;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
}

.rr-workspace:hover {
  color: var(--ds-ink);
  background: var(--ds-subtle);
  border-color: var(--ds-control-border);
}

.rr-workspace__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.rr-workspace__slug {
  color: var(--ds-muted);
  font-size: var(--ds-text-sm);
}

/* Az MCP-bérlőválasztó munkaterületei: ugyanaz a megjelenés gombként (űrlapbeküldés). */
.rr-workspace--button {
  width: 100%;
  font: inherit;
  text-align: left;
  background: var(--ds-surface);
  cursor: pointer;
}

/* A hozzájárulás engedélyeinek listája. */
.rr-scopes {
  margin: 0;
  padding-left: var(--ds-space-5);
}

.rr-scopes li + li {
  margin-top: var(--ds-space-1);
}

@media (forced-colors: active) {
  .rr-btn,
  .rr-workspace,
  .rr-alert {
    border-color: CanvasText;
  }
}
