:root {
    --auth-plum: #852b8f;
    --auth-plum-deep: #682574;
    --auth-sage: #507a62;
    --auth-ink: #161f2b;
    --auth-muted: #69716f;
    --auth-border: #e5e7e2;
    --auth-paper: #fafbf8;
    --auth-font: 'Manrope', sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--auth-paper); }
html[dir="rtl"] { --auth-font: 'Tajawal', sans-serif; }
body.auth-page {
    margin: 0; min-height: 100vh; color: var(--auth-ink); font-family: var(--auth-font);
    background:
        radial-gradient(ellipse at 2% 2%, #eee4f0 0, transparent 42%),
        radial-gradient(ellipse at 94% 78%, #e5efe6 0, transparent 42%),
        radial-gradient(ellipse at 48% 100%, #f5eee3 0, transparent 46%), #fafbf8;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #bca0c6; outline-offset: 5px; }
.auth-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.auth-icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: 0 0 auto; }
.auth-frame { max-width: 1280px; padding: 30px 52px 22px; margin: auto; min-height: 100svh; display: flex; flex-direction: column; }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 60px; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 22px; max-width: 65%; }
.auth-brand img { display: block; max-width: 225px; max-height: 68px; object-fit: contain; }
.auth-brand-mark { color: white; background: var(--auth-plum); border-radius: 15px; padding: 10px 18px; }
.auth-language-form { margin: 0; }
.auth-language { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 17px; border: 1px solid #dddeda; border-radius: 30px; background: #ffffff9c; color: #434d48; font-size: 13px; font-weight: 700; transition: background .2s, border-color .2s; }
.auth-language .auth-icon { width: 18px; height: 18px; }
.auth-language:hover { background: #fff; border-color: #c5c9c0; }
.auth-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 86px); padding: 50px 0 48px; }
.auth-story { position: relative; padding: 12px 0; animation: auth-reveal .65s both; }
.auth-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--auth-sage); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; }
html[dir="rtl"] .auth-eyebrow { letter-spacing: 0; font-size: 14px; }
.auth-eyebrow > span { width: 26px; height: 1px; background: var(--auth-sage); }
.auth-story h1 { font-size: clamp(36px, 4vw, 53px); line-height: 1.22; font-weight: 800; letter-spacing: -2.4px; margin: 0 0 20px; max-width: 550px; }
html[dir="rtl"] .auth-story h1 { letter-spacing: -.6px; line-height: 1.48; font-size: clamp(36px, 4vw, 52px); }
.auth-heading-dot { color: var(--auth-plum); }
.auth-story-description { max-width: 410px; font-size: 14px; line-height: 1.95; color: var(--auth-muted); margin: 0; }
html[dir="rtl"] .auth-story-description { font-size: 17px; }
.auth-illustration { height: 310px; max-width: 480px; position: relative; margin-top: 12px; }
.auth-illustration::before { content: ''; position: absolute; width: 280px; height: 240px; top: 38px; left: 80px; background: radial-gradient(ellipse, #d8e8d6a6, transparent 69%); filter: blur(16px); }
.auth-orbit { position: absolute; border: 1px solid #d8e1d4; border-radius: 50%; width: 296px; height: 296px; top: 9px; left: 65px; }
.orbit-one { transform: rotate(-23deg) scaleX(1.4) scaleY(.6); }
.orbit-two { transform: rotate(45deg) scaleX(1.14) scaleY(.7); border-color: #e5dce9; }
.auth-clock { position: absolute; top: 26px; left: 99px; width: 247px; height: 247px; border-radius: 50%; background: linear-gradient(135deg, #fff, #eff1e9); padding: 18px; box-shadow: 12px 23px 43px #586a4a12, inset 1px 1px 3px white; transform: rotate(-9deg); }
.auth-clock::after { content: ''; position: absolute; inset: 7px; border: 1px solid #e2e6dc; border-radius: 50%; }
.auth-clock-face { height: 100%; width: 100%; position: relative; border-radius: 50%; background: linear-gradient(155deg, #fdfefa, #f3f4ed); border: 1px solid #e4e6de; }
.clock-label { position: absolute; top: 46px; width: 100%; text-align: center; letter-spacing: 4px; font: 700 9px 'Manrope', sans-serif; color: #a5afa0; }
.clock-tick { position: absolute; width: 3px; height: 12px; background: #acb8a5; border-radius: 4px; }
.tick-top { top: 13px; left: calc(50% - 1px); }
.tick-bottom { bottom: 13px; left: calc(50% - 1px); }
.tick-right { right: 17px; top: calc(50% - 6px); transform: rotate(90deg); }
.tick-left { left: 17px; top: calc(50% - 6px); transform: rotate(90deg); }
.clock-hand { position: absolute; bottom: 50%; left: calc(50% - 3px); border-radius: 10px; transform-origin: bottom; width: 6px; }
.hand-hour { height: 51px; background: var(--auth-plum); transform: rotate(0deg); }
.hand-minute { height: 69px; background: var(--auth-sage); transform: rotate(125deg); }
.clock-center { position: absolute; top: calc(50% - 7px); left: calc(50% - 7px); width: 14px; height: 14px; background: white; border: 4px solid var(--auth-sage); border-radius: 50%; }
.auth-float { position: absolute; display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-radius: 16px; background: #ffffffde; border: 1px solid #fff; backdrop-filter: blur(12px); box-shadow: 0 14px 30px #354b3710; font-size: 12px; font-weight: 700; }
.float-attendance { left: 16px; top: 170px; min-width: 214px; animation: auth-reveal .7s .15s both; }
.auth-float small { display: block; margin-top: 5px; font-size: 10px; color: #889383; font-weight: 500; }
.auth-mini-icon { background: #edf4e9; color: var(--auth-sage); width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; }
.auth-live-dot { margin-inline-start: auto; height: 6px; width: 6px; background: #7da27d; border-radius: 50%; }
.float-secure { top: 70px; right: -2px; color: var(--auth-plum-deep); padding: 13px 17px; animation: auth-reveal .7s .3s both; }
.float-secure .auth-icon { width: 17px; height: 17px; }
.auth-spark { position: absolute; color: #9cae92; font-size: 20px; font-weight: 400; }
.spark-one { left: 28px; top: 55px; }
.spark-two { right: 29px; bottom: 52px; font-size: 28px; color: #bba4c4; }
.auth-panel { position: relative; width: 100%; max-width: 496px; padding: 36px 39px 24px; background: linear-gradient(145deg, #fffffff7, #ffffffda); border: 1px solid #fff; border-radius: 28px; box-shadow: 0 25px 70px #3c413809, 0 3px 12px #3c413803; animation: auth-reveal .65s .1s both; }
.auth-panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.auth-panel-line { width: 35px; height: 4px; background: linear-gradient(90deg, var(--auth-plum), #c7afd0); border-radius: 5px; }
.auth-panel-top .auth-icon { color: #93a28c; width: 19px; height: 19px; }
.auth-kicker { display: block; text-transform: uppercase; letter-spacing: 1.7px; color: var(--auth-sage); font-size: 10px; font-weight: 800; margin-bottom: 12px; }
html[dir="rtl"] .auth-kicker { letter-spacing: 0; font-size: 13px; }
.auth-form-heading h2 { font-size: 29px; font-weight: 800; line-height: 1.35; margin: 0 0 10px; letter-spacing: -.8px; }
html[dir="rtl"] .auth-form-heading h2 { font-size: 32px; letter-spacing: 0; }
.auth-form-heading p { margin: 0 0 27px; color: var(--auth-muted); font-size: 12px; line-height: 1.9; }
html[dir="rtl"] .auth-form-heading p { font-size: 15px; }
.auth-form { margin: 0; }
.auth-field { margin-bottom: 20px; }
.auth-field > label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 9px; color: #394338; }
html[dir="rtl"] .auth-field > label { font-size: 14px; }
.auth-input-wrap { position: relative; }
.auth-input-wrap input { display: block; width: 100%; min-width: 0; height: 52px; background: #f7f8f4; color: var(--auth-ink); border: 1px solid var(--auth-border); border-radius: 11px; padding: 0 16px; padding-inline-end: 48px; font-size: 13px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
.auth-input-wrap input::placeholder { color: #a1a69c; opacity: 1; }
.auth-input-wrap input:focus { background: #fff; border-color: #ad88b5; box-shadow: 0 0 0 4px #852b8f0b; }
.auth-input-wrap input[aria-invalid="true"] { border-color: #ce8c80; }
.auth-input-wrap input[dir="ltr"] { padding-right: 46px; padding-left: 16px; text-align: left; }
html[dir="rtl"] .auth-input-wrap input[dir="ltr"] { padding-left: 46px; padding-right: 16px; }
.auth-input-icon { position: absolute; inset-inline-end: 15px; top: 17px; width: 18px; height: 18px; color: #9aa491; pointer-events: none; }
.auth-password-toggle { position: absolute; inset-inline-end: 5px; top: 5px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #97a18f; }
.auth-password-toggle:hover, .auth-password-toggle[aria-pressed="true"] { color: var(--auth-plum); background: #852b8f08; }
.auth-password-toggle .auth-icon { width: 19px; height: 19px; }
.auth-form-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 5px 0 25px; font-size: 11px; }
html[dir="rtl"] .auth-form-options { font-size: 13px; }
.auth-remember { display: inline-flex; align-items: center; gap: 7px; color: #72796d; cursor: pointer; }
.auth-remember input { width: 15px; height: 15px; margin: 0; accent-color: var(--auth-plum); cursor: pointer; }
.auth-text-link { color: var(--auth-plum-deep); font-weight: 700; text-decoration: none; text-underline-offset: 4px; }
.auth-text-link:hover { text-decoration: underline; }
.auth-submit { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 11px; border: 1px solid #773281; padding: 13px 19px; background: linear-gradient(115deg, #732b7f, #934f9c); box-shadow: 0 8px 17px #852b8f18; color: white; font-size: 13px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
html[dir="rtl"] .auth-submit { font-size: 15px; }
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 11px 22px #852b8f26; }
.auth-submit:active { transform: translateY(0); }
.auth-submit[disabled] { cursor: wait; opacity: .7; }
html[dir="rtl"] .auth-direction-arrow { transform: rotate(180deg); }
.auth-panel-footer { border-top: 1px solid #eceee7; margin-top: 26px; padding-top: 19px; color: #979d93; font-size: 9px; line-height: 1.8; display: flex; gap: 7px; align-items: flex-start; }
html[dir="rtl"] .auth-panel-footer { font-size: 12px; }
.auth-status-dot { flex: 0 0 auto; width: 5px; height: 5px; background: #8ba17e; border-radius: 50%; margin-top: 5px; }
.auth-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #969c92; font-size: 10px; line-height: 1.8; padding-top: 10px; }
html[dir="rtl"] .auth-footer { font-size: 12px; }
.auth-feedback { padding: 13px 15px; border-radius: 10px; margin-bottom: 20px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.auth-feedback-success { background: #edf5eb; color: #426347; border: 1px solid #dce9d6; }
.auth-feedback-error { background: #fcf0ec; color: #a34639; border: 1px solid #f3ddd5; }
.auth-field-error { font-size: 11px; line-height: 1.7; color: #aa493c; margin: 8px 0 0; }
.auth-back-link { display: block; text-align: center; font-size: 12px; color: var(--auth-plum-deep); margin-top: 21px; text-decoration: none; }
.auth-back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-demo { margin-top: 22px; font-size: 11px; color: var(--auth-muted); }
.auth-demo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-demo-button { border: 1px solid var(--auth-border); background: #f8f9f6; width: 100%; padding: 10px; border-radius: 8px; color: var(--auth-sage); font-size: 11px; }
@keyframes auth-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1600px) { .auth-frame { max-width: 1370px; } .auth-main { gap: 120px; } }
@media (max-width: 1050px) {
    .auth-frame { padding: 24px 32px 20px; }
    .auth-main { gap: 35px; }
    .auth-panel { padding: 30px 26px 22px; }
    .auth-story h1 { font-size: 38px; }
    .auth-illustration { transform: scale(.86); transform-origin: top left; height: 285px; margin-inline-start: -18px; }
    html[dir="rtl"] .auth-illustration { transform-origin: top right; }
}
@media (max-width: 760px) {
    .auth-frame { padding: 20px 22px 16px; }
    .auth-main { display: flex; justify-content: center; padding: 34px 0; }
    .auth-story { display: none; }
    .auth-panel { max-width: 465px; padding: 29px 27px 23px; }
    .auth-header { min-height: 50px; }
    .auth-brand img { max-width: 170px; max-height: 52px; }
    .auth-footer { justify-content: center; text-align: center; }
    .auth-footer-label { display: none; }
    .auth-form-heading p { font-size: 13px; }
    .auth-panel-footer { font-size: 10px; }
}
@media (max-width: 390px) {
    .auth-frame { padding: 17px 15px; }
    .auth-panel { padding: 25px 20px 20px; border-radius: 22px; }
    .auth-brand img { max-width: 145px; }
    .auth-language { padding: 9px 12px; }
    .auth-form-heading h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
