/* ==========================================================================
   auth.css — صفحات الدخول (login.php) والتواصل (contact.php) — البادئة au-
   يعتمد على متغيرات header.php: --accent --bg-dark --bg-light --bg-surface-glass
   --border-color --text-primary --text-secondary --text-muted (+ Cairo)
   ========================================================================== */

.au-page, .au-contact {
    --au-radius: 22px;
    --au-radius-sm: 12px;
    --au-surface: rgba(15, 19, 26, 0.62);
    --au-border: rgba(255, 255, 255, 0.07);
    --au-border-strong: rgba(255, 255, 255, 0.12);
    --au-accent: var(--accent, #ffcc00);
    --au-accent-soft: rgba(255, 204, 0, 0.10);
    --au-accent-line: rgba(255, 204, 0, 0.30);
    --au-success: #10b981;
    --au-danger: #ef4444;
    --au-warning: #f59e0b;
    --au-muted: var(--text-muted, #64748b);
    --au-muted-light: #94a3b8;
    --au-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    --au-ease: cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Cairo', sans-serif;
    color: var(--text-primary, #f8fafc);
    box-sizing: border-box;
}
.au-page *, .au-page *::before, .au-page *::after,
.au-contact *, .au-contact *::before, .au-contact *::after { box-sizing: border-box; }

/* ---------- بطاقة زجاجية عامة ---------- */
.au-card {
    position: relative;
    background: var(--au-surface);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--au-shadow);
    transition: border-color .3s var(--au-ease), box-shadow .3s var(--au-ease);
    overflow: hidden;
}
.au-card::before {
    content: '';
    position: absolute; inset: 0 0 auto 0; height: 160px;
    background: radial-gradient(60% 90% at 50% 0%, rgba(255, 204, 0, 0.10) 0%, transparent 70%);
    pointer-events: none;
}
.au-card:hover { border-color: var(--au-accent-line); box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 204, 0, 0.08); }
.au-card > * { position: relative; }

/* ---------- حقول الإدخال ---------- */
.au-label { display: block; margin: 0 0 8px; color: var(--au-muted-light); font-size: 13px; font-weight: 700; }
.au-label .au-req { color: var(--au-danger); margin-inline-start: 2px; }
.au-field { position: relative; }
/* الأيقونة على يسار الحقل (نهاية السطر في RTL) — قيم فيزيائية لأن حقل الهاتف يرث direction:ltr من المتصفح */
.au-field > i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--au-muted); font-size: 14px; pointer-events: none; transition: color .2s;
}
.au-field--area > i { top: 18px; transform: none; }
.au-field:focus-within > i { color: var(--au-accent); }
.au-input {
    width: 100%; min-height: 48px; padding: 12px 15px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--au-border-strong);
    border-radius: var(--au-radius-sm);
    color: #fff; font: 600 14px/1.5 'Cairo', sans-serif;
    outline: none; appearance: none; -webkit-appearance: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.au-field > .au-input { padding-left: 44px; }
.au-input::placeholder { color: var(--au-muted); font-weight: 500; }
.au-input:hover { border-color: rgba(255, 255, 255, 0.18); }
.au-input:focus { border-color: var(--au-accent); background: rgba(0, 0, 0, 0.36); box-shadow: 0 0 0 3px var(--au-accent-soft); }
textarea.au-input { min-height: 150px; resize: vertical; line-height: 1.7; }

/* ---------- أزرار ---------- */
.au-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 48px; padding: 0 20px; border-radius: var(--au-radius-sm); border: 1px solid transparent;
    background: linear-gradient(135deg, var(--au-accent) 0%, #e6b800 100%); color: #0b0f19;
    font: 800 15px/1 'Cairo', sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.18);
    transition: transform .2s var(--au-ease), box-shadow .25s var(--au-ease), background .25s, color .25s;
    -webkit-tap-highlight-color: transparent;
}
.au-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 204, 0, 0.30); color: #000; }
.au-btn:active:not(:disabled) { transform: translateY(0); }
.au-btn:disabled { background: rgba(255, 255, 255, 0.06); color: var(--au-muted); box-shadow: none; cursor: not-allowed; }
.au-btn--wa { background: linear-gradient(135deg, #25d366 0%, #128c7e 100%); color: #fff; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.22); }
.au-btn--wa:hover:not(:disabled) { color: #fff; box-shadow: 0 10px 22px rgba(37, 211, 102, 0.35); }
.au-btn--wa i { font-size: 18px; }

/* ---------- تنبيهات ---------- */
.au-page .alert, .au-contact .alert {
    display: none; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 14px; margin: 0 0 18px; border-radius: var(--au-radius-sm);
    font-size: 14px; font-weight: 700; line-height: 1.6; text-align: center;
    animation: au-fade .4s var(--au-ease);
}
.au-page .alert-error, .au-page .alert-success, .au-page .alert-warning,
.au-contact .alert-error, .au-contact .alert-success, .au-contact .alert-warning { display: flex; }
.au-page .alert-error, .au-contact .alert-error { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.au-page .alert-success, .au-contact .alert-success { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.au-page .alert-warning, .au-contact .alert-warning { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
@keyframes au-fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   صفحة الدخول
   ========================================================================== */
.au-page {
    display: flex; justify-content: center; align-items: center;
    min-height: min(calc(100vh - 280px), 820px);
    padding: 32px 16px 56px;
}
.au-login { width: 100%; max-width: 440px; padding: 34px 30px 28px; text-align: center; }
.au-login__badge {
    width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    background: var(--au-accent-soft); border: 1px solid var(--au-accent-line); color: var(--au-accent);
    font-size: 24px; box-shadow: 0 0 0 6px rgba(255, 204, 0, 0.04), 0 8px 20px rgba(255, 204, 0, 0.12);
}
.au-login__title { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: #fff; line-height: 1.3; }
.au-login__sub { margin: 0 0 24px; color: var(--au-muted-light); font-size: 13.5px; }
.au-login form { text-align: right; }
.au-login .form-group { margin-bottom: 16px; }
.au-login .form-group.checkbox-group { margin: 2px 0 18px; }
.au-check {
    display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
    color: var(--au-muted-light); font-size: 13px; font-weight: 700;
}
.au-check input[type="checkbox"] {
    width: 18px; height: 18px; margin: 0; flex: 0 0 auto; cursor: pointer;
    accent-color: var(--au-accent); border-radius: 5px;
}
.au-check label { margin: 0; cursor: pointer; }
.au-check:hover { color: #fff; }
.au-login .btn { margin-top: 2px; }

.au-login .google-separator {
    display: flex; align-items: center; gap: 12px; margin: 22px 0 14px;
    color: var(--au-muted); font-size: 12.5px; font-weight: 600;
}
.au-login .google-separator::before, .au-login .google-separator::after { content: ''; flex: 1; border-bottom: 1px solid var(--au-border-strong); }
.au-login .google-btn-wrapper { display: flex; justify-content: center; width: 100%; margin-bottom: 6px; }
.au-login .google-btn-wrapper > div { width: 100% !important; }
.au-login .google-btn-wrapper iframe { border-radius: var(--au-radius-sm); }

.au-login .links {
    display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap;
    margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--au-border-strong);
    font-size: 13px;
}
.au-login .links a {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--au-muted-light); text-decoration: none; font-weight: 700; transition: color .2s;
}
.au-login .links a i { color: var(--au-accent); font-size: 12px; }
.au-login .links a:hover { color: var(--au-accent); }
.au-login .links a:focus-visible { outline: 2px solid var(--au-accent); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 480px) {
    .au-page { padding: 20px 16px 40px; align-items: flex-start; }
    .au-login { padding: 28px 20px 22px; }
    .au-login__title { font-size: 22px; }
}

/* ==========================================================================
   التسجيل / نسيت كلمة المرور / إعادة التعيين (تشترك مع بطاقة الدخول)
   ========================================================================== */
.au-register { max-width: 760px; }
.au-register__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .au-register__grid { grid-template-columns: 1fr; } }
.au-optional { color: var(--au-muted); font-weight: 600; font-size: 12px; }
.au-input--ltr { direction: ltr; text-align: left; }
.au-input--ltr::placeholder { text-align: left; }
.au-hint { margin-top: 6px; color: var(--au-muted); font-size: 12px; line-height: 1.5; display: flex; align-items: center; gap: 6px; }
.au-hint--error { color: #f87171; }
.au-hint--success { color: #34d399; }
.au-page [hidden] { display: none !important; }
.au-field--pass > .au-input { padding-left: 44px; }
.au-eye {
    position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent;
    color: var(--au-muted); font-size: 14px; cursor: pointer; transition: color .2s, background .2s;
}
.au-eye:hover { color: var(--au-accent); background: rgba(255, 255, 255, 0.05); }
.au-strength { display: flex; gap: 5px; margin-top: 8px; }
.au-strength i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); transition: background .25s; }
.au-strength--1 i:nth-child(-n+1) { background: #ef4444; }
.au-strength--2 i:nth-child(-n+2) { background: #f59e0b; }
.au-strength--3 i:nth-child(-n+3) { background: #eab308; }
.au-strength--4 i { background: #10b981; }
.au-agree { margin: 4px 0 16px; align-items: flex-start; line-height: 1.6; }
.au-agree input { margin-top: 3px; }
.au-agree a { color: var(--au-accent); text-decoration: none; font-weight: 800; }
.au-agree a:hover { text-decoration: underline; }
.au-login .links--center { justify-content: center; }
.au-login .links .au-muted { color: var(--au-muted); font-weight: 600; }
.au-login .au-note { margin: -8px 0 20px; color: var(--au-muted-light); font-size: 13.5px; line-height: 1.8; }
.au-login .au-note b { color: #fff; }
.au-login .au-steps { list-style: none; margin: 0 0 20px; padding: 0; text-align: right; display: flex; flex-direction: column; gap: 8px; }
.au-login .au-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--au-muted-light); font-size: 13.5px; line-height: 1.7; }
.au-login .au-steps li i { color: var(--au-accent); margin-top: 5px; font-size: 12px; }
.au-login .au-btn--ghost { background: rgba(255, 255, 255, 0.04); color: var(--text-secondary, #cbd5e1); border-color: var(--au-border-strong); box-shadow: none; }
.au-login .au-btn--ghost:hover:not(:disabled) { color: #fff; border-color: var(--au-accent-line); box-shadow: none; }
.au-login .au-btn--wa { margin-top: 10px; }

/* ==========================================================================
   صفحة التواصل
   ========================================================================== */
.au-contact { padding-bottom: 16px; }

/* الهيرو */
.au-hero {
    position: relative; overflow: hidden; text-align: center;
    padding: 52px 20px 44px;
    background: var(--bg-dark, #080b11);
    border-bottom: 1px solid var(--au-border);
}
.au-hero::before {
    content: ''; position: absolute; left: 50%; top: -220px; width: 720px; height: 460px; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(255, 204, 0, 0.12), transparent);
    pointer-events: none;
}
.au-hero > * { position: relative; }
.au-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; margin-bottom: 14px;
    border-radius: 999px; background: var(--au-accent-soft); border: 1px solid var(--au-accent-line);
    color: var(--au-accent); font-size: 12.5px; font-weight: 800;
}
.au-hero__title { margin: 0 0 12px; font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: #fff; line-height: 1.25; letter-spacing: -0.2px; }
.au-hero__title i { color: var(--au-accent); margin-inline-end: 4px; }
.au-hero__sub { max-width: 640px; margin: 0 auto; color: var(--au-muted-light); font-size: 15px; line-height: 1.9; }

/* التخطيط */
.au-grid {
    max-width: 1200px; margin: 0 auto; padding: 40px 20px 40px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 28px; align-items: start;
}
@media (max-width: 900px) { .au-grid { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; } }

/* بطاقات المعلومات */
.au-info { display: flex; flex-direction: column; gap: 14px; }
.au-info .au-card::before { height: 100%; opacity: .6; }
.au-info-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px 20px; }
.au-info-card:hover { transform: translateY(-3px); }
.au-info-card { transition: transform .3s var(--au-ease), border-color .3s var(--au-ease), box-shadow .3s var(--au-ease); }
.au-info__icon {
    width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--au-accent-soft); border: 1px solid var(--au-accent-line); color: var(--au-accent);
    font-size: 18px; transition: background .25s, color .25s, box-shadow .25s;
}
.au-info-card:hover .au-info__icon { background: var(--au-accent); color: #000; box-shadow: 0 6px 16px rgba(255, 204, 0, 0.3); }
.au-info__body { min-width: 0; flex: 1; }
.au-info__body h4 { margin: 0 0 5px; font-size: 16px; font-weight: 800; color: #fff; line-height: 1.4; }
.au-info__body p { margin: 0; color: var(--au-muted-light); font-size: 14px; line-height: 1.7; word-break: break-word; }
.au-info__body a { color: var(--text-secondary, #cbd5e1); text-decoration: none; font-weight: 700; transition: color .2s; }
.au-info__body a:hover { color: var(--au-accent); }
.au-info__body p[dir="ltr"] { text-align: right; }

/* بطاقة واتساب */
.au-wa {
    padding: 20px; text-align: center;
    background: linear-gradient(160deg, rgba(37, 211, 102, 0.10) 0%, rgba(15, 19, 26, 0.7) 60%);
    border-color: rgba(37, 211, 102, 0.22);
}
.au-wa::before { background: radial-gradient(60% 90% at 50% 0%, rgba(37, 211, 102, 0.14) 0%, transparent 70%); }
.au-wa:hover { border-color: rgba(37, 211, 102, 0.45); box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5), 0 0 24px rgba(37, 211, 102, 0.12); }
.au-wa__icon {
    width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(37, 211, 102, 0.14); border: 1px solid rgba(37, 211, 102, 0.35); color: #25d366; font-size: 26px;
}
.au-wa h4 { margin: 0 0 4px; font-size: 17px; font-weight: 800; color: #fff; }
.au-wa p { margin: 0 0 14px; color: var(--au-muted-light); font-size: 13.5px; line-height: 1.7; }

/* الفورم */
.au-form { padding: 30px 30px 28px; }
.au-form__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--au-border); }
.au-form__icon {
    width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--au-accent-soft); border: 1px solid var(--au-accent-line); color: var(--au-accent); font-size: 18px;
}
.au-form__head h3 { margin: 0; font-size: 21px; font-weight: 800; color: #fff; line-height: 1.3; }
.au-form__head p { margin: 2px 0 0; color: var(--au-muted-light); font-size: 13px; }
.au-form .form-group { margin-bottom: 18px; }
.au-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .au-form .form-row { grid-template-columns: 1fr; } }
.au-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.au-form__note { margin: 0; color: var(--au-muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.au-form__note i { color: var(--au-success); }
.au-form .au-btn { width: auto; min-width: 200px; }
@media (max-width: 600px) {
    .au-form { padding: 22px 18px 20px; }
    .au-form .au-btn { width: 100%; }
    .au-form__foot { flex-direction: column-reverse; align-items: stretch; }
    .au-form__note { justify-content: center; }
}

/* الخريطة */
.au-map { max-width: 1200px; margin: 0 auto 48px; padding: 0 20px; }
.au-map__head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; font-weight: 800; color: #fff; }
.au-map__head i { color: var(--au-accent); }
.au-map__frame { border-radius: var(--au-radius); overflow: hidden; border: 1px solid var(--au-border); height: 380px; box-shadow: var(--au-shadow); background: #0f131a; }
.au-map__frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(.85); }
@media (max-width: 600px) { .au-map__frame { height: 300px; } .au-map { margin-bottom: 36px; } }
