/* Modale globale — stile allineato a report_speed purchase-confirm */
.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 28, 0.58);
    backdrop-filter: blur(4px);
}

.app-modal-overlay.hidden {
    display: none;
}

body.app-modal-open {
    overflow: hidden;
}

.app-modal {
    width: min(100%, 420px);
    padding: 32px 28px 28px;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    animation: app-modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-modal__icon {
    font-size: 46px;
    line-height: 1;
    margin-bottom: 10px;
}

.app-modal__icon[hidden] {
    display: none;
}

.app-modal__title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text, #1a1a1a);
    line-height: 1.3;
}

.app-modal__message {
    margin: 0 0 22px;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text-muted, #636e72);
}

.app-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-modal__btn {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.app-modal__btn--primary {
    background: var(--primary, #4a7a85);
    color: #fff;
}

.app-modal__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(74, 122, 133, 0.35);
}

.app-modal__btn--danger {
    background: var(--error, #dc2626);
}

.app-modal__btn--danger:hover {
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.app-modal__btn--ghost {
    background: transparent;
    color: var(--text-muted, #636e72);
    font-weight: 500;
}

.app-modal__btn--ghost:hover {
    color: var(--text, #1a1a1a);
}

.app-modal-overlay--success .app-modal__icon {
    color: var(--success, #16a34a);
}

.app-modal-overlay--danger .app-modal__title {
    color: var(--error, #dc2626);
}

.app-modal-overlay--warning .app-modal__icon {
    color: var(--warning, #d97706);
}

@keyframes app-modal-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-modal {
        animation: none;
    }
}
