/* ============================================================ */
/* Auth-keret (bejelentkezés + alfolyamatok)                     */
/* Forrás: Nitrogen Shell.dc.html · 03 · BEJELENTKEZÉS — a terv  */
/* egzakt értékeivel. A hub FilamentAssetként szállítja.         */
/*                                                               */
/* Bal rail-sáv (a belépett rail szélessége: --n3-rail-w) ·      */
/* középen fehér hasáb a Filament loginnal (380px oszlop,        */
/* kártya-chrome nélkül) · jobb 682px gradiens hero + 300px      */
/* changelog.                                                    */
/* ============================================================ */

/* --- Bal rail-sáv --------------------------------------------- */

/* NP2-41, Balázs döntése: ugyanaz a rail-beállítás, mint belépés után — a sáv pontosan 92 px
   széles (--n3-rail-w a témából), minden eleme (logó, helytartók) 92 × 92 px-es négyzetes cella,
   hogy belépés után semmi ne mozduljon el. A 92 px nincs a skálán: jóváhagyott kivétel. */
.n3-auth-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--n3-rail-w, 92px);
    background: #3b1259;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 20px;
    z-index: 30;
}

/* 92 × 92 px-es logó-cella, benne a 40 px-es gradiens jel. */
.n3-auth-cell {
    width: var(--n3-rail-w, 92px);
    height: var(--n3-rail-w, 92px);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.n3-auth-logo {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    corner-shape: superellipse(2);
    background: linear-gradient(140deg, #7636c1, #ec3f4c 70%, #fb8127);
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #fff;
}

.n3-auth-logo > span {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 40px;
}

.n3-auth-logo > sup {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    margin-top: 8px;
}

/* Helytartó cellák: belépés után itt jelennek meg a modulok —
   a keret tartja a helyet, semmi nem mozdul el. Cella: 92 × 92 px,
   benne a szaggatott 40 px-es csempe-helytartó. */
.n3-auth-rail-slots {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.n3-auth-rail-slot {
    width: var(--n3-rail-w, 92px);
    height: var(--n3-rail-w, 92px);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.n3-auth-rail-slot::before {
    content: '';
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    border-radius: 15px;
    corner-shape: superellipse(2);
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.18);
}

.n3-auth-rail-version {
    margin-top: auto;
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 9px;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Középső hasáb: a Filament login a terv anatómiájával ------ */

/* A jobb hasáb a terv 1440-es rajzán 682px (47.4%) — széles kijelzőn az
   arány tartja magát, így a fehér középhasáb nem nő aránytalanra. */
:root {
    --n3-auth-aside-w: max(682px, 47.4vw);
}

body:has(.n3-auth-rail) .fi-simple-layout {
    background: var(--n3-surface, #fff);
    padding-inline-start: var(--n3-rail-w, 92px);
    padding-inline-end: var(--n3-auth-aside-w, 682px);
}

/* A kártya-chrome elhagyása: fehér hasáb, 380px-es űrlap-oszlop. */
body:has(.n3-auth-rail) .fi-simple-main {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    width: 380px;
    max-width: 380px;
    padding: 56px 0;
}

/* Fejléc balra zárva, a terv méreteivel. */
body:has(.n3-auth-rail) .fi-simple-header {
    align-items: flex-start;
    text-align: start;
    gap: 7px;
}

body:has(.n3-auth-rail) .fi-simple-header-heading {
    font-size: 29px;
    font-weight: 700;
    letter-spacing: -0.028em;
    color: var(--n3-ink, #1d1523);
}

body:has(.n3-auth-rail) .fi-simple-header-subheading {
    font-size: 14.5px;
    color: var(--n3-muted, #6c6377);
}

.n3-auth-eyebrow {
    display: block;
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--n3-muted, #6c6377);
    margin: 0 0 7px;
}

/* Azonosítás csak a railben: a panel brand-neve/logója egyik vendég
   auth-képernyőn sem jelenik meg (a Login osztály hasLogo()=false-a a
   loginon intézi, ez a többi alfolyamatot fedi). */
body:has(.n3-auth-rail) .fi-simple-header .fi-logo {
    display: none;
}

/* Mezők: 48px magas, 14px superellipse, subtle háttér; fókuszban
   1.5px lila keret + 4px gyűrű. */
body:has(.n3-auth-rail) .fi-input-wrp {
    min-height: 48px;
    border-radius: 14px;
    corner-shape: superellipse(2);
    background: var(--n3-subtle, #fafafb);
}

body:has(.n3-auth-rail) .fi-input-wrp:focus-within {
    background: var(--n3-surface, #fff);
    box-shadow:
        0 0 0 1.5px #7636c1,
        0 0 0 5.5px rgba(118, 54, 193, 0.14);
}

body:has(.n3-auth-rail) .fi-input-wrp input {
    font-size: 14.5px;
    /* A mező töltse ki a 48px-es wrappert — különben a belső input (és
       főleg a böngésző-autofill festése) kisebb dobozként üt el tőle. */
    min-height: 46px;
}

/* A böngésző-autofill kék festésének semlegesítése: a wrapper hátterével
   azonos belső árnyék + öröklött rádiusz, így nincs "doboz a dobozban". */
body:has(.n3-auth-rail) .fi-input-wrp input:-webkit-autofill,
body:has(.n3-auth-rail) .fi-input-wrp input:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px var(--n3-subtle, #fafafb) inset;
    -webkit-text-fill-color: var(--n3-ink, #1d1523);
    caret-color: var(--n3-ink, #1d1523);
    border-radius: inherit;
}

body:has(.n3-auth-rail) .fi-input-wrp:focus-within input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--n3-surface, #fff) inset;
}

/* Elsődleges gomb: 50px, 14px sarok, márka-gradiens, terv-árnyék. */
body:has(.n3-auth-rail) .fi-simple-page .fi-btn.fi-color-primary {
    min-height: 50px;
    border-radius: 14px;
    corner-shape: superellipse(2);
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(180, 45, 90, 0.28);
}

/* Segítség-sor az űrlap alatt. */
.n3-auth-help {
    margin: 24px 0 0;
    font-size: 12.5px;
    color: var(--n3-muted, #6c6377);
}

/* A többi bejelentkezési mód linkjei (NP2-166): egymás alatt, soronként egy, középen. */
.n3-auth-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 22px 0 0;
    font-size: 12.5px;
}

.n3-auth-methods a {
    color: var(--n3-muted);
    text-decoration: underline;
}

.n3-auth-methods a:hover {
    color: var(--n3-ink);
}

/* A verzió a rail lábában él — a globális footer itt nem kell. */
body:has(.n3-auth-rail) .fi-footer,
body:has(.n3-auth-rail) .n3-footer {
    display: none;
}

/* --- Jobb hasáb: hero + changelog ------------------------------ */

.n3-auth-aside {
    position: fixed;
    inset: 0 0 0 auto;
    width: var(--n3-auth-aside-w, 682px);
    display: flex;
    flex-direction: column;
    z-index: 30;
    background: linear-gradient(155deg, #3b1259 0%, #7636c1 52%, #ec3f4c 86%, #fb8127 100%);
    overflow: hidden;
}

.n3-auth-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 78% at 14% 6%, rgba(59, 18, 89, 0.6), transparent 62%);
    pointer-events: none;
}

.n3-auth-hero {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.n3-auth-hero-headline {
    margin: 0;
    font-size: 37px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.028em;
    color: #fff;
    max-width: 520px;
    text-wrap: pretty;
}

.n3-auth-hero-modules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 470px;
}

.n3-auth-hero-module {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    corner-shape: superellipse(2);
    padding: 12px 14px;
}

.n3-auth-hero-module-tile {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 9px;
    corner-shape: superellipse(2);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #3b1259;
}

.n3-auth-hero-module-name {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.n3-auth-hero-module-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.72);
}

/* Changelog-panel: 300px, sötétített üveg-sáv a gradiens alján. */
.n3-auth-changelog {
    position: relative;
    flex: 0 0 300px;
    background: rgba(23, 8, 36, 0.42);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    padding: 26px 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.n3-auth-changelog-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.n3-auth-changelog-label {
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.72);
}

/* Számláló-jellegű jel: szándékos pill kivétel. */
.n3-auth-version {
    corner-shape: round;
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 10.5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 3px 9px;
}

.n3-auth-changelog-link {
    margin-left: auto;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.35);
}

.n3-auth-changelog-link:hover {
    color: #fff;
    text-decoration-color: #fff;
}

.n3-auth-changelog-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.n3-auth-changelog-entry {
    display: flex;
    gap: 13px;
    align-items: baseline;
}

.n3-auth-changelog-date {
    width: 64px;
    flex: none;
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

.n3-auth-changelog-kind {
    width: 74px;
    flex: none;
    font-family: var(--font-mono, 'IBM Plex Mono', monospace);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    corner-shape: superellipse(2);
    padding: 3px 0;
    text-align: center;
}

.n3-auth-changelog-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    text-wrap: pretty;
}

/* --- Reszponzív ------------------------------------------------ */
/* 1280 alatt a hero-hasáb elmarad, 1024 alatt a rail-sáv is —
   marad a Filament saját középre zárt oszlopa. */

@media (max-width: 1280px) {
    .n3-auth-aside {
        display: none;
    }

    body:has(.n3-auth-rail) .fi-simple-layout {
        padding-inline-end: 0;
    }
}

@media (max-width: 1024px) {
    .n3-auth-rail {
        display: none;
    }

    body:has(.n3-auth-rail) .fi-simple-layout {
        padding-inline-start: 0;
    }
}
