/**
 * farask-auth-ui.css — واجهة الدخول/التسجيل
 * خلفية بيضاء · ثلاثية خطوط · بانر معلومات متحرك
 */
:root {
    --fs-brand: #206843;
    --fs-brand-deep: #14532d;
    --fs-brand-soft: #f0fdf4;
    --fs-teal: #0f766e;
    --fs-teal-soft: #f0fdfa;
    --fs-sky: #0284c7;
    --fs-sky-soft: #eff6ff;
    --fs-amber: #b45309;
    --fs-amber-soft: #fffbeb;
    --fs-rose: #e11d48;
    --fs-rose-soft: #fff1f2;
    --fs-ink: #1f2937;
    --fs-ink-soft: #374151;
    --fs-muted: #64748b;
    --fs-line: #e2e8f0;
    --fs-surface: #ffffff;
    --fs-radius: 14px;
    --fs-radius-lg: 22px;
    --fs-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
    /* هوية التقييم — مكتب (evh) + مقيّم (ev) — بدون بنفسجي */
    --fs-evh-brand: #0f766e;
    --fs-evh-brand-deep: #115e59;
    --fs-evh-mint: #5eead4;
    --fs-evh-sky: #0284c7;
    --fs-evh-amber: #f59e0b;
    --fs-evh-emerald: #059669;
    --fs-ev-brand: #206843;
    --fs-ev-brand-dark: #185a37;
    --fs-ev-secondary: #ec750b;
    --fs-font-display: 'El Messiri', sans-serif;
    --fs-font-ui: 'Tajawal', sans-serif;
    --fs-font-data: 'IBM Plex Sans Arabic', sans-serif;
    --fs-font-input: 'IBM Plex Sans Arabic', sans-serif;
    --fs-header-offset: 74px;
    --fs-auth-header-max: 1120px;
    --fs-auth-max: 460px;
    --fs-auth-shell-pad: 16px;
    --fs-nav-label: #1f2937;
}

html.fs-auth-html,
.fs-auth-page {
    scroll-behavior: smooth;
}

/* ——— صفحة بيضاء بالكامل ——— */
.fs-auth-page {
    margin: 0;
    min-height: 100vh;
    direction: rtl;
    font-family: var(--fs-font-ui);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--fs-ink);
    background: #ffffff;
    padding-top: var(--fs-header-offset);
    -webkit-font-smoothing: antialiased;
}

.fs-auth-page h2 {
    font-family: var(--fs-font-display);
    font-weight: 700;
    letter-spacing: 0;
    font-size: 1.35rem;
}

/* غلاف ضيق — لا يملأ الشاشة */
.fs-auth-shell {
    width: 100%;
    max-width: var(--fs-auth-max);
    margin: 0 auto;
    padding: 12px var(--fs-auth-shell-pad) 32px;
    box-sizing: border-box;
}

.fs-auth-page input,
.fs-auth-page select,
.fs-auth-page textarea,
.fs-auth-page .form-control,
.fs-auth-page .form-control::placeholder {
    font-family: var(--fs-font-input) !important;
    font-style: normal;
}

.fs-auth-page button,
.fs-auth-page .btn,
.fs-auth-page .input-group-text {
    font-family: var(--fs-font-ui);
    font-style: normal;
}

.fs-auth-page .form-control {
    font-weight: 400;
    font-size: 0.9rem;
}

.fs-auth-page .form-control::placeholder {
    font-family: var(--fs-font-ui);
    font-weight: 400;
    color: #94a3b8;
    opacity: 1;
}

.fs-auth-page .form-label {
    font-family: var(--fs-font-ui);
    font-weight: 600;
}

.fs-auth-page .fs-auth-num {
    font-family: var(--fs-font-data);
    font-variant-numeric: tabular-nums;
}


/* ——— هيدر المصادقة — هوية التقييم (ألوان متعددة) ——— */
.fs-auth-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #ffffff;
    border-bottom: 1px solid var(--fs-line);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.fs-auth-header__spectrum {
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--fs-evh-brand) 0%,
        var(--fs-evh-mint) 22%,
        var(--fs-evh-sky) 44%,
        var(--fs-evh-amber) 66%,
        var(--fs-ev-brand) 100%
    );
}

.fs-auth-header__shell {
    max-width: var(--fs-auth-header-max);
    margin: 0 auto;
    padding: 0 clamp(12px, 3vw, 24px);
}

.fs-auth-header__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    flex-wrap: wrap;
}

.fs-auth-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}

.fs-auth-header__logo {
    height: 40px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    display: block;
}

.fs-auth-header__brand-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.fs-auth-header__brand-title {
    font-family: var(--fs-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fs-ink);
    line-height: 1.2;
    white-space: nowrap;
}

.fs-auth-header__chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-width: min(100%, 28rem);
}

/* شريط جهات المنصة — أيقونات مفتوحة + تباعد، بلا مربعات وبلا hover */
.fs-auth-rail {
    flex: 0 1 auto;
    min-width: 0;
    margin-inline-start: 0.75rem;
    max-width: min(100%, 22rem);
}

.fs-auth-rail__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.fs-auth-rail__hint {
    font-family: var(--fs-font-ui);
    font-size: 0.62rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.06em;
    line-height: 1;
    padding-inline-start: 0.1rem;
}

.fs-auth-rail__stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 1.75rem;
}

.fs-auth-rail__group {
    display: none;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    opacity: 0;
}

.fs-auth-rail__group.is-active {
    display: inline-flex;
    opacity: 1;
}

.fs-auth-rail__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.55rem;
    color: #334155;
    white-space: nowrap;
    background: transparent;
    border: 0;
}

.fs-auth-rail__item:first-child {
    padding-inline-start: 0;
}

.fs-auth-rail__item i {
    font-size: 1.05rem;
    line-height: 1;
    color: var(--rail-c, #0f766e);
}

.fs-auth-rail__item span {
    font-family: var(--fs-font-display);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    color: #1e293b;
}

.fs-auth-rail__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    margin: 0 0.15rem;
}

.fs-auth-rail__item--office { --rail-c: #2563eb; }
.fs-auth-rail__item--eval { --rail-c: #0f766e; }
.fs-auth-rail__item--amber { --rail-c: #d97706; }
.fs-auth-rail__item--sky { --rail-c: #0284c7; }
.fs-auth-rail__item--rose { --rail-c: #e11d48; }
.fs-auth-rail__item--cyan { --rail-c: #0891b2; }
.fs-auth-rail__item--slate { --rail-c: #475569; }
.fs-auth-rail__item--teal { --rail-c: #0d9488; }
.fs-auth-rail__item--law { --rail-c: #b45309; }

.fs-auth-header__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: auto;
    padding: 0;
    border: 1px solid var(--fs-line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--fs-evh-brand);
    cursor: pointer;
    font-size: 1rem;
}

.fs-auth-header__menu-btn[aria-expanded="true"] {
    background: #f0fdfa;
    border-color: rgba(15, 118, 110, 0.35);
    color: var(--fs-evh-brand-deep);
}

.fs-auth-header__panel {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.fs-auth-header__nav {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.fs-auth-header__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2px 4px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    font-family: var(--fs-font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fs-nav-label);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.fs-auth-header__link:hover {
    background: #f8fafc;
    border-color: #eef2f7;
}

.fs-auth-header__link-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1;
}

.fs-auth-header__link-icon i {
    font-style: normal;
    line-height: 1;
}

.fs-auth-header__link-label {
    font-family: var(--fs-font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.25;
    white-space: nowrap;
    color: var(--fs-nav-label);
}

.fs-auth-header__link--teal {
    color: var(--fs-nav-label);
}
.fs-auth-header__link--teal .fs-auth-header__link-icon {
    color: #0f766e;
    background: #ecfdf5;
}

.fs-auth-header__link--sky {
    color: var(--fs-nav-label);
}
.fs-auth-header__link--sky .fs-auth-header__link-icon {
    color: #0284c7;
    background: #eff6ff;
}

.fs-auth-header__link--amber {
    color: var(--fs-nav-label);
}
.fs-auth-header__link--amber .fs-auth-header__link-icon {
    color: #d97706;
    background: #fffbeb;
}

.fs-auth-header__link--green {
    color: var(--fs-nav-label);
}
.fs-auth-header__link--green .fs-auth-header__link-icon {
    color: #166534;
    background: #f0fdf4;
}

.fs-auth-header__link--rose {
    color: var(--fs-nav-label);
}
.fs-auth-header__link--rose .fs-auth-header__link-icon {
    color: #e11d48;
    background: #fff1f2;
}

/* إبقاء الصنف القديم متوافقاً دون بنفسجي */
.fs-auth-header__link--violet {
    color: var(--fs-nav-label);
}
.fs-auth-header__link--violet .fs-auth-header__link-icon {
    color: #0f766e;
    background: #ecfdf5;
}

.fs-auth-header__link.is-active {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.fs-auth-header__link.is-active .fs-auth-header__link-label {
    color: #111827;
    font-weight: 600;
}
.fs-auth-header__link.is-active .fs-auth-header__link-icon {
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.fs-auth-header__fav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--fs-font-data, 'IBM Plex Sans Arabic', sans-serif);
}

.fs-auth-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.fs-auth-header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 10px;
    font-family: var(--fs-font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: filter 0.18s, box-shadow 0.18s;
}

.fs-auth-header__btn--teal {
    color: var(--fs-evh-brand-deep);
    background: #f0fdfa;
    border-color: rgba(15, 118, 110, 0.25);
}

.fs-auth-header__btn--teal.is-active,
.fs-auth-header__btn--teal:hover {
    background: var(--fs-evh-brand);
    color: #fff;
    border-color: var(--fs-evh-brand);
}

.fs-auth-header__btn--green {
    color: #fff;
    background: var(--fs-ev-brand);
    border-color: var(--fs-ev-brand);
    box-shadow: 0 2px 8px rgba(32, 104, 67, 0.2);
}

.fs-auth-header__btn--green.is-active,
.fs-auth-header__btn--green:hover {
    background: var(--fs-ev-brand-dark);
    border-color: var(--fs-ev-brand-dark);
}

.fs-auth-header__btn--amber {
    color: #9a3412;
    background: #fff7ed;
    border-color: rgba(236, 117, 11, 0.35);
}

.fs-auth-header__btn--amber:hover {
    background: var(--fs-ev-secondary);
    color: #fff;
    border-color: var(--fs-ev-secondary);
}

.fs-auth-header__btn--sky {
    color: #0369a1;
    background: #eff6ff;
    border-color: rgba(2, 132, 199, 0.3);
}

.fs-auth-header__btn--sky.is-active,
.fs-auth-header__btn--sky:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

/* توافق قديم: أي btn--violet يصبح سماوي وليس بنفسجياً */
.fs-auth-header__btn--violet {
    color: #0369a1;
    background: #eff6ff;
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: none;
}

.fs-auth-header__btn--violet.is-active,
.fs-auth-header__btn--violet:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

.fs-auth-header__btn--rose {
    color: #be123c;
    background: #fff1f2;
    border-color: rgba(190, 18, 60, 0.28);
    gap: 0.35rem;
}

.fs-auth-header__btn--rose.is-active,
.fs-auth-header__btn--rose:hover {
    background: #e11d48;
    border-color: #e11d48;
    color: #fff;
}

.fs-auth-header__btn--rose .fs-auth-header__fav-count {
    background: #fff;
    color: #e11d48;
}

.fs-auth-header__btn--rose.is-active .fs-auth-header__fav-count,
.fs-auth-header__btn--rose:hover .fs-auth-header__fav-count {
    background: rgba(255, 255, 255, 0.95);
    color: #be123c;
}

.fs-auth-header__user {
    position: relative;
}

.fs-auth-header__user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 6px;
    border: 1px solid var(--fs-line);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    cursor: pointer;
    font-family: var(--fs-font-ui);
}

.fs-auth-header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0fdfa, #ecfdf5);
    color: var(--fs-evh-brand);
    border: 2px solid var(--fs-ev-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.fs-auth-header__user-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
    text-align: right;
}

.fs-auth-header__user-name {
    font-family: var(--fs-font-display);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--fs-ink);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-auth-header__user-role {
    font-family: var(--fs-font-data);
    font-size: 0.68rem;
    color: var(--fs-muted);
}

.fs-auth-header__chevron {
    font-size: 0.7rem;
    color: var(--fs-muted);
}

.fs-auth-header__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--fs-line);
    border-radius: 12px;
    box-shadow: var(--fs-shadow);
    z-index: 1060;
}

.fs-auth-header__dropdown[hidden] {
    display: none !important;
}

.fs-auth-header__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 8px;
    font-family: var(--fs-font-ui);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--fs-ink);
    text-decoration: none;
}

.fs-auth-header__dropdown-item--teal:hover {
    background: #f0fdfa;
    color: var(--fs-evh-brand);
}

.fs-auth-header__dropdown-item--sky:hover {
    background: #eff6ff;
    color: var(--fs-evh-sky);
}

.fs-auth-header__dropdown-item--rose {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--fs-line);
    color: var(--fs-rose);
}

.fs-auth-header__dropdown-item--rose:hover {
    background: var(--fs-rose-soft);
}

.fs-auth-header__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1045;
}

.fs-auth-header__backdrop[hidden] {
    display: none !important;
}

body.fs-auth-nav-open {
    overflow: hidden;
}

@media (max-width: 899.98px) {
    .fs-auth-header__brand-meta {
        display: none;
    }

    .fs-auth-rail {
        max-width: 14.5rem;
        margin-inline-start: 0.35rem;
    }

    .fs-auth-rail__hint {
        display: none;
    }

    .fs-auth-rail__item {
        gap: 0.28rem;
        padding: 0 0.35rem;
    }

    .fs-auth-rail__item i {
        font-size: 0.92rem;
    }

    .fs-auth-rail__item span {
        font-size: 0.68rem;
    }

    .fs-auth-rail__dot {
        margin: 0 0.05rem;
    }

    .fs-auth-header__menu-btn {
        display: inline-flex;
    }

    .fs-auth-header__panel {
        position: fixed;
        top: var(--fs-header-offset);
        right: 0;
        left: 0;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 16px 20px;
        background: #fff;
        border-bottom: 1px solid var(--fs-line);
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
        max-height: calc(100vh - var(--fs-header-offset));
        overflow-y: auto;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    }

    .fs-auth-header__panel.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .fs-auth-header__nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding-bottom: 12px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--fs-line);
    }

    .fs-auth-header__link {
        padding: 10px 12px;
    }

    .fs-auth-header__actions {
        flex-direction: column;
        width: 100%;
    }

    .fs-auth-header__btn {
        width: 100%;
        justify-content: center;
        padding: 11px 14px;
    }

    .fs-auth-header__user,
    .fs-auth-header__user-btn {
        width: 100%;
    }

    .fs-auth-header__user-btn {
        justify-content: space-between;
    }

    .fs-auth-header__dropdown {
        position: static;
        margin-top: 8px;
        box-shadow: none;
    }
}

@media (max-width: 520px) {
    .fs-auth-header__btn span {
        font-size: 0.76rem;
    }
}

/* ——— عنوان البطاقة (بديل fixed-message) ——— */
.fs-auth-page .login-card__head {
    padding: 1.25rem 1.25rem 0;
    text-align: center;
}

.fs-auth-page .login-card__head h2 {
    margin: 0 0 6px;
    font-family: var(--fs-font-display);
    color: var(--fs-ink);
}

.fs-auth-page .fs-auth-lead {
    margin: 0;
    font-family: var(--fs-font-ui);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.55;
    color: var(--fs-muted);
}

.fs-auth-page .fixed-message {
    display: none;
}

/* ——— بطاقة الدخول ——— */
.fs-auth-page .login-card {
    width: 100%;
    margin: 0 auto 28px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--fs-line);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.fs-auth-page .login-card > .alert {
    margin: 0.85rem 1.25rem 0;
    font-size: 0.85rem;
}

/* ——— عمود واحد ضيق ——— */
.fs-auth-page .login-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.75rem;
}

.fs-auth-page .login-form-section {
    padding: 1rem 1.25rem 1.35rem;
    background: #ffffff;
    border: none;
    order: 2;
}

.fs-auth-page .login-info-section {
    padding: 0;
    background: #fafbfc;
    border: none;
    border-top: 1px solid var(--fs-line);
    border-bottom: 1px solid var(--fs-line);
    display: flex;
    flex-direction: column;
    order: 1;
}

/* ——— بانر معلومات متحرك ——— */
.fs-auth-page .fs-auth-info-banner {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem 0.65rem;
}

.fs-auth-page .fs-auth-banner__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.fs-auth-page .fs-auth-banner__tag {
    font-family: var(--fs-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fs-ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fs-auth-page .fs-auth-banner__tag .bi {
    color: var(--fs-sky);
    font-size: 1.2rem;
}

.fs-auth-page .fs-auth-banner__dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.fs-auth-page .fs-auth-banner__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.fs-auth-page .fs-auth-banner__dot.is-active {
    background: var(--fs-brand);
    transform: scale(1.15);
}

.fs-auth-page .fs-auth-banner__viewport {
    position: relative;
    flex: 0 0 auto;
    min-height: 118px;
    overflow: hidden;
    border-radius: var(--fs-radius);
    background: #ffffff;
    border: 1px solid var(--fs-line);
    direction: ltr; /* حركة الشرائح ثابتة */
}

.fs-auth-page .fs-auth-banner__slide {
    direction: rtl; /* النص عربي */
}

.fs-auth-page .fs-auth-banner__track {
    display: flex;
    height: 100%;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.fs-auth-page .fs-auth-banner__viewport .fs-auth-banner__slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0.85rem 0.9rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.fs-auth-page .fs-auth-banner__viewport .fs-auth-banner__slide.is-active {
    opacity: 1;
}

.fs-auth-page .fs-auth-banner__slide[data-tone="brand"] {
    background: linear-gradient(145deg, #ffffff 0%, var(--fs-brand-soft) 100%);
}

.fs-auth-page .fs-auth-banner__slide[data-tone="teal"] {
    background: linear-gradient(145deg, #ffffff 0%, var(--fs-teal-soft) 100%);
}

.fs-auth-page .fs-auth-banner__slide[data-tone="sky"] {
    background: linear-gradient(145deg, #ffffff 0%, var(--fs-sky-soft) 100%);
}

.fs-auth-page .fs-auth-banner__slide[data-tone="amber"] {
    background: linear-gradient(145deg, #ffffff 0%, var(--fs-amber-soft) 100%);
}

.fs-auth-page .fs-auth-banner__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.fs-auth-page .fs-auth-banner__slide[data-tone="brand"] .fs-auth-banner__icon {
    background: var(--fs-brand-soft);
    color: var(--fs-brand);
}

.fs-auth-page .fs-auth-banner__slide[data-tone="teal"] .fs-auth-banner__icon {
    background: var(--fs-teal-soft);
    color: var(--fs-teal);
}

.fs-auth-page .fs-auth-banner__slide[data-tone="sky"] .fs-auth-banner__icon {
    background: var(--fs-sky-soft);
    color: var(--fs-sky);
}

.fs-auth-page .fs-auth-banner__slide[data-tone="amber"] .fs-auth-banner__icon {
    background: var(--fs-amber-soft);
    color: var(--fs-amber);
}

.fs-auth-page .fs-auth-banner__slide-title {
    font-family: var(--fs-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fs-ink);
    margin: 0;
}

.fs-auth-page .fs-auth-banner__slide-text {
    font-family: var(--fs-font-ui);
    font-size: 0.92rem;
    color: var(--fs-muted);
    margin: 0;
    line-height: 1.7;
}

.fs-auth-page .fs-auth-banner__counter {
    font-family: var(--fs-font-data);
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 8px;
}

.fs-auth-page .fs-auth-banner__progress {
    height: 3px;
    background: #e2e8f0;
    border-radius: 0 0 var(--fs-radius) var(--fs-radius);
    overflow: hidden;
}

.fs-auth-page .fs-auth-banner__progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--fs-brand), var(--fs-teal));
    transition: width 0.1s linear;
}

.fs-auth-page .security-note {
    margin: 0;
    padding: 8px 1rem 10px;
    border-radius: 0;
    background: transparent;
    border: none;
    border-top: 1px dashed #e2e8f0;
    color: var(--fs-muted);
    font-family: var(--fs-font-ui);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

.fs-auth-page .security-note .bi {
    color: var(--fs-amber);
}

.fs-auth-page .security-note strong {
    font-family: var(--fs-font-display);
    font-weight: 700;
}

/* إخفاء القائمة القديمة إن وُجدت */
.fs-auth-page .info-list {
    display: none;
}

.fs-auth-page .info-title {
    display: none;
}

/* ——— تبويبات الدخول ——— */
.fs-auth-page .method-tabs {
    display: flex;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
}

.fs-auth-page .method-tab {
    flex: 1;
    padding: 11px 12px;
    border: 1px solid var(--fs-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--fs-muted);
    font-family: var(--fs-font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.fs-auth-page .method-tab.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.fs-auth-page .method-tab:first-child.active {
    background: var(--fs-brand);
}

.fs-auth-page .method-tab:last-child.active {
    background: var(--fs-teal);
}

.fs-auth-page .method-tab .bi {
    margin-left: 6px;
}

/* ——— حقول ——— */
.fs-auth-page .form-control {
    border: 1px solid var(--fs-line);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: var(--fs-font-ui);
    background: #ffffff;
}

.fs-auth-page .form-control:focus {
    border-color: var(--fs-teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.fs-auth-page .input-group-text {
    background: #f8fafc;
    color: var(--fs-muted);
    border: 1px solid var(--fs-line);
    border-radius: 0 10px 10px 0;
}

.fs-auth-page .input-group .form-control {
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.fs-auth-page .input-group .btn-outline-secondary {
    background: #f8fafc;
    border-color: var(--fs-line);
    color: var(--fs-muted);
}

.fs-auth-page .text-primary {
    color: var(--fs-teal) !important;
    font-weight: 600;
}

/* ——— أزرار ——— */
.fs-auth-page .btn.primary-login {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 10px;
    background: var(--fs-brand);
    color: #fff;
    font-family: var(--fs-font-ui);
    font-size: 0.92rem;
    font-weight: 600;
}

.fs-auth-page .btn.otp-login {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 10px;
    background: var(--fs-teal);
    color: #fff;
    font-family: var(--fs-font-ui);
    font-size: 0.92rem;
    font-weight: 600;
}

.fs-auth-page .google-login-section {
    margin-top: 0.5rem;
}

.fs-auth-page .btn-google {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--fs-line);
    background: #ffffff;
    color: #475569;
    font-family: var(--fs-font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fs-auth-page .btn-google .google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.fs-auth-page .divider {
    color: var(--fs-muted);
    font-family: var(--fs-font-data);
    font-size: 0.8rem;
}

.fs-auth-page .divider::before,
.fs-auth-page .divider::after {
    background: var(--fs-line);
}

/* ——— تنبيهات ——— */
.fs-auth-page .alert {
    border-radius: var(--fs-radius);
    font-family: var(--fs-font-ui);
    animation: fsAuthSlideIn 0.35s ease-out;
}

@keyframes fsAuthSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.fs-auth-page .alert-danger {
    background: var(--fs-rose-soft);
    color: #9f1239;
    border-right: 4px solid var(--fs-rose);
}

/* ——— فوتر المصادقة (هوية التقييم) ——— */
.fs-auth-footer {
    margin-top: 32px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%);
    border-top: 1px solid var(--fs-line);
    position: relative;
}

.fs-auth-footer__spectrum {
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--fs-evh-brand) 0%,
        var(--fs-evh-mint) 22%,
        var(--fs-evh-sky) 44%,
        var(--fs-evh-amber) 66%,
        var(--fs-ev-brand) 100%
    );
}

.fs-auth-footer__shell {
    max-width: var(--fs-auth-header-max);
    margin: 0 auto;
    padding: 22px clamp(14px, 3vw, 24px) 20px;
}

.fs-auth-footer__top {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.fs-auth-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--fs-line);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.fs-auth-footer__brand:hover {
    border-color: rgba(15, 118, 110, 0.3);
    box-shadow: 0 4px 18px rgba(15, 118, 110, 0.1);
}

.fs-auth-footer__brand img {
    height: 34px;
    width: auto;
    display: block;
}

.fs-auth-footer__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.fs-auth-footer__brand-name {
    font-family: var(--fs-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fs-ink);
    line-height: 1.2;
}

.fs-auth-footer__brand-tag {
    font-family: var(--fs-font-data);
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--fs-muted);
}

.fs-auth-footer__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.fs-auth-footer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--fs-line);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.fs-auth-footer__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.fs-auth-footer__link-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.fs-auth-footer__link-label {
    font-family: var(--fs-font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fs-ink);
    line-height: 1.35;
}

.fs-auth-footer__link--teal .fs-auth-footer__link-icon {
    background: #f0fdfa;
    color: var(--fs-evh-brand);
}
.fs-auth-footer__link--teal:hover {
    border-color: rgba(15, 118, 110, 0.35);
}

.fs-auth-footer__link--sky .fs-auth-footer__link-icon {
    background: #eff6ff;
    color: var(--fs-evh-sky);
}
.fs-auth-footer__link--sky:hover {
    border-color: rgba(2, 132, 199, 0.35);
}

.fs-auth-footer__link--green .fs-auth-footer__link-icon {
    background: #ecfdf5;
    color: var(--fs-ev-brand);
}
.fs-auth-footer__link--green:hover {
    border-color: rgba(32, 104, 67, 0.35);
}

.fs-auth-footer__link--amber .fs-auth-footer__link-icon {
    background: #fffbeb;
    color: var(--fs-evh-amber);
}
.fs-auth-footer__link--amber:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.fs-auth-footer__legal {
    padding-top: 16px;
    border-top: 1px dashed var(--fs-line);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fs-auth-footer__copy,
.fs-auth-footer__locale {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fs-auth-footer__copy {
    font-family: var(--fs-font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fs-ink);
}

.fs-auth-footer__locale {
    font-family: var(--fs-font-data);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--fs-muted);
}

.fs-auth-footer__copy i {
    color: var(--fs-ev-brand);
    font-size: 0.8rem;
}

.fs-auth-footer__locale i {
    color: var(--fs-ev-secondary);
    font-size: 0.78rem;
}

@media (min-width: 640px) {
    .fs-auth-footer__nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .fs-auth-footer__link {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 14px 10px;
        min-height: 96px;
        justify-content: center;
    }

    .fs-auth-footer__link-label {
        font-size: 0.74rem;
    }
}

@media (max-width: 399.98px) {
    .fs-auth-footer__brand-text {
        display: none;
    }
}

/* ——— استجابة ——— */
@media (max-width: 768px) {
    :root {
        --fs-header-offset: 60px;
        --fs-auth-shell-pad: 12px;
    }

    .fs-auth-page .login-form-section {
        padding: 0.9rem 1rem 1.2rem;
    }

    .fs-auth-page .form-control {
        font-size: 16px;
    }

    .fs-auth-page .method-tab {
        font-size: 0.78rem;
        padding: 9px 6px;
    }

}

@media (min-width: 520px) {
    :root {
        --fs-auth-max: 480px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fs-auth-page .fs-auth-banner__track,
    .fs-auth-page .fs-auth-banner__progress-bar,
    .fs-auth-page .alert {
        transition: none;
        animation: none;
    }
}

/* ——— صفحات قانونية (خصوصية · شروط) ——— */
html.fs-auth-html:has(.fs-legal-page),
.fs-legal-page {
    background: #ffffff;
    --fs-legal-read: 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --fs-legal-size: 1.05rem;
    --fs-legal-weight: 500;
    --fs-legal-line: 1.9;
    --fs-legal-max: min(96vw, 1380px);
}

.fs-legal-shell {
    width: 100%;
    max-width: var(--fs-legal-max);
    margin: 0 auto;
    padding: 12px clamp(12px, 2vw, 28px) 36px;
    box-sizing: border-box;
}

.fs-legal-doc {
    background: #ffffff;
    border: 1px solid var(--fs-line);
    border-radius: 18px;
    box-shadow: 0 4px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.fs-legal-hero {
    padding: 1.5rem 1.35rem 1.25rem;
    background: linear-gradient(145deg, #ffffff 0%, #f0fdfa 38%, #eff6ff 100%);
    border-bottom: 1px solid var(--fs-line);
    text-align: center;
}

.fs-legal-hero__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--fs-evh-sky);
    background: #eff6ff;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.fs-legal-hero h1 {
    margin: 0 0 10px;
    font-family: var(--fs-font-display);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--fs-ink);
}

.fs-legal-hero__lead {
    margin: 0;
    font-family: var(--fs-legal-read);
    font-size: clamp(0.95rem, 1.2vw, 1.12rem);
    font-weight: var(--fs-legal-weight);
    color: #334155;
    line-height: var(--fs-legal-line);
    max-width: 52em;
    margin-inline: auto;
}

.fs-legal-hero__lead a {
    color: var(--fs-evh-brand);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fs-legal-hero__meta {
    margin: 12px auto 0;
    max-width: 52em;
    font-family: var(--fs-font-data);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.65;
    color: var(--fs-muted);
}

.fs-legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--fs-line);
}

.fs-legal-toc a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--fs-font-data);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s;
}

.fs-legal-toc a i {
    font-size: 0.72rem;
    opacity: 0.9;
}

.fs-legal-toc a:nth-child(4n+1) { color: var(--fs-evh-brand); background: #f0fdfa; border-color: rgba(15,118,110,.2); }
.fs-legal-toc a:nth-child(4n+2) { color: var(--fs-evh-sky); background: #eff6ff; border-color: rgba(2,132,199,.2); }
.fs-legal-toc a:nth-child(4n+3) { color: var(--fs-ev-brand-dark); background: #ecfdf5; border-color: rgba(32,104,67,.2); }
.fs-legal-toc a:nth-child(4n)   { color: #9a3412; background: #fff7ed; border-color: rgba(236,117,11,.25); }

.fs-legal-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.fs-legal-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--fs-line);
}

.fs-legal-callout__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.fs-legal-callout__body h2 {
    margin: 0 0 6px;
    font-family: var(--fs-font-display);
    font-size: 0.95rem;
    font-weight: 700;
}

.fs-legal-callout__body p {
    margin: 0;
    font-family: var(--fs-legal-read);
    font-size: var(--fs-legal-size);
    font-weight: var(--fs-legal-weight);
    line-height: var(--fs-legal-line);
    color: #334155;
}

.fs-legal-callout--teal { background: linear-gradient(135deg, #fff, #f0fdfa); }
.fs-legal-callout--teal .fs-legal-callout__icon { background: #ccfbf1; color: var(--fs-evh-brand); }
.fs-legal-callout--teal .fs-legal-callout__body h2 { color: var(--fs-evh-brand-deep); }

.fs-legal-callout--sky { background: linear-gradient(135deg, #fff, #eff6ff); }
.fs-legal-callout--sky .fs-legal-callout__icon { background: #dbeafe; color: var(--fs-evh-sky); }
.fs-legal-callout--sky .fs-legal-callout__body h2 { color: #0369a1; }

.fs-legal-callout--amber { background: linear-gradient(135deg, #fff, #fffbeb); }
.fs-legal-callout--amber .fs-legal-callout__icon { background: #fde68a; color: var(--fs-evh-amber); }
.fs-legal-callout--amber .fs-legal-callout__body h2 { color: #b45309; }

.fs-legal-callout--green { background: linear-gradient(135deg, #fff, #ecfdf5); }
.fs-legal-callout--green .fs-legal-callout__icon { background: #bbf7d0; color: var(--fs-ev-brand); }
.fs-legal-callout--green .fs-legal-callout__body h2 { color: var(--fs-ev-brand-dark); }

.fs-legal-section {
    margin-bottom: 1.35rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    scroll-margin-top: calc(var(--fs-header-offset) + 12px);
}

.fs-legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fs-legal-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.fs-legal-section__num {
    font-family: var(--fs-font-data);
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fs-legal-section__fa {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    background: #f1f5f9;
    color: var(--fs-evh-brand);
}

.fs-legal-section--sky .fs-legal-section__fa { color: var(--fs-evh-sky); }
.fs-legal-section--green .fs-legal-section__fa { color: var(--fs-ev-brand); }
.fs-legal-section--amber .fs-legal-section__fa { color: var(--fs-evh-amber); }
.fs-legal-section--violet .fs-legal-section__fa { color: var(--fs-evh-emerald); }
.fs-legal-section--rose .fs-legal-section__fa { color: var(--fs-rose); }

.fs-legal-section__title {
    margin: 0;
    font-family: var(--fs-font-display);
    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
    font-weight: 700;
    color: var(--fs-ink);
    flex: 1;
    min-width: 12rem;
}

.fs-legal-section--teal .fs-legal-section__num { background: #f0fdfa; color: var(--fs-evh-brand); }
.fs-legal-section--sky .fs-legal-section__num { background: #eff6ff; color: var(--fs-evh-sky); }
.fs-legal-section--green .fs-legal-section__num { background: #ecfdf5; color: var(--fs-ev-brand); }
.fs-legal-section--amber .fs-legal-section__num { background: #fffbeb; color: var(--fs-evh-amber); }
.fs-legal-section--violet .fs-legal-section__num { background: #ecfdf5; color: var(--fs-evh-emerald); }
.fs-legal-section--rose .fs-legal-section__num { background: #fff1f2; color: var(--fs-rose); }

.fs-legal-section p,
.fs-legal-section li {
    font-family: var(--fs-legal-read);
    font-size: var(--fs-legal-size);
    font-weight: var(--fs-legal-weight);
    line-height: var(--fs-legal-line);
    color: #334155;
}

.fs-legal-section p {
    margin: 0 0 0.85rem;
}

.fs-legal-section h3 {
    font-family: var(--fs-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--fs-ink);
    margin: 1rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fs-legal-section h3::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--fs-evh-brand);
    content: '\f054';
}

.fs-legal-section ul {
    margin: 0 0 0.65rem;
    padding-right: 0;
    list-style: none;
}

.fs-legal-section > ul > li {
    position: relative;
    padding-right: 1.35rem;
    margin-bottom: 0.55rem;
}

.fs-legal-section > ul > li::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f00c';
    position: absolute;
    right: 0;
    top: 0.45em;
    font-size: 0.65rem;
    color: var(--fs-ev-brand);
    opacity: 0.85;
}

.fs-legal-section li strong {
    font-weight: 700;
    color: var(--fs-ink);
}

.fs-legal-section a {
    color: var(--fs-evh-brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fs-legal-section a:hover {
    color: var(--fs-ev-brand-dark);
}

.fs-legal-callout__body a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.fs-legal-section__list-card {
    background: #f8fafc;
    border: 1px solid var(--fs-line);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 10px;
}

.fs-legal-section__list-card ul {
    list-style: none;
    padding-right: 0;
}

.fs-legal-section__list-card li {
    padding-right: 1.2rem;
    position: relative;
}

.fs-legal-section__list-card li::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f111';
    font-size: 0.35rem;
    position: absolute;
    right: 0;
    top: 0.65em;
    color: var(--fs-evh-sky);
}

.fs-legal-footnotes {
    display: grid;
    gap: 10px;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--fs-line);
}

/* تخطيط: محتوى + فهرس جانبي (سطح المكتب) */
.fs-legal-layout {
    display: block;
}

.fs-legal-sidebar {
    display: none;
}

.fs-legal-sidebar__title {
    margin: 0 0 10px;
    font-family: var(--fs-font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fs-ink);
}

.fs-legal-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fs-legal-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    font-family: var(--fs-font-data);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--fs-muted);
    text-decoration: none;
    border-right: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fs-legal-sidebar__nav a i {
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.85;
}

.fs-legal-sidebar__nav a:hover,
.fs-legal-sidebar__nav a.is-active {
    background: #f8fafc;
    color: var(--fs-evh-brand);
    border-right-color: var(--fs-evh-brand);
}

.fs-legal-grid {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.fs-legal-card {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--fs-line);
    background: #f8fafc;
}

.fs-legal-card h4 {
    margin: 0 0 8px;
    font-family: var(--fs-font-display);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--fs-ink);
}

.fs-legal-card ul {
    margin: 0;
    padding-right: 1.1rem;
}

.fs-legal-card li {
    font-family: var(--fs-legal-read);
    font-size: 0.95rem;
    font-weight: var(--fs-legal-weight);
    line-height: var(--fs-legal-line);
    color: #334155;
    margin-bottom: 0.45rem;
}

.fs-legal-card--teal { border-color: rgba(15, 118, 110, 0.2); background: linear-gradient(135deg, #fff, #f0fdfa); }
.fs-legal-card--sky { border-color: rgba(2, 132, 199, 0.2); background: linear-gradient(135deg, #fff, #eff6ff); }
.fs-legal-card--green { border-color: rgba(32, 104, 67, 0.2); background: linear-gradient(135deg, #fff, #ecfdf5); }
.fs-legal-card--amber { border-color: rgba(245, 158, 11, 0.25); background: linear-gradient(135deg, #fff, #fffbeb); }

.fs-legal-table-wrap {
    overflow-x: auto;
    margin: 12px 0;
    border: 1px solid var(--fs-line);
    border-radius: 12px;
}

.fs-legal-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--fs-legal-read);
    font-size: 0.92rem;
    font-weight: var(--fs-legal-weight);
}

.fs-legal-table th,
.fs-legal-table td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid var(--fs-line);
}

.fs-legal-table th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--fs-ink);
    white-space: nowrap;
}

.fs-legal-table tr:last-child td {
    border-bottom: none;
}

/* ——— تابلت ——— */
@media (min-width: 720px) {
    .fs-legal-page {
        --fs-legal-size: 1.06rem;
    }

    .fs-legal-shell {
        padding-bottom: 44px;
    }

    .fs-legal-body {
        padding: 1.6rem 1.85rem 1.85rem;
    }

    .fs-legal-hero {
        padding: 1.85rem 2rem 1.5rem;
    }

    .fs-legal-footnotes {
        grid-template-columns: 1fr 1fr;
    }

    .fs-legal-grid--2 {
        grid-template-columns: 1fr 1fr;
    }

    .fs-legal-card {
        padding: 16px 18px;
    }
}

/* ——— سطح المكتب ——— */
@media (min-width: 1024px) {
    .fs-legal-page {
        --fs-legal-size: 1.1rem;
        --fs-legal-line: 1.9;
    }

    .fs-legal-shell {
        padding: 16px clamp(20px, 3vw, 40px) 52px;
    }

    .fs-legal-doc {
        border-radius: 20px;
        box-shadow: 0 10px 48px rgba(15, 23, 42, 0.09);
    }

    .fs-legal-hero {
        padding: 2.25rem 2.75rem 1.65rem;
    }

    .fs-legal-hero__icon {
        width: 64px;
        height: 64px;
        font-size: 1.55rem;
    }

    .fs-legal-toc--hero {
        display: none;
    }

    .fs-legal-layout {
        display: grid;
        grid-template-columns: minmax(260px, 22%) minmax(0, 1fr);
        gap: 0;
        align-items: start;
    }

    .fs-legal-sidebar {
        display: block;
        position: sticky;
        top: calc(var(--fs-header-offset) + 16px);
        max-height: calc(100vh - var(--fs-header-offset) - 32px);
        overflow-y: auto;
        padding: 1.65rem 1.15rem 1.65rem 1.65rem;
        border-left: 1px solid var(--fs-line);
        background: #ffffff;
    }

    .fs-legal-sidebar__nav a {
        font-size: 0.88rem;
        padding: 10px 12px;
    }

    .fs-legal-body {
        padding: 2rem 2.25rem 2.25rem 2rem;
        min-width: 0;
    }

    .fs-legal-section__num {
        min-width: 36px;
        height: 36px;
        font-size: 0.88rem;
    }

    .fs-legal-section__fa {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }

    .fs-legal-callout {
        padding: 20px 22px;
    }

    .fs-legal-grid--2 {
        grid-template-columns: 1fr 1fr;
    }

    .fs-legal-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fs-legal-section {
        margin-bottom: 2rem;
        padding-bottom: 1.65rem;
    }

    .fs-legal-table {
        font-size: 0.98rem;
    }

    .fs-legal-table th,
    .fs-legal-table td {
        padding: 12px 16px;
    }
}

@media (min-width: 1280px) {
    .fs-legal-page {
        --fs-legal-size: 1.125rem;
    }

    .fs-legal-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .fs-legal-body {
        padding: 2.25rem 2.75rem 2.5rem 2.25rem;
    }

    .fs-legal-section__title {
        font-size: 1.32rem;
    }
}

@media (min-width: 1440px) {
    .fs-legal-page {
        --fs-legal-max: min(94vw, 1440px);
        --fs-legal-size: 1.15rem;
    }
}

/* صفحة الشروط — فهرس أطول دون ازدحام الترويسة */
.fs-legal-page--terms .fs-legal-toc--hero {
    justify-content: flex-start;
    max-height: 11rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 12px 6px 8px;
    margin-top: 16px;
}

.fs-legal-page--terms .fs-legal-toc--hero a {
    font-size: 0.8rem;
    padding: 7px 13px;
}

.fs-legal-page--terms .fs-legal-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.35rem;
}

.fs-legal-page--terms .fs-legal-body {
    padding: 1.35rem 1.4rem 1.65rem;
}

@media (min-width: 720px) {
    .fs-legal-page--terms .fs-legal-body {
        padding: 1.6rem 1.85rem 1.85rem;
    }
}

@media (min-width: 1024px) {
    .fs-legal-page--terms .fs-legal-toc--hero {
        display: none;
    }

    .fs-legal-page--terms .fs-legal-body {
        padding: 2rem 2.25rem 2.25rem 2rem;
    }
}
