/* ========================================
   Auth Pages Styles (Login & Register)
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-purple: #7D66FF;
    --primary-yellow: #E4FF4B;
    /* --primary-purple: #6A6CCE; */
    --primary-purple-light: #D7D6F8;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-600: #666666;
    --gray-700: #4a4a4a;
    --gray-800: #333333;
    --gray-900: #1a1a1a;
    --danger: #ef4444;
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Auth Container
======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header Section
======================================== */

.auth-header {
    background: var(--primary-purple);
    padding: 1rem 1.5rem 3rem;
    position: relative;
}

.status-bar {
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.auth-logo {
    height: 5rem;
    width: auto;
}

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

/* ========================================
   Form Container
======================================== */

.auth-form-container {
    flex: 1;
    background: var(--white);
    border-radius: 2rem 2rem 0 0;
    margin-top: -2rem;
    position: relative;
    z-index: 1;
}

.auth-form-wrapper {
    padding: 2rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* ========================================
   Form Elements
======================================== */

.auth-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.required {
    color: var(--danger);
    margin-left: 0.125rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-control::placeholder {
    color: var(--gray-600);
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-input {
    padding-right: 3rem;
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--gray-600);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.btn-toggle-password:hover {
    color: var(--gray-800);
}

/* ========================================
   Forgot Password
======================================== */

.forgot-password-wrapper {
    text-align: right;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

.forgot-password-link {
    font-size: 0.875rem;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--primary-purple-dark);
    text-decoration: underline;
}

/* ========================================
   Submit Button
======================================== */

.btn-submit {
    width: 100%;
    padding: 1rem;
    /* background: var(--primary-purple); */
    background: var(--primary-yellow);
    color: var(--black);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ========================================
   Switch Form Link
======================================== */

.switch-form {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.switch-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.switch-link:hover {
    color: var(--primary-purple-dark);
    text-decoration: underline;
}

/* ========================================
   Validation States
======================================== */

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--danger);
}

.demo-login {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-demo {
    flex: 1;
    background: #fff;
    border: 2px solid #ccc;
    color: #666;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-demo:hover {
    /* background: #f5f5f5;
    border-color: #999; */
    text-decoration: none;
}


/* ========================================
   Responsive Design
======================================== */

/* Tablet */
@media (min-width: 768px) {
    .auth-header {
        padding: 1.5rem 2rem 4rem;
    }
    
    .logo-container {
        padding: 3rem 0;
    }
    
    .auth-logo {
        height: 5rem;
    }
    
    .logo-text {
        font-size: 3.5rem;
    }
    
    .auth-form-wrapper {
        padding: 3rem 2rem;
    }
    
    .form-title {
        font-size: 2rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .auth-container {
        flex-direction: row;
    }
    
    .auth-header {
        width: 40%;
        min-height: 100vh;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .logo-container {
        padding: 0;
    }
    
    .auth-form-container {
        width: 60%;
        border-radius: 0;
        margin-top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .auth-form-wrapper {
        padding: 3rem;
        width: 100%;
        max-width: 500px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .auth-header {
        width: 45%;
    }
    
    .auth-form-container {
        width: 55%;
    }
    
    .auth-logo {
        height: 6rem;
    }
    
    .logo-text {
        font-size: 4rem;
    }
}