/* ==========================================================================
   موهبة طلاب — Admin Login · Simple & Clean
   Navy #0F1026 · Primary #1A2E5C · Accent #3B82F6 · Gold #F59E0B · Light #F8F9FA
   ========================================================================== */

:root {
    --y-font: "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
    --y-primary: #1A2E5C;
    --y-accent: #3B82F6;
    --y-gold: #F59E0B;
    --y-light: #F8F9FA;
    --y-dark: #0F1026;
    --y-ink: #1F2937;
    --y-muted: #6B7280;
    --y-line: #E2E8F0;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: var(--y-font);
}

html,
body {
    min-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--y-ink);
    background: var(--y-light);
}

/* ── Split layout ── */
.login-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Image side ── */
.login-visual {
    position: relative;
    flex: 1 1 55%;
    overflow: hidden;
    background: var(--y-dark);
}

.bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
}

.bg-slide.active { opacity: 1; }

.bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 16, 38, .45), rgba(26, 46, 92, .35));
}

/* ── Form side ── */
.login-panel {
    position: relative;
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #fff;
}

/* ── Language switcher ── */
.language-switcher {
    position: absolute;
    top: 24px;
    inset-inline-end: 26px;
    z-index: 40;
}

.lang-dropdown { position: relative; }

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid var(--y-line);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--y-primary);
    background: #fff;
    transition: border-color .2s, background-color .2s;
}

.lang-btn:hover {
    border-color: var(--y-accent);
    background: #f8fafc;
}

.flag-icon {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.lang-btn-text { font-weight: 600; }
.lang-btn-arrow { font-size: 11px; opacity: .7; }

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--y-line);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 28px -14px rgba(15, 16, 38, .35);
    z-index: 999;
}

.lang-menu.show { display: block; }

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--y-ink);
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.lang-menu a:hover {
    background: #f1f5f9;
    color: var(--y-primary);
}

.lang-menu a.is-active {
    background: #eff6ff;
    color: var(--y-accent);
    font-weight: 700;
    cursor: default;
}

.lang-menu-text { font-weight: 500; }
.check-icon { margin-inline-start: auto; font-size: 12px; color: var(--y-accent); }

/* ── Login card ── */
.login-card {
    width: 100%;
    max-width: 400px;
    text-align: start;
}

.login-logo {
    display: block;
    width: auto;
    height: 96px;
    max-width: 280px;
    object-fit: contain;
    margin-bottom: 20px;
}

.card-sub {
    margin: 0;
    color: var(--y-muted);
    font-size: 15px;
}

.alert-error {
    display: block;
    margin-top: 18px;
    padding: 11px 16px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13.5px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 28px 0 18px;
}

.input-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--y-primary);
    font-size: 13.5px;
    font-weight: 600;
}

.input-field input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--y-line);
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: var(--y-ink);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.input-field input::placeholder { color: #9CA3AF; }

.input-field input:focus {
    border-color: var(--y-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}

.pass-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pass-wrap input { padding-inline-end: 46px; }

.toggle-pass {
    position: absolute;
    inset-inline-end: 8px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--y-muted);
    cursor: pointer;
    transition: color .2s, background-color .2s;
}

.toggle-pass:hover {
    color: var(--y-primary);
    background: #f1f5f9;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-field input {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--y-accent);
}

.check-field label {
    color: var(--y-ink);
    font-size: 14px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    height: 52px;
    margin-top: 26px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #1A2E5C, #2563EB);
    transition: filter .2s, box-shadow .2s;
}

.submit-btn i { margin-inline-start: 6px; }

.submit-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 24px -14px rgba(26, 46, 92, .8);
}

.submit-btn:active { filter: brightness(.97); }

.footer {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--y-line);
    color: var(--y-muted);
    font-size: 13px;
    text-align: center;
}

.footer-brand { color: var(--y-primary); font-weight: 700; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .login-split {
        flex-direction: column;
    }

    .login-visual {
        flex: 0 0 auto;
        min-height: 220px;
    }

    .login-panel {
        flex: 1 1 auto;
        padding: 40px 22px 48px;
    }
}

@media (max-width: 480px) {
    .language-switcher { top: 14px; inset-inline-end: 16px; }
    .login-logo { height: 72px; }
    .login-visual { min-height: 170px; }
}
