/* login.css - the login / sign-up stage (Core\Auth\LoginPage, template-parts/auth/login.php, behaviour in login.js).
   RTL first. Accent pair comes from the department the visitor came from (--lg-a / --lg-b). Rule 10: icons / prefixes inside a field sit at the LEFT
   and the field reserves room for them. Motion has a reduced-motion fallback at the end. */
.lg-main { display: block; }
.lg {
    --lg-ink: #0f172a; --lg-muted: #64748b; --lg-line: #dbe3ef; --lg-bg: #f8fafc;
    --lg-ring: color-mix(in srgb, var(--lg-a) 22%, transparent);
    position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center;
    min-height: calc(100vh - 76px); padding: 44px 16px 56px; color: var(--lg-ink);
    background: radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--lg-a) 38%, #0b1226) 0%, transparent 60%), radial-gradient(900px 500px at 0% 110%, color-mix(in srgb, var(--lg-b) 34%, #0b1226) 0%, transparent 60%), #0b1226;
}
.lg *, .lg *::before, .lg *::after { box-sizing: border-box; }

/* ---------- background: soft orbs + a blueprint grid ---------- */
.lg__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lg__orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: lg-float 18s ease-in-out infinite; }
.lg__orb--1 { width: 420px; height: 420px; top: -120px; inset-inline-start: 6%; background: var(--lg-a); }
.lg__orb--2 { width: 360px; height: 360px; bottom: -140px; inset-inline-end: 8%; background: var(--lg-b); animation-delay: -6s; }
.lg__orb--3 { width: 220px; height: 220px; top: 38%; inset-inline-start: 46%; background: #22d3ee; opacity: .22; animation-delay: -11s; }
.lg__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%); }
@keyframes lg-float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(28px, 24px, 0) scale(1.08); } }

/* ---------- the shell: card (start side) + brand (end side) ---------- */
.lg__shell { width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); border-radius: 30px; overflow: hidden; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 40px 90px rgba(2, 6, 23, .55), inset 0 1px 0 rgba(255, 255, 255, .12); animation: lg-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lg-rise { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- brand panel ---------- */
.lg__brand { position: relative; color: #fff; display: flex; background: linear-gradient(155deg, color-mix(in srgb, var(--lg-a) 86%, #000) 0%, color-mix(in srgb, var(--lg-b) 82%, #000) 100%); }
.lg__brand[data-has-image] { background: linear-gradient(155deg, color-mix(in srgb, var(--lg-a) 78%, transparent), color-mix(in srgb, var(--lg-b) 82%, transparent)), var(--lg-img) center / cover no-repeat; }
.lg__brand::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 280px at 90% 0%, rgba(255, 255, 255, .22), transparent 70%), radial-gradient(420px 260px at 0% 100%, rgba(0, 0, 0, .28), transparent 70%); pointer-events: none; }
.lg__brand-in { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 40px 38px 30px; width: 100%; }
.lg__kicker { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0; padding: 7px 14px; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26); font-size: .8rem; font-weight: 700; backdrop-filter: blur(6px); }
.lg__headline { margin: 6px 0 0; font-size: clamp(1.55rem, 2.6vw, 2.15rem); line-height: 1.5; font-weight: 800; color: #fff; text-wrap: balance; }
.lg__lead { margin: 0; font-size: .95rem; line-height: 2; color: rgba(255, 255, 255, .86); }
.lg__benefits { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.lg__benefits li { display: flex; gap: 14px; align-items: flex-start; }
.lg__benefit-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: rgba(255, 255, 255, .17); border: 1px solid rgba(255, 255, 255, .28); font-size: .95rem; }
.lg__benefits strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.lg__benefits small { display: block; font-size: .8rem; line-height: 1.85; color: rgba(255, 255, 255, .78); }

.lg__city { display: block; width: 100%; height: auto; margin-top: auto; padding-top: 10px; overflow: visible; }
.lg__city-lines path { stroke-dasharray: 520; stroke-dashoffset: 520; animation: lg-draw 2.6s .5s ease forwards; }
.lg__city-fill { opacity: 0; animation: lg-fade 1.2s 1.6s ease forwards; }
.lg__city-win rect { opacity: 0; animation: lg-twinkle 5s calc(var(--i) * .37s + 1.8s) ease-in-out infinite; }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-fade { to { opacity: 1; } }
@keyframes lg-twinkle { 0%, 100% { opacity: .08; } 18% { opacity: .9; } 55% { opacity: .35; } }

.lg__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg__chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); animation: lg-bob 6s ease-in-out infinite; }
.lg__chip:nth-child(3n) { animation-delay: -2s; } .lg__chip:nth-child(3n+1) { animation-delay: -4s; }
.lg__chip i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--c); font-size: .62rem; }
@keyframes lg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- the card ---------- */
.lg__card { order: -1; position: relative; background: #fff; padding: 38px 40px 26px; display: flex; flex-direction: column; gap: 4px; min-height: 560px; }
.lg__card.is-shake { animation: lg-shake .45s; }
@keyframes lg-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.lg__notices:empty { display: none; }
.lg__notices { margin-bottom: 10px; }
.lg__head { margin-bottom: 14px; }
.lg__title { margin: 0 0 6px; font-size: 1.75rem; line-height: 1.4; font-weight: 800; color: var(--lg-ink); }
.lg__sub { margin: 0; font-size: .9rem; line-height: 1.9; color: var(--lg-muted); }

.lg__tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 6px 0 16px; border-radius: 15px; background: #f1f5f9; }
.lg__tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 0; background: transparent; border-radius: 11px; font: inherit; font-size: .86rem; font-weight: 700; color: var(--lg-muted); cursor: pointer; transition: color .25s; }
.lg__tabs button[aria-selected="true"] { color: var(--lg-ink); }
.lg__tabs button:focus-visible { outline: 3px solid var(--lg-ring); outline-offset: 1px; }
.lg__tab-pill { position: absolute; top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc(50% - 4px); border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .12); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.lg__tabs[data-active="pwd"] .lg__tab-pill { transform: translateX(100%); }
[dir="rtl"] .lg__tabs[data-active="pwd"] .lg__tab-pill { transform: translateX(-100%); }

.lg__status { margin: 0 0 12px; padding: 11px 14px; border-radius: 13px; font-size: .86rem; line-height: 1.8; display: flex; gap: 8px; align-items: flex-start; }
.lg__status[hidden] { display: none; }
.lg__status.is-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lg__status.is-ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.lg__status.is-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.lg__pane[hidden], .lg__step[hidden], .lg__done[hidden], .lg__caps[hidden], [data-lg-resend][hidden] { display: none; }
.lg__pane { animation: lg-pane .35s ease both; }
@keyframes lg-pane { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lg__steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 10px; align-items: center; font-size: .78rem; font-weight: 700; color: var(--lg-muted); }
.lg__steps li { display: inline-flex; align-items: center; gap: 8px; flex: 1; }
.lg__steps li::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--lg-line); }
.lg__steps li:last-child { flex: none; } .lg__steps li:last-child::after { display: none; }
.lg__steps span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #e8edf5; color: var(--lg-muted); font-size: .74rem; transition: background .3s, color .3s, transform .3s; }
.lg__steps li.is-on { color: var(--lg-ink); } .lg__steps li.is-on span { background: linear-gradient(135deg, var(--lg-a), var(--lg-b)); color: #fff; transform: scale(1.08); }
.lg__steps li.is-done span { background: #16a34a; color: #fff; }
.lg__steps li.is-done::after { background: linear-gradient(90deg, var(--lg-a), var(--lg-b)); }

.lg__form { display: flex; flex-direction: column; gap: 6px; }
.lg__label { font-size: .84rem; font-weight: 700; color: #334155; margin: 6px 0 2px; }
.lg__field { position: relative; display: flex; align-items: center; }
.lg__field input { width: 100%; height: 56px; padding: 0 16px !important; /* !important: the legacy style.css forces 5px on every field */ border: 1.5px solid var(--lg-line); border-radius: 15px; background: var(--lg-bg); font: inherit; font-size: 1.05rem; color: var(--lg-ink); transition: border-color .2s, box-shadow .2s, background .2s; }
.lg__field input::placeholder { color: #a3aec0; letter-spacing: .02em; }
.lg__field input:hover { border-color: #c3cfe2; }
.lg__field input:focus { outline: 0; background: #fff; border-color: var(--lg-a); box-shadow: 0 0 0 4px var(--lg-ring); }
.lg__field.is-valid input { border-color: #22c55e; background: #fff; }
.lg__field.is-error input { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .13); }
/* icons / prefixes sit at the LEFT (rule 10); the input reserves the room */
.lg__field > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.lg__field input[data-lg-phone] { padding-left: 86px !important; font-size: 1.15rem; letter-spacing: .12em; font-weight: 600; text-align: left; }
.lg__field input[data-lg-phone]::placeholder { letter-spacing: .08em; font-weight: 400; }
.lg__prefix { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 10px; background: #e8edf5; color: #475569; font-size: .72rem; font-weight: 800; letter-spacing: .04em; pointer-events: none; direction: ltr; }
.lg__field input[data-lg-pass], .lg__field input[name="username"] { padding-left: 52px !important; text-align: left; }
.lg__eye { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: #64748b; cursor: pointer; }
.lg__eye:hover { background: #eef2f7; } .lg__eye:focus-visible { outline: 3px solid var(--lg-ring); }
.lg__hint { margin: 2px 0 0; font-size: .76rem; color: var(--lg-muted); line-height: 1.8; }
.lg__hint--center { text-align: center; margin-top: 10px; }
.lg__hint a, .lg__link { color: var(--lg-a); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.lg__hint a:hover, .lg__link:hover { text-decoration: underline; }
.lg__caps { margin: 4px 0 0; font-size: .78rem; color: #b45309; }

.lg__sent { margin: 0 0 8px; font-size: .88rem; line-height: 2; color: #334155; }
.lg__otp { display: flex; gap: 9px; justify-content: space-between; margin: 4px 0 6px; }
.lg__digit { width: 100%; max-width: 56px; height: 64px; padding: 0 !important; text-align: center; border: 1.5px solid var(--lg-line); border-radius: 15px; background: var(--lg-bg); font: inherit; font-size: 1.6rem; font-weight: 800; color: var(--lg-ink); caret-color: var(--lg-a); transition: border-color .2s, box-shadow .2s, background .2s, transform .2s; }
.lg__digit:focus { outline: 0; background: #fff; border-color: var(--lg-a); box-shadow: 0 0 0 4px var(--lg-ring); transform: translateY(-2px); }
.lg__digit.is-filled { background: color-mix(in srgb, var(--lg-a) 9%, #fff); border-color: color-mix(in srgb, var(--lg-a) 60%, #fff); }
.lg__otp.is-error .lg__digit { border-color: #ef4444; background: #fef2f2; animation: lg-shake .4s; }
.lg__resend { margin: 4px 0 6px; font-size: .8rem; color: var(--lg-muted); min-height: 24px; }

.lg__btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; margin-top: 12px; border: 0; border-radius: 15px; cursor: pointer; font: inherit; font-size: 1rem; font-weight: 800; color: #fff; background: linear-gradient(110deg, var(--lg-a), var(--lg-b)); background-size: 160% 100%; box-shadow: 0 14px 30px color-mix(in srgb, var(--lg-a) 38%, transparent); transition: transform .2s, box-shadow .2s, background-position .5s; }
.lg__btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; inset-inline-start: -90px; transform: skewX(-20deg); background: rgba(255, 255, 255, .28); transition: inset-inline-start .6s; }
.lg__btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 18px 36px color-mix(in srgb, var(--lg-a) 46%, transparent); }
.lg__btn:hover::after { inset-inline-start: calc(100% + 30px); }
.lg__btn:active { transform: translateY(0); }
.lg__btn:focus-visible { outline: 3px solid var(--lg-ring); outline-offset: 3px; }
.lg__btn-ic { font-size: .85rem; transition: transform .25s; } .lg__btn:hover .lg__btn-ic { transform: translateX(-4px); }
.lg__spin { display: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: lg-spin .7s linear infinite; }
.lg__btn.is-busy { pointer-events: none; opacity: .92; } .lg__btn.is-busy .lg__spin { display: inline-block; } .lg__btn.is-busy .lg__btn-ic { display: none; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

.lg__note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--lg-a) 7%, #fff); border: 1px dashed color-mix(in srgb, var(--lg-a) 35%, #fff); font-size: .8rem; line-height: 1.9; color: #475569; }
.lg__note[hidden] { display: none; }
.lg__note i { color: var(--lg-a); margin-top: 6px; }
.lg__foot { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .74rem; color: #94a3b8; }
.lg__foot a { color: #64748b; }
.lg__done { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #fff; text-align: center; animation: lg-fade .35s both; }
.lg__done[hidden] { display: none; }
.lg__done strong { font-size: 1.3rem; } .lg__done span { color: var(--lg-muted); font-size: .9rem; }
.lg__done svg { width: 84px; height: 84px; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.lg__done circle { stroke: color-mix(in srgb, #22c55e 30%, #fff); } .lg__done path { stroke: #16a34a; stroke-dasharray: 40; stroke-dashoffset: 40; animation: lg-draw-check .6s .25s ease forwards; }
@keyframes lg-draw-check { to { stroke-dashoffset: 0; } }

/* ---------- tablet / phone ---------- */
@media (max-width: 920px) {
    .lg { padding: 22px 12px 36px; align-items: start; }
    .lg__shell { grid-template-columns: 1fr; border-radius: 26px; }
    .lg__card { padding: 28px 22px 20px; min-height: 0; }
    .lg__brand-in { padding: 28px 22px 24px; gap: 12px; }
    .lg__city, .lg__benefits small { display: none; }
    .lg__benefits { gap: 10px; }
    .lg__otp { gap: 6px; } .lg__digit { height: 56px; font-size: 1.4rem; border-radius: 13px; }
    .lg__title { font-size: 1.5rem; }
}
@media (max-width: 420px) { .lg__chips { max-height: 92px; overflow: hidden; } }
@media (prefers-reduced-motion: reduce) {
    .lg__orb, .lg__chip, .lg__shell, .lg__pane, .lg__city-win rect { animation: none !important; }
    .lg__city-lines path { animation: none; stroke-dashoffset: 0; } .lg__city-fill { animation: none; opacity: 1; } .lg__city-win rect { opacity: .5; }
    .lg__btn, .lg__btn::after, .lg__tab-pill, .lg__digit { transition: none; }
}
