/* ============================================
   AUTH PAGES - MODERN DESIGN SYSTEM
   ============================================ */

:root {
    --primary: #3B82F6;
    --primary-dark: #1F2937;
    --secondary: #6366F1;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --light: #F9FAFB;
    --dark: #111827;
    --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;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: var(--gray-800);
    line-height: 1.6;
}

/* ============================================
   AUTH WRAPPER
   ============================================ */

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: #fff;
    overflow: hidden;
}

/* Left Section */
.auth-left {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -40%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    filter: blur(40px);
}

/* Brand Section */
.brand-section {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: translateY(-2px);
}

.brand-logo i {
    font-size: 1.75rem;
}

.brand-name {
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

/* Benefits Section */
.benefits-section {
    position: relative;
    z-index: 2;
    flex: 1;
    margin: 60px 0;
}

.benefits-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.3;
}

.benefit-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    animation: slideInLeft 0.6s ease backwards;
}

.benefit-item:nth-child(2) {
    animation-delay: 0.1s;
}

.benefit-item:nth-child(3) {
    animation-delay: 0.2s;
}

.benefit-item:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.benefit-content h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.benefit-content p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

/* Testimonial */
.testimonial-mini {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 25px;
}

.stars {
    display: flex;
    gap: 4px;
    color: #FCD34D;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.testimonial-text {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
}

.testimonial-author {
    font-size: 0.8rem;
    opacity: 0.85;
    margin: 0;
}

/* Right Section */
.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 450px;
}

/* Form Header */
.form-header {
    margin-bottom: 40px;
}

.form-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--gray-900);
    line-height: 1.2;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    margin: 0;
}

/* OAuth Buttons */
.btn-oauth {
    border: 2px solid var(--gray-200);
    background: #fff;
    color: var(--gray-800);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-oauth:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-oauth i {
    font-size: 1.25rem;
}

.btn-google:hover {
    color: #EA4335;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* Form Groups */
.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.form-label::after {
    content: ' *';
    color: var(--danger);
}

/* Input Group */
.input-group-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--gray-400);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

.form-control {
    padding-left: 45px !important;
    border: 2px solid var(--gray-200) !important;
    border-radius: 12px !important;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--gray-50);
    color: var(--gray-900);
}

.form-control:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-text {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 6px;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 2;
    padding: 0;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Password Strength */
.password-strength {
    display: flex;
    gap: 10px;
    align-items: center;
}

.strength-meter {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: var(--danger);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--danger);
    min-width: 50px;
    text-align: right;
}

/* Form Check */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    margin-top: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-700);
    cursor: pointer;
    margin: 0;
    line-height: 1.5;
}

.form-check-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3);
}

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

.btn-text {
    display: inline-block;
}

/* Free Tier Banner */
.free-tier-banner {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.free-tier-banner i {
    font-size: 1.25rem;
    color: var(--success);
    flex-shrink: 0;
}

.free-tier-banner strong {
    display: block;
    margin-bottom: 2px;
}

.free-tier-banner p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.form-footer p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.login-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Alert */
.alert {
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #B91C1C;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-danger i {
    font-size: 1.1rem;
}

.btn-close {
    width: 20px;
    height: 20px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        min-height: 100vh;
        padding: 30px 20px;
    }

    .auth-form-wrapper {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .form-title {
        font-size: 1.5rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .benefit-item {
        margin-bottom: 20px;
    }

    .btn-oauth {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .auth-right {
        padding: 20px 16px;
    }

    .form-header {
        margin-bottom: 30px;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .free-tier-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .free-tier-banner strong {
        margin-bottom: 0;
    }
}

/* Add these styles to your existing auth.css */

.benefits-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Stats Card */
.stats-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 20px;
}

/* Forgot Link */
.forgot-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.forgot-link:hover {
    color: var(--primary-dark);
}

/* Security Notice */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-600);
    font-size: 0.8rem;
    padding: 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.security-notice i {
    color: var(--success);
    font-size: 0.9rem;
}

/* Back Link */
.back-link a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.back-link a:hover {
    transform: translateX(-4px);
}

/* Steps Container */
.steps-container {
    margin: 20px 0;
}

.step-item {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.step-item p {
    margin: 0;
    color: var(--gray-700);
    font-size: 0.95rem;
    padding-top: 4px;
}

/* Resend Container */
.resend-container {
    text-align: center;
}

/* Signup Link */
.signup-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Form validation states */
.form-control.is-invalid {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.form-control.is-valid {
    border-color: var(--success);
}

/* Loading state for button */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .stats-card {
        padding: 16px;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-divider {
        height: 40px;
        margin: 0 12px;
    }

    .step-item {
        margin-bottom: 12px;
    }
}