/* ==========================================================================
   aemz Tech — Modern Unified Authentication Suite (Login & Register)
   Premium SaaS & Fintech Glassmorphism Aesthetic
   ========================================================================== */

:root {
    /* Brand Color Tokens */
    --auth-bg-gradient: radial-gradient(circle at 50% 0%, #172554 0%, #0b1329 45%, #030712 100%);
    --auth-card-bg: rgba(15, 23, 42, 0.84);
    --auth-card-border: rgba(255, 255, 255, 0.08);
    --auth-card-border-glow: rgba(59, 130, 246, 0.25);
    --auth-card-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px -5px rgba(37, 99, 235, 0.15);
    
    --auth-accent: #38bdf8;
    --auth-accent-gradient: linear-gradient(135deg, #0284c7 0%, #003473 100%);
    --auth-accent-glow: rgba(56, 189, 248, 0.25);
    
    --auth-text-main: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-text-subtle: #64748b;
    
    --auth-input-bg: rgba(15, 23, 42, 0.65);
    --auth-input-border: rgba(148, 163, 184, 0.22);
    --auth-input-border-focus: #38bdf8;
    --auth-input-focus-glow: rgba(56, 189, 248, 0.22);
    --auth-input-text: #ffffff;
    
    --auth-badge-bg: rgba(56, 189, 248, 0.12);
    --auth-badge-border: rgba(56, 189, 248, 0.28);
    --auth-badge-text: #7dd3fc;
    
    --auth-btn-bg: linear-gradient(135deg, #0284c7 0%, #003473 100%);
    --auth-btn-hover: linear-gradient(135deg, #0369a1 0%, #00224d 100%);
    --auth-btn-shadow: 0 12px 30px -5px rgba(2, 132, 199, 0.45);
}

* {
    box-sizing: border-box;
}

body.auth-modern-body {
    background: var(--auth-bg-gradient) !important;
    min-height: 100vh;
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-text-main);
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 32px 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ambient Background Glowing Spheres */
.auth-ambient-sphere {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
    opacity: 0.6;
    animation: ambientFloat 14s ease-in-out infinite alternate;
}

.auth-ambient-sphere-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.22) 0%, transparent 70%);
    top: -100px;
    right: 10%;
}

.auth-ambient-sphere-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    bottom: -120px;
    left: 8%;
    animation-delay: -7s;
}

@keyframes ambientFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(30px, 40px) scale(1.08);
    }
}

/* Main Container Card */
.auth-modern-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 28px;
    box-shadow: var(--auth-card-shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%;
    padding: 42px 38px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.auth-modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), transparent);
}

.auth-card-login {
    max-width: 480px;
}

.auth-card-register {
    max-width: 640px;
}

@media (max-width: 576px) {
    body.auth-modern-body {
        padding: 16px 12px;
    }
    .auth-modern-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    .auth-card-register {
        padding: 24px 18px;
    }
}

/* Header & Brand */
.auth-brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-link {
    display: inline-block;
    transition: transform 0.25s ease;
    margin-bottom: 16px;
}

.auth-logo-link:hover {
    transform: scale(1.03);
}

.auth-brand-logo {
    max-height: 95px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.auth-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--auth-badge-bg);
    border: 1px solid var(--auth-badge-border);
    color: var(--auth-badge-text);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}

.auth-badge-pill i {
    font-size: 1rem;
    color: var(--auth-accent);
}

.auth-page-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--auth-text-main);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.auth-page-subtitle {
    font-size: 0.92rem;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Form Groups & Inputs */
.auth-form-group {
    margin-bottom: 18px;
    text-align: start;
}

.auth-input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.87rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 7px;
}

.auth-input-label i {
    color: var(--auth-accent);
    font-size: 0.95rem;
}

.auth-input-wrapper {
    position: relative;
}

.auth-form-control {
    width: 100%;
    height: 48px;
    background: var(--auth-input-bg) !important;
    border: 1.5px solid var(--auth-input-border) !important;
    border-radius: 12px !important;
    color: var(--auth-input-text) !important;
    font-size: 0.94rem;
    padding: 10px 16px;
    transition: all 0.25s ease;
    outline: none !important;
}

.auth-form-control::placeholder {
    color: var(--auth-text-subtle);
    opacity: 0.75;
}

.auth-form-control:focus {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: var(--auth-input-border-focus) !important;
    box-shadow: 0 0 0 4px var(--auth-input-focus-glow) !important;
}

/* Password Toggle Icon */
[dir="rtl"] .auth-form-control.has-toggle {
    padding-left: 44px;
    padding-right: 16px;
}

[dir="ltr"] .auth-form-control.has-toggle {
    padding-right: 44px;
    padding-left: 16px;
}

.auth-toggle-password-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: var(--auth-text-muted);
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: color 0.2s ease, transform 0.15s ease;
    z-index: 5;
}

[dir="rtl"] .auth-toggle-password-btn {
    left: 4px;
    right: auto;
}

[dir="ltr"] .auth-toggle-password-btn {
    right: 4px;
    left: auto;
}

.auth-toggle-password-btn:hover {
    color: var(--auth-text-main);
    transform: translateY(-50%) scale(1.1);
}

/* Remember Me Checkbox */
.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 0.88rem;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--auth-text-muted);
    font-weight: 500;
}

.auth-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0284c7;
    cursor: pointer;
    border-radius: 4px;
}

/* Submit CTA Button */
.btn-auth-primary {
    height: 50px;
    background: var(--auth-btn-bg) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    box-shadow: var(--auth-btn-shadow);
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.btn-auth-primary:hover {
    background: var(--auth-btn-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -5px rgba(2, 132, 199, 0.55);
    filter: brightness(1.06);
}

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

.btn-auth-primary i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

[dir="rtl"] .btn-auth-primary i {
    transform: scaleX(-1);
}

.btn-auth-primary:hover i {
    transform: translateX(4px);
}

[dir="rtl"] .btn-auth-primary:hover i {
    transform: scaleX(-1) translateX(4px);
}

/* Footer Navigation Links */
.auth-footer-links {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
    font-size: 0.88rem;
}

.auth-switch-link {
    color: var(--auth-accent);
    font-weight: 700;
    text-decoration: none !important;
    margin-inline-start: 6px;
    transition: all 0.2s ease;
}

.auth-switch-link:hover {
    color: #7dd3fc;
    text-decoration: underline !important;
}

.auth-super-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-text-subtle);
    font-size: 0.82rem;
    text-decoration: none !important;
    margin-top: 14px;
    transition: color 0.2s ease;
}

.auth-super-link:hover {
    color: var(--auth-text-muted);
}
