.app-modal-root {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 16px;
}

.app-modal-root.is-open {
    display: flex;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.app-modal {
    position: relative;
    background: var(--color-surface);
    border-radius: 18px;
    max-width: 360px;
    width: 100%;
    padding: 20px 20px 16px 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    z-index: 1;
    animation: app-modal-pop 0.18s ease-out;
}

@keyframes app-modal-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.app-modal-title {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
    font-size: 17px;
}

.app-modal-body {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.app-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    flex-wrap: wrap;
}

.app-modal-actions .btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.app-modal-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.app-modal-actions .app-modal-ok {
    background: linear-gradient(135deg, #2563eb, var(--color-primary));
    color: #ffffff;
    border-color: var(--color-primary);
}

.app-modal-actions .app-modal-ok:hover {
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.35);
}

.app-modal-actions .app-modal-cancel {
    background: var(--color-bg-alt);
    color: var(--color-text);
}
