/* ═══════════════════════════════════════════════════════════
   Auth screens (login / forgot / reset / setup password) — design B:
   black brand panel like the sidebar + the form on the internal
   light-blue background with flat corner circles.
   ═══════════════════════════════════════════════════════════ */
:root { --ink: #0f1f3d; --muted: #64748b; }
body.auth-page { font-family: var(--nova-font); margin: 0; min-height: 100vh; color: var(--ink); }

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

/* ─── Left: black brand panel ─── */
.auth-panel {
    flex: 0 0 46%; background: #0b0b0c; color: #fff; padding: 48px 56px;
    display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-panel::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at calc(100% + 40px) -40px, color-mix(in srgb, var(--primary) 16%, transparent) 210px, transparent 211px),
        radial-gradient(circle at -60px calc(100% + 60px), rgba(255, 255, 255, .05) 240px, transparent 241px),
        radial-gradient(circle at 120px calc(100% + 90px), color-mix(in srgb, var(--primary) 10%, transparent) 170px, transparent 171px);
}
.auth-panel > * { position: relative; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand-icon {
    flex-shrink: 0; width: 70px; height: 70px; border-radius: 12px;
    display: grid; place-items: center; color: #fff; font-size: 1.15rem; overflow: hidden;
}
.auth-brand-icon img { max-width: 70px; max-height: 70px; object-fit: contain; }
.auth-brand-name { display: block; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.auth-brand-sub { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: rgba(255, 255, 255, .4); }
.auth-pitch { margin: auto 0; }
.auth-pitch h2 { font-size: 2.3rem; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.auth-pitch h2 span { color: var(--primary); }
.auth-pitch h2 + .auth-feat { margin-top: 32px; }
.auth-pitch p { color: rgba(255, 255, 255, .55); font-size: 1rem; max-width: 380px; margin-bottom: 32px; }
.auth-feat { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; color: rgba(255, 255, 255, .85); font-weight: 500; }
.auth-feat i {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08);
    display: grid; place-items: center; color: var(--primary); font-size: .9rem;
}
.auth-copy { font-size: .8rem; color: rgba(255, 255, 255, .3); }

/* ─── Right: the form on the internal blue background ─── */
.auth-side {
    flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px;
    background:
        radial-gradient(circle at calc(100% + 30px) 70px, color-mix(in srgb, var(--primary) 16%, transparent) 190px, transparent 191px),
        radial-gradient(circle at 30px calc(100% + 30px), color-mix(in srgb, var(--primary) 20%, transparent) 170px, transparent 171px),
        radial-gradient(circle at calc(100% - 10px) calc(100% + 50px), color-mix(in srgb, var(--secondary) 38%, transparent) 170px, transparent 171px),
        linear-gradient(180deg, #edf3fc 0%, #f3f7fd 45%, #f7f9fc 100%);
}
.auth-form { width: 100%; max-width: 420px; }
.auth-form h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.auth-lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth-form .alert { border-radius: 12px; font-size: .88rem; }

/* ─── Fields ─── */
.f-label { display: block; font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: 6px; }
.f-field { position: relative; }
.f-ic { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .95rem; pointer-events: none; transition: color .15s; }
.f-input {
    width: 100%; height: 50px; border-radius: 12px; border: 1px solid #e2e8f0; background: #f8fafc;
    padding-block: 0 0; padding-inline: 44px 48px; font-size: .95rem; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.f-input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.f-input:focus ~ .f-ic { color: var(--primary); }
.f-input:disabled, .f-input[readonly] { color: var(--muted); cursor: not-allowed; }
.f-input[readonly]:focus { background: #f8fafc; border-color: #e2e8f0; box-shadow: none; }
.pw-eye {
    position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent;
    color: #94a3b8; display: grid; place-items: center; cursor: pointer; transition: color .15s, background .15s;
}
.pw-eye:hover, .pw-eye.on { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }

.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 22px; font-size: .88rem; }
.auth-row .form-check-label { color: var(--muted); }
.auth-form a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-form a:hover { text-decoration: underline; }
.auth-form .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.auth-form .form-check-input:focus { box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 25%, transparent); border-color: var(--primary); }

.btn-auth {
    width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--primary); color: #fff;
    font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); transition: filter .15s, box-shadow .15s;
}
.btn-auth:hover { filter: brightness(.95); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 45%, transparent); }
.auth-back { display: block; text-align: center; margin-top: 18px; font-size: .9rem; }

/* ─── Phone: the black panel becomes a strip on top ─── */
@media (max-width: 860px) {
    .auth-shell { flex-direction: column; }
    .auth-panel { flex: none; padding: 26px 22px 30px; }
    .auth-pitch { margin: 22px 0 0; }
    .auth-pitch h2 { font-size: 1.5rem; margin: 0; }
    .auth-pitch p, .auth-feat, .auth-copy { display: none; }
    .auth-side { flex: 1; align-items: flex-start; padding: 28px 20px; }
    .auth-form h1 { font-size: 1.5rem; }
}

.auth-form a.btn-auth { color: #fff; text-decoration: none; }
.auth-form a.btn-auth-light { background: #fff; color: var(--ink); border: 1px solid #e2e8f0; box-shadow: none; }
.auth-form a.btn-auth-light:hover { color: var(--ink); background: #f8fafc; box-shadow: none; filter: none; }

/* "or" between the password form and "Sign in with Google". */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.auth-google-icon { color: #4285f4; }

/* Lock screen: "Not you? Sign out" under the Unlock button. */
.auth-alt { margin-top: 18px; text-align: center; font-size: .88rem; color: var(--muted); }
.auth-alt button { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 600; }
.auth-alt button:hover { text-decoration: underline; }

/* Language switch on the sign-in screen: pinned to the top corner of the form side. */
.auth-side { position: relative; }
.auth-lang { position: absolute; top: 24px; inset-inline-end: 28px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid #e2e8f0; }
.lang-switch-item { padding: .28rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; line-height: 1.4; }
.lang-switch-item:hover { color: var(--primary); }
.lang-switch-item.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
/* Arrows point the way the text reads. */
[dir="rtl"] .auth-arrow { transform: scaleX(-1); }
