.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 12500;
    display: grid;
    place-items: center;
    padding: 16px;
}

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

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 42, 24, 0.58);
    backdrop-filter: blur(5px);
}

.auth-dialog {
    position: relative;
    width: min(100%, 460px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 24px;
    border: 1px solid #9dd3aa;
    border-radius: 18px;
    background: #f8fff9;
    color: #183b2a;
    box-shadow: 0 28px 70px rgba(12, 72, 35, 0.3);
}

/* Thu nhỏ riêng form lấy lại mật khẩu khẩn cấp 10%. */
#panel-login-modal .auth-dialog {
    transform: scale(0.9);
    transform-origin: center;
}

.auth-heading {
    margin-bottom: 18px;
    text-align: center;
}

.auth-mark {
    display: grid;
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    place-items: center;
    border-radius: 15px;
    background: #dcfce7;
    color: #15803d;
}

.auth-heading h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

.auth-heading p {
    margin: 0;
    color: #5c7866;
    font-size: 0.82rem;
}

.auth-fields {
    display: grid;
    gap: 12px;
}

.auth-field label {
    display: block;
    margin-bottom: 5px;
    color: #245237;
    font-size: 0.82rem;
    font-weight: 750;
}

.auth-field input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #b8d9c0;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #183b2a;
    font: inherit;
}

.auth-field input:focus {
    border-color: #22a653;
    box-shadow: 0 0 0 3px rgba(34, 166, 83, 0.14);
}

.auth-verify {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.auth-verify button {
    min-width: 112px;
    border: 1px solid #86c895;
    border-radius: 10px;
    background: #e5f8e9;
    color: #176b3a;
    font-weight: 750;
    cursor: pointer;
}

.auth-message {
    display: none;
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 0.78rem;
}

.auth-message.show {
    display: block;
}

.auth-message.error {
    background: #fff0f0;
    color: #b42331;
}

.auth-message.success {
    background: #e8f8ed;
    color: #176b3a;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 9px;
    margin-top: 18px;
}

.auth-actions button {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.auth-submit {
    border: 1px solid #15803d;
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #fff;
}

.auth-close {
    border: 1px solid #bed8c4;
    background: #fff;
    color: #315d44;
}

.auth-submit:disabled,
.auth-verify button:disabled {
    cursor: wait;
    opacity: 0.58;
}

@media (max-width: 480px) {
    .auth-dialog {
        padding: 20px 14px;
        border-radius: 15px;
    }

    .auth-verify,
    .auth-actions {
        grid-template-columns: 1fr;
    }

    .auth-verify button {
        min-height: 42px;
    }
}
