@font-face {
    font-family: "Bahij";
    src: url("/Template/fonts/Bahij_TheSansArabic-Plain.ttf");
}
/* ── Tokens (same palette as the registration page) ── */
:root {
    --brand-primary: #1a6f4a;
    --brand-primary-dark: #145939;
    --brand-primary-light: #e8f5ef;
    --brand-accent: #f0a500;
    --wa: #25d366;
    --wa-dark: #1ebe5a;
    --text-dark: #1a2332;
    --text-mid: #4a5568;
    --text-muted: #718096;
    --border: #d1d9e0;
    --surface: #ffffff;
    --bg-panel: #f0f7f4;
    --radius: 12px;
    --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Bahij', 'Droid Arabic Kufi', 'Segoe UI', sans-serif !important;
    background: var(--bg-panel);
    min-height: 100vh;
    color: var(--text-dark);
}

/* ── Loader ── */
#load_screen { position: fixed; inset: 0; background: var(--surface); z-index: 9999; display: flex; align-items: center; justify-content: center; }

/* ── Layout ── */
.page-wrapper { display: flex; min-height: 100vh; }

/* Brand panel */
.brand-panel {
    width: 42%;
    background: linear-gradient(160deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 3rem 2.5rem;
    position: sticky; top: 0; height: 100vh;
    color: #fff; text-align: center;
}
.brand-panel .logo-wrap img { height: 56px; margin-bottom: 2.5rem; filter: brightness(0) invert(1); }
.brand-headline { font-size: 1.5rem; font-weight: 700; line-height: 1.55; margin-bottom: 1rem; color: #fff; }
.brand-sub { font-size: .92rem; color: rgba(255,255,255,.75); line-height: 1.7; margin-bottom: 2.25rem; }

.feature-list { list-style: none; width: 100%; max-width: 380px; text-align: right; }
.feature-list li {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .5rem; border-radius: var(--radius-sm);
    font-size: .88rem; color: rgba(255,255,255,.92);
    transition: background .2s;
}
.feature-list li:hover { background: rgba(255,255,255,.1); }
.feature-list .icon {
    width: 30px; height: 30px; background: rgba(255,255,255,.18); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem;
}

/* Form panel */
.form-panel {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 2.5rem 2rem 3rem;
}
.form-card {
    width: 100%; max-width: 440px;
    background: var(--surface); border-radius: var(--radius);
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.mobile-logo { display: none; text-align: center; margin-bottom: 1.25rem; }
.mobile-logo img { height: 48px; }

.form-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.form-card .subtitle { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Alerts */
.alert-box {
    border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1.25rem;
    font-size: .875rem; display: flex; align-items: flex-start; gap: .5rem; line-height: 1.6;
}
.alert-box.error { background: #fdeaea; border-right: 4px solid #e53e3e; color: #9b2c2c; }
.alert-box.success { background: var(--brand-primary-light); border-right: 4px solid var(--brand-primary); color: var(--brand-primary-dark); }

/* Fields */
.field-group { margin-bottom: 1.1rem; }
.field-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.input-wrap { position: relative; }
.field-icon { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%); font-size: 1rem; pointer-events: none; color: var(--text-muted); }

.form-input {
    width: 100%; height: 46px; padding: 0 2.4rem 0 .9rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .92rem; color: var(--text-dark); background: var(--surface);
    transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-input:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(26,111,74,.12); }
.form-input.has-toggle { padding-left: 2.8rem; }

.toggle-pass {
    position: absolute; left: .4rem; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: none; background: transparent; border-radius: 50%;
    cursor: pointer; font-size: 1rem; color: var(--text-muted); transition: background .2s;
}
.toggle-pass:hover { background: #f1f5f3; }

.row-between { display: flex; justify-content: flex-start; margin: -.35rem 0 1.25rem; font-size: .82rem; }
.row-between a { color: var(--brand-primary); text-decoration: none; font-weight: 600; }
.row-between a:hover { text-decoration: underline; }

/* Buttons */
.btn-submit {
    width: 100%; height: 48px; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: #fff; font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: opacity .2s, transform .1s;
    display: flex; align-items: center; justify-content: center; gap: .6rem;
}
.btn-submit:hover { opacity: .92; }
.btn-submit:active { transform: scale(.99); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; }
.btn-submit .spin {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-submit.loading .spin { display: inline-block; }

.divider { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1.1rem; font-size: .8rem; color: var(--text-muted); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-outline {
    width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: .5rem;
    border: 1.5px solid var(--brand-primary); border-radius: var(--radius-sm);
    color: var(--brand-primary); font-weight: 700; font-size: .95rem; text-decoration: none;
    transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--brand-primary); color: #fff; }

/* Support */
.support-row {
    margin-top: 1.25rem; padding: .85rem 1rem; border-radius: var(--radius-sm);
    background: #f2fbf6; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    font-size: .82rem; color: var(--text-mid); line-height: 1.5;
}
.support-row a.wa-link { color: #128c4a; font-weight: 700; text-decoration: none; white-space: nowrap; }
.support-row a.wa-link:hover { text-decoration: underline; }
.support-row .num { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* Floating WhatsApp button */
.wa-fab {
    position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 900;
    display: flex; align-items: center; gap: .5rem;
    height: 52px; padding: 0 1.1rem; border-radius: 26px;
    background: var(--wa); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none;
    box-shadow: 0 6px 20px rgba(37,211,102,.45);
    transition: background .2s, transform .15s;
}
.wa-fab:hover { background: var(--wa-dark); color: #fff; transform: translateY(-2px); }
.wa-fab .wa-ico { font-size: 1.4rem; line-height: 1; }

.copyright { margin-top: 1.25rem; font-size: .75rem; color: var(--text-muted); text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
    .brand-panel { display: none; }
    .mobile-logo { display: block; }
    .form-panel { padding: 1.5rem 1rem 5.5rem; }
}
@media (max-width: 480px) {
    .form-card { padding: 1.5rem 1.25rem; }
    .wa-fab { padding: 0; width: 52px; justify-content: center; }
    .wa-fab .wa-text { display: none; }
    .support-row { flex-direction: column; align-items: flex-start; }
}

/* ── Added for recovery / reset pages ── */
.alert-box.info { background: #eef6ff; border-right: 4px solid #3182ce; color: #2a4365; }

.state-box { text-align: center; padding: 1.25rem .5rem 1rem; }
.state-box .state-icon { font-size: 2.75rem; line-height: 1; margin-bottom: .75rem; }
.state-box h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.state-box p { font-size: .88rem; color: var(--text-mid); line-height: 1.8; }

.back-link { display: block; margin-top: 1.25rem; text-align: center; font-size: .88rem; font-weight: 600; color: var(--brand-primary); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.field-hint { font-size: .76rem; color: var(--text-muted); margin-top: .35rem; }
.field-error-text { display: none; font-size: .78rem; color: #e53e3e; margin-top: .35rem; }
.field-error-text.visible { display: block; }
.form-input.invalid { border-color: #e53e3e; box-shadow: 0 0 0 3px rgba(229,62,62,.1); }
