/*
   ADWE 2026 — AUTH PAGES
   Split-Screen Design · Landing Page Background · Glassmorphism Form
*/

/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
    --auth-primary:       #ff3344;
    --auth-primary-light: #ff6677;
    --auth-bg:            #0d0d0f;
    --auth-surface:       rgba(18, 18, 20, 0.82);
    --auth-text:          #ffffff;
    --auth-text-muted:    #9ca3af;
    --auth-input-bg:      rgba(255, 255, 255, 0.04);
    --auth-border:        rgba(255, 51, 68, 0.18);
    --auth-radius:        20px;
}

/* ─────────────────────────────────────────
   BASE RESET
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─────────────────────────────────────────
   BODY — نفس خلفية اللاندينغ
───────────────────────────────────────── */
body.auth-body {
    background-color: var(--auth-bg);
    background-image: url('/assets/img/bg-home-pxwall.png');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: var(--auth-text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
    animation: auth-bg-pan 25s ease-in-out infinite alternate;
}

@keyframes auth-bg-pan {
    0%   { background-size: 100% 100%; background-position: center center; filter: brightness(0.85); }
    50%  { background-size: 110% 110%; background-position: 48% 52%;      filter: brightness(0.9) contrast(1.04); }
    100% { background-size: 105% 105%; background-position: 52% 48%;      filter: brightness(0.80); }
}

/* ─────────────────────────────────────────
   HIDE OLD BLOB ENGINE (لا نحتاجه مع صورة الخلفية)
───────────────────────────────────────── */
.auth-bg-engine { display: none; }

/* ─────────────────────────────────────────
   SPLIT-SCREEN WRAPPER
───────────────────────────────────────── */
.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ─────────────────────────────────────────
   LEFT PANEL — الهوية البصرية
───────────────────────────────────────── */
.auth-side-art {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 70px;
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(255, 51, 68, 0.06) 100%
    );
    border-right: 1px solid rgba(255, 51, 68, 0.12);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* خط أحمر جانبي في اليسار */
.auth-side-art::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; bottom: 15%;
    width: 3px;
    background: linear-gradient(180deg, transparent, #ff3344 40%, #ff6677 60%, transparent);
    border-radius: 0 4px 4px 0;
}

.auth-side-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 60px;
    text-decoration: none;
}

.auth-side-brand-icon {
    width: 44px;
    height: 44px;
    background: var(--auth-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 8px 24px rgba(255, 51, 68, 0.35);
}

.auth-side-brand-name {
    font-weight: 900;
    font-size: 1.8rem;
    color: #fff;
    letter-spacing: -1.5px;
}

.auth-side-headline {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.auth-side-headline span {
    background: linear-gradient(90deg, #ff3344, #ff8899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-side-sub {
    color: var(--auth-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 50px;
}

/* ستاتس صغيرة في الجانب */
.auth-side-stats {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 51, 68, 0.12);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.auth-stat-row:hover {
    background: rgba(255, 51, 68, 0.06);
    border-color: rgba(255, 51, 68, 0.25);
    transform: translateX(6px);
}

.auth-stat-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 51, 68, 0.1);
    border: 1px solid rgba(255, 51, 68, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.auth-stat-info .auth-stat-val {
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    display: block;
}

.auth-stat-info .auth-stat-lbl {
    font-size: 0.72rem;
    color: var(--auth-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ─────────────────────────────────────────
   RIGHT PANEL — الفورم (Glassmorphism)
───────────────────────────────────────── */
.auth-main {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
    background: rgba(10, 10, 12, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 51, 68, 0.12);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* خط أحمر في أعلى الفورم */
.auth-main::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff3344 50%, transparent);
    border-radius: 0 0 4px 4px;
}

.auth-main::-webkit-scrollbar { width: 4px; }
.auth-main::-webkit-scrollbar-thumb { background: rgba(255,51,68,0.3); border-radius: 10px; }

/* للوجو داخل فورم اللوجن (centered) */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 40px;
    justify-content: center;
}

/* ─────────────────────────────────────────
   CENTERED LAYOUT (صفحة Login فقط)
───────────────────────────────────────── */
.auth-wrapper.centered {
    align-items: center;
    justify-content: center;
}

.auth-wrapper.centered .auth-main {
    width: 100%;
    max-width: 460px;
    min-height: auto;
    border-radius: var(--auth-radius);
    border: 1px solid rgba(255, 51, 68, 0.18);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(255, 51, 68, 0.06);
    margin: 40px 20px;
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
.auth-title {
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.auth-title span {
    background: linear-gradient(90deg, #ff3344, #ff8899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.88rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ─────────────────────────────────────────
   FORM ELEMENTS
───────────────────────────────────────── */
.form-group-lux { margin-bottom: 16px; }

.label-lux {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--auth-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.input-lux {
    width: 100%;
    background: var(--auth-input-bg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 13px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    appearance: none;
}

.input-lux::placeholder { color: rgba(255,255,255,0.2); }

.input-lux:focus {
    border-color: var(--auth-primary);
    background: rgba(255, 51, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 51, 68, 0.12);
    outline: none;
}

select.input-lux {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff6677'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 45px;
    cursor: pointer;
}

select.input-lux option { background: #1a1a1e; color: #fff; }

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

/* ─────────────────────────────────────────
   BUTTON
───────────────────────────────────────── */
.btn-lux {
    width: 100%;
    padding: 15px;
    background: var(--auth-primary);
    border: 1px solid var(--auth-primary);
    border-radius: 50px;
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-lux::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-lux:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 51, 68, 0.4);
}

.btn-lux:hover::before { left: 100%; }

/* ─────────────────────────────────────────
   TRUST FEATURES (داخل السايد الأيسر للـ Register)
───────────────────────────────────────── */
.trust-feature {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.02);
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.trust-feature:hover {
    background: rgba(255, 51, 68, 0.05);
    border-color: rgba(255, 51, 68, 0.18);
    transform: translateX(8px);
}

.trust-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(255, 51, 68, 0.25);
}

/* ─────────────────────────────────────────
   SELECT2 FIX
───────────────────────────────────────── */
.select2-container { width: 100% !important; }

/* ─────────────────────────────────────────
   ENTRANCE ANIMATION
───────────────────────────────────────── */
.reveal-up {
    animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes reveal-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
    .auth-side-art { padding: 60px 50px; }
    .auth-main { width: 420px; padding: 50px 40px; }
}

@media (max-width: 860px) {
    .auth-side-art { display: none; }
    .auth-main {
        width: 100%;
        border-left: none;
        border-radius: 0;
        min-height: 100vh;
    }
    .auth-wrapper.centered .auth-main {
        border-radius: var(--auth-radius);
        min-height: auto;
    }
}

@media (max-width: 500px) {
    .field-grid { grid-template-columns: 1fr; }
    .auth-main { padding: 40px 24px; }
    .auth-wrapper.centered .auth-main {
        border-radius: 0;
        border: none;
        margin: 0;
    }
    body.auth-body { align-items: flex-start; }
}
