/* =====================================================================
   تشغيلة — Login page (split screen: brand panel | form)
   Brand: navy #003E77 · green #4C8C2B
   ===================================================================== */

:root {
    --navy: #003e77;
    --navy-dk: #002a52;
    --green: #4c8c2b;
    --green-dk: #3c7221;
    --green-soft: #8cc63f;
    --ink: #13233a;
    --muted: #5d6b7d;
    --line: #cfd8e3;
    --field: #f3f6f9;
}

html, body { height: 100%; }
.login-body {
    margin: 0;
    min-height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 28px 16px;
    font-family: var(--font-sans);
    color: var(--ink);
    background: #f4f8f1 url("../img/doodles-green.svg") repeat;
    background-size: 300px;
}

/* ---------- Card ---------- */
.login-card {
    width: 100%; max-width: 1080px; min-height: 600px;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #fff;
    border: 12px solid var(--navy-dk);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 42, 82, .22);
}

/* ---------- Left: brand panel ---------- */
.login-brand {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    padding: 0 32px 48px;
    background: #fff url("../img/doodles-green.svg") repeat;
    background-size: 260px;
}
/* Green arch with white food doodles */
.brand-arch {
    position: absolute; left: 0; right: 0; top: 0; height: 58%;
    background: var(--green) url("../img/doodles-white.svg") repeat;
    background-size: 240px;
    border-radius: 0 0 50% 50% / 0 0 34% 34%;
}
.brand-arch::after {           /* soft light sweep */
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,.22), transparent 60%);
    border-radius: inherit;
}
/* White circle holding the logo, overlapping the arch */
.brand-circle {
    position: absolute; left: 50%; top: 58%;
    transform: translate(-50%, -62%);
    width: 300px; height: 300px; border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 10px rgba(255,255,255,.35), 0 14px 34px rgba(0, 42, 82, .14);
}
.brand-circle img { width: 78%; height: auto; }

.brand-caption { position: relative; text-align: center; }
.brand-name {
    font-weight: 700; font-size: 1.55rem; line-height: 1.25;
    color: var(--navy); letter-spacing: -.3px;
}
.brand-tagline { margin-top: 8px; font-weight: 500; font-size: 1.05rem; color: var(--ink); }
.brand-tagline-ar { margin-top: 4px; font-size: .95rem; color: var(--green-dk); font-weight: 600; }

/* ---------- Right: form ---------- */
.login-form-side {
    position: relative;
    display: flex; flex-direction: column; justify-content: center;
    padding: 48px 56px 28px;
    background: #fff;
    border-inline-start: 1px solid #e7edf3;
}
.login-form-wrap { width: 100%; max-width: 380px; margin: 0 auto; }

.login-mini-logo { display: block; width: 120px; height: auto; margin: 0 auto 14px; }
.login-title { text-align: center; font-weight: 700; font-size: 2rem; margin: 0; color: var(--ink); }
.login-sub { text-align: center; color: var(--muted); font-size: .95rem; margin: 4px 0 26px; }

.login-label { display: block; font-weight: 500; font-size: .92rem; margin: 0 0 6px 4px; color: var(--ink); }

.pill-input {
    position: relative; display: flex; align-items: center;
    background: var(--field);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    margin-bottom: 16px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.pill-input:focus-within { border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(76, 140, 43, .14); }
.pill-input input {
    flex: 1; min-width: 0;
    border: 0; outline: 0; background: transparent;
    padding: 13px 18px 13px 4px;
    font: inherit; font-size: .95rem; color: var(--ink);
    font-family: var(--font-sans);
}
.pill-input input::placeholder { color: #95a2b2; }
.pill-icon, .pill-eye { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pill-icon { width: 48px; padding-inline-start: 6px; }
.pill-icon svg, .pill-eye svg {
    width: 20px; height: 20px; fill: none; stroke: var(--green);
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pill-eye { width: 46px; height: 46px; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.pill-eye svg { stroke: #8a98a8; }
.pill-eye.on svg, .pill-eye:hover svg { stroke: var(--navy); }

.login-forgot { text-align: end; font-size: .82rem; color: var(--muted); margin: -6px 4px 22px; }
.login-forgot strong { color: var(--green-dk); font-weight: 600; }
.login-hint { font-size: .8rem; color: var(--muted); margin: -8px 0 20px 6px; }

.login-btn {
    width: 100%; border: 0; border-radius: 999px;
    padding: 14px 20px;
    font: inherit; font-weight: 600; font-size: 1.05rem; color: #fff;
    background: linear-gradient(90deg, var(--green), #63a536);
    box-shadow: 0 8px 20px rgba(76, 140, 43, .3);
    cursor: pointer; transition: transform .12s, box-shadow .12s, filter .12s;
}
.login-btn:hover { filter: brightness(1.05); box-shadow: 0 10px 24px rgba(76, 140, 43, .38); }
.login-btn:active { transform: translateY(1px); }
.login-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.login-btn:disabled { opacity: .75; cursor: wait; }

.login-foot { text-align: center; font-size: .85rem; color: var(--muted); margin: 18px 0 0; }
.login-copy { text-align: center; font-size: .75rem; color: #9aa6b4; margin-top: 28px; }

.login-alert, .login-form-wrap .alert {
    border-radius: 14px; padding: 10px 14px; font-size: .88rem; margin-bottom: 16px;
}
.login-alert { background: #fdecec; color: #a61b1b; border: 1px solid #f5c2c2; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .login-card { grid-template-columns: minmax(0, 1fr); min-height: 0; border-width: 8px; border-radius: 26px; }
    .login-brand { min-height: 330px; padding: 0 18px 22px; }
    .brand-arch { height: 52%; }
    .brand-circle { width: 170px; height: 170px; top: 40%; transform: translate(-50%, -50%); box-shadow: 0 0 0 7px rgba(255,255,255,.35), 0 10px 24px rgba(0, 42, 82, .14); }
    .brand-name { font-size: 1.1rem; }
    .brand-tagline { font-size: .9rem; margin-top: 4px; }
    .brand-tagline-ar { font-size: .85rem; }
    .login-form-side { padding: 28px 20px 20px; border-inline-start: 0; border-top: 1px solid #e7edf3; }
    .login-mini-logo { display: none; }
    .login-title { font-size: 1.7rem; }
}
@media (max-width: 420px) {
    .login-body { padding: 12px 10px; align-items: flex-start; }
    .login-brand { min-height: 300px; }
    .brand-circle { width: 150px; height: 150px; }
}


/* PWA: install link + offline page */
.login-install {
    display: block; margin: 18px auto 0; padding: 8px 18px;
    border: 1.5px dashed var(--green); border-radius: 999px; background: #f4faf0;
    color: var(--green-dk); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.login-install:hover { background: #e9f5e1; }

.offline-card {
    width: 100%; max-width: 520px; text-align: center;
    background: #fff; border: 10px solid var(--navy-dk); border-radius: 30px;
    padding: 36px 30px; box-shadow: 0 24px 60px rgba(0, 42, 82, .22);
}
.offline-logo { width: 190px; height: auto; margin-bottom: 18px; }
.offline-icon { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: #eef6e9; display: flex; align-items: center; justify-content: center; }
.offline-icon svg { width: 38px; height: 38px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; }
.offline-card .login-title { font-size: 1.5rem; }
.offline-btn { display: inline-block; width: auto; padding: 12px 28px; text-decoration: none; margin-top: 8px; }

.login-copy strong { color: var(--navy); font-weight: 600; }
.login-copy div + div { margin-top: 2px; }
