/* ============================================================
   AUTH ISOLATED STYLES — prefix: alx-
   Scoped under #alx-wrap to override Bootstrap/RTL conflicts
   ============================================================ */

/* ── RESET SCOPE ── */
#alx-wrap,
#alx-wrap *,
#alx-wrap *::before,
#alx-wrap *::after {
    box-sizing: border-box !important;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif !important;
}

/* Reset Bootstrap interference */
#alx-wrap .alx-field { all: unset; }
#alx-wrap a { text-decoration: none !important; }
#alx-wrap h1 { margin: 0 !important; padding: 0 !important; border: none !important; }

/* ── PAGE WRAPPER ── */
#alx-wrap {
    min-height: 100vh !important;
    display: flex !important;
    align-items: stretch !important;
    background: #f0f4ff !important;
    overflow: hidden !important;
    position: relative !important;
    direction: rtl !important;
}

/* ── FLOATING ANNOUNCEMENT ── */
.alx-badge {
    position: absolute !important;
    top: 2rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 30 !important;
    width: max-content !important;
    max-width: 92vw !important;
    background: rgba(17, 35, 9, 0.28) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    border-radius: 50px !important;
    padding: 0.55rem 1.4rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    color: #fff !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 24px rgba(79,70,229,0.18) !important;
    animation: alx-floatIn 0.7s cubic-bezier(.22,1,.36,1) both !important;
}

.alx-badge-dot {
    width: 8px !important;
    height: 8px !important;
    background: #34d399 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    animation: alx-pulse 2s infinite !important;
    display: inline-block !important;
}

/* ── VISUAL PANEL (image side) ── */
.alx-visual {
    flex: 1 !important;
    position: relative !important;
    min-height: 500px !important;
    background-size: cover !important;
    background-position: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 2.5rem !important;
    border-radius: 20px;
}

.alx-visual::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(135deg,rgba(4, 151, 21, 0.65) 0%,rgba(21, 80, 16, 0.88) 100%) !important;
    z-index: 1 !important;
    border-radius: 20px;
}

/* login: image LEFT | register: image RIGHT — set via modifier class */
#alx-wrap.alx-login  .alx-visual  { order: 1 !important; }
#alx-wrap.alx-login  .alx-form    { order: 2 !important; box-shadow: -8px 0 48px rgba(79,70,229,0.08) !important; }
#alx-wrap.alx-register .alx-visual { order: 2 !important; }
#alx-wrap.alx-register .alx-form  { order: 1 !important; box-shadow:  8px 0 48px rgba(79,70,229,0.08) !important; }

/* ── GLASS FEATURE CARDS ── */
.alx-cards {
    position: relative !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
}

.alx-card {
    background: rgba(255,255,255,0.14) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255,255,255,0.28) !important;
    border-radius: 16px !important;
    padding: 1rem 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    color: #fff !important;
    transition: transform 0.25s, background 0.25s !important;
    animation: alx-slideUp 0.6s cubic-bezier(.22,1,.36,1) both !important;
}

.alx-card:nth-child(1) { animation-delay: 0.1s !important; }
.alx-card:nth-child(2) { animation-delay: 0.22s !important; }

.alx-card:hover {
    transform: translateY(-3px) !important;
    background: rgba(255,255,255,0.22) !important;
}

.alx-card-ico {
    width: 42px !important;
    height: 42px !important;
    background: rgba(255,255,255,0.2) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
}

.alx-card-title {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin: 0 0 0.15rem !important;
    display: block !important;
}

.alx-card-desc {
    font-size: 0.76rem !important;
    color: rgba(255,255,255,0.82) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    display: block !important;
}

.alx-brand-tag {
    position: relative !important;
    z-index: 10 !important;
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.78rem !important;
    margin-bottom: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.alx-brand-tag span {
    display: inline-block !important;
    width: 24px !important;
    height: 2px !important;
    background: rgba(255,255,255,0.5) !important;
    border-radius: 2px !important;
}

/* ── FORM PANEL ── */
.alx-form {
    width: 480px !important;
    min-width: 340px !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 3rem !important;
    position: relative !important;
    overflow-y: auto !important;
    max-height: 100vh !important;
    animation: alx-slideInR 0.55s cubic-bezier(.22,1,.36,1) both !important;
}

#alx-wrap.alx-register .alx-form {
    animation-name: alx-slideInL !important;
}

.alx-logo {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #4f46e5, #10b981) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: 1.8rem !important;
    display: inline-block !important;
}

.alx-heading {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 0.35rem !important;
    line-height: 1.2 !important;
}

.alx-subheading {
    color: #64748b !important;
    font-size: 0.9rem !important;
    margin: 0 0 1.8rem !important;
}

/* ── ALERTS ── */
.alx-alerts .alert,
.alx-alerts .alert-danger,
.alx-alerts .alert-success,
.alx-alerts .alert-warning {
    border-radius: 12px !important;
    font-size: 0.87rem !important;
    padding: 0.7rem 1rem !important;
    border: none !important;
    margin-bottom: 0.8rem !important;
}
.alx-alerts .alert-danger  { background: #fef2f2 !important; color: #b91c1c !important; }
.alx-alerts .alert-success { background: #f0fdf4 !important; color: #15803d !important; }
.alx-alerts .alert-warning { background: #fffbeb !important; color: #92400e !important; }

/* ── INPUT GROUP ── */
.alx-field-wrap {
    position: relative !important;
    margin-bottom: 1.1rem !important;
}

.alx-label {
    display: block !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.4rem !important;
    text-align: right;

}

.alx-ico {
    position: absolute !important;
    right: 0.85rem !important;
    top: 50% !important;
    transform: translateY(calc(-50% + 12px)) !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    display: flex !important;
    align-items: center !important;
}

.alx-ico svg { width: 17px !important; height: 17px !important; }

.alx-input {
    display: block !important;
    width: 100% !important;
    padding: 0.7rem 1rem 0.7rem 2.8rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.92rem !important;
    color: #1a1a2e !important;
    background: #f8fafc !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-align: center;
}

.alx-input:focus {
    border-color: #4f46e5 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1) !important;
}

.alx-input.is-invalid,
.alx-input.alx-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1) !important;
}

.alx-invalid-msg {
    font-size: 0.78rem !important;
    color: #ef4444 !important;
    margin-top: 0.3rem !important;
    display: block !important;
}

/* 2FA special */
.alx-input.alx-otp {
    letter-spacing: 0.4rem !important;
    text-align: center !important;
    font-size: 1.3rem !important;
    padding-left: 1rem !important;
}

/* ── 2FA INFO BOX ── */
.alx-twofa-box {
    background: linear-gradient(135deg, #f0f4ff, #e8f5f0) !important;
    border: 1.5px solid #c7d2fe !important;
    border-radius: 14px !important;
    padding: 1rem 1.2rem !important;
    margin-bottom: 1.3rem !important;
    font-size: 0.84rem !important;
    color: #4338ca !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
}

/* ── CHECKBOX ROW ── */
.alx-check-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-bottom: 1.3rem !important;
}

.alx-check-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    cursor: pointer !important;
    user-select: none !important;
    font-size: 0.82rem !important;
    color: #64748b !important;
}

.alx-check-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    accent-color: #4f46e5 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.alx-terms-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    margin-bottom: 0.6rem !important;
    font-size: 0.78rem !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
}

.alx-terms-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    accent-color: #4f46e5 !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
}

.alx-terms-label a {
    color: #4f46e5 !important;
    text-decoration: none !important;
}

.alx-terms-label a:hover { text-decoration: underline !important; }

.alx-forgot {
    font-size: 0.82rem !important;
    color: #4f46e5 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    display: flex !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
}

.alx-forgot a {
    color: #4f46e5 !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.alx-forgot a:hover { text-decoration: underline !important; }

/* ── PRIMARY BUTTON ── */
.alx-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.82rem 1rem !important;
    background: linear-gradient( 99deg, #6BB611, #65AD0E );
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s !important;
    box-shadow: 0 4px 18px rgba(79,70,229,0.35) !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 1.4 !important;
}

.alx-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(79,70,229,0.45) !important;
    color: #fff !important;
}

.alx-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.alx-btn:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
}

/* ── DIVIDER ── */
.alx-divider {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin: 1.3rem 0 !important;
    color: #94a3b8 !important;
    font-size: 0.78rem !important;
}

.alx-divider::before,
.alx-divider::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: #e2e8f0 !important;
}

/* ── SOCIAL BUTTONS ── */
.alx-social {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    width: 100% !important;
    padding: 0.65rem 1rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #374151 !important;
    font-size: 0.87rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-bottom: 0.6rem !important;
    text-decoration: none !important;
    transition: background 0.18s, border-color 0.18s, transform 0.18s !important;
}

.alx-social:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
    color: #374151 !important;
    text-decoration: none !important;
}

.alx-social img {
    width: 18px !important;
    height: 18px !important;
}

/* ── BOTTOM LINK ── */
.alx-bottom {
    margin-top: 1.8rem !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    color: #64748b !important;
}

.alx-bottom a {
    color: #4f46e5 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.alx-bottom a:hover { text-decoration: underline !important; }

/* ── KEYFRAMES ── */
@keyframes alx-floatIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes alx-pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.4); }
}

@keyframes alx-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes alx-slideInR {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes alx-slideInL {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    #alx-wrap                  { flex-direction: column !important; }
    #alx-wrap .alx-visual      { min-height: 260px !important; order: 1 !important; flex: none !important; }
    #alx-wrap .alx-form        { width: 100% !important; order: 2 !important; padding: 2rem 1.5rem !important; max-height: none !important; box-shadow: none !important; }
    .alx-badge                 { top: 1rem !important; font-size: 0.75rem !important; padding: 0.45rem 1rem !important; }
}

@media (max-width: 480px) {
    #alx-wrap .alx-form        { padding: 1.5rem 1rem !important; }
    #alx-wrap .alx-visual      { min-height: 180px !important; }
    .alx-cards                 { display: none !important; }
    .alx-badge                 { white-space: normal !important; text-align: center !important; }
}
