/* Hộp đăng nhập dùng chung cho các shell không nạp style.css. */
body.ahust-login-modal-open {
    overflow: hidden;
}

.ahust-login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--scrim-color, rgba(0, 0, 0, 0.56));
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.ahust-login-modal-overlay.is-open {
    opacity: 1;
}

.ahust-login-modal {
    position: relative;
    width: min(100%, 480px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    border: 1px solid var(--border-color, var(--tl-outline-soft, #e5e7eb));
    border-radius: 16px;
    background: var(--bg-card, var(--tl-surface-lowest, #ffffff));
    color: var(--text-main, var(--tl-text, #111827));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    text-align: center;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
}

.ahust-login-modal-overlay.is-open .ahust-login-modal {
    transform: translateY(0) scale(1);
}

.ahust-login-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-sub, var(--tl-muted, #6b7280));
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: 0.18s ease;
}

.ahust-login-modal__close:hover,
.ahust-login-modal__close:focus-visible {
    background: var(--bg-body, var(--tl-bg, #f9fafb));
    color: var(--text-main, var(--tl-text, #111827));
    outline: none;
}

.ahust-login-modal__icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(15, 48, 71, 0.08);
    color: var(--secondary-color, var(--tl-secondary-text, #0f3047));
}

.ahust-login-modal__icon svg {
    width: 42px;
    height: 42px;
    fill: currentColor;
}

.ahust-login-modal h2 {
    margin: 0 0 24px;
    color: var(--text-main, var(--tl-text, #111827));
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
}

.ahust-login-modal__actions {
    width: 100%;
    display: grid;
    gap: 14px;
}

.ahust-login-provider {
    min-height: 56px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 18px;
    border: 1px solid var(--border-color, var(--tl-outline-soft, #e5e7eb));
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-main, var(--tl-text, #111827));
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.18s ease;
}

.ahust-login-provider:hover,
.ahust-login-provider:focus-visible {
    border-color: rgba(198, 58, 50, 0.5);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.ahust-login-provider__icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.ahust-login-modal__note {
    max-width: 360px;
    margin: 24px 0 0;
    color: var(--text-sub, var(--tl-muted, #6b7280));
    font-size: 14px;
    line-height: 1.6;
}

body.dark-mode .ahust-login-provider {
    background: var(--bg-control);
}

@media (max-width: 520px) {
    .ahust-login-modal {
        padding: 28px 20px 24px;
    }

    .ahust-login-modal__icon {
        width: 68px;
        height: 68px;
    }

    .ahust-login-modal h2 {
        padding: 0 36px;
        font-size: 21px;
        line-height: 1.4;
    }
}
