/* =========================================================
   Sign-in pages – design A (split screen), light + dark, LTR + RTL
   ========================================================= */
:root {
    --auth-brand: #0F6E56;
    --auth-brand-dark: #085041;
    --auth-brand-soft: #9FE1CB;
    --auth-brand-text: #E1F5EE;
    --auth-bg: #ffffff;
    --auth-page: #F4F6F5;
    --auth-text: #1f2937;
    --auth-muted: #6b7280;
    --auth-border: #d7dcda;
    --auth-field: #ffffff;
    --auth-focus: rgba(15, 110, 86, .18);
    --auth-danger-bg: #FCEBEB;
    --auth-danger-text: #791F1F;
    --auth-ok-bg: #E1F5EE;
    --auth-ok-text: #085041;
}

@media (prefers-color-scheme: dark) {
    :root {
        --auth-bg: #16181a;
        --auth-page: #0f1112;
        --auth-text: #e7e9e8;
        --auth-muted: #9aa3a0;
        --auth-border: #2e3331;
        --auth-field: #1d2022;
        --auth-focus: rgba(93, 202, 165, .25);
        --auth-danger-bg: #3a1717;
        --auth-danger-text: #F7C1C1;
        --auth-ok-bg: #0d2b23;
        --auth-ok-text: #9FE1CB;
    }
}

html, body { height: 100%; }

.auth-body {
    margin: 0;
    background: var(--auth-page);
    color: var(--auth-text);
    font-family: "Segoe UI", Tahoma, system-ui, -apple-system, Arial, sans-serif;
    font-size: 15px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 44%) 1fr;
}

/* ---------- brand side ---------- */
.auth-brand {
    background: var(--auth-brand);
    color: var(--auth-brand-text);
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.auth-logo { display: flex; align-items: center; gap: 12px; }
    .auth-logo img { height: 44px; width: auto; max-width: 160px; border-radius: 8px; background: #fff; padding: 4px; }

.auth-mark {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255,255,255,.14);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
}

.auth-name { font-size: 18px; font-weight: 600; color: #fff; }

.auth-pitch h1 { font-size: 30px; font-weight: 600; color: #fff; line-height: 1.25; margin: 0 0 12px; }
.auth-pitch p { font-size: 16px; margin: 0 0 22px; max-width: 30rem; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-pitch li { display: flex; gap: 10px; align-items: center; color: var(--auth-brand-text); }
    .auth-pitch li i { color: var(--auth-brand-soft); font-size: 18px; }

.auth-foot { font-size: 13px; color: var(--auth-brand-soft); }

/* ---------- form side ---------- */
.auth-main {
    background: var(--auth-bg);
    display: flex;
    flex-direction: column;
    padding: 20px 28px 32px;
}

.auth-top { display: flex; justify-content: flex-end; }

.auth-lang {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--auth-border);
    color: var(--auth-text); text-decoration: none; font-size: 14px;
}
    .auth-lang:hover { border-color: var(--auth-brand); color: var(--auth-brand); }

.auth-panel {
    flex: 1;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0;
}

.auth-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--auth-ok-bg); color: var(--auth-brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 16px;
}
    .auth-icon.danger { background: var(--auth-danger-bg); color: var(--auth-danger-text); }

.auth-title { font-size: 26px; font-weight: 600; margin: 0 0 6px; color: var(--auth-text); }
.auth-sub { color: var(--auth-muted); margin: 0 0 24px; line-height: 1.6; }

.auth-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--auth-border);
    background: var(--auth-field);
    color: var(--auth-text);
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
    .auth-input:focus { outline: none; border-color: var(--auth-brand); box-shadow: 0 0 0 4px var(--auth-focus); }
    .auth-input.input-validation-error { border-color: #E24B4A; }

.auth-field { margin-bottom: 16px; }
.auth-pw { position: relative; }
    .auth-pw .auth-input { padding-inline-end: 46px; }

.auth-eye {
    position: absolute; top: 0; bottom: 0; inset-inline-end: 4px;
    width: 40px; border: none; background: none;
    color: var(--auth-muted); font-size: 18px;
}
    .auth-eye:hover { color: var(--auth-brand); }

.auth-err { display: block; color: #E24B4A; font-size: 13px; margin-top: 6px; }
.auth-err:empty { display: none; }

.auth-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; margin: 4px 0 20px; flex-wrap: wrap;
}

.auth-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
    .auth-check input { width: 18px; height: 18px; accent-color: var(--auth-brand); }

.auth-link { color: var(--auth-brand); text-decoration: none; font-size: 14px; font-weight: 500; }
    .auth-link:hover { text-decoration: underline; color: var(--auth-brand-dark); }

@media (prefers-color-scheme: dark) {
    .auth-link, .auth-lang:hover { color: var(--auth-brand-soft); }
}

.auth-btn {
    width: 100%; height: 48px;
    border: none; border-radius: 10px;
    background: var(--auth-brand); color: #fff;
    font-size: 16px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
    transition: background .15s;
}
    .auth-btn:hover { background: var(--auth-brand-dark); color: #fff; }
    .auth-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--auth-focus); }
    .auth-btn.secondary { background: transparent; color: var(--auth-text); border: 1px solid var(--auth-border); }
        .auth-btn.secondary:hover { border-color: var(--auth-brand); color: var(--auth-brand); }

.auth-alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
    .auth-alert.danger { background: var(--auth-danger-bg); color: var(--auth-danger-text); }
    .auth-alert.ok { background: var(--auth-ok-bg); color: var(--auth-ok-text); }
    .auth-alert ul { margin: 0; padding-inline-start: 18px; }

.auth-back { display: flex; justify-content: center; margin-top: 22px; }

/* arrows point the reading direction in Arabic */
[dir="rtl"] .auth-body .bi-arrow-left,
[dir="rtl"] .auth-body .bi-box-arrow-in-right,
[dir="rtl"] .auth-body .bi-box-arrow-right { display: inline-block; transform: scaleX(-1); }
.auth-note { color: var(--auth-muted); font-size: 13px; text-align: center; margin-top: 14px; line-height: 1.6; }

/* ---------- tablet: narrower brand ---------- */
@media (max-width: 1100px) {
    .auth-brand { padding: 32px; }
    .auth-pitch h1 { font-size: 24px; }
}

/* ---------- phone: brand becomes a top bar ---------- */
@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-brand { padding: 14px 16px; flex-direction: row; align-items: center; gap: 12px; }
    .auth-pitch, .auth-foot { display: none; }
    .auth-logo img, .auth-mark { height: 36px; width: auto; min-width: 36px; font-size: 18px; }
    .auth-name { font-size: 16px; }
    .auth-main { padding: 12px 16px 24px; }
    .auth-title { font-size: 22px; }
}
