/* Login / register / forgot password pages (front/auth/*). Classes start with "au-". */
:root {
    --au-ink: #1a1a1a;
    --au-text: #6b6b6b;
    --au-muted: #9a9a9a;
    --au-line: #e7e3df;
    --au-accent: #fe7e00;
    --au-accent-dark: #e26f00;
    --au-dark: #1c1714;
    --au-danger: #d93d3d;
    --au-success: #1f9d55;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.au-body {
    margin: 0; min-height: 100vh; font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px; line-height: 1.6; color: var(--au-ink); background: #fff;
}
.au-body a { color: inherit; text-decoration: none; }
.au-body img { display: block; max-width: 100%; }
[dir="ltr"] .au-flip { transform: scaleX(-1); }

/* ---------- page + card ---------- */
.au { min-height: 100vh; display: flex; }
.au-card { flex: 1; display: flex; min-height: 100vh; background: #fff; }

/* ---------- brand panel (desktop only) ---------- */
.au-brand { display: none; }

/* ---------- form panel ---------- */
.au-panel { flex: 1; display: flex; flex-direction: column; padding: 20px 20px 16px; min-width: 0; }
.au-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.au-top__logo img { height: 40px; width: auto; }
.au-top__back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--au-text) !important; }
.au-top__back:hover { color: var(--au-accent) !important; }
.au-top__back svg { width: 18px; height: 18px; }

.au-form-wrap { width: 100%; max-width: 440px; margin: 0 auto; padding: 48px 0 32px; flex: 1; }
.au-line { display: block; width: 40px; height: 3px; border-radius: 2px; background: var(--au-accent); margin-bottom: 14px; }
.au-title { margin: 0 0 6px; font-size: 30px; font-weight: 800; line-height: 1.3; }
.au-text { margin: 0 0 26px; color: var(--au-text); font-size: 15px; }

/* ---------- alerts ---------- */
.au-alert { border-radius: 12px; padding: 10px 14px; margin-bottom: 18px; background: #fdecec; color: var(--au-danger); font-size: 14px; font-weight: 600; }
.au-alert p { margin: 0; }
.au-alert p + p { margin-top: 4px; }
.au-alert--success { background: #e8f6ee; color: var(--au-success); }

/* ---------- fields ---------- */
.au-form { display: grid; gap: 18px; }
.au-field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.au-input { position: relative; }
.au-input input, .au-input select {
    width: 100%; height: 56px; padding: 0 18px; padding-inline-start: 52px;
    border: 1.5px solid var(--au-line); border-radius: 14px; background: #fff; color: var(--au-ink);
    font: inherit; font-size: 15px; outline: 0; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
/* the icon / eye sits at the end of the field (left in arabic), like the design */
.au-input input { padding-inline-start: 18px; padding-inline-end: 52px; }
.au-input > svg, .au-eye { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 16px; }
.au-input > svg { width: 20px; height: 20px; color: #a9a29c; pointer-events: none; }
.au-input input:focus, .au-input select:focus { border-color: var(--au-accent); box-shadow: 0 0 0 4px rgba(254, 126, 0, .12); }
.au-input.is-invalid input, .au-input.is-invalid select { border-color: var(--au-danger); }
.au-input--select select {
    padding-inline-end: 44px;
    padding-inline-start: 18px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9a29c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-size: 18px;
}
[dir="rtl"] .au-input--select select { background-position: left 16px center; }
[dir="ltr"] .au-input--select select { background-position: right 16px center; }
.au-input--code input { text-align: center; letter-spacing: 14px; font-size: 22px; font-weight: 800; padding: 0 18px !important; direction: ltr; }

.au-eye { width: 34px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; color: #8a837d; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.au-eye { inset-inline-end: 10px; }
.au-eye:hover { color: var(--au-ink); background: #f6f3f0; }
.au-eye svg { width: 20px; height: 20px; }
.au-eye__closed { display: none; }
.au-eye.is-on .au-eye__open { display: none; }
.au-eye.is-on .au-eye__closed { display: block; }

/* ---------- row: remember + forgot ---------- */
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.au-row--center { justify-content: center; margin-top: 18px; }
.au-dot { color: var(--au-muted); }
.au-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--au-text); }
.au-check input { position: absolute; opacity: 0; pointer-events: none; }
.au-check span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #c9c2bb; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.au-check input:checked + span { background: var(--au-accent); border-color: var(--au-accent); }
.au-check input:checked + span::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translateY(-1px); }
.au-check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(254, 126, 0, .25); }
.au-link { color: var(--au-accent-dark) !important; font-weight: 700; }
.au-link:hover { text-decoration: underline; }
.au-link--button { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--au-accent-dark) !important; }
.au-terms { margin: -4px 0 0; font-size: 13px; color: var(--au-text); }

/* ---------- button ---------- */
.au-btn {
    height: 58px; width: 100%; border: 0; border-radius: 14px; cursor: pointer;
    background: var(--au-accent); color: #fff; font: inherit; font-size: 17px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: 0 10px 24px rgba(254, 126, 0, .25); transition: background .2s, transform .1s;
}
.au-btn:hover { background: var(--au-accent-dark); }
.au-btn:active { transform: scale(.99); }
.au-btn:disabled { opacity: .7; cursor: progress; }
.au-btn svg { width: 20px; height: 20px; }

.au-switch { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--au-line); text-align: center; color: var(--au-text); font-size: 14px; }
.au-footer { padding-top: 14px; border-top: 1px solid #f0ece8; text-align: center; color: var(--au-muted); font-size: 13px; }

/* =================== desktop: split card =================== */
@media (min-width: 992px) {
    body.au-body { background: linear-gradient(135deg, #fbf3ec 0%, #f6efe9 45%, #fbf8f5 100%); }
    .au { align-items: center; justify-content: center; padding: 40px 24px; }
    .au-card {
        flex: 0 1 1440px; min-height: 0; height: min(860px, calc(100vh - 80px)); max-height: 940px;
        border-radius: 34px; overflow: hidden; box-shadow: 0 30px 80px rgba(60, 35, 15, .14);
    }

    .au-brand {
        position: relative; flex: 0 0 46%; display: flex; flex-direction: column; justify-content: space-between;
        padding: 52px 56px; overflow: hidden; color: #fff;
        background: radial-gradient(circle at 20% 110%, rgba(254, 126, 0, .45) 0%, rgba(254, 126, 0, 0) 45%),
                    linear-gradient(160deg, #2a221d 0%, var(--au-dark) 55%, #120f0d 100%);
    }
    .au-brand::before, .au-brand::after {
        content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); pointer-events: none;
    }
    .au-brand::before { width: 620px; height: 620px; top: 120px; inset-inline-end: -260px; box-shadow: 0 0 0 70px rgba(255, 255, 255, .02); }
    .au-brand::after { width: 380px; height: 380px; top: 240px; inset-inline-end: -140px; }
    .au-brand > * { position: relative; z-index: 1; }

    .au-brand__logo { display: inline-flex; align-items: center; gap: 16px; align-self: flex-start; }
    .au-brand__mark { width: 78px; height: 78px; border-radius: 20px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; }
    .au-brand__mark img { max-height: 100%; width: auto; }
    .au-brand__name strong { display: block; font-size: 24px; font-weight: 800; color: #fff; }
    .au-brand__name small { display: block; color: #ffb066; letter-spacing: 3px; font-size: 12px; font-weight: 700; }
    .au-brand__body .au-line { width: 52px; margin-bottom: 20px; }
    .au-brand__kicker { margin: 0 0 12px; color: #ffb066; font-weight: 700; font-size: 16px; }
    .au-brand__body h2 { margin: 0 0 18px; font-size: 52px; line-height: 1.35; font-weight: 800; color: #fff; max-width: 460px; }
    .au-brand__body p:last-child { margin: 0; max-width: 420px; color: rgba(255, 255, 255, .78); font-size: 17px; line-height: 1.9; }
    .au-brand__footer { margin: 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .7); font-size: 14px; }
    .au-brand__footer span { width: 28px; height: 1px; background: var(--au-accent); }

    .au-panel { padding: 40px 72px 24px; overflow-y: auto; }
    .au-top { justify-content: flex-start; }
    .au-top__logo { display: none; }
    .au-form-wrap { max-width: 540px; padding: 56px 0 28px; display: flex; flex-direction: column; justify-content: center; }
    .au-title { font-size: 44px; }
    .au-text { font-size: 16px; margin-bottom: 32px; }
    .au-input input, .au-input select { height: 62px; font-size: 16px; }
    .au-btn { height: 64px; font-size: 18px; }
}

@media (min-width: 992px) and (max-height: 760px) {
    .au-card { height: auto; max-height: none; }
    .au { padding: 24px; }
}
