/* ===== Auth Pages Styles ===== */

:root {
    /* Primary Colors */
    --primary: #00fca8;
    --primary-dark: #00d590;
    --primary-light: #33ffba;
    --secondary: #1cdaff;
    --accent: #7c3aed;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --black: #000000;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--gray-900);
    line-height: 1.6;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.auth-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--gray-900);
    transition: var(--transition-fast);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--gray-600);
    display: block;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Main Content ===== */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin: 0 auto;
}

/* ===== Auth Card ===== */
.auth-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-2xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-card-header p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== Forms ===== */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--white);
    position: relative;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 252, 168, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary);
}

.form-group {
    position: relative;
}

.forgot-link {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-dark);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strength-bar {
    height: 4px;
    width: 0;
    background: var(--gray-200);
    border-radius: 2px;
    transition: all var(--transition-base);
    flex: 1;
    max-width: 100px;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* ===== Buttons ===== */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 252, 168, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 252, 168, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

/* ===== Social Login ===== */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider span {
    background: var(--white);
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--gray-200);
}

.social-login {
    display: grid;
    gap: 1rem;
}

.btn-social {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-social:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.btn-social.google:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.btn-social.apple:hover {
    border-color: #000000;
    color: #000000;
}

/* ===== Auth Footer ===== */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.auth-footer p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--primary-dark);
}

/* ===== Features Sidebar ===== */
.auth-features {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-features h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.feature-item:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0;
}

/* Pricing Note */
.pricing-note {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    color: var(--white);
}

.pricing-note h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.price-item:last-child {
    border-bottom: none;
}

.price-item.recommended {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    position: relative;
}

.price-item .badge {
    background: var(--warning);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.plan-name {
    font-weight: 600;
}

.price {
    font-weight: 800;
    font-size: 1.1rem;
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-danger i {
    color: #dc2626;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-success i {
    color: #059669;
}

/* ===== Footer Main ===== */
.auth-footer-main {
    background: var(--gray-900);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--gray-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin: 0;
}

.footer-badges {
    display: flex;
    gap: 1rem;
}

.footer-badges img {
    height: 32px;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.footer-badges img:hover {
    opacity: 1;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .auth-features {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding: 2rem 1rem;
    }
    
    .auth-card {
        border-radius: 16px;
        padding: 1.5rem;
    }
    
    .auth-card-header h2 {
        font-size: 1.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ===== Loading State ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== Print Styles ===== */
@media print {
    .auth-header,
    .auth-footer-main,
    .auth-features,
    .social-login {
        display: none !important;
    }
}