/* =====================================================================
   ImportPanel, portal klienta E: ekran logowania, wariant W4 „Pora dnia”
   (makieta assets/mockups/portal-redesign/logowanie-v4/W4-pora-dnia.html).
   Duże zdjęcie w zaokrąglonej ramie z rotacją scen (przenikanie co 7 s),
   start według pory dnia, obok formularz.
   Para z js/portal/e-logowanie.js: inny wariant = podmiana obu plików.
   Wszystko w zakresie .elg. Fonty jak we wnętrzu portalu (css/portal-e.css):
   Bricolage Grotesque i Manrope z Google Fonts ładowane w portal.html.
   ===================================================================== */

/* Ostrość na Windows przy skali 100 % (30.09): logowanie bez własnej warstwy GPU.
   #portal-content ma w portal.html will-change i transform animacji wejścia; wtedy Chrome
   rysuje tekst w osobnej warstwie bez ClearType i obraz wygląda na rozmyty. */
#portal-content:has(> .elg) { will-change: auto !important; transform: none !important; animation: none !important; }

body.portal-auth-full { background: #ECE7DF; }

.elg {
    --bg: #ECE7DF; --paper: #F8F5F0; --ink: #15191C; --ink-2: #434A50; --muted: #434A50;
    --sea: #0F3B53; --sea-2: #185170; --sun: #9A4F16; --rule-2: #DCD4C8;
    --field: #fff; --line: #D3CBBF; --line-h: #9E958A;
    --err: #A12A1E; --err-bg: #FBEAE6; --ok: #2E6A4C;
    --disp: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    --sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--ink);
    font: 500 15px/1.55 var(--sans); font-feature-settings: "tnum" 1, "lnum" 1;
}
.elg *, .elg *::before, .elg *::after { box-sizing: border-box; }
.elg [hidden] { display: none !important; }
.elg a { color: inherit; }
.elg img, .elg svg { display: block; }
.elg-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.elg :focus-visible { outline: 2px solid var(--sea-2); outline-offset: 3px; border-radius: 6px; }
.elg .elg-in:focus-visible, .elg .cl-input:focus-visible { outline: none; }

/* górny pasek */
.elg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 40px; }
.elg-wm { font: 700 20px/1 var(--disp); letter-spacing: -.02em; text-decoration: none; }
.elg-wm i { font-style: normal; color: var(--sea-2); }
.elg a.elg-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 9px 14px; border-radius: 999px; }
.elg a.elg-back:hover { background: rgba(21,25,28,.06); color: var(--ink); }
.elg-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.elg-back-t { white-space: pre; }

/* rama ze zdjęciami i formularz */
.elg-spread { flex: 1; display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 400px); gap: clamp(48px, 6vw, 96px); justify-content: center; align-items: center; padding: 4px 40px 40px; }
.elg-frame { margin: 0; position: relative; border-radius: 28px; overflow: hidden; background: #b9c6cc; box-shadow: 0 40px 80px -40px rgba(15,40,55,.5); }
/* Warstwa zdjęć: sam kontener z <img>, bez tekstu. Przenikanie (opacity 1,5 s) i Ken Burns
   (transform 1,00 do 1,06 w czasie sceny) działają tylko na <img>. Formularz i nagłówki nie
   dostają transform ani will-change (lekcja v5.182.2: tekst obok ma zostać w ClearType). */
.elg-stack { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.elg-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s cubic-bezier(.4,0,.2,1); }
.elg-slide.is-on { opacity: 1; }
.elg-slide.is-kb { animation: elg-kb-a calc(var(--elg-co, 6500ms) + 1500ms) linear forwards; }
.elg-slide.kb-b.is-kb { animation-name: elg-kb-b; }
.elg-slide.kb-c.is-kb { animation-name: elg-kb-c; }
.elg-slide.kb-d.is-kb { animation-name: elg-kb-d; }
@keyframes elg-kb-a { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.06) translate(-1.2%, -.8%); } }
@keyframes elg-kb-b { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.06) translate(1.2%, -.6%); } }
@keyframes elg-kb-c { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.06) translate(-.8%, .8%); } }
@keyframes elg-kb-d { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.06) translate(1%, .6%); } }
.elg-frame.is-paused .elg-slide, .elg-frame.is-paused .elg-dot i { animation-play-state: paused; }
.elg-pager { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 999px; background: rgba(12,26,35,.78); color: #fff; font: 700 12.5px/1.2 var(--sans); }
.elg-cap { white-space: nowrap; }
.elg-dots { display: flex; align-items: center; }
.elg-dot { position: relative; width: 16px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; transition: width .35s ease; }
.elg-dot::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.45); transition: background-color .3s, width .35s ease; }
.elg-dot:hover::before { background: rgba(255,255,255,.85); }
.elg-dot i { display: none; }
.elg-dot[aria-current="true"] { width: 34px; }
.elg-dot[aria-current="true"]::before { width: 24px; background: rgba(255,255,255,.35); }
/* pasek postępu aktualnej sceny: szerokość małego paska, nie transform */
.elg-dot[aria-current="true"] i { display: block; position: absolute; left: 5px; top: 9px; width: 0; height: 6px; border-radius: 3px; background: #fff; animation: elg-prog var(--elg-co, 6500ms) linear forwards; }
@keyframes elg-prog { to { width: 24px; } }
.elg-frame.is-still .elg-dot[aria-current="true"] i { animation: none; width: 24px; }
.elg .elg-dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 999px; }
.elg-side { min-width: 0; }

.elg-head { margin-bottom: 26px; }
.elg-kicker { margin: 0 0 10px; font: 700 13px/1.3 var(--sans); color: var(--sun); }
.elg-title { margin: 0; font: 700 44px/1.02 var(--disp); letter-spacing: -.035em; color: var(--ink); }
.elg-title:focus { outline: none; }
.elg-lead { margin: 12px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 40ch; text-wrap: pretty; }

.elg-f { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.elg-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.elg-field-pw { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: baseline; }
.elg-field-pw > .elg-label { grid-column: 1; grid-row: 1; }
.elg-field-pw > .elg-forgot { grid-column: 2; grid-row: 1; justify-self: end; }
.elg-field-pw > .elg-pw, .elg-field-pw > .elg-caps { grid-column: 1 / -1; }
.elg-label { font: 600 14px/1.3 var(--sans); color: var(--ink); }
.elg-in { width: 100%; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: 500 16px var(--sans); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.elg-in::placeholder { color: var(--muted); opacity: .75; }
.elg-in:hover { border-color: var(--line-h); }
.elg-in:focus { border-color: var(--sea-2); box-shadow: 0 0 0 3px rgba(24,81,112,.22); }
.elg-in[readonly] { opacity: .7; }
.elg-in:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 40px var(--field) inset; caret-color: var(--ink); }
.elg-field.is-err .elg-in { border-color: var(--err); }
.elg-field.is-err .elg-in:focus { box-shadow: 0 0 0 3px rgba(161,42,30,.2); }
.elg-caps { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }

.elg-pw { position: relative; }
.elg-pw .elg-in { padding-right: 104px; }
.elg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 13.5px var(--sans); cursor: pointer; }
.elg-eye:hover { color: var(--ink); background: rgba(21,25,28,.06); }
.elg-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.elg-eye .i-off, .elg-eye.on .i-on { display: none; }
.elg-eye.on .i-off { display: block; }

.elg-link { color: var(--sea); font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(15,59,83,.35); }
.elg-link:hover { text-decoration-color: currentColor; }

.elg-chk { position: relative; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-size: 14.5px; cursor: pointer; user-select: none; min-height: 24px; }
.elg-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.elg-chk .box { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; border: 1.5px solid var(--line-h); background: var(--field); transition: background-color .15s, border-color .15s; }
.elg-chk .box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.elg-chk input:checked + .box { background: var(--sea); border-color: var(--sea); }
.elg-chk input:checked + .box svg { opacity: 1; }
.elg-chk input:focus-visible + .box { outline: 2px solid var(--sea-2); outline-offset: 3px; }

.elg-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 4px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--sea); color: #fff; font: 700 15.5px var(--sans); letter-spacing: -.005em; cursor: pointer; transition: background-color .15s, transform .1s; }
.elg-btn:hover { background: var(--sea-2); }
.elg-btn:active { transform: scale(.99); }
.elg-btn:disabled { cursor: progress; }
.elg-btn-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.elg-btn:hover .elg-btn-i svg { transform: translateX(3px); }
.elg-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: elg-spin .7s linear infinite; }
.elg-btn.is-loading .elg-spin { display: inline-block; }
.elg-btn.is-loading .elg-btn-i { display: none; }
@keyframes elg-spin { to { transform: rotate(360deg); } }

.elg-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--err-bg); color: var(--err); font-size: 14px; line-height: 1.45; border: 1px solid rgba(161,42,30,.25); animation: elg-in .25s ease; }
.elg-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.elg-alert p { margin: 0; }
.elg-alert b { font-weight: 700; }
.elg-alert span { color: var(--ink); }
.elg-alert a { color: var(--err); font-weight: 600; text-underline-offset: 3px; }
@keyframes elg-in { from { opacity: 0; transform: translateY(-4px); } }

.elg-note { margin: 26px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.elg-note a, .elg-note b { color: var(--ink); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.elg-note a:hover { color: var(--sea); }

/* reset hasła, rejestracja, weryfikacja: formularze z pages/auth.js w tej samej kolumnie */
.elg-solo .cla-box { max-width: none; width: 100%; padding: 0; gap: 18px; background: none; border: 0; box-shadow: none; }
.elg-solo .cla-a { animation: none; }
.elg-solo .cl-eyebrow { margin: 0; font: 700 13px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--sun); background: none; padding: 0; border: 0; }
.elg-solo .cl-eyebrow::before { display: none; }
.elg-solo .cla-box .cl-h1 { margin: 10px 0 0; font: 700 40px/1.02 var(--disp); letter-spacing: -.035em; color: var(--ink); }
.elg-solo .cl-h1:focus { outline: none; }
.elg-solo .cla-box .cl-lead, .elg-solo .cla-box .cla-sub { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.elg-solo .cla-f { margin-bottom: 18px; }
.elg-solo .cl-label { font: 600 14px/1.3 var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none; }
.elg-solo .cla-f .cl-label i { color: var(--muted); }
.elg-solo .cla-in .pw-toggle-btn { color: var(--muted); }
.elg-solo .cl-input { height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: 500 16px var(--sans); box-shadow: none; padding-left: 16px; }
.elg-solo .cl-input:hover { border-color: var(--line-h); }
.elg-solo .cl-input:focus { outline: none; border-color: var(--sea-2); box-shadow: 0 0 0 3px rgba(24,81,112,.22); }
.elg-solo .cla-in > svg { display: none; }
.elg-solo .cla-in > .cl-input { padding-left: 16px; }
.elg-solo .cla-code .cl-input { font: 700 28px var(--disp); letter-spacing: 10px; }
.elg-solo .cl-btn-p { width: 100%; min-height: 54px; border-radius: 999px; background: var(--sea); color: #fff; font: 700 15.5px var(--sans); box-shadow: none; border: 0; }
.elg-solo .cl-btn-p:hover:not(:disabled) { background: var(--sea-2); }
.elg-solo .cl-btn-g { border-radius: 999px; }
.elg-solo a, .elg-solo a.cla-link { color: var(--sea); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(15,59,83,.35); }
.elg-solo .cla-alt { text-align: left; color: var(--muted); font-size: 14px; }
.elg-solo .cla-foot { display: none; }
.elg-solo .cla-row, .elg-solo .cla-between { color: var(--muted); }
.elg-solo .cla-done { text-align: left; }
.elg-solo .cla-done .cla-ico { margin: 0 0 18px; width: 52px; height: 52px; border-radius: 14px; background: #E1DACE; color: var(--ink); box-shadow: none; }
.elg-solo .cla-done .cla-ico.cla-bad { background: var(--err-bg); color: var(--err); }
.elg-solo .cla-box .cla-done .cl-h1 { font-size: 36px; margin: 6px 0 10px; }
.elg-solo .cla-done p { color: var(--muted); }
.elg-solo .cla-banner { border-radius: 14px; background: #E1DACE; border: 0; color: var(--ink); }
.elg-solo .cla-banner b { color: var(--ink); }
.elg-solo .cl-alert { border-radius: 14px; }
.elg-solo .cla-strong { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }

.elg-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 40px 40px; font-size: 13px; color: var(--ink-2); }
.elg-foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.elg-foot a { text-decoration: none; }
.elg-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) { .elg-spread { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 48px; } }
/* telefon: zdjęcie jako niski pas, formularz w pierwszym ekranie */
@media (max-width: 820px) {
    .elg-top { padding: 12px 16px; }
    .elg a.elg-back { padding: 10px 12px; background: rgba(255,255,255,.7); font-size: 13.5px; }
    .elg-back-t { display: none; }
    .elg-spread { display: block; padding: 0 16px 28px; }
    .elg-frame { border-radius: 18px; margin: 0 0 22px; }
    .elg-stack { aspect-ratio: 2 / 1; }
    .elg-pager { left: 10px; bottom: 10px; gap: 8px; padding: 4px 6px 4px 11px; font-size: 12px; }
    .elg-dot { width: 14px; height: 22px; }
    .elg-dot[aria-current="true"] { width: 30px; }
    .elg-dot[aria-current="true"] i { top: 8px; left: 3px; }
    .elg-side { max-width: 480px; margin: 0 auto; }
    .elg-title { font-size: 32px; }
    .elg-head { margin-bottom: 20px; }
    .elg-lead { font-size: 15px; margin-top: 8px; }
    .elg-f { gap: 16px; }
    .elg-solo .cla-box .cl-h1 { font-size: 32px; }
    .elg-solo .cla-reqs { grid-template-columns: 1fr; }
    .elg-foot { padding: 18px 16px 32px; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .elg *, .elg *::before, .elg *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .elg-spin { animation: elg-spin 1.6s linear infinite !important; }
    .elg-slide.is-kb { animation: none !important; transform: none; }
}
