/* ================= LOGIN PAGE STYLES - SIDE BY SIDE LAYOUT ================= */
/* Clean, no-scroll login page with side-by-side design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden; /* Prevent any scrolling */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    height: 100vh;
    max-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Main Content Container */
.main-content {
    flex: 1;
    display: flex;
    position: relative;
    z-index: 1;
    overflow: hidden;
    min-height: 0; /* Important for flexbox children */
}

/* Login Wrapper - Side by Side Layout */
.login-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0; /* Important for flexbox children */
}

/* Welcome Section - Left Side */
.welcome-section {
    flex: 1;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    max-width: 500px;
    padding: 40px;
}

.welcome-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    line-height: 1.6;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 1.5rem;
    color: #3b82f6;
    width: 30px;
    text-align: center;
}

.feature-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;
}

/* Login Section - Right Side */
.login-section {
    flex: 1;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
    min-height: 0; /* Important for flexbox children */
}

.login-container {
    max-width: 450px;
    width: 100%;
    margin: 0 auto; /* Center horizontally */
    max-height: 100%;
    overflow: hidden;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.login-card h2 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.form-group {
    margin-bottom: 10px;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #3b82f6;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.remember-me label {
    color: #64748b;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    padding: 9px 22px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    color: white;
    width: 100%;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4);
}

.divider {
    position: relative;
    text-align: center;
    margin: 12px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 15px;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 35px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    color: #374151;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: #374151;
}

.btn-google svg,
.btn-google i {
    flex-shrink: 0;
    font-size: 1.1rem;
}

.btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 35px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 2px solid #3b82f6;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    margin-top: 12px;
}

.btn-register:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.btn-register i {
    flex-shrink: 0;
    font-size: 1.1rem;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: none;
    font-weight: 500;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border-left: 4px solid #22c55e;
}

.login-links {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.login-links p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.login-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.register-link {
    font-weight: 600 !important;
    color: #3b82f6 !important;
}

.register-link:hover {
    color: #1d4ed8 !important;
}

/* Top Corner Registration Link */
.top-corner-register {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.register-corner-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(59, 130, 246, 0.9);
    backdrop-filter: blur(15px);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.register-corner-link:hover {
    background: rgba(37, 99, 235, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.register-corner-link i {
    font-size: 1rem;
}

/* Viewport Height Constraint Handling */
@media screen and (max-height: 800px) {
    .login-section {
        padding: 8px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .login-container {
        margin: 0 auto;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .login-card h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
}

@media screen and (max-height: 700px) {
    .login-section {
        padding: 5px;
        align-items: flex-start;
        padding-top: 15px;
    }
    
    .login-container {
        margin: 0 auto;
    }
    
    .login-card {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .login-card h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .btn-primary {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .btn-google {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
}

/* High DPI / Zoom Level Adjustments */
@media screen and (min-resolution: 120dpi) {
    .login-section {
        padding: 10px;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .login-card h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .welcome-content h1 {
        font-size: 2.5rem;
    }
    
    .welcome-content p {
        font-size: 1.1rem;
    }
    
    .welcome-features {
        gap: 15px;
    }
    
    .feature-item {
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .welcome-section {
        flex: 0 0 40%;
        padding: 20px;
    }
    
    .welcome-content {
        padding: 20px;
    }
    
    .welcome-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .welcome-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .welcome-features {
        flex-direction: row;
        gap: 10px;
        margin-top: 25px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 10px;
        gap: 8px;
    }
    
    .feature-item i {
        font-size: 1.2rem;
    }
    
    .feature-item span {
        font-size: 0.9rem;
    }
    
    .login-section {
        flex: 1;
        padding: 20px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-card h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .top-corner-register {
        top: 15px;
        right: 15px;
    }
    
    .register-corner-link {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .welcome-section {
        flex: 0 0 35%;
    }
    
    .welcome-content h1 {
        font-size: 1.8rem;
    }
    
    .welcome-content p {
        font-size: 0.95rem;
    }
    
    .welcome-features {
        gap: 8px;
    }
    
    .feature-item {
        padding: 8px;
    }
    
    .feature-item i {
        font-size: 1rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
    
    .login-section {
        padding: 15px;
    }
    
    .login-card {
        padding: 25px 15px;
    }
    
    .login-card h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 16px 12px 45px;
        font-size: 0.95rem;
    }
    
    .btn-primary {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .btn-google {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .top-corner-register {
        top: 10px;
        right: 10px;
    }
    
    .register-corner-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .register-corner-link span {
        display: none;
    }
}
