/*=====================================================================
  [1] Authentication System - Professional Arabic UI
=====================================================================*/

/* Base Auth Page Styles */
.auth-page {
    font-family: 'Cairo', sans-serif !important;
    background: linear-gradient(135deg, var(--c-background) 0%, #1a1f3a 100%) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem 1rem !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Background Effects */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Main Container */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Auth Card */
.auth-card {
    background: var(--c-surface);
    border-radius: 20px;
    border: 1px solid var(--c-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-logo img {
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text span:first-child {
    color: var(--c-primary);
    font-weight: 800;
    font-size: 1.5rem;
}

.logo-text span:last-child {
    color: var(--c-text-main);
    font-weight: 600;
    font-size: 1.2rem;
}

.auth-header h1 {
    color: var(--c-text-main);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    color: var(--c-text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    color: var(--c-text-main);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-background);
    color: var(--c-text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group input::placeholder {
    color: var(--c-text-secondary);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--c-text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-group input:focus + .input-icon {
    color: var(--c-primary);
}

.toggle-password {
    position: absolute;
    left: auto;
    right: 1rem;
    background: none;
    border: none;
    color: var(--c-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--c-primary);
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--c-text-main);
    font-size: 0.9rem;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--c-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--c-primary);
    border-color: var(--c-primary);
}

.checkbox-label input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.forgot-password {
    color: var(--c-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--c-primary-dark);
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    display: none;
}

.btn-loader-hidden {
    display: none;
}

.auth-btn.loading .btn-text {
    opacity: 0;
}

.auth-btn.loading .btn-loader {
    display: block;
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: var(--c-text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--c-border);
}

.auth-divider span {
    background: var(--c-surface);
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.social-btn.google {
    border-color: #ea4335;
    color: #ea4335;
}

.social-btn.google:hover {
    background: #ea4335;
    color: white;
}

.social-btn.facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.social-btn.facebook:hover {
    background: #1877f2;
    color: white;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
}

.auth-footer p {
    color: var(--c-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.auth-link {
    color: var(--c-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--c-primary-dark);
}

/* Side Illustration */
.auth-illustration {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--c-text-main);
}

.illustration-content {
    text-align: center;
    max-width: 400px;
}

.floating-elements {
    position: relative;
    height: 200px;
    margin-bottom: 2rem;
}

.float-element {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
}

.float-element:nth-child(1) {
    top: 20px;
    left: 20%;
    animation-delay: 0s;
}

.float-element:nth-child(2) {
    top: 60px;
    right: 30%;
    animation-delay: 2s;
}

.float-element:nth-child(3) {
    bottom: 20px;
    left: 40%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.auth-illustration h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.auth-illustration p {
    color: var(--c-text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.features-list {
    list-style: none;
    padding: 0;
    text-align: right;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--c-text-main);
    font-size: 1rem;
}

.features-list i {
    color: var(--c-primary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .auth-illustration {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .social-login {
        gap: 0.75rem;
    }
    
    .social-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
