*, *::before, *::after { box-sizing: border-box; }
:root {
    --navy: #033c73;
    --navy-2: #0b5a9a;
    --ink: #1a2332;
    --muted: #6b7c93;
    --label: #5c6b7a;
    --field: #eef1f5;
}
html, body { margin: 0; }
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(120deg, #e9edf3 0%, #d8e1ee 100%);
    font-family: 'Cairo', sans-serif;
    font-size: 12.5px;
    color: #1f2a37;
}
a { color: var(--navy-2); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

.auth-layout {
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 520px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px -24px rgba(3, 30, 60, .35);
}

.auth-brand {
    flex: 0 0 44%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    padding-inline-end: 44px;
    border-start-start-radius: 0;
    border-start-end-radius: 140px;
    border-end-end-radius: 96px;
    border-end-start-radius: 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    text-align: center;
}
.auth-brand-logo {
    display: inline-flex;
    padding: 10px 18px;
    margin-bottom: 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
}
.auth-brand-logo img { display: block; height: 40px; width: auto; }
.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 3px 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
}
.auth-brand-title { margin: 0 0 10px; font-size: 26px; font-weight: 700; line-height: 1.35; }
.auth-brand-divider { width: 48px; height: 3px; margin: 0 auto 12px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
.auth-brand-subtitle { margin: 0 auto 14px; max-width: 240px; font-size: 14px; line-height: 1.7; }
.auth-brand-note { margin: 0 auto; max-width: 250px; font-size: 12.5px; line-height: 1.6; opacity: .85; }

.auth-form-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 40px;
}
.auth-form-inner { width: 100%; max-width: 320px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.auth-head p { margin: 0; font-size: 13px; color: var(--muted); }

.auth-alert {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fdecec;
    color: #b42318;
    font-size: 12.5px;
}
.auth-alert i { margin-top: 3px; }

.auth-field { margin-bottom: 12px; }
.auth-field label { display: block; margin: 0 0 4px; font-size: 12.5px; font-weight: 500; color: var(--label); }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #8a9bb0;
    pointer-events: none;
}
.auth-input-wrap input {
    width: 100%;
    height: 40px;
    padding: 8px 14px;
    padding-inline-start: 40px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--field);
    font: inherit;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.auth-input-wrap input::placeholder { color: #9aa8b8; }
.auth-input-wrap input:focus {
    background: #fff;
    border-color: var(--navy-2);
    box-shadow: 0 0 0 3px rgba(11, 90, 154, .12);
}
.auth-toggle-pass {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: none;
    color: #8a9bb0;
    cursor: pointer;
}
.auth-input-wrap input[type="password"], .auth-input-wrap input.has-toggle { padding-inline-end: 40px; }

.auth-btn {
    display: block;
    min-width: 170px;
    height: 42px;
    margin: 16px auto 0;
    padding: 0 32px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.auth-btn:hover { background: var(--navy-2); box-shadow: 0 8px 18px -8px rgba(3, 60, 115, .6); }

.auth-links { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-links + .auth-links { margin-top: 4px; }

.auth-demo { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e6ebf1; text-align: center; }
.auth-demo-title { margin-bottom: 6px; font-size: 11.5px; color: var(--muted); }
.auth-demo-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.auth-demo-list button {
    padding: 3px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 20px;
    background: #fff;
    color: #344767;
    font: inherit;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
}
.auth-demo-list button:hover { border-color: var(--navy); color: var(--navy); }

.auth-footer { margin-top: 14px; text-align: center; font-size: 11px; color: #8a9bb0; }

.auth-lang { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.auth-lang a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border: 1px solid #d1d9e0; border-radius: 20px; color: #344767; font-size: 12px; font-weight: 600; }
.auth-lang a:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }

[dir="rtl"] body * { letter-spacing: normal !important; }
[dir="rtl"] .auth-input-wrap input:is([type="email"], [type="password"], .has-toggle) { direction: ltr; text-align: right; padding-left: 14px; padding-right: 40px; }
[dir="rtl"] .auth-input-wrap input:is([type="password"], .has-toggle) { padding-left: 40px; }

@media (max-width: 767px) {
    body { padding: 12px; align-items: flex-start; }
    .auth-layout { flex-direction: column; min-height: 0; border-radius: 20px; }
    .auth-brand { flex: none; padding: 18px 22px 26px; border-radius: 0 0 80px 80px / 0 0 36px 36px; }
    .auth-brand-logo { padding: 6px 12px; margin-bottom: 8px; border-radius: 10px; }
    .auth-brand-logo img { height: 28px; }
    .auth-brand-badge { display: none; }
    .auth-brand-title { margin: 0; font-size: 21px; }
    .auth-brand-divider, .auth-brand-subtitle, .auth-brand-note { display: none; }
    .auth-form-panel { padding: 18px 20px 20px; }
    .auth-head h1 { font-size: 21px; }
}
