@font-face {
    font-family: Cairo;
    src: url('../fonts/login/Cairo.ttf') format('truetype');
    font-weight: 200 1000;
    font-display: swap;
}
:root {
    color-scheme: light;
    --navy: #062449;
    --muted: #71809c;
    --line: #dce2ec;
    --city-height: clamp(140px, 30svh, 380px);
    --space: clamp(12px, 2svh, 24px);
}
* { box-sizing: border-box; }
html { scroll-padding-block: 24px; }
body { margin: 0; direction: ltr; color: var(--navy); font-family: Cairo, Tahoma, sans-serif; background: #fbfcfe; line-height: 1.7; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, select { cursor: pointer; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 3px solid #5486ca; outline-offset: 4px; }
.icon-library { position: absolute; width: 0; height: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.login-page { position: relative; display: grid; grid-template-columns: minmax(0, 54.5fr) minmax(0, 45.5fr); direction: ltr; min-height: 100svh; background: radial-gradient(ellipse at 67% 80%, #e6ebf3 0, transparent 58%), #fff; }
.brand-panel { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; color: #fff; text-align: center; direction: rtl; }
.brand-panel::after { content: ''; display: block; min-height: var(--city-height); flex-shrink: 0; }
/* Only the decorative layer is clipped; translated content stays in normal flow. */
.brand-visual { position: absolute; z-index: -1; inset: 0; overflow: hidden; clip-path: url(#brand-curve); background: radial-gradient(ellipse at 95% 6%, #215d96 0, transparent 47%), linear-gradient(120deg, #00152f 8%, #063569 75%, #195586); }
.brand-visual::before { content: ''; position: absolute; inset: -35% -30% 39% 40%; border: 1px solid #88b0d04a; border-radius: 50%; transform: rotate(-32deg); background: linear-gradient(140deg, #a2bed031, transparent 65%); }
.brand-visual::after { content: ''; position: absolute; inset: auto -10% -49px -12%; height: 100px; border-radius: 50%; border-top: 20px solid #e3e8ef; transform: rotate(-8deg); pointer-events: none; }
.brand-ribbon { position: absolute; top: -35px; left: -12%; width: 85%; height: 90px; border-top: 18px solid #b9cbdc; border-radius: 50%; transform: rotate(-25deg); opacity: .85; }
.brand-content { position: relative; width: 78%; margin: 0 18% 0 4%; padding-block: clamp(8px, 2svh, 32px) var(--space); mix-blend-mode: screen; }
.brand-link { display: block; width: clamp(150px, min(22vw, 26svh), 290px); max-width: 100%; margin: 0 auto var(--space); }
.brand-logo { display: block; width: 100%; height: auto; filter: grayscale(1) invert(1) brightness(1.1) contrast(1.1); mix-blend-mode: screen; }
.brand-content h1 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.5; letter-spacing: -.7px; margin: 0 0 var(--space); font-weight: 800; }
.brand-description { font-size: clamp(1rem, 1.65vw, 1.4375rem); line-height: 1.75; max-width: 520px; margin: 0 auto var(--space); text-wrap: pretty; }
.brand-content h1, .brand-description, .services li, .card-heading, .register-area, .login-footer, .language-picker { overflow-wrap: anywhere; }
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); direction: ltr; gap: clamp(8px, 1vw, 15px); list-style: none; padding: 0; margin: 0 auto; max-width: 620px; }
.services li { display: flex; align-items: center; flex-direction: column; min-width: 0; direction: rtl; font-size: clamp(.875rem, 1.2vw, 1.125rem); line-height: 1.5; font-weight: 600; }
.services li > span { max-width: 100%; }
.service-icon { width: clamp(48px, 8svh, 72px); height: clamp(48px, 8svh, 72px); max-width: 100%; border: 2px solid #7798b9; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; box-shadow: inset 0 0 0 4px #b4c6db0a, 0 2px 6px #0002; }
.service-icon svg { width: 50%; height: 50%; stroke-width: 1.5; }
.city-photo { position: absolute; bottom: 0; left: 0; width: 100%; height: var(--city-height); object-fit: cover; object-position: center 49%; mask-image: linear-gradient(to bottom, transparent, #000 27%); }
.login-panel { position: relative; direction: rtl; display: grid; grid-template-rows: auto auto; align-content: center; justify-items: center; align-items: center; gap: clamp(12px, 2svh, 20px); min-width: 0; padding: 64px clamp(16px, 3vw, 60px) clamp(16px, 2svh, 24px) 12px; }
.language-picker { position: absolute; top: 12px; right: clamp(16px, 3vw, 60px); display: flex; align-items: center; gap: 7px; color: #052e85; max-width: calc(100% - 32px); min-width: 0; }
.language-picker select { border: 0; background: transparent; color: inherit; font-size: 1rem; font-weight: 700; padding: 4px; min-height: 44px; max-width: min(200px, 65vw); min-width: 0; }
.login-card { background: #fffffff5; width: 100%; max-width: 560px; min-width: 0; border: 1px solid #fff; border-radius: 32px; box-shadow: 0 20px 65px #173a6610; padding: clamp(22px, 2.5vw, 32px); min-height: clamp(0px, calc(100svh - 130px), 660px); display: flex; flex-direction: column; }
.card-heading { text-align: center; margin-bottom: var(--space); min-width: 0; }
.card-heading h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.5; letter-spacing: -.8px; margin: 0 0 5px; font-weight: 800; }
.card-heading p { font-size: clamp(1rem, 1.2vw, 1.0625rem); margin: 0; color: var(--muted); }
.login-form, .field { min-width: 0; }
.field { position: relative; margin-bottom: 14px; }
.field input { display: block; width: 100%; min-height: 54px; height: 3.5rem; border: 1.5px solid var(--line); border-radius: 15px; background: #fff; color: var(--navy); padding: 10px 22px 10px 55px; font-size: 1rem; min-width: 0; text-align: right; box-shadow: 0 1px 2px #132f5010; scroll-margin-block: 24px; }
.field input::placeholder { color: #8490a8; opacity: 1; }
.field input[aria-invalid=true] { border-color: #b95865; }
.field-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #657895; pointer-events: none; }
.password-field input { padding-right: 58px; }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: #7e8ba4; }
.password-toggle[hidden] { display: none; }
.password-toggle:hover { background: #f0f4fa; }
.remember { display: flex; align-items: center; gap: 9px; font-size: 1rem; width: fit-content; min-height: 44px; max-width: 100%; margin: 4px 0 12px; cursor: pointer; overflow-wrap: anywhere; }
.remember input { flex-shrink: 0; width: 21px; height: 21px; margin: 0; accent-color: #073f9d; }
.remember span { min-width: 0; }
.sign-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; width: 100%; min-height: 56px; border: 1px solid #092a52; border-radius: 16px; background: linear-gradient(100deg, #031b38, #06376b); box-shadow: 0 3px 7px #0524490b; color: white; font-size: 1.25rem; font-weight: 600; padding: 10px 20px; }
.sign-in span { min-width: 0; overflow-wrap: anywhere; }
.sign-in:hover { background: linear-gradient(100deg, #092c53, #104b81); }
.sign-in svg { width: 28px; height: 28px; }
.register-area { text-align: center; margin-top: auto; padding-top: var(--space); min-width: 0; }
.divider { display: flex; align-items: center; gap: 12px; font-size: .9375rem; color: var(--muted); }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1 0 12px; background: var(--line); }
.register-area p { font-size: 1rem; color: var(--muted); margin: 16px 0 5px; }
.register-area a { color: #0645c0; font-weight: 750; text-decoration: none; display: inline-block; padding-block: 6px; margin-inline-start: 6px; max-width: 100%; }
.register-area a:hover { text-decoration: underline; }
.register-area small { font-size: .8125rem; color: var(--muted); }
.login-footer { font-size: .8125rem; color: #738099; text-align: center; margin: 0; letter-spacing: 1px; }
.error-message, .status-message { flex-shrink: 0; font-size: .875rem; border: 1px solid #dcb7be; background: #fff4f5; color: #8b263b; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; overflow-wrap: anywhere; }
.status-message { background: #edf6ff; color: #163d69; border-color: #bfd2e7; }
.error-message ul { padding-inline-start: 20px; margin: 6px 0 0; }
html[dir=ltr] .brand-panel, html[dir=ltr] .login-panel, html[dir=ltr] .services li { direction: ltr; }
html[dir=ltr] .field input { text-align: left; }
@media (min-width: 1000px) and (max-height: 800px) {
    :root { --space: 12px; --city-height: clamp(140px, 28svh, 230px); }
    .brand-content { padding-top: 8px; }
    .brand-content h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
    .brand-description { font-size: 1.125rem; line-height: 1.65; }
    .login-card { padding: 24px; }
}
@media (min-width: 701px) and (max-width: 999px) {
    .login-page { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); }
    .brand-visual { clip-path: none; border-end-end-radius: 100px; }
    .brand-content { width: 88%; margin-inline: auto; padding-top: 32px; }
    .brand-content h1 { font-size: 1.5rem; }
    .brand-description { font-size: 1rem; }
    .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .brand-link { width: clamp(150px, 22vw, 215px); }
    .login-panel { padding-inline: 20px; }
    .login-card { padding: 24px; }
}
@media (max-width: 700px), (max-width: 1000px) and (max-height: 500px) {
    :root { --city-height: clamp(110px, 20svh, 145px); --space: 14px; }
    .login-page { grid-template-columns: minmax(0, 1fr); }
    .brand-visual { clip-path: none; border-radius: 0 0 36px 36px; }
    .brand-visual::after { display: none; }
    .brand-content { width: auto; margin-inline: 20px; padding-top: 64px; }
    .brand-link { width: clamp(125px, 35vw, 150px); margin-bottom: 10px; }
    .brand-content h1 { font-size: clamp(1.5rem, 5vw, 1.625rem); margin-bottom: 10px; }
    .brand-description { font-size: 1rem; max-width: 520px; margin-bottom: 16px; }
    .services { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 500px; gap: 8px; }
    .services li { font-size: .875rem; }
    .service-icon { width: 48px; height: 48px; }
    .city-photo { object-position: center 55%; }
    .login-panel { position: static; display: flex; flex-direction: column; padding: 24px 16px 20px; gap: 16px; }
    .language-picker { top: 8px; right: 16px; color: #fff; z-index: 2; }
    .language-picker option { color: var(--navy); }
    .login-card { min-height: 0; max-width: 440px; padding: 24px 20px; border-radius: 25px; box-shadow: 0 10px 45px #173a6612; }
    .card-heading h2 { font-size: 1.5rem; }
    .register-area { padding-top: 22px; }
}
@media (max-width: 340px) {
    .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand-content { margin-inline: 16px; }
    .login-card { padding-inline: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
    .sign-in, .password-toggle { transition: background .15s ease; }
}
