/* ===================================
   WANDACONNECT LOGIN PAGE STYLES
   Following Main Design System
   =================================== */

/* ===================================
   BACKGROUND ELEMENTS
   =================================== */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    animation: meshFloat 20s ease-in-out infinite;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    opacity: 0.1;
    animation: elementFloat 15s ease-in-out infinite;
}

.element-1 {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.element-2 {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    top: 70%;
    right: 10%;
    animation-delay: -5s;
}

.element-3 {
    width: 60px;
    height: 60px;
    background: var(--gradient-warning);
    border-radius: var(--radius-lg);
    bottom: 20%;
    left: 15%;
    animation-delay: -10s;
    transform: rotate(45deg);
}

.element-4 {
    width: 100px;
    height: 100px;
    background: var(--gradient-success);
    border-radius: var(--radius-xl);
    top: 40%;
    right: 20%;
    animation-delay: -7s;
}

/* ===================================
   MAIN LOGIN SECTION
   =================================== */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-6);
    background: var(--gradient-mesh-bg);
}

.login-container {
    width: 100%;
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-3xl);
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-2xl);
}

/* ===================================
   WELCOME PANEL
   =================================== */
.welcome-panel {
    padding: var(--space-12) var(--space-8);
    background: var(--gradient-primary);
    color: var(--neutral-0);
    position: relative;
    overflow: hidden;
}

.welcome-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/patterns/cameroon-pattern.svg') no-repeat center;
    background-size: cover;
    opacity: 0.1;
    z-index: 1;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

/* Hero Section */
.welcome-hero {
    margin-bottom: var(--space-10);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(10px);
}

.cameroon-flag {
    display: flex;
    align-items: center;
    gap: 1px;
    width: 20px;
    height: 14px;
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.flag-green, .flag-red, .flag-yellow {
    height: 100%;
    flex: 1;
}

.flag-green { background: #007A5E; }
.flag-red { background: #CE1126; }
.flag-yellow { background: #FCD116; }

.welcome-title {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
}

.gradient-text {
    background: linear-gradient(135deg, #FCD116, #FFFFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-description {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    opacity: 0.9;
    margin-bottom: var(--space-8);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}

.feature-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.feature-content p {
    font-size: var(--text-xs);
    opacity: 0.8;
}

/* Success Stats */
.success-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-10);
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-secondary);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-xs);
    opacity: 0.8;
    font-weight: var(--font-medium);
}

/* Testimonial */
.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    backdrop-filter: blur(10px);
}

.testimonial-content {
    position: relative;
}

.quote-mark {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: var(--text-2xl);
    opacity: 0.3;
}

.testimonial-content blockquote {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    display: block;
    margin-bottom: var(--space-1);
}

.author-role {
    font-size: var(--text-xs);
    opacity: 0.8;
}

/* ===================================
   LOGIN PANEL
   =================================== */
.login-panel {
    padding: var(--space-12) var(--space-8);
}

.login-form-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.form-title {
    font-family: var(--font-secondary);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--neutral-900);
    margin-bottom: var(--space-2);
}

.form-subtitle {
    font-size: var(--text-base);
    color: var(--neutral-600);
}

/* Social Login */
.social-login-section {
    margin-bottom: var(--space-6);
}

.social-login-title {
    text-align: center;
    margin-bottom: var(--space-4);
}

.social-login-title span {
    font-size: var(--text-sm);
    color: var(--neutral-600);
    font-weight: var(--font-medium);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    background: var(--neutral-0);
    color: var(--neutral-700);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.social-btn:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.social-btn:active {
    transform: translateY(0);
}

.social-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-btn:hover {
    border-color: #4285F4;
    background: rgba(66, 133, 244, 0.05);
}

.facebook-btn:hover {
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.05);
}

/* Form Divider */
.form-divider {
    position: relative;
    text-align: center;
    margin: var(--space-6) 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--neutral-200);
}

.form-divider span {
    background: var(--neutral-0);
    padding: 0 var(--space-4);
    font-size: var(--text-sm);
    color: var(--neutral-500);
    position: relative;
    z-index: 1;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--neutral-700);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.required-asterisk {
    color: var(--error-500);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--space-4);
    color: var(--neutral-400);
    font-size: var(--text-lg);
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-12);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    color: var(--neutral-900);
    background: var(--neutral-0);
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input.error {
    border-color: var(--error-500);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
    border-color: var(--success-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.password-toggle {
    position: absolute;
    right: var(--space-4);
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    font-size: var(--text-lg);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    z-index: 1;
}

.password-toggle:hover {
    color: var(--neutral-600);
    background: var(--neutral-100);
}

.input-validation {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-lg);
    z-index: 1;
}

.input-validation.success {
    color: var(--success-500);
}

.input-validation.error {
    color: var(--error-500);
}

.error-message {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--error-600);
    margin-top: var(--space-1);
}

.error-message i {
    font-size: var(--text-base);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: var(--space-4) 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--neutral-700);
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    background: var(--neutral-0);
}

.checkbox-custom i {
    font-size: var(--text-sm);
    color: var(--neutral-0);
    opacity: 0;
    transition: all var(--transition-fast);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom i {
    opacity: 1;
}

.forgot-link {
    font-size: var(--text-sm);
    color: var(--primary-600);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: all var(--transition-normal);
}

.forgot-link:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: var(--space-4);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--neutral-0);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    margin: var(--space-2) 0;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: all var(--transition-normal);
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--neutral-0);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--neutral-500);
    margin-top: var(--space-4);
}

.security-badge i {
    color: var(--success-500);
}

/* Form Footer */
.form-footer {
    margin-top: var(--space-8);
    text-align: center;
}

.signup-prompt {
    font-size: var(--text-sm);
    color: var(--neutral-600);
    margin-bottom: var(--space-6);
}

.signup-link {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: var(--font-semibold);
    transition: all var(--transition-normal);
}

.signup-link:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* Support Links */
.support-links {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.support-link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--neutral-500);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.support-link:hover {
    color: var(--primary-600);
}

/* ===================================
   LOADING OVERLAY
   =================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: var(--neutral-0);
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-400);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: var(--accent-400);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: var(--warning-400);
    animation-duration: 2s;
}

.loading-content h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-2);
}

.loading-content p {
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    min-width: 300px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.success {
    border-left-color: var(--success-500);
}

.toast.error {
    border-left-color: var(--error-500);
}

.toast.warning {
    border-left-color: var(--warning-500);
}

.toast.info {
    border-left-color: var(--primary-500);
}

.toast-icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success-500);
}

.toast.error .toast-icon {
    color: var(--error-500);
}

.toast.warning .toast-icon {
    color: var(--warning-500);
}

.toast.info .toast-icon {
    color: var(--primary-500);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--neutral-600);
    line-height: var(--leading-relaxed);
}

.toast-close {
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    font-size: var(--text-lg);
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--neutral-600);
    background: var(--neutral-100);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes meshFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes elementFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .welcome-panel {
        order: 2;
        padding: var(--space-8) var(--space-6);
    }
    
    .login-panel {
        order: 1;
        padding: var(--space-8) var(--space-6);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .success-stats {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

@media (max-width: 768px) {
    .login-section {
        padding: var(--space-4);
    }
    
    .login-container {
        border-radius: var(--radius-2xl);
    }
    
    .welcome-panel,
    .login-panel {
        padding: var(--space-6) var(--space-4);
    }
    
    .welcome-title {
        font-size: var(--text-2xl);
    }
    
    .form-title {
        font-size: var(--text-2xl);
    }
    
    .support-links {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .toast-container {
        top: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
    
    .social-buttons {
        gap: var(--space-2);
    }
    
    .social-btn {
        padding: var(--space-3);
        font-size: var(--text-sm);
    }
    
    .element {
        display: none;
    }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .gradient-mesh,
    .element,
    .spinner,
    .spinner-ring {
        animation: none;
    }
}

.form-input:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.submit-btn:focus-visible {
    outline: 2px solid var(--primary-300);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-container {
        border: 2px solid var(--neutral-900);
    }
    
    .form-input {
        border-width: 2px;
    }
    
    .submit-btn {
        border: 2px solid var(--neutral-0);
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .login-container {
        background: rgba(17, 24, 39, 0.95);
        border-color: rgba(55, 65, 81, 0.3);
    }
    
    .login-panel {
        background: var(--neutral-800);
    }
    
    .form-title {
        color: var(--neutral-100);
    }
    
    .form-subtitle {
        color: var(--neutral-300);
    }
    
    .form-input {
        background: var(--neutral-700);
        border-color: var(--neutral-600);
        color: var(--neutral-100);
    }
    
    .form-label {
        color: var(--neutral-200);
    }
}

