/**
 * العنقاء - Login / Auth page
 * Split-screen professional theme (art panel + form)
 */

:root {
    --gs-primary: #6366f1;
    --gs-secondary: #8b5cf6;
    --gs-accent: #ec4899;
    --gs-cyan: #22d3ee;
    --gs-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
    --gs-bg: #0b0f22;
    --gs-bg-soft: #10152e;
    --gs-field: #161c38;
    --gs-text: #e9ecf8;
    --gs-text-muted: #98a0c8;
    --gs-border: rgba(130, 138, 190, 0.20);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body.auth-body {
    font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
    background: var(--gs-bg);
    color: var(--gs-text);
    -webkit-font-smoothing: antialiased;
}

.auth-wrap {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   ART PANEL
   ============================================================ */
.auth-art {
    flex: 1 1 46%;
    position: relative;
    background: #05070f center/cover no-repeat;
    background-image: url('../assets/images/login/phoenix-hero.webp');
    overflow: hidden;
    isolation: isolate;
}

.auth-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(5, 7, 15, 0.10) 0%,
        rgba(5, 7, 15, 0.45) 55%,
        rgba(11, 15, 34, 0.96) 100%);
    z-index: 1;
}

.auth-art-content {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 3.5rem;
    z-index: 2;
}

.auth-art-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--gs-cyan);
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid rgba(34, 211, 238, 0.30);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.auth-art-brand {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 3.25rem;
    line-height: 1.05;
    margin: 0;
    background: linear-gradient(120deg, #ffffff 0%, #c7b6ff 55%, #ff9ecb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 40px rgba(139, 92, 246, 0.35);
}

.auth-art-tagline {
    color: #d3d9f5;
    font-size: 1.1rem;
    line-height: 1.9;
    margin: 1rem 0 1.75rem;
    max-width: 30rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.auth-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auth-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #e6e9f8;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
}

.auth-feature i { color: var(--gs-cyan); }

/* ============================================================
   FORM PANEL
   ============================================================ */
.auth-form-side {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    position: relative;
    background:
        radial-gradient(1200px circle at 85% 0%, rgba(99, 102, 241, 0.12), transparent 45%),
        radial-gradient(900px circle at 0% 100%, rgba(236, 72, 153, 0.10), transparent 45%),
        var(--gs-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-brandline {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.25rem;
}

/* Bare white logo (no frame), with a soft glow */
.auth-logo {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.45));
}

.auth-logo-text {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 1.55rem;
    letter-spacing: -0.5px;
    line-height: 1;
    background: var(--gs-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
}

.auth-sub {
    color: var(--gs-text-muted);
    font-size: 0.95rem;
    margin: 0 0 2rem;
}

/* Fields */
.auth-group { margin-bottom: 1.25rem; }

.auth-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gs-text-muted);
    margin-bottom: 0.5rem;
}

.auth-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gs-field);
    border: 1px solid var(--gs-border);
    border-radius: 12px;
    padding: 0 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-field:focus-within {
    background: #0e1330;
    border-color: var(--gs-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.auth-field .field-icon {
    color: var(--gs-text-muted);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.auth-field input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--gs-text);
    font-size: 1rem;
    padding: 0.85rem 0.4rem;
    font-family: inherit;
}

.auth-field input::placeholder { color: #666e96; }
.auth-field input[dir="ltr"] { text-align: right; }

.auth-toggle {
    background: none;
    border: none;
    color: var(--gs-text-muted);
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    border-radius: 8px;
    transition: color 0.2s;
}
.auth-toggle:hover { color: var(--gs-primary); }

/* Alert */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.40);
    color: #fca5a5;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Button */
.btn-auth {
    width: 100%;
    background: var(--gs-gradient);
    background-size: 160% 160%;
    border: none;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.3px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.35);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-position 0.4s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow: 0 14px 34px rgba(139, 92, 246, 0.5);
}

.btn-auth:active:not(:disabled) { transform: translateY(0); }

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-foot {
    color: var(--gs-text-muted);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 2.25rem;
}

.d-none { display: none !important; }

/* Minimal spinner (self-contained, no Bootstrap dependency) */
.spinner-border {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: -0.15em;
    border: 0.18em solid currentColor;
    border-inline-start-color: transparent;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}
.spinner-border-sm { width: 0.95rem; height: 0.95rem; border-width: 0.15em; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.btn-spinner { display: inline-flex; align-items: center; gap: 0.5rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .auth-wrap { flex-direction: column; }
    .auth-art {
        flex: 0 0 210px;
        min-height: 210px;
    }
    .auth-art-content { padding: 1.75rem; }
    .auth-art-kicker { margin-bottom: 0.75rem; }
    .auth-art-brand { font-size: 2.1rem; }
    .auth-art-tagline {
        font-size: 0.95rem;
        margin: 0.5rem 0 0;
        line-height: 1.7;
    }
    .auth-features { display: none; }
    .auth-form-side { flex: 1 1 auto; padding: 2.25rem 1.35rem; }
}

@media (max-width: 480px) {
    .auth-art { flex-basis: 165px; min-height: 165px; }
    .auth-art-brand { font-size: 1.8rem; }
    .auth-title { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-logo { animation: none; }
    .btn-auth { transition: none; }
}
