/* auth.css - صفحات الدخول والتسجيل وإعادة كلمة المرور (يحتاج base.css) */

body.auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(360px, 5fr) 7fr;
    background: var(--surface);
}

/* ========= اللوحة الداكنة ========= */
.auth-aside {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem clamp(2rem, 4vw, 3.5rem);
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-light,
.brand-light:hover {
    color: #fff;
}

.brand-light .seal {
    box-shadow: inset 0 0 0 2px var(--beni), inset 0 0 0 3.5px rgba(255, 255, 255, 0.55);
}

.auth-story {
    max-width: 30rem;
}

/* الختم الكبير - العنصر المميز في الهوية */
.seal-hero {
    width: 112px;
    height: 112px;
    margin-bottom: 2rem;
    font-size: 68px;
    border-radius: 18px;
    box-shadow: inset 0 0 0 5px var(--beni), inset 0 0 0 8px rgba(255, 255, 255, 0.6);
    transform: rotate(-6deg);
}

.auth-headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 1.2rem + 1.6vw, 2.6rem);
    line-height: 1.2;
}

.auth-lede {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.0625rem;
    max-width: 40ch;
}

.auth-points {
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-points i {
    width: 1.5rem;
    color: var(--beni-light);
}

.auth-aside-foot {
    display: flex;
    gap: 1.25rem;
    font-size: 0.875rem;
}

.auth-aside-foot a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.auth-aside-foot a:hover {
    color: #fff;
}

/* ========= النموذج ========= */
.auth-main {
    display: flex;
    flex-direction: column;
    padding: 2.5rem var(--gutter);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.auth-card h1 {
    font-size: var(--step-3);
}

.auth-sub {
    margin: 0.4rem 0 1.75rem;
    color: var(--ink-soft);
}

.field {
    margin-bottom: 1.1rem;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.field-row a {
    font-size: 0.875rem;
}

.password-container {
    position: relative;
}

.password-container input {
    padding-inline-end: 3rem;
}

.toggle-password {
    position: absolute;
    top: 50%;
    inset-inline-end: 4px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ink-faint);
}

.toggle-password:hover {
    color: var(--ink);
}

/* CAPTCHA */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.captcha-box img {
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #F6F2F7;
    max-width: calc(100% - 52px);
    height: auto;
}

.captcha-refresh {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-soft);
}

.captcha-refresh:hover {
    border-color: var(--ink);
    color: var(--ink);
}

#captcha {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
}

.auth-card .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--ink-soft);
}

.auth-switch a {
    font-weight: 700;
}

.auth-copy {
    margin-top: 2rem;
    text-align: center;
    font-size: var(--step--1);
    color: var(--ink-faint);
}

/* اختيار الجنس */
.choice-group {
    margin: 0 0 1.1rem;
    padding: 0;
    border: 0;
}

.choice-group legend {
    margin-bottom: 0.4rem;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 700;
}

.radio-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0.5rem 0 1.25rem;
    font-size: 0.925rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.check-row input {
    flex: none;
    margin-top: 3px;
}

/* قصص النجاح المختارة تحت نموذج الدخول (الصفحة الرئيسية) */
.home-stories {
    width: 100%;
    max-width: 420px;
    margin: 2.25rem auto 0;
}

.home-stories h2 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.home-stories h2 i {
    color: var(--beni);
}

.home-stories-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-stories-list a {
    display: grid;
    gap: 0.15rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--beni);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.home-stories-list a:hover strong,
.home-stories-list a:focus-visible strong {
    color: var(--beni-deep);
    text-decoration: underline;
}

.home-stories .story-stage {
    color: var(--beni-deep);
    font-size: 0.78rem;
    font-weight: 700;
}

.home-story-who {
    color: var(--ink-soft);
    font-size: 0.875rem;
}

.home-stories-all {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ========= الهاتف والجهاز اللوحي ========= */
@media (max-width: 900px) {
    body.auth {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        background: var(--paper);
    }

    .auth-aside {
        position: static;
        height: auto;
        padding: 1rem var(--gutter);
    }

    .auth-story,
    .auth-aside-foot {
        display: none;
    }

    .auth-main {
        padding-top: 2rem;
    }

    .auth-card {
        margin: 0 auto;
        padding: 1.75rem 1.25rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-panel);
    }
}

/* صفحة الاستئناف: نص الاستئناف المرسل */
.appeal-quote {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 1rem;
    border-inline-start: 3px solid var(--line-strong);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.appeal-card textarea {
    width: 100%;
    resize: vertical;
}