/* --- VARIABLES --- */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-main: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    /* Validation Colors */
    --success-border: #10b981;
    --success-bg: #f0fdf4;
    --error-border: #ef4444;
    --error-bg: #fef2f2;
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    overflow-y: scroll;
}

body {
    background-color: var(--bg-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.swal2-shown {
    padding-right: 0 !important;
}

.auth-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
}

/* --- LEFT SIDE: INFO SECTION --- */
.info-section {
    flex: 1.2;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), 
                url('./Cyient.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--white);
}

.info-content {
    max-width: 550px;
}

.info-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.info-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    margin-top: 30px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* --- RIGHT SIDE: AUTH SECTION --- */
.auth-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
}

.header {
    margin-bottom: 32px;
}

.header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* --- INPUT STYLES & WRAPPERS --- */
.auth-card input, 
.auth-card select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
    background-color: #fff;
}

.auth-card input:focus, 
.auth-card select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Container to hold input and icon together */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Make sure text doesn't go under the icons */
.input-wrapper input {
    padding-right: 40px; 
}

/* Live Validation Icons */
.status-icon {
    position: absolute;
    right: 12px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: none; /* Let clicks pass through to input */
}

/* Valid State (Green) */
input.valid {
    border-color: var(--success-border) !important; 
    background-color: var(--success-bg) !important; 
}

/* Invalid State (Red) */
input.invalid {
    border-color: var(--error-border) !important; 
    background-color: var(--error-bg) !important; 
}

/* Password Eye Toggle */
.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #9ca3af; 
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-password:hover {
    color: #4b5563; 
}

/* --- BUTTONS --- */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s ease, background 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* --- FORGOT PASSWORD SPECIFIC STYLES --- */
.forgot-password-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: -12px;
    margin-bottom: 20px;
}

#forgotPassword {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

#forgotPassword:hover {
    color: var(--primary);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.site-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid #f1f5f9;
    background-color: var(--white);
    width: 100%;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .info-section {
        flex: none;
        width: 100%;
        padding: 80px 40px;
        text-align: center;
    }

    .info-content {
        margin: 0 auto;
    }

    .auth-section {
        padding: 50px 20px;
        background: var(--bg-main);
    }

    .auth-card {
        background: var(--white);
        padding: 40px;
        border-radius: 24px;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    }
}

@media (max-width: 480px) {
    .info-section {
        padding: 60px 20px;
    }

    .info-content h1 {
        font-size: 2.2rem;
    }

    .auth-card {
        padding: 30px 20px;
    }
}