@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 580px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.auth-container.signup {
    max-width: 1200px;
    min-height: 680px;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-container.signup .auth-left {
    flex: 0 0 42%;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: moveBackground 20s linear infinite;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.auth-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-logo {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.brand-logo i {
    font-size: 2.5rem;
    margin-right: 12px;
    vertical-align: middle;
}

.brand-tagline {
    font-size: 1.15rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 320px;
}

.feature-list {
    list-style: none;
    text-align: left;
    margin-top: 32px;
    padding: 0;
}

.feature-list li {
    padding: 14px 0;
    font-size: 0.95rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.feature-list li i {
    margin-right: 14px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-right {
    flex: 1;
    padding: 50px 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-container.signup .auth-right {
    max-height: 100%;
    overflow-y: auto;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-container.signup .auth-header {
    margin-bottom: 28px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.alert i {
    margin-right: 14px;
    font-size: 1.2rem;
    margin-top: 2px;
}

.alert strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-danger i {
    color: #ef4444;
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-left: 4px solid #22c55e;
}

.alert-success i {
    color: #22c55e;
}

.form-group {
    margin-bottom: 22px;
}

.auth-container.signup .form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-label .optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.8rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: #1f2937;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control:focus + .input-icon,
.form-control:focus ~ .input-icon {
    color: #667eea;
}

.form-control.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-control::placeholder {
    color: #9ca3af;
}

.invalid-feedback {
    display: block;
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 6px;
    margin-left: 4px;
    font-weight: 500;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 4px;
}

.remember-me label {
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.forgot-link {
    font-size: 0.9rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
}

.btn-auth {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    letter-spacing: 0.3px;
}

.auth-container.signup .btn-auth {
    margin-top: 10px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.social-divider {
    margin: 28px 0 24px;
    text-align: center;
    position: relative;
}

.social-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.social-divider span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    font-size: 0.85rem;
    color: #6b7280;
    z-index: 1;
    font-weight: 500;
}

.social-buttons {
    display: flex;
    gap: 14px;
}

.btn-social {
    flex: 1;
    padding: 13px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #4b5563;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
    background: #f9fafb;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-footer-link {
    margin-top: 28px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.auth-container.signup .auth-footer-link {
    margin-top: 24px;
}

.auth-footer-link p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.auth-footer-link a {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-footer-link a:hover {
    color: #764ba2;
}

.password-strength {
    margin-top: 10px;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    width: 0%;
    border-radius: 3px;
}

.password-strength-bar.weak {
    width: 33%;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.password-strength-bar.medium {
    width: 66%;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.password-strength-bar.strong {
    width: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
}

.password-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 8px;
    padding-left: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 992px) {
    .auth-container,
    .auth-container.signup {
        flex-direction: column;
    }

    .auth-left,
    .auth-container.signup .auth-left {
        padding: 40px 30px;
        min-height: 280px;
        flex: none;
    }

    .brand-logo {
        font-size: 2.25rem;
    }

    .feature-list {
        margin-top: 20px;
    }

    .auth-right {
        padding: 40px 30px;
    }

    .auth-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .auth-left {
        padding: 30px 20px;
    }

    .auth-right {
        padding: 30px 20px;
    }

    .brand-logo {
        font-size: 1.85rem;
    }

    .brand-tagline {
        font-size: 1rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}

