﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* 👇 Background with your logo */
    background: url("../Images/Ql.jpeg") no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

    /* 👇 Dark overlay on top of logo */
    body::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7); /* adjust 0.5–0.8 depending on darkness */
        z-index: 0;
    }

/* Make sure your .main stays above the overlay */
.main {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); /* stronger shadow for contrast */
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}



/* Left side - Branding and messaging */
.branding-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

.branding-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.logo-container {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.company-logo img {
    width: 100px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto 1rem;
}


.company-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3498db, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.6;
}

.features {
    list-style: none;
    text-align: left;
    max-width: 280px;
}

.features li {
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    opacity: 0.8;
}

.features li::before {
    content: '✓';
    background: #27ae60;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Right side - Login form */
.login-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #f8f9fa;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input {
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.login-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1e6091 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

/* Footer branding */
.footer-branding {
    position: absolute;
    bottom: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 0.85rem;
    z-index: 10;
}

.footer-branding .qtech-mini {
    background: linear-gradient(135deg, #3498db, #e74c3c);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.75rem;
}

/* Error message styling */
#error-message {
    background: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    display: none;
}

/* Loading state */
.login-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .branding-section {
        padding: 2rem;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .company-name {
        font-size: 2rem;
    }
    
    .login-section {
        padding: 2rem;
    }
    
    .footer-branding {
        position: static;
        justify-content: center;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .main {
        border-radius: 15px;
    }
    
    .branding-section,
    .login-section {
        padding: 1.5rem;
    }
}