/* =====================================================================================================
   Login page (/Auth/Index). Scoped to .lp so the theme (style.css / style_rtl.css) is untouched elsewhere.
   Spacing on an 8px grid; logical properties only, so one set of rules serves Arabic (RTL) and English (LTR).
   Brand: EMAAR logo navy + orange; primary action uses the application's primary colour.
   ===================================================================================================== */

:root {
    --lp-primary: #7539ff;
    --lp-primary-hover: #5f22ef;
    --lp-primary-ring: rgba(117, 57, 255, .18);
    --lp-navy: #273548;
    --lp-orange: #e0913f;
    --lp-orange-text: #9a5410;
    --lp-text: #1d2433;
    --lp-muted: #5b6577;
    --lp-border: #dde1ea;
    --lp-border-strong: #c9cfdb;
    --lp-bg: #f3f5f9;
    --lp-surface: #fff;
    --lp-danger: #c62828;
    --lp-danger-soft: #fdecec;
    --lp-radius-sm: 8px;
    --lp-radius: 12px;
    --lp-radius-lg: 16px;
    --lp-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --lp-font: "circular std", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[dir="rtl"] { --lp-font: "droidkufifont", "Segoe UI", Tahoma, Arial, sans-serif; }

html, body.lp-body { height: auto; min-height: 100%; }
body.lp-body {
    margin: 0; background: var(--lp-bg); color: var(--lp-text);
    font-family: var(--lp-font); font-size: 15px; line-height: 1.5;
    display: block; -webkit-font-smoothing: antialiased;
}
/* Same font everywhere on the page except icon fonts (the theme forces fonts per element). */
.lp, .lp *:not(i):not(.fa):not(.fas):not(.far):not(.fab) { font-family: var(--lp-font); }
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp :where(h1, h2, p, ul) { margin: 0; }

/* ------------------------------------------------------------------ layout */

.lp {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 40px 32px; overflow: hidden;
}

.lp-shell {
    position: relative; z-index: 1; width: 100%; max-width: 1240px;
    display: grid; align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 448px);
    grid-template-areas: "brand login" "promo login";
    column-gap: clamp(48px, 6vw, 96px); row-gap: 32px;
}
.lp-brand { grid-area: brand; align-self: end; }
.lp-login { grid-area: login; }
.lp-promo { grid-area: promo; align-self: start; }

/* ------------------------------------------------------------------ brand / hero */

.lp-logo { display: block; width: auto; height: 128px; max-width: 100%; object-fit: contain; margin-bottom: 24px; }
.lp-eyebrow { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--lp-orange-text); }
.lp-title {
    font-size: clamp(28px, 2.5vw, 38px); line-height: 1.2; font-weight: 700; color: var(--lp-navy);
    letter-spacing: -.01em; max-width: 640px; margin-bottom: 16px;
}
html[dir="rtl"] .lp-title { letter-spacing: 0; line-height: 1.45; }
.lp-lead { font-size: 16px; line-height: 1.6; color: var(--lp-muted); max-width: 56ch; margin-bottom: 24px; }
.lp-feats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.lp-feats li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--lp-navy); }
.lp-feats i { font-size: 14px; color: var(--lp-muted); }

/* ------------------------------------------------------------------ login card */

.lp-card {
    background: var(--lp-surface); border: 1px solid #e6e9f0; border-radius: var(--lp-radius-lg);
    box-shadow: var(--lp-shadow); padding: 40px;
}
.lp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.lp-h { font-size: 26px; line-height: 1.25; font-weight: 700; color: var(--lp-text); }
.lp-sub { font-size: 15px; color: var(--lp-muted); margin-bottom: 32px; }

.lp-lang {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
    border: 1px solid var(--lp-border); border-radius: 999px; background: #fff;
    font-size: 13px; font-weight: 600; color: var(--lp-navy); text-decoration: none; white-space: nowrap;
    transition: border-color .15s ease, background-color .15s ease;
}
.lp-lang i { font-size: 13px; color: var(--lp-muted); }
.lp-lang:hover { border-color: var(--lp-border-strong); background: #f7f8fb; color: var(--lp-navy); }
.lp-lang span[lang="ar"] { font-family: "droidkufifont", "Segoe UI", Tahoma, sans-serif; }

.lp-alert {
    display: flex; align-items: flex-start; gap: 8px; margin-bottom: 24px; padding: 12px 16px;
    border-radius: var(--lp-radius-sm); background: var(--lp-danger-soft); color: var(--lp-danger);
    font-size: 14px; font-weight: 500; border: 1px solid rgba(198, 40, 40, .18);
}
.lp-alert i { margin-top: 3px; }

.lp-field { margin-bottom: 24px; }
.lp-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--lp-text); }
.lp-input-wrap { position: relative; }
.lp-input-ic {
    position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: #8a93a5; pointer-events: none;
}
.lp .lp-input {
    display: block; width: 100%; height: 48px; margin: 0;
    padding-block: 0; padding-inline: 44px 16px;
    font-size: 15px; color: var(--lp-text); background: #fff;
    border: 1px solid var(--lp-border-strong); border-radius: var(--lp-radius-sm); box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lp .lp-input-pw { padding-inline-end: 48px; }
/* Password dots render poorly in the Arabic web font. */
/* Masked password: a font that has the bullet glyph. The ID beats the page-wide font rule above (.lp *:not(...)),
   which otherwise applies the Arabic font here and the browser falls back to odd symbols. */
.lp #lpPass[type="password"] { font-family: "Segoe UI", Tahoma, Arial, sans-serif; letter-spacing: .1em; }
.lp .lp-input::placeholder { color: #98a1b2; opacity: 1; font-size: 14px; letter-spacing: 0; }
.lp .lp-input:hover { border-color: #b4bccb; }
.lp .lp-input:focus { outline: none; border-color: var(--lp-primary); box-shadow: 0 0 0 4px var(--lp-primary-ring); }
.lp .lp-input.is-invalid { border-color: var(--lp-danger); }
.lp .lp-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(198, 40, 40, .15); }
.lp-input-wrap:focus-within .lp-input-ic { color: var(--lp-primary); }

.lp-eye {
    position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; border-radius: var(--lp-radius-sm); background: transparent;
    display: inline-flex; align-items: center; justify-content: center; color: #6b7487; cursor: pointer; padding: 0;
}
.lp-eye[hidden] { display: none; }
.lp-eye:hover { color: var(--lp-text); background: #f2f4f8; }
.lp-eye:focus-visible { outline: 2px solid var(--lp-primary); outline-offset: 0; }

.lp-err { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--lp-danger); }
.lp-err[hidden] { display: none; }

.lp-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 24px; flex-wrap: wrap; }
.lp-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: 14px; color: var(--lp-text); }
.lp-check input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--lp-primary); cursor: pointer; flex: 0 0 auto; }
.lp-link { font-size: 14px; font-weight: 600; color: var(--lp-primary); text-decoration: none; }
.lp-link:hover { color: var(--lp-primary-hover); text-decoration: underline; }
.lp a:focus-visible, .lp-check input:focus-visible { outline: 2px solid var(--lp-primary); outline-offset: 2px; border-radius: 4px; }

.lp-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 50px; padding: 0 24px; border: 0; border-radius: var(--lp-radius-sm);
    background: var(--lp-primary); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
    transition: background-color .15s ease;
}
.lp-btn:hover { background: var(--lp-primary-hover); }
.lp-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--lp-primary-ring); }
.lp-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: lpSpin .8s linear infinite; }
.lp-btn.is-loading { cursor: progress; background: var(--lp-primary-hover); }
.lp-btn.is-loading .lp-spinner { display: inline-block; }
@keyframes lpSpin { to { transform: rotate(360deg); } }

.lp-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; font-size: 13px; color: var(--lp-muted); }
.lp-secure i { color: #3f9b6b; }

/* ------------------------------------------------------------------ promotional cards */

.lp-promo-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lp-muted); margin-bottom: 16px; }
html[dir="rtl"] .lp-promo-title { letter-spacing: 0; text-transform: none; font-size: 14px; }
.promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.promo-card {
    position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; text-align: start;
    width: 100%; margin: 0; padding: 24px; cursor: pointer; color: var(--lp-text); font: inherit;
    background: var(--lp-surface); border: 1px solid #e6e9f0; border-radius: var(--lp-radius-lg); box-shadow: var(--lp-shadow);
    transition: border-color .15s ease;
}
.promo-card[data-promo="city"] { --promo-accent: #be1522; --promo-soft: rgba(190, 21, 34, .08); }
.promo-card[data-promo="emaar"] { --promo-accent: #6d3df5; --promo-soft: rgba(109, 61, 245, .08); }
.promo-card:hover { border-color: var(--promo-accent); }
.promo-card:focus-visible { outline: 3px solid var(--promo-accent); outline-offset: 3px; }

.promo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.promo-ic {
    width: 48px; height: 48px; border-radius: var(--lp-radius); display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--promo-accent); background: var(--promo-soft);
}
.promo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--lp-muted); white-space: nowrap; }
.promo-name { display: block; font-size: 19px; line-height: 1.25; font-weight: 700; color: var(--lp-text); margin-bottom: 4px; }
.lp .promo-name[lang="en"] { font-family: "circular std", "Segoe UI", Roboto, Arial, sans-serif; }
.promo-sub { display: block; font-size: 14px; font-weight: 600; color: var(--promo-accent); margin-bottom: 8px; }
.promo-desc { display: block; font-size: 14px; line-height: 1.55; color: var(--lp-muted); margin-bottom: 16px; flex: 1 1 auto; }
.promo-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--promo-accent); }
.promo-cta i { font-size: 12px; transition: transform .18s ease; }
html[dir="rtl"] .lp-flip { transform: scaleX(-1); }
.promo-card.is-loading { cursor: progress; }
.promo-card.is-loading .promo-cta i { animation: lpSpin 1s linear infinite; }

/* ------------------------------------------------------------------ responsive */

/* Short desktop screens (1366x768, 1024x768): tighten vertical rhythm so nothing scrolls. */
@media (min-width: 992px) and (max-height: 820px) {
    .lp { padding-block: 24px; }
    .lp-shell { row-gap: 24px; }
    .lp-logo { height: 96px; margin-bottom: 16px; }
    .lp-title { font-size: clamp(26px, 2.3vw, 32px); margin-bottom: 8px; }
    .lp-lead { font-size: 15px; margin-bottom: 16px; }
    .lp-card { padding: 32px; }
    .lp-sub { margin-bottom: 24px; }
    .lp-field { margin-bottom: 16px; }
    .lp-row { margin: 0 0 24px; }
    .lp-secure { margin-top: 16px; }
    .promo-card { padding: 20px; }
    .promo-top { margin-bottom: 12px; }
    .promo-ic { width: 40px; height: 40px; font-size: 18px; }
    .promo-desc { margin-bottom: 12px; }
}

@media (max-width: 1199px) {
    .lp-shell { grid-template-columns: minmax(0, 1fr) minmax(360px, 400px); column-gap: 48px; }
    .lp-card { padding: 32px; }
    .promo-card { padding: 20px; }
    .promo-tag { display: none; }
}

/* Tablet and below: one column — brand, then sign-in, then the systems. */
@media (max-width: 991px) {
    .lp { align-items: flex-start; padding: 40px 24px; }
    .lp-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "login" "promo"; max-width: 640px; row-gap: 32px; }
    .lp-brand { text-align: center; align-self: auto; }
    .lp-logo { height: 112px; margin-inline: auto; }
    .lp-title, .lp-lead { margin-inline: auto; }
    .lp-feats { justify-content: center; }
    .promo-tag { display: inline-flex; }
}

/* Phones: logo, then the form straight away; the marketing copy steps aside so Sign In stays near the top. */
@media (max-width: 575px) {
    body.lp-body { font-size: 14px; }
    .lp { padding: 24px 16px 32px; }
    .lp-shell { row-gap: 24px; }
    .lp-logo { height: 88px; margin-bottom: 0; }
    .lp-hero { display: none; }
    .lp-card { padding: 24px; border-radius: var(--lp-radius); }
    .lp-h { font-size: 22px; }
    .lp-sub { font-size: 14px; margin-bottom: 24px; }
    .promo-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .promo-card { padding: 20px; }
}
@media (max-width: 340px) {
    .lp-card-top { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    .lp *, .lp *::before, .lp *::after { transition: none !important; }
    .lp-spinner, .promo-card.is-loading .promo-cta i { animation-duration: 2.4s; }
}
@media (forced-colors: active) {
    .lp-btn, .promo-card, .lp-card { border: 1px solid CanvasText; }
}
