/**
 * AddUserModal — overlay e painel (equivalente visual a overlay escuro + blur + card branco arredondado)
 */
body.add-user-modal-open {
    overflow: hidden;
}

.add-user-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.add-user-modal[hidden] {
    display: none !important;
}

.add-user-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.add-user-modal__panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', system-ui, sans-serif;
}

.add-user-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.add-user-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.add-user-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.add-user-modal__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.add-user-modal__close:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

.add-user-modal__body {
    padding: 1.25rem 1.25rem 0.5rem;
    flex: 1;
}

.add-user-modal__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.add-user-modal__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.35rem;
}

.add-user-modal__field {
    margin-bottom: 1rem;
}

.add-user-modal__input,
.add-user-modal__select {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.add-user-modal__input:focus,
.add-user-modal__select:focus {
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
    outline: none;
}

.add-user-modal__btn-cancel {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.add-user-modal__btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.add-user-modal__btn-invite {
    border: none;
    background: var(--brand-green, #047857);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.add-user-modal__btn-invite:hover {
    background: var(--brand-green-hover, #065f46);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
}

.add-user-modal__btn-invite:focus-visible,
.add-user-modal__btn-cancel:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

@media (max-width: 400px) {
    .add-user-modal__footer {
        flex-direction: column-reverse;
    }

    .add-user-modal__footer .add-user-modal__btn-cancel,
    .add-user-modal__footer .add-user-modal__btn-invite {
        width: 100%;
    }
}
