/* Enterprise Professional Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
    --shadow-lg: 0 20px 60px rgba(99, 102, 241, 0.18);
    --radius: 14px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --bg-page: #f0f2ff;
    --card-border: rgba(99, 102, 241, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

/* Login page gets the gradient background */
body.login-page {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Left Side */
.login-left {
    background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 60%, #a855f7 100%);
    color: var(--white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.login-left::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.login-left::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.brand-section {
    margin-bottom: 40px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.features-list {
    margin: 40px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
}

.feature-item i {
    color: var(--secondary);
    font-size: 20px;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.6;
}

.testimonial-author strong {
    display: block;
    margin-bottom: 4px;
}

.testimonial-author span {
    font-size: 14px;
    opacity: 0.8;
}

/* Right Side */
.login-right {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-container {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}

.form-header {
    margin-bottom: 32px;
    text-align: center;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-header p {
    color: var(--gray);
    font-size: 15px;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--secondary);
}

/* Forms */
.auth-form {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary);
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary);
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--secondary);
    width: 0%;
    transition: var(--transition);
}

.password-strength.weak::after { width: 33%; background: var(--danger); }
.password-strength.medium::after { width: 66%; background: var(--warning); }
.password-strength.strong::after { width: 100%; background: var(--secondary); }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-social {
    background: var(--white);
    border: 2px solid #e2e8f0;
    color: var(--dark);
    flex: 1;
}

.btn-social:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.form-footer {
    text-align: center;
    margin: 24px 0;
}

.form-footer p {
    color: var(--gray);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.form-footer a:hover {
    color: var(--primary-dark);
}

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: var(--white);
    padding: 0 16px;
    color: var(--gray);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.social-login {
    display: flex;
    gap: 12px;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 13px;
}

.badge i {
    color: var(--secondary);
}

/* Responsive */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-left {
        display: none;
    }
    
    .login-right {
        padding: 40px 24px;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .security-badges {
        flex-direction: column;
        gap: 12px;
    }
}

/* Loading Animation */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
