/* ============================================================================
   V2RLegal — premium sign-in ("Counsel Navy & Chamber Crimson")
   Split layout: midnight-navy case-lifecycle hero (left) / light sign-in card
   (right). RTL-safe via logical properties; Dubai font applies for Arabic.
   ========================================================================== */

.lgl-login {
    --ink: #0A1930; --ink-2: #12294A;
    --navy: #1F4E85; --navy-deep: #193F6C; --navy-bright: #4F83B8;
    --crimson: #A93B47; --crimson-soft: #C4626A;
    --mist: #DCE7F3; --muted: #7C93AE;
    --panel-bg: #F3F6FA; --card: #FFFFFF; --border: #DCE4EE; --border-strong: #C6D3E3;
    --text: #16293D; --text-muted: #5A6E84;
    --display: 'Spectral', 'Dubai', Georgia, serif;
    --body-font: 'Inter', 'Dubai', system-ui, sans-serif;

    margin: 0; padding: 0; min-height: 100vh;
    font-family: var(--body-font); color: var(--text);
    background: var(--panel-bg);
}
[lang="ar"] .lgl-login, [dir="rtl"] .lgl-login { font-family: 'Dubai', var(--body-font); }

.lgl-login-shell { display: flex; min-height: 100vh; }

/* ===== LEFT — hero ======================================================== */
.lgl-login-hero {
    flex: 1 1 54%;
    display: flex; flex-direction: column;
    padding: clamp(1.5rem, 3.5vw, 3rem);
    color: var(--mist);
    background:
        radial-gradient(110% 70% at 90% -10%, rgba(46, 99, 157, .42), transparent 55%),
        radial-gradient(70% 45% at 0% 100%, rgba(169, 59, 71, .14), transparent 60%),
        linear-gradient(180deg, #0B1C36 0%, var(--ink) 50%, #060F1D 100%);
}

.lgl-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.lgl-hero-brand { display: flex; align-items: center; gap: .7rem; }
.lgl-hero-brand .mark {
    width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--navy-bright), var(--navy-deep));
    color: #fff; font-size: 1.35rem; box-shadow: 0 10px 26px -8px rgba(46, 99, 157, .65);
}
.lgl-hero-brand .wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.lgl-hero-brand .wordmark strong { font-family: var(--display); color: #fff; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.lgl-hero-brand .wordmark small { color: var(--muted); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }

.lgl-lang { display: flex; gap: .15rem; border: 1px solid rgba(220, 231, 243, .16); border-radius: 999px; padding: .2rem; }
.lgl-lang button {
    background: transparent; border: none; color: var(--muted);
    font-family: var(--body-font); font-size: .78rem; font-weight: 600;
    padding: .3rem .7rem; border-radius: 999px; cursor: pointer;
}
.lgl-lang button.on { background: rgba(220, 231, 243, .12); color: #fff; }

.lgl-hero-tag { margin: clamp(1.6rem, 4.5vh, 3.2rem) 0 clamp(1.2rem, 3vh, 2rem); max-width: 34rem; }
.lgl-hero-tag .eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-bright);
}
.lgl-hero-tag .eyebrow .dash { width: 22px; height: 2px; border-radius: 2px; background: var(--crimson); }
.lgl-hero-tag h1 {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.6rem, 2.9vw, 2.3rem); line-height: 1.15; letter-spacing: -.01em;
    color: #fff; margin: .8rem 0 .8rem;
}
.lgl-hero-tag p { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: 0; }

/* Vertical workflow timeline */
.lgl-flow { display: flex; flex-direction: column; gap: 0; margin-top: auto; max-width: 30rem; }
.lgl-flow-step { display: flex; gap: 1rem; position: relative; padding-bottom: 1.15rem; }
.lgl-flow-step:last-child { padding-bottom: 0; }
.lgl-flow-step:not(:last-child)::before {
    content: ""; position: absolute; top: 40px; bottom: 4px;
    inset-inline-start: 19px; width: 2px;
    background: repeating-linear-gradient(180deg, rgba(79, 131, 184, .45) 0 6px, transparent 6px 12px);
}
.lgl-flow-num {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.1rem;
    background: rgba(46, 99, 157, .22); border: 1px solid rgba(79, 131, 184, .38); color: var(--navy-bright);
}
.lgl-flow-txt h5 { font-family: var(--display); margin: 0 0 .15rem; font-size: .95rem; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.lgl-flow-txt p { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ===== RIGHT — sign-in panel ============================================= */
.lgl-login-panel {
    flex: 1 1 46%;
    display: flex; align-items: center; justify-content: center;
    padding: clamp(1.5rem, 3.5vw, 3rem);
    background: var(--panel-bg);
}
.lgl-login-card {
    width: 100%; max-width: 420px;
    background: var(--card); border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 24px 60px -24px rgba(19, 48, 82, .25);
    padding: clamp(1.6rem, 3vw, 2.4rem);
}
.lgl-login-mini-brand { display: none; align-items: center; gap: .55rem; margin-bottom: 1.2rem; font-family: var(--display); font-weight: 700; color: var(--text); }
.lgl-login-mini-brand .mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-bright), var(--navy-deep)); color: #fff; font-size: 1.05rem; }

.lgl-login-title { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .3rem; color: var(--text); }
.lgl-login-sub { color: var(--text-muted); font-size: .9rem; margin: 0 0 1.5rem; }

.lgl-field { margin-bottom: 1.05rem; }
.lgl-field label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .35rem; }
.lgl-field .wrap { position: relative; display: flex; align-items: center; }
.lgl-field .wrap > i { position: absolute; inset-inline-start: .85rem; color: var(--text-muted); font-size: 1.05rem; pointer-events: none; }
.lgl-field input {
    width: 100%; font-family: var(--body-font); font-size: .95rem; color: var(--text);
    background: #FBFCFE; border: 1px solid var(--border-strong); border-radius: 12px;
    padding: .72rem 1rem; padding-inline-start: 2.55rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.lgl-field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 78, 133, .16); background: #fff; }
.lgl-field .toggle-password {
    position: absolute; inset-inline-end: .5rem;
    background: transparent; border: none; color: var(--text-muted);
    width: 34px; height: 34px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; font-size: 1.05rem;
}
.lgl-field .toggle-password:hover { background: #EFF4FA; color: var(--navy-deep); }

.lgl-login-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: .2rem 0 1.25rem; }
.lgl-remember { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--text-muted); cursor: pointer; }
.lgl-remember input { accent-color: var(--navy); width: 15px; height: 15px; }
.lgl-forgot { font-size: .84rem; font-weight: 600; color: var(--navy-deep); text-decoration: none; }
.lgl-forgot:hover { text-decoration: underline; }

.lgl-login-btn {
    position: relative; width: 100%;
    background: linear-gradient(135deg, var(--navy-bright), var(--navy-deep));
    color: #fff; border: none; border-radius: 12px;
    font-family: var(--display); font-weight: 700; font-size: 1rem;
    padding: .85rem 1rem; cursor: pointer;
    box-shadow: 0 14px 30px -10px rgba(31, 78, 133, .6);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.lgl-login-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.lgl-login-btn .label { display: inline-flex; align-items: center; gap: .5rem; }
.lgl-login-btn .spin {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
    animation: lglLoginSpin .8s linear infinite; vertical-align: -3px; margin-inline-end: .5rem;
}
.lgl-login-btn.is-loading .spin { display: inline-block; }
.lgl-login-btn.is-loading .label i { display: none; }
@keyframes lglLoginSpin { to { transform: rotate(360deg); } }

.lgl-login-error {
    display: none; margin-top: 1rem; padding: .7rem .95rem;
    background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA;
    border-radius: 10px; font-size: .85rem;
}
.lgl-login-error.is-shown { display: block; }

.lgl-login-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.5rem; font-size: .74rem; color: var(--text-muted); }
.lgl-login-foot .pill { display: inline-flex; align-items: center; gap: .35rem; background: #EFF4FA; color: var(--navy-deep); font-weight: 600; border-radius: 999px; padding: .3rem .7rem; }

/* ===== Responsive ======================================================== */
@media (max-width: 860px) {
    .lgl-login-shell { flex-direction: column; }
    .lgl-login-hero { display: none; }
    .lgl-login-panel { min-height: 100vh; }
    .lgl-login-mini-brand { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
    .lgl-login-btn, .lgl-login-btn:hover { transition: none; transform: none; }
    .lgl-login-btn .spin { animation-duration: 1.5s; }
}
