/* PJICO — Đăng nhập / Đăng ký (Figma WE6gKxBzgE6jVl5PeymY9a) */

/* Modal đăng nhập nổi trên trang (Figma pop-up 420×496) */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 125px 16px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay[hidden] {
    display: none !important;
}

.auth-modal-overlay.is-open[hidden] {
    display: flex !important;
}

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 24, 57, 0.55);
    backdrop-filter: blur(2px);
    z-index: 0;
}

.auth-modal-panel {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 100%;
    max-width: 420px;
    animation: authModalSlideIn 0.28s ease;
}

/* Pop-up đăng nhập/đăng ký — theo design PJICO */
.auth-login-popup {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    padding: 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(1, 18, 34, 0.12);
    overflow: hidden;
}

.auth-login-popup__header {
    position: relative;
    flex-shrink: 0;
    padding: 24px 56px 0 24px;
}

.auth-login-popup__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: -0.44px;
    color: #061839;
}

.auth-login-popup__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    background: #f0f2f5;
    color: #6b788e;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-login-popup__close:hover {
    background: #e8eaed;
    color: #061839;
}

.auth-login-popup__content {
    padding: 20px 24px 24px;
}

.auth-login-popup__form {
    display: flex;
    flex-direction: column;
}

.auth-login-popup .auth-input {
    border-radius: 10px;
    padding: 12px 16px;
}

.auth-field--compact {
    margin-bottom: 20px;
}

.auth-field--compact .auth-label {
    margin-bottom: 4px;
}

.auth-login-popup__forgot {
    margin: -12px 0 20px;
    text-align: right;
}

.auth-login-popup__forgot-link {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #2cb5d2;
    text-decoration: none;
}

.auth-login-popup__forgot-link:hover {
    text-decoration: underline;
}

.auth-login-popup__submit {
    margin-bottom: 20px;
}

.auth-login-popup__social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-login-popup__social-label {
    font-size: 14px;
    line-height: 20px;
    color: #6b788e;
    white-space: nowrap;
}

.auth-login-popup__social-icons {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.auth-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #dee5ef;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.auth-social-icon:hover {
    border-color: #c5ced9;
    box-shadow: 0 2px 8px rgba(6, 24, 57, 0.08);
}

.auth-social-icon--google svg {
    display: block;
    width: 22px;
    height: 22px;
}

.auth-social-icon--facebook {
    border-color: #1877f2;
    background: #1877f2;
    color: #fff;
}

.auth-social-icon--facebook i {
    font-size: 20px;
    line-height: 1;
}

.auth-social-icon--facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
}

.auth-login-popup__footer-line {
    border: 0;
    border-top: 1px solid #dee5ef;
    margin: 0 0 16px;
}

.auth-login-popup__register {
    margin: 0;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    color: #6b788e;
}

.auth-login-popup__register a {
    color: #2cb5d2;
    font-weight: 500;
    text-decoration: underline;
}

.auth-login-popup__register a:hover {
    color: #24a3be;
}

@keyframes authModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.auth-modal-open {
    overflow: hidden;
}

.auth-shell {
    min-height: calc(100vh - 108px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 56px;
    background: #f7f8f9;
    position: relative;
}

.auth-shell--modal {
    background-color: #e8eaed;
    background-image: url('../image/banner/banner_bh.png');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

.auth-shell--modal::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(6, 24, 57, 0.55);
    z-index: 0;
}

.auth-shell--modal .auth-card {
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    background: #fff;
    box-shadow: 0 8px 32px rgba(1, 18, 34, 0.12);
}

.auth-card--login {
    max-width: 420px;
    border-radius: 16px;
    padding: 24px;
}

.auth-card--register {
    max-width: 600px;
    border-radius: 20px;
    padding: 24px 24px 40px;
    margin: 0 auto;
}

/* Trang đăng ký — Figma 7503:192325 */
.auth-register-container {
    max-width: 1296px;
}

.auth-register-card {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(1, 18, 34, 0.12);
}

.auth-register-card__subtitle {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.27px;
    color: #061839;
}

.auth-register-card__divider {
    border: 0;
    border-top: 1px solid #dee5ef;
    margin: 0 0 24px;
}

.auth-register-card__divider--form {
    margin-top: 0;
    margin-bottom: 24px;
}

.auth-register-card .auth-input {
    border-radius: 10px;
    padding: 12px 16px;
}

.auth-register-card__form .auth-field--compact {
    margin-bottom: 24px;
}

.auth-field--row-register {
    gap: 24px;
    margin-bottom: 24px;
}

.auth-field--row-register > .auth-field {
    flex: 1 1 calc(50% - 12px);
    min-width: 0;
    margin-bottom: 0;
}

.auth-checkbox--register {
    margin-bottom: 24px;
}

.auth-checkbox--register label a {
    color: #2cb5d2;
    text-decoration: none;
}

.auth-checkbox--register label a:hover {
    text-decoration: underline;
}

.auth-register-card__actions {
    display: flex;
    justify-content: flex-end;
}

.auth-btn-primary--register {
    width: 200px;
    max-width: 100%;
}

.auth-register-card__login {
    margin: 24px 0 0;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    color: #6b788e;
}

.auth-register-card__login a {
    color: #2cb5d2;
    font-weight: 500;
    text-decoration: underline;
}

.auth-register-card__login a:hover {
    color: #24a3be;
}

.auth-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-card__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: -0.44px;
    color: #061839;
}

.auth-card__subtitle {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.27px;
    color: #000;
}

.auth-card__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -10px -10px 0 0;
    border: none;
    background: transparent;
    color: #6b788e;
    font-size: 20px;
    text-decoration: none;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-card__close:hover {
    background: #f7f8f9;
    color: #061839;
}

.auth-page-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
    letter-spacing: -0.64px;
    color: #061839;
    margin: 0 0 32px;
}

.auth-register-wrap {
    background: #f7f8f9;
    padding: 32px 16px 48px;
    min-height: calc(100vh - 108px);
}

.auth-field {
    margin-bottom: 24px;
}

.auth-field--row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.auth-field--row > .auth-field {
    flex: 1 1 calc(50% - 12px);
    min-width: 200px;
    margin-bottom: 0;
}

.auth-label {
    display: block;
    font-size: 14px;
    line-height: 20px;
    color: #091e42;
    margin-bottom: 4px;
}

.auth-label .required {
    color: #f04438;
}

.auth-input,
.auth-select {
    width: 100%;
    border: 1px solid #dee5ef;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 16px;
    line-height: 24px;
    color: #061839;
    background: #fff;
}

.auth-input::placeholder {
    color: #a6aebb;
}

.auth-input:focus,
.auth-select:focus {
    outline: none;
    border-color: #2cb5d2;
    box-shadow: 0 0 0 2px rgba(44, 181, 210, 0.15);
}

.auth-input.is-invalid {
    border-color: #f04438;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-input {
    padding-right: 44px;
}

.auth-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6b788e;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.auth-toggle-pw:hover {
    color: #061839;
}

.auth-divider {
    border: 0;
    border-top: 1px solid #dee5ef;
    margin: 24px 0;
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    margin: 0;
    flex-shrink: 0;
    border: 1px solid #dee5ef;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.auth-checkbox input[type="checkbox"]:checked {
    background-color: #2cb5d2;
    border-color: #2cb5d2;
}

.auth-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-checkbox input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 181, 210, 0.35);
}

.auth-checkbox label {
    font-size: 14px;
    line-height: 20px;
    color: #061839;
    margin: 0;
}

.auth-checkbox label a {
    color: #2e90fa;
    text-decoration: none;
}

.auth-checkbox label a:hover {
    text-decoration: underline;
}

.auth-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: #2cb5d2;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.auth-btn-primary:hover {
    background: #24a3be;
}

.auth-form-actions {
    display: flex;
    justify-content: flex-end;
}

.auth-form-actions .auth-btn-primary {
    width: 200px;
}

.auth-hint {
    margin: 8px 0 0;
    padding-left: 1.25rem;
    font-size: 12px;
    line-height: 18px;
    color: #6b788e;
}

.auth-hint li {
    margin-bottom: 4px;
}

.auth-footer-links {
    margin-top: 24px;
    font-size: 14px;
    line-height: 20px;
    color: #6b788e;
}

.auth-footer-links p {
    margin: 0 0 8px;
}

.auth-footer-links a {
    color: #2e90fa;
    font-weight: 500;
    text-decoration: none;
}

.auth-footer-links a:hover {
    text-decoration: underline;
}

.auth-alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-alert--success {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.auth-alert--error {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.auth-invalid {
    display: block;
    font-size: 12px;
    color: #f04438;
    margin-top: 4px;
}

@media (max-width: 575px) {
    .auth-modal-overlay {
        align-items: center;
        padding: 16px;
    }

    .auth-login-popup {
        min-height: auto;
        max-height: calc(100vh - 32px);
    }

    .auth-field--row > .auth-field,
    .auth-field--row-register > .auth-field {
        flex: 1 1 100%;
    }

    .auth-form-actions .auth-btn-primary,
    .auth-btn-primary--register {
        width: 100%;
    }

    .auth-register-card__actions {
        justify-content: stretch;
    }

    .auth-page-title {
        font-size: 26px;
        line-height: 34px;
        margin-bottom: 24px;
    }
}
