/* Smart POS PRO — تسجيل دخول (نمط داكن / زجاجي) */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

.auth-page {
    --auth-gold: #d4af37;
    --auth-gold-light: #f0d060;
    --auth-gold-dark: #a67c00;
    --auth-navy: #050a18;
    --auth-navy-mid: #0c1428;
    --auth-text: #f1f5f9;
    --auth-muted: #94a3b8;
    --auth-glass: rgba(255, 255, 255, 0.045);
    --auth-glass-border: rgba(255, 255, 255, 0.1);
    --auth-input-bg: rgba(0, 0, 0, 0.35);
    --auth-radius: 16px;
    --auth-radius-lg: 22px;
    min-height: 100vh;
    margin: 0;
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    color: var(--auth-text);
    background: var(--auth-navy);
    position: relative;
    overflow-x: hidden;
}

.auth-page * { box-sizing: border-box; }

/* خلفية الخطوط الشعاعية */
.auth-rays {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 100% 80% at 50% 50%, rgba(212, 175, 55, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(76, 110, 245, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #060d1f 0%, #050a18 40%, #030712 100%);
}

.auth-rays::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: repeating-conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg 8deg,
        rgba(255, 255, 255, 0.018) 8deg 9deg
    );
    animation: auth-rays-spin 120s linear infinite;
}

@keyframes auth-rays-spin {
    to { transform: rotate(360deg); }
}

/* شريط علوي */
.auth-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.auth-lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--auth-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.auth-lang-pill:hover {
    color: var(--auth-text);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.08);
}

.auth-lang-pill svg {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

.auth-enterprise-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--auth-gold-light);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.28);
}

.auth-enterprise-badge svg {
    width: 14px;
    height: 14px;
}

/* المنصة الرئيسية */
.auth-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(340px, 420px) 1fr;
    align-items: center;
    gap: 2rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem 3rem;
    min-height: calc(100vh - 70px);
    direction: ltr; /* تثبيت: النموذج يسار، الشعار يمين */
}

/* ——— بطاقة الدخول الزجاجية ——— */
.auth-glass {
    direction: rtl;
    padding: 2rem 1.85rem 1.75rem;
    border-radius: var(--auth-radius-lg);
    background: var(--auth-glass);
    border: 1px solid var(--auth-glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[dir="ltr"] .auth-glass {
    direction: ltr;
}

.auth-glass h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.auth-glass .auth-subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.9rem;
    transform: translateY(-50%);
    color: #64748b;
    display: flex;
    pointer-events: none;
}

.auth-input-icon svg {
    width: 18px;
    height: 18px;
}

.auth-input {
    width: 100%;
    padding: 0.85rem 2.6rem 0.85rem 2.6rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--auth-radius);
    font: inherit;
    font-size: 0.92rem;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input::placeholder {
    color: #64748b;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.auth-toggle-pw {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.75rem;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0.2rem;
    cursor: pointer;
    color: #64748b;
    display: flex;
    line-height: 0;
}

.auth-toggle-pw:hover { color: var(--auth-gold-light); }

.auth-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.95rem 1.25rem;
    border: none;
    border-radius: var(--auth-radius);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1200;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--auth-gold-light) 0%, var(--auth-gold) 45%, var(--auth-gold-dark) 100%);
    box-shadow:
        0 4px 20px rgba(212, 175, 55, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.15s, box-shadow 0.2s;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 8px 28px rgba(212, 175, 55, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-submit svg {
    width: 18px;
    height: 18px;
}

[dir="rtl"] .auth-submit svg {
    transform: scaleX(-1);
}

.auth-forgot {
    display: block;
    text-align: center;
    margin-top: 1.15rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot:hover { color: var(--auth-gold-light); }

.auth-glass-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
}

.auth-glass-footer a {
    color: var(--auth-gold);
    text-decoration: none;
}

/* ——— جانب الشعار ——— */
.auth-showcase {
    direction: rtl;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

[dir="ltr"] .auth-showcase {
    direction: ltr;
}

.auth-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: min(340px, 88vw);
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(212, 175, 55, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-logo-box img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(300px, 80vw);
    max-height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.auth-logo-fallback {
    font-size: 1.85rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.25;
    text-align: center;
}

.auth-logo-fallback span { color: var(--auth-gold-light); }

.auth-tagline {
    margin: 0 0 1.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--auth-muted);
    text-transform: uppercase;
}

.auth-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-pill-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--auth-gold-light);
}

.auth-pill-icon svg {
    width: 15px;
    height: 15px;
}

/* ——— جوال ——— */
@media (max-width: 900px) {
    .auth-stage {
        grid-template-columns: 1fr;
        direction: rtl;
        padding: 0 1.25rem 2rem;
        gap: 1.5rem;
    }

    [dir="ltr"] .auth-stage {
        direction: ltr;
    }

    .auth-showcase { order: -1; }

    .auth-logo-box {
        max-width: 280px;
        padding: 0.9rem 1.15rem;
        margin-bottom: 0.75rem;
    }

    .auth-logo-box img {
        max-width: 240px;
        max-height: 90px;
    }

    .auth-tagline { margin-bottom: 1rem; }

    .auth-pills { gap: 0.5rem; }

    .auth-glass { padding: 1.5rem 1.25rem; }

    .auth-topbar { padding: 1rem 1.25rem; }
}
