/* ==========================================================================
   Waseela-e-Harmain — Auth pages (login, register, reset, 2FA, verify)
   Split screen: Haram imagery panel + form panel. Unlayered CSS, so it also
   normalises the Tailwind-styled inner auth views without rewriting them.
   ========================================================================== */

.wh-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: var(--wh-canvas);
    font-family: var(--wh-font);
    color: var(--wh-ink);
    -webkit-font-smoothing: antialiased;
}
@media (min-width: 1024px) {
    .wh-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
    .wh-auth--wide { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}

/* ---------- Visual panel ---------- */
.wh-auth__visual {
    position: relative;
    display: none;
    overflow: hidden;
    color: #eaf6f0;
    background: var(--wh-emerald-950);
}
@media (min-width: 1024px) {
    .wh-auth__visual { display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100vh; padding: 2.5rem 3rem; }
}
.wh-auth__visual > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .55;
}
.wh-auth__visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(3, 42, 31, .55) 0%, rgba(3, 42, 31, .15) 35%, rgba(3, 42, 31, .92) 100%),
        radial-gradient(80% 60% at 0% 100%, rgba(233, 188, 63, .18), transparent 70%);
}
.wh-auth__visual > * { position: relative; z-index: 2; }
.wh-auth__brand { display: inline-flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; }
.wh-auth__mark {
    width: 3rem;
    height: 3rem;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 42, 31, .55);
    backdrop-filter: blur(6px);
    color: var(--wh-gold);
    box-shadow: inset 0 0 0 1px rgba(233, 188, 63, .35);
}
.wh-auth__mark svg { width: 1.6rem; height: 1.6rem; }
.wh-auth__brand strong { display: block; font-size: 1.1rem; font-weight: 800; letter-spacing: -.015em; }
.wh-auth__brand span span { display: block; font-size: .74rem; color: var(--wh-mint); font-weight: 600; margin-top: .1rem; }

.wh-auth__verse { max-width: 30rem; }
.wh-auth__verse p.wh-auth__arabic {
    font-family: 'Noto Naskh Arabic', var(--wh-font-urdu);
    font-size: 1.6rem;
    line-height: 1.9;
    color: var(--wh-gold);
    margin: 0 0 .75rem;
    direction: rtl;
    display: inline-block;
}
.wh-auth__verse h2 { margin: 0; font-size: 2.15rem; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; color: #fff; }
html[dir="rtl"] .wh-auth__verse h2 { font-family: var(--wh-font-urdu); font-size: 1.9rem; line-height: 1.9; letter-spacing: 0; }
.wh-auth__verse > p:last-of-type { margin: 1rem 0 0; font-size: .95rem; line-height: 1.65; color: #cfe7dc; max-width: 26rem; }

.wh-auth__facts { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; max-width: 32rem; }
.wh-auth__facts li {
    padding: .85rem .9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
}
.wh-auth__facts svg { width: 1.15rem; height: 1.15rem; color: var(--wh-mint); }
.wh-auth__facts strong { display: block; margin-top: .45rem; font-size: .82rem; font-weight: 800; color: #fff; }
.wh-auth__facts span { display: block; font-size: .7rem; color: #b9d8ca; margin-top: .1rem; line-height: 1.4; }
.wh-auth__visual-foot { font-size: .72rem; color: rgba(207, 231, 220, .7); }

/* ---------- Form panel ---------- */
.wh-auth__panel { display: flex; flex-direction: column; min-height: 100vh; padding: 1.25rem 1.25rem 1.5rem; }
@media (min-width: 640px) { .wh-auth__panel { padding: 1.75rem 2.5rem 2rem; } }
.wh-auth__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wh-auth__top .wh-auth__brand { color: var(--wh-ink); }
.wh-auth__top .wh-auth__brand span span { color: var(--wh-muted); }
.wh-auth__top .wh-auth__mark { background: linear-gradient(150deg, var(--wh-emerald-800), var(--wh-emerald-950)); }
@media (min-width: 1024px) { .wh-auth__top .wh-auth__brand { visibility: hidden; } }
.wh-auth__back { font-size: .78rem; font-weight: 700; color: var(--wh-muted); text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.wh-auth__back:hover { color: var(--wh-ink); }
.wh-auth__back svg { width: .95rem; height: .95rem; }

.wh-auth__center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
.wh-auth__card { width: 100%; max-width: 27rem; }
.wh-auth--wide .wh-auth__card { max-width: 44rem; }
.wh-auth__foot { text-align: center; font-size: .72rem; color: var(--wh-muted); }

/* ---------- Normalise the inner auth views ---------- */
.wh-auth__card h2 { font-size: 1.7rem !important; font-weight: 800 !important; letter-spacing: -.025em; color: var(--wh-ink) !important; text-align: start; }
html[dir="rtl"] .wh-auth__card h2 { letter-spacing: 0; }
.wh-auth__card h2 + p, .wh-auth__card h2 + span + p { font-size: .86rem !important; color: var(--wh-muted) !important; line-height: 1.6; text-align: start; }
.wh-auth__card > div > .border-b:first-child { border-bottom: 0 !important; text-align: start !important; padding-bottom: 0 !important; }
.wh-auth__card label { font-size: .78rem !important; font-weight: 700 !important; color: var(--wh-ink-2) !important; letter-spacing: 0 !important; }
.wh-auth__card input[type="text"],
.wh-auth__card input[type="email"],
.wh-auth__card input[type="password"],
.wh-auth__card input[type="tel"],
.wh-auth__card input[type="number"],
.wh-auth__card input[type="date"],
.wh-auth__card select,
.wh-auth__card textarea {
    width: 100%;
    font-family: var(--wh-font) !important;
    font-size: .9rem !important;
    color: var(--wh-ink) !important;
    background: #fff !important;
    border: 1px solid var(--wh-line-strong) !important;
    border-radius: 12px !important;
    padding: .72rem .9rem !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.wh-auth__card input:focus, .wh-auth__card select:focus, .wh-auth__card textarea:focus {
    border-color: var(--wh-emerald-600) !important;
    box-shadow: 0 0 0 3px rgba(31, 165, 119, .16) !important;
}
.wh-auth__card input.border-red-500, .wh-auth__card input[aria-invalid="true"] { border-color: var(--wh-rose) !important; }
.wh-auth__card input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--wh-emerald-700); border-radius: 5px; }
.wh-auth__card button[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .82rem 1.1rem !important;
    border-radius: 12px !important;
    border: 0 !important;
    background: var(--wh-emerald-900) !important;
    color: #fff !important;
    font-family: var(--wh-font) !important;
    font-size: .9rem !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 22px -12px rgba(6, 59, 44, .7) !important;
    cursor: pointer;
    transition: background-color .15s ease;
}
.wh-auth__card button[type="submit"]:hover { background: var(--wh-emerald-800) !important; }
.wh-auth__card button[type="submit"]:disabled { opacity: .7; cursor: progress; }
.wh-auth__card a { color: var(--wh-emerald-700); }
.wh-auth__card .text-red-600, .wh-auth__card .text-rose-600 { color: var(--wh-rose) !important; }
.wh-auth__card .rounded-lg.bg-emerald-50,
.wh-auth__card .rounded-xl.bg-emerald-50 { border-radius: 12px !important; }

/* Login-specific helpers */
.wh-auth-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.75rem; }
.wh-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wh-auth-pass { position: relative; }
.wh-auth-pass input { padding-inline-end: 3rem !important; }
.wh-auth-pass button {
    position: absolute;
    inset-inline-end: .45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: var(--wh-faint);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wh-auth-pass button:hover { color: var(--wh-ink); background: var(--wh-subtle); }
.wh-auth-pass button svg { width: 1.15rem; height: 1.15rem; }
.wh-auth-check { display: inline-flex; align-items: center; gap: .55rem; font-size: .82rem !important; font-weight: 600 !important; color: var(--wh-ink-2) !important; cursor: pointer; }
.wh-auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.6rem 0 1.1rem; font-size: .74rem; color: var(--wh-faint); }
.wh-auth-divider::before, .wh-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--wh-line); }
.wh-auth-alt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--wh-line);
    background: #fff;
    text-decoration: none;
    color: var(--wh-ink);
    transition: border-color .15s ease, background-color .15s ease;
}
.wh-auth-alt:hover { border-color: var(--wh-mint-line); background: var(--wh-mint-soft); }
.wh-auth-alt strong { display: block; font-size: .86rem; font-weight: 800; }
.wh-auth-alt span span { display: block; font-size: .75rem; color: var(--wh-muted); margin-top: .1rem; }
.wh-auth-alt > svg { width: 1.1rem; height: 1.1rem; color: var(--wh-emerald-700); flex-shrink: 0; }

@media (max-width: 479px) {
    .wh-auth__back { display: none; }
    .wh-auth__top .wh-auth__brand strong { font-size: .98rem; white-space: nowrap; }
    .wh-auth__top .wh-auth__brand span span { display: none; }
    .wh-auth__top .wh-auth__mark { width: 2.5rem; height: 2.5rem; border-radius: 12px; }
}

/* Registration */
.wh-auth--wide .wh-auth__card { max-width: 36rem; }
.wh-reg-steps { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.wh-reg-steps li { display: flex; align-items: center; gap: .45rem; font-size: .74rem; font-weight: 700; color: var(--wh-faint); padding: .5rem .6rem; border-radius: 10px; background: #fff; border: 1px solid var(--wh-line); }
.wh-reg-steps li span { width: 1.35rem; height: 1.35rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--wh-subtle); border: 1px solid var(--wh-line-strong); font-size: .68rem; flex-shrink: 0; }
.wh-reg-steps li.is-current { color: var(--wh-emerald-900); border-color: var(--wh-mint-line); background: var(--wh-mint-soft); }
.wh-reg-steps li.is-current span { background: var(--wh-emerald-900); border-color: var(--wh-emerald-900); color: #fff; }
.wh-reg-steps li.is-done span { background: var(--wh-emerald-600); border-color: var(--wh-emerald-600); color: #fff; }
@media (max-width: 479px) { .wh-reg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wh-terms { border: 1px solid var(--wh-mint-line); background: var(--wh-mint-soft); border-radius: 14px; padding: .9rem; display: flex; flex-direction: column; gap: .7rem; }
.wh-terms__head { display: flex; align-items: center; justify-content: space-between; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--wh-emerald-900); }
.wh-terms__body { max-height: 8.5rem; overflow-y: auto; background: #fff; border: 1px solid var(--wh-line); border-radius: 10px; padding: .75rem .85rem; font-size: .76rem; line-height: 1.6; color: var(--wh-ink-2); }
.wh-terms__body p { margin: 0 0 .5rem; }
.wh-terms .wh-auth-check { font-size: .78rem !important; line-height: 1.5; }

/* Top navigation on login / register / password pages */
.wh-authnav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: .6rem 1.25rem; background: var(--wh-emerald-950); color: #fff; box-shadow: 0 6px 20px -14px rgba(0, 0, 0, .6); }
.wh-authnav__brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; min-width: 0; }
.wh-authnav__brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-authnav__logo { width: 2.4rem !important; height: 2.4rem !important; }
.wh-authnav__links { display: flex; gap: 1.1rem; margin-inline-start: auto; }
.wh-authnav__links a { color: #cfe7dc; text-decoration: none; font-weight: 600; font-size: .88rem; }
.wh-authnav__links a:hover { color: var(--wh-gold); }
.wh-authnav__tools { display: inline-flex; align-items: center; gap: .5rem; }
.wh-authnav__home { width: 2.3rem; height: 2.3rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.wh-authnav__home svg { width: 1.1rem; height: 1.1rem; }
.wh-authnav .wh-lang { background: rgba(255, 255, 255, .08); }
@media (max-width: 860px) { .wh-authnav__links { display: none; } .wh-authnav__tools { margin-inline-start: auto; } }
@media (max-width: 380px) { .wh-authnav__brand span { display: none; } }

/* the logo inside the brand block is a normal picture (it used to inherit the full-bleed background-photo rule and sat on top of the title) */
.wh-auth__visual .wh-auth__mark { position: relative; inset: auto; width: 3rem; height: 3rem; object-fit: contain; background: #fff; padding: 2px; border-radius: 50%; z-index: 2; }
