/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: none;
}

:root {
    --primary-color: #FFFFFF;
    --secondary-color: #0A0A0A;
    --text-color: #A7AABB;
    --bg-color: #060606;
    --accent-color: #A93E17;
    --accent-secondary-color: #15399A;
    --divider-color: #FFFFFF0F;
    --dark-divider-color: #FFFFFF33;
    --error-color: rgb(230, 87, 87);
    --default-font: "Manrope", sans-serif;
}

body {
    font-family: var(--default-font);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    height: 100vh;
    overflow: hidden;
}

/* Main Container */
.login-container {
    display: flex;
    height: 100vh;
}

/* Left Side - Login Form */
.login-section {
    flex: 1;
    max-width: 500px;
    background: linear-gradient(145deg, var(--primary-color) 0%, #fafbfc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(6, 6, 6, 0.05);
}

.login-content {
    width: 100%;
    max-width: 400px;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    height: 40px;
    width: auto;
}

/* Welcome Header */
.welcome-header {
    margin-bottom: 32px;
}

.welcome-header h1 {
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2a2a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.welcome-header p {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.5;
    opacity: 0.8;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #404040 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid rgba(167, 170, 187, 0.2);
    border-radius: 8px;
    font-size: 16px;
    color: var(--secondary-color);
    background: linear-gradient(145deg, var(--primary-color) 0%, #fdfdfd 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(6, 6, 6, 0.02);
}

.input-wrapper input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(169, 62, 23, 0.1), 0 4px 16px rgba(169, 62, 23, 0.05);
    background: var(--primary-color);
}

.input-wrapper input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

.input-icon {
    position: absolute;
    left: 16px;
    background: linear-gradient(135deg, var(--text-color) 0%, #9da0b1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    z-index: 1;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.toggle-password:hover {
    color: var(--accent-color);
    opacity: 1;
    transform: scale(1.1);
}

/* Forgot Password */
.forgot-password-link {
    text-align: right;
    margin-bottom: 8px;
}

.forgot-link {
    font-size: 14px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c14920 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-link:hover {
    background: linear-gradient(135deg, var(--accent-secondary-color) 0%, #1a42b5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-1px);
}

/* Sign In Button */
.sign-in-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary-color) 50%, var(--accent-color) 100%);
    background-size: 200% 200%;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 4px 16px rgba(169, 62, 23, 0.2);
    position: relative;
    overflow: hidden;
}

.sign-in-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sign-in-btn:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(169, 62, 23, 0.3), 0 4px 8px rgba(21, 57, 154, 0.15);
}

.sign-in-btn:hover::before {
    left: 100%;
}

.sign-in-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    text-align: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(167, 170, 187, 0.3) 50%, transparent 100%);
}

.divider span {
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    opacity: 0.8;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(167, 170, 187, 0.2);
    border-radius: 8px;
    background: linear-gradient(145deg, var(--primary-color) 0%, #fafbfc 100%);
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(6, 6, 6, 0.02);
}

.social-btn:hover {
    background: linear-gradient(145deg, #f8f9fa 0%, var(--primary-color) 100%);
    border-color: rgba(169, 62, 23, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(6, 6, 6, 0.08);
}

.social-btn i {
    font-size: 16px;
}

.google-btn:hover {
    background: linear-gradient(145deg, #fff3f3 0%, var(--primary-color) 100%);
    color: #ea4335;
    border-color: rgba(234, 67, 53, 0.2);
}

.mobile-btn:hover {
    background: linear-gradient(145deg, #f0f8ff 0%, var(--primary-color) 100%);
    color: var(--accent-color);
    border-color: rgba(169, 62, 23, 0.2);
}

/* Sign Up Link */
.signup-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.signup-link a {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.signup-link a:hover {
    background: linear-gradient(135deg, #c14920 0%, #1a42b5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-1px);
}

/* Right Side - Branding */
.branding-section {
    flex: 1;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary-color) 50%, #d4582a 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.branding-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    opacity: 0.6;
}

.branding-content {
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.branding-content h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Testimonial */
.testimonial {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 48px;
    border: none;
}

.quote-icon {
    font-size: 48px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: Georgia, serif;
    line-height: 1;
    margin-bottom: 16px;
}

.testimonial p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.author-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Trusted By Section */
.trusted-by {
    text-align: center;
}

.trusted-header {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.company-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    opacity: 0.7;
}

.company-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.company-logo:hover {
    opacity: 1;
}

.company-logo i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
}

.company-logo span {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .branding-content h2 {
        font-size: 32px;
    }
    
    .company-logos {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .branding-section {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
    
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .branding-section {
        display: none;
    }
    
    .login-section {
        max-width: 100%;
        padding: 24px;
        order: 1;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .welcome-header {
        margin-bottom: 24px;
    }
    
    .welcome-header h1 {
        font-size: 24px;
    }
    
    .logo-section {
        margin-bottom: 32px;
        justify-content: center;
    }
    
    .logo {
        height: 36px;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding: 20px;
        height: 100vh;
    }
    
    .welcome-header h1 {
        font-size: 22px;
    }
    
    .welcome-header p {
        font-size: 15px;
    }
    
    .input-wrapper input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .logo {
        height: 32px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
    
    .sign-in-btn,
    .social-btn,
    .toggle-password {
        transition: none;
    }
}