/*
 * BELEPES ELOTTI LAPOK (belepes, regisztracio, elfelejtett jelszo, jelszo-visszaallitas): kozos stilus.
 * Onallo: nem fugg a portal.css-tol, a tokenek (--au-*) itt vannak, vilagos/sotet temaval. A keretet es a mezoket a
 * includes/page_layout.php portal_auth_* fuggvenyei rajzoljak.
 *
 * Elrendezes:
 *   >= 960 px   osztott: bal oldalon marka-panel (melyzold), jobb oldalon az urlap-kartya kozepre igazitva
 *   720-959 px  a marka-panel fejlec-savva zsugorodik (csak a logo), alatta egy oszlop
 *   < 720 px    egy oszlop: a logo fent, az urlap alatta (a tartalom nem csuszik a billentyuzet ala)
 * 2560 px-en sem nyulik szet: az urlap-kartya max 420 px, a panel tartalma max 480 px, kozepre igazitva.
 */
:root {
  --au-bg: #F7F4EC; --au-card: #FFFFFF; --au-ink: #23201B; --au-muted: #5F594E; --au-line: #D9D1BE;
  --au-input: #FFFFFF; --au-brand: #1F4D3A; --au-brand-h: #163828; --au-on-brand: #FFFFFF; --au-link: #1F4D3A;
  --au-gold: #B8935A; --au-focus: rgba(31, 77, 58, .35);
  --au-err: #B3261E; --au-err-bg: #FDECEA; --au-ok: #1F4D3A; --au-ok-bg: #E6F1EA;
  --au-panel: #0B2E22; --au-panel-ink: #F4F0E6; --au-panel-muted: rgba(244, 240, 230, .80);
  --au-shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 12px 32px rgba(20, 30, 25, .08);
  --au-font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --au-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --au-bg: #111512; --au-card: #1A201C; --au-ink: #EAE6DB; --au-muted: #AEA999; --au-line: #333C36;
    --au-input: #121713; --au-brand: #2F7D5B; --au-brand-h: #3B8F6B; --au-on-brand: #FFFFFF; --au-link: #7FD0A8;
    --au-gold: #D9BC78; --au-focus: rgba(127, 208, 168, .45);
    --au-err: #FFB4AB; --au-err-bg: #3B1815; --au-ok: #9BE0BD; --au-ok-bg: #16302A;
    --au-panel: #0B2E22; --au-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --au-bg: #111512; --au-card: #1A201C; --au-ink: #EAE6DB; --au-muted: #AEA999; --au-line: #333C36;
  --au-input: #121713; --au-brand: #2F7D5B; --au-brand-h: #3B8F6B; --au-on-brand: #FFFFFF; --au-link: #7FD0A8;
  --au-gold: #D9BC78; --au-focus: rgba(127, 208, 168, .45);
  --au-err: #FFB4AB; --au-err-bg: #3B1815; --au-ok: #9BE0BD; --au-ok-bg: #16302A;
  --au-panel: #0B2E22; --au-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-meret="nagy"] { font-size: 112.5%; }
html[data-meret="nagyon-nagy"] { font-size: 125%; }
body.au {
  margin: 0; background: var(--au-bg); color: var(--au-ink);
  font: 400 1rem/1.55 var(--au-font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
}
.au a { color: var(--au-link); text-underline-offset: 3px; }
.au a:hover { text-decoration-thickness: 2px; }
.au a:focus-visible, .au button:focus-visible { outline: 3px solid var(--au-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- keret */
.au-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.au-brand { display: none; position: relative; overflow: hidden; background: var(--au-panel); color: var(--au-panel-ink); }
.au-brand a { color: inherit; }
.au-brand-in { position: relative; z-index: 1; }
.au-logo-bar { display: block; }
.au-logo-big, .au-lead, .au-points { display: none; }
.au-motif { position: absolute; pointer-events: none; color: var(--au-gold); }
.au-motif-a { width: 220px; height: 220px; right: -40px; top: -90px; opacity: .22; }
.au-motif-b { display: none; }

.au-main {
  grid-row: 2; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: calc(20px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}
.au-top { width: 100%; max-width: 420px; margin: 4px 0 20px; text-align: center; }
.au-top .pbl { margin: 0 auto; }
.au-card {
  width: 100%; max-width: 420px; background: var(--au-card); border: 1px solid var(--au-line); border-radius: 20px;
  padding: clamp(20px, 5.5vw, 32px); box-shadow: var(--au-shadow);
}
.au-foot { width: 100%; max-width: 420px; margin-top: 20px; text-align: center; font-size: .8125rem; color: var(--au-muted); line-height: 1.6; }
.au-foot a { color: var(--au-muted); }
.au-foot .au-sep { margin: 0 6px; opacity: .6; }

@media (min-width: 720px) {
  .au-top { display: none; }
  .au-brand { display: block; grid-row: 1; padding: 16px 32px; }
  .au-main { grid-row: 2; justify-content: center; padding-top: clamp(24px, 5vh, 56px); padding-bottom: clamp(24px, 5vh, 56px); }
}
@media (min-width: 960px) {
  .au-wrap { grid-template-columns: minmax(380px, 5fr) minmax(0, 6fr); grid-template-rows: minmax(0, 1fr); }
  .au-brand {
    grid-row: 1; grid-column: 1; position: sticky; top: 0; height: 100vh; height: 100dvh;
    display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vh, 72px) clamp(32px, 5vw, 96px);
  }
  .au-brand-in { width: 100%; max-width: 460px; }
  .au-logo-bar { display: none; }
  .au-logo-big { display: block; margin: 0 0 clamp(20px, 4vh, 40px); }
  .au-lead { display: block; margin: 0 0 20px; font: 600 clamp(1.6rem, 2.2vw, 2.15rem)/1.2 var(--au-font-head); color: var(--au-panel-ink); }
  .au-points { display: block; margin: 0; padding: 0; list-style: none; color: var(--au-panel-muted); font-size: 1rem; line-height: 1.5; }
  .au-points li { position: relative; padding-left: 28px; margin: 0 0 12px; }
  .au-points li::before { content: ''; position: absolute; left: 0; top: .5em; width: 14px; height: 2px; background: var(--au-gold); border-radius: 2px; }
  .au-motif-a { width: min(70vh, 560px); height: min(70vh, 560px); right: -12%; top: auto; bottom: -14%; opacity: .16; }
  .au-motif-b { display: block; width: 260px; height: 260px; left: -90px; top: -80px; opacity: .10; }
  .au-main { grid-column: 2; grid-row: 1; padding-left: clamp(24px, 4vw, 72px); padding-right: clamp(24px, 4vw, 72px); }
}
@media (min-width: 960px) and (max-height: 560px) {
  .au-brand { position: relative; height: auto; min-height: 100dvh; }
  .au-lead { font-size: 1.4rem; }
}

/* ---------------------------------------------------------------- tipografia, mezok */
.au-card h1 { margin: 0 0 6px; font: 600 clamp(1.75rem, 6vw, 2.1rem)/1.15 var(--au-font-head); color: var(--au-ink); letter-spacing: .005em; }
.au-sub { margin: 0 0 22px; color: var(--au-muted); font-size: .9375rem; }
.au-field { margin: 0 0 16px; }
.au-field label.au-label { display: block; margin: 0 0 6px; font-size: .875rem; font-weight: 600; color: var(--au-ink); }
.au-field input[type="text"], .au-field input[type="email"], .au-field input[type="password"] {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--au-ink);
  background: var(--au-input); border: 1.5px solid var(--au-line); border-radius: 12px; appearance: none; -webkit-appearance: none;
}
.au-field input::placeholder { color: var(--au-muted); opacity: .7; }
.au-field input:focus { outline: none; border-color: var(--au-brand); box-shadow: 0 0 0 3px var(--au-focus); }
.au-field input[aria-invalid="true"] { border-color: var(--au-err); }
.au-pw { position: relative; }
.au-pw input { padding-right: 104px !important; }
.au-pw-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: none; align-items: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--au-link); font: 600 .8125rem/1 var(--au-font); cursor: pointer;
}
.au-js .au-pw-btn { display: inline-flex; }
.au-pw-btn:hover { background: var(--au-ok-bg); }
.au-pw-btn svg { width: 20px; height: 20px; flex: none; }
.au-pw-btn .au-i-off { display: none; }
.au-pw-btn[aria-pressed="true"] .au-i-on { display: none; }
.au-pw-btn[aria-pressed="true"] .au-i-off { display: block; }
.au-hint { margin: 6px 0 0; font-size: .8125rem; color: var(--au-muted); }
.au-err { margin: 6px 0 0; font-size: .8125rem; font-weight: 600; color: var(--au-err); }
.au-meter { margin: 8px 0 0; display: none; align-items: center; gap: 10px; font-size: .8125rem; }
.au-js .au-meter { display: flex; }
.au-meter-bar { flex: 1 1 auto; height: 6px; border-radius: 6px; background: var(--au-line); overflow: hidden; }
.au-meter-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--au-err); transition: width .2s ease, background-color .2s ease; }
.au-meter[data-level="2"] .au-meter-bar i { background: #B7791F; }
.au-meter[data-level="3"] .au-meter-bar i { background: var(--au-brand); }
.au-meter-txt { flex: none; min-width: 6.5em; text-align: right; color: var(--au-muted); font-weight: 600; }

.au-check { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 8px 0; margin: 0 0 8px; cursor: pointer; font-size: .9375rem; line-height: 1.45; }
.au-check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--au-brand); cursor: pointer; }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.au-row .au-check { margin: 0; }
.au-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 20px; margin-top: 8px;
  border: 0; border-radius: 12px; color: #FFFFFF; font: 600 1rem/1.2 var(--au-font);
  /* V4 zold-arany fo gomb, ugyanaz, mint a portal.css --btn-fo-*; a literal tartalek, ha a portal.css nincs betoltve */
  background: var(--btn-fo-hatter, linear-gradient(180deg, rgba(255,244,214,.14) 0, rgba(255,244,214,0) 12px), linear-gradient(120deg, #1F4D3A 0%, #3D5F37 25%, #75612B 55%, #8A6A2F 100%) #8A6A2F);
  box-shadow: var(--btn-fo-arnyek, inset 0 1px 0 rgba(255,240,205,.38), 0 1px 2px rgba(23,59,44,.2), 0 6px 14px -6px rgba(110,82,30,.5));
  text-shadow: 0 1px 1px rgba(50,32,0,.3);
  cursor: pointer; text-decoration: none; text-align: center; transition: background-color .15s ease, transform .05s ease;
}
.au-btn:hover { background: var(--btn-fo-hatter-hover, linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.1)), linear-gradient(120deg, #1F4D3A 0%, #3D5F37 25%, #75612B 55%, #8A6A2F 100%) #75612B); color: #FFFFFF; }
.au-btn:focus-visible { outline: 3px solid var(--btn-fokusz, #A07C47); outline-offset: 2px; }
.au-btn:active { transform: translateY(1px); }
.au-btn[disabled], .au-btn.is-busy { opacity: .75; cursor: progress; }
.au .au-btn { color: #FFFFFF; }
.au-links { margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: .9375rem; text-align: center; }
.au-links a { display: inline-block; padding: 6px 4px; min-height: 32px; font-weight: 600; }
.au-links .au-muted { color: var(--au-muted); font-weight: 400; }
.au-forgot { font-size: .875rem; font-weight: 600; }

.au-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; font-size: .9375rem; line-height: 1.45; }
.au-alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.au-alert-err { background: var(--au-err-bg); color: var(--au-err); border: 1px solid currentColor; }
.au-alert-err span { color: var(--au-ink); }
.au-alert-ok { background: var(--au-ok-bg); color: var(--au-ok); border: 1px solid currentColor; }
.au-alert-ok span { color: var(--au-ink); }

.au-state { text-align: center; }
.au-state-ico { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; background: var(--au-ok-bg); color: var(--au-ok); }
.au-state-ico svg { width: 34px; height: 34px; }
.au-state-ico.is-warn { background: var(--au-err-bg); color: var(--au-err); }
.au-state p { margin: 0 0 14px; color: var(--au-muted); }
.au-state p strong { color: var(--au-ink); }

/* ---------------------------------------------------------------- egyszeru nezet: nagyobb betu, 56 px-es mezok es gombok */
html[data-nezet="egyszeru"] body.au { font-size: 1.1875rem; }
html[data-nezet="egyszeru"] .au-field input[type="text"], html[data-nezet="egyszeru"] .au-field input[type="email"], html[data-nezet="egyszeru"] .au-field input[type="password"] { min-height: 56px; font-size: 1.1875rem; }
html[data-nezet="egyszeru"] .au-btn { min-height: 56px; font-size: 1.25rem; }
html[data-nezet="egyszeru"] .au-field label.au-label { font-size: 1.0625rem; }
html[data-nezet="egyszeru"] .au-check input { width: 32px; height: 32px; }
html[data-nezet="egyszeru"] .au-pw-btn { min-height: 48px; font-size: 1rem; }
html[data-nezet="egyszeru"] .au-hint, html[data-nezet="egyszeru"] .au-err, html[data-nezet="egyszeru"] .au-meter, html[data-nezet="egyszeru"] .au-foot, html[data-nezet="egyszeru"] .au-forgot { font-size: 1rem; }
html[data-nezet="egyszeru"] .au-links { font-size: 1.125rem; }
html[data-nezet="egyszeru"] .au-card h1 { font-size: 2.3rem; }

@media (max-width: 380px) {
  .au-card { padding: 18px; border-radius: 16px; }
  .au-pw input { padding-right: 96px !important; }
}
@media (prefers-reduced-motion: reduce) { .au-meter-bar i, .au-btn { transition: none; } }
.au input:focus-visible { outline: none; }
