/* ============================================================================
   TIẾNG VIỆT HAY - AUTHENTICATION STYLES (ĐĂNG NHẬP / ĐĂNG KÝ)
   ============================================================================ */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px); /* Adjust based on header/footer */
    padding: 40px 20px;
}

.auth-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-header p.welcome-subtitle {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 4px;
}

/* Auth Alert Banners */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert-danger {
    background-color: #ffeef0;
    color: var(--color-error);
    border: 1px solid #fecdd3;
}

.auth-alert-success {
    background-color: #ecfdf5;
    color: var(--color-success);
    border: 1px solid #a7f3d0;
}

.auth-alert-warning {
    background-color: #fffbeb;
    color: var(--color-warning);
    border: 1px solid #fef3c7;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

/* Input with icon wrapper */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon .form-control {
    padding-left: 44px;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-with-icon .form-control:focus + .input-icon,
.input-with-icon .form-control:focus ~ .input-icon {
    color: var(--primary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 146, 205, 0.15);
}

/* For Validation Error Highlights */
.form-control.is-invalid {
    border-color: var(--color-error);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.invalid-feedback {
    display: block;
    color: var(--color-error);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    transition: opacity 0.5s ease, max-height 0.5s ease, margin-top 0.5s ease;
    opacity: 1;
    max-height: 50px;
    overflow: hidden;
}

.invalid-feedback.fading {
    opacity: 0;
    max-height: 0;
    margin-top: 0 !important;
}

/* Checkbox container */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 4px 6px rgba(106, 146, 205, 0.15);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--text-white);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--text-white);
    box-shadow: 0 4px 6px rgba(229, 91, 136, 0.15);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: var(--text-white);
}

/* Footer links inside Auth */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    font-weight: 600;
}

/* Onboarding Choices */
.select-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.select-control:focus {
    border-color: var(--primary-color);
}

/* Password wrapper and toggle eye icon styling */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

/* Handle password wrapper with input icon */
.password-wrapper.input-with-icon .form-control {
    padding-left: 44px;
    padding-right: 48px;
}

.password-wrapper.input-with-icon .input-icon {
    left: 16px;
    z-index: 5;
}

.password-toggle-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
    z-index: 10;
    padding: 4px;
}

.password-toggle-btn:hover {
    color: var(--text-main);
}
