/*
=================================================================
 Login & Registration Page Styles
=================================================================
*/

/* ===== 1. BASE & RESET STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    color: #374151;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

        /* Performance optimizations */
        img, svg {
            display: block;
            max-width: 100%;
            height: auto;
        }

        a { 
            text-decoration: none; 
            color: inherit;
        }

/* ===== 2. ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

        .page-loaded .cs-right-panel > * {
            animation: fadeIn 0.3s ease-out forwards;
        }
        
        .page-loaded .cs-brand-logo-container {
            animation-delay: 0s;
        }
        
        .page-loaded .cs-login-title, 
        .page-loaded .cs-login-description {
            animation-delay: 0.1s;
        }
        
        .page-loaded form {
            animation-delay: 0.2s;
        }
        
        .page-loaded .cs-social-links,
        .page-loaded .cs-form-footer {
            animation-delay: 0.3s;
        }

/* ===== 3. LAYOUT ===== */
        .cs-page-container {
            display: grid;
            grid-template-columns: 1fr;
            width: 100%;
            min-height: 100vh;
        }

        .cs-left-panel, .cs-right-panel {
            padding: 25px 5%;
            display: flex;
            background-color: #fff;
            flex-direction: column;
        }
        
        /* Hide left panel on mobile by default */
        .cs-left-panel {
            display: none;
        }

/* ===== 4. LEFT PANEL CONTENT ===== */
        .cs-service-title {
            font-size: 22px;
            font-weight: 700;
            color: #17a2b8;
            margin-bottom: 1px;
            margin-top: 40px;
        }
        
        .cs-service-tagline {
            color: #6c757d;
            margin-bottom: 30px;
            font-size: 16px;
        }
        
        .cs-section-heading {
            font-size: 18px;
            color: #6c757d;
            margin-bottom: 15px;
            font-weight: 500;
        }
        
        .cs-section-text {
            color: #6c757d;
            margin-bottom: 1rem;
            font-size: 15px;
            line-height: 1.6;
        }
        
        .cs-create-account-btn {
            background-color: #17a2b8;
            color: #fff;
            border: none;
            border-radius: 50px;
            padding: 8px 20px;
            font-size: 14px;
            cursor: pointer;
            margin-top: 20px;
            font-weight: 500;
            display: inline-block;
            align-self: flex-start;
        }

/* ===== 5. RIGHT PANEL CONTENT (FORM AREA) ===== */
        .cs-brand-logo-container {
            text-align: center;
            margin-bottom: 15px;
            margin-top: 5px;
            display: flex;
            justify-content: center;
        }
        
        .cs-brand-logo {
            width: 70px;
            height: 70px;
            background-color: #17a2b8;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 25px;
            font-weight: bold;
        }

        .cs-login-title {
            font-size: 24px;
            font-weight: bold;
            color: #17a2b8;
            margin-bottom: 3px;
            margin-top: 15px;
        }

        .cs-login-description {
            color: #666;
            margin-bottom: 20px;
            font-size: 15px;
        }

/* ===== 6. FORM ELEMENTS ===== */
        .cs-form-group {
            margin-bottom: 15px;
        }

        /* This wrapper is specific to login/reg forms to contain the icon and input */
        .cs-input-wrapper {
            position: relative;
            display: flex;
            align-items: center; /* Vertically center items */
        }

        .cs-form-input {
            width: 100%;
            padding: 12px 12px 12px 44px; /* Standard padding with left space for icon */
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            outline: none;
            font-size: 16px;
            background-color: #fff !important;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .input-focused .cs-form-input {
            border-color: #17a2b8;
            box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.2);
        }

        .cs-input-icon {
            position: absolute;
            left: 1rem; /* 16px */
            color: #6c757d;
            pointer-events: none; /* Make icon non-interactive */
            font-size: 16px;
            z-index: 2; /* Ensure icon is above the input background */
        } 

        .cs-form-hint {
            color: #6c757d;
            font-size: 13px;
            margin-top: 4px;
            display: block; /* Ensure it takes its own line */
        }

/* ===== 7. FORM OPTIONS & VALIDATION ===== */
        .cs-error-message {
            color: #f44336;
            font-size: 14px;
            margin-top: 5px;
            display: none;
            align-items: center;
        }

        .cs-error-message i {
            margin-right: 5px;
        }

        .cs-form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

        .cs-checkbox-wrapper {
            display: flex;
            align-items: center;
            margin-bottom: 5px;
        }

        .cs-checkbox-wrapper input {
            margin-right: 8px;
            cursor: pointer;
        }

        .cs-checkbox-wrapper span {
            font-size: 14px;
            color: #666;
        }

        .cs-forgot-password {
            color: #666;
            font-size: 14px;
        }

/* ===== 8. BUTTONS ===== */
        .cs-button-row {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
            margin-bottom: 15px;
        }

        .cs-btn {
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            cursor: pointer;
            color: #fff;
            font-weight: bold;
            transition: background-color 0.2s, transform 0.1s;
            position: relative;
            overflow: hidden;
        }
        
        .cs-btn:active {
            transform: scale(0.98);
        }
        
        .cs-btn::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5px;
            height: 5px;
            background: rgba(255, 255, 255, 0.5);
            opacity: 0;
            border-radius: 100%;
            transform: scale(1, 1) translate(-50%);
            transform-origin: 50% 50%;
        }
        
        .cs-btn:focus:not(:active)::after {
            animation: ripple 0.6s ease-out;
        }
        
        @keyframes ripple {
            0% {
                transform: scale(0, 0);
                opacity: 0.5;
            }
            20% {
                transform: scale(25, 25);
                opacity: 0.3;
            }
            100% {
                opacity: 0;
                transform: scale(40, 40);
            }
        }

        .cs-btn-primary {
            background-color: #17a2b8;
        }

        .cs-btn-primary:hover {
            background-color: #138496;
        }

/* ===== 9. SOCIAL & FOOTER LINKS ===== */
        .cs-social-links {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 15px;
        }

        .cs-social-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            background-color: #f9f9f9;
            border: 1px solid #e0e0e0;
            transition: all 0.3s ease;
        }

        .cs-social-icon:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            border-color: #ccc;
        }

        .cs-icon-youtube { color: #FF0000; }
        .cs-icon-google { color: #4285F4; }
        .cs-icon-facebook { color: #1877F2; }

        .cs-form-footer {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            font-size: 14px;
            color: #666;
            margin-top: 10px;
            width: 100%;
            gap: 20px; /* Add space between links */
        }
        .cs-form-footer a {
            color: #17a2b8;
        }

/* ===== 10. VALIDATION STATES ===== */
        .cs-form-input.cs-border-error {
            border: 1px solid #f44336;
        }

        .cs-form-input.cs-border-success {
            border: 1px solid #17a2b8;
        }

        .cs-show-error .cs-error-message {
            display: flex;
        }

/* ===== 12. SUCCESS PAGE STYLES ===== */
.cs-success-container {
    animation: fadeIn 0.5s ease-out;
    justify-content: center;
    text-align: center;
}
.cs-success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981, #15803d);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    margin-bottom: 25px;
    animation: popIn 0.5s ease-out 0.2s backwards;
}
@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.cs-success-description {
    max-width: 350px; margin-left: auto; margin-right: auto;
}

/*
=================================================================
 Mobile-Specific Enhancements (for better visual appeal)
=================================================================
*/
@media screen and (max-width: 480px) {
    .cs-right-panel {
        padding: 25px 20px; /* Increased side padding for a better look */
    }

    .cs-brand-logo {
        width: 80px; /* Made the logo slightly larger */
        height: 80px;
        font-size: 28px;
    }

    .cs-login-title {
        font-size: 28px; /* Larger title for more impact */
        margin-top: 20px;
    }

    .cs-login-description {
        font-size: 16px; /* Slightly larger description text */
        margin-bottom: 30px;
    }

    .cs-form-input {
        padding-top: 14px; /* Made input fields taller */
        padding-bottom: 14px;
        font-size: 16px; /* Ensured font size is readable */
    }
    
    .cs-otp-input {
        width: 45px; /* Adjusted OTP input size for better touch experience */
        height: 58px;
        font-size: 24px;
    }

    .cs-btn {
        padding: 14px; /* Made buttons taller */
        font-size: 16px;
    }
}

/* ===== 11. RESPONSIVE & PRINT STYLES ===== */
        @media screen and (min-width: 768px) {
            .cs-page-container {
                grid-template-columns: 1fr 1px 1fr;
                height: 100vh;
            }
            
            .cs-vertical-divider {
                background-color: #ddd;
                height: 50%;
                width: 1px;
                margin: auto;
                display: block;
            }
            
            .cs-left-panel, .cs-right-panel {
                padding: 30px 40px;
                height: 100%;
                overflow-y: auto;
            }
            
            /* Show left panel on tablet and desktop */
            .cs-left-panel {
                display: flex;
            }
            
            .cs-button-row {
                grid-template-columns: 1fr 1fr;
                gap: 15px;
            }
            
            .cs-brand-logo-container {
                margin-top: 70px;
                margin-bottom: 25px;
            }
            
            .cs-brand-logo {
                width: 80px;
                height: 80px;
                font-size: 30px;
            }
            
            .cs-service-title {
                font-size: 24px;
                margin-top: 120px;
            }
        }
        
        @media screen and (min-width: 992px) {
            .cs-left-panel {
                padding: 40px 80px;
            }
            
            .cs-right-panel {
                padding: 40px 120px;
            }
            
            .cs-service-title {
                font-size: 26px;
                margin-top: 150px;
            }
        }
        
        @media print {
            body {
                background-color: #fff;
            }
            
            .cs-page-container {
                display: block;
            }
            
            .cs-left-panel {
                display: none;
            }
            
            .cs-vertical-divider {
                display: none;
            }
            
            .cs-right-panel {
                padding: 20px;
            }
            
            .cs-button-row, .cs-social-links {
                display: none;
            }
        }

/* ===== 12. OTP STYLES ===== */
        .cs-otp-container {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 25px;
            margin-top: 10px;
        }

        .cs-otp-input {
            width: 48px;
            height: 55px;
            text-align: center;
            font-size: 22px;
            font-weight: 700;
            color: #374151;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .cs-otp-input:focus {
            border-color: #17a2b8;
            box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.2);
        }